Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
KishanViramgama authored Feb 25, 2021
1 parent 9dfb603 commit c12c7ac
Showing 1 changed file with 2 additions and 40 deletions.
42 changes: 2 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Drawing

<img src="https://github.com/KishanViramgama/Drawing/blob/master/app/src/main/res/drawable/app_demo.gif" height="368px" align="right" style="max-width:100%;">
<img src="https://github.com/KishanViramgama/Drawing/blob/master/app_demo.gif" height="368px" align="right" style="max-width:100%;">

<b>Gradle</b>

Expand All @@ -22,42 +22,4 @@ dependencies {
}
</pre>

<RelativeLayout
android:id="@+id/relativeLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/toolbar"
android:background="@color/white">

<com.app.drawing.Util.CanvasView
android:id="@+id/canvas_drawing"
app:paintColor="@color/colorPrimary"
app:paintStork="10"
android:layout_width="match_parent"
android:layout_height="match_parent" />

<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/app_name"
android:src="@mipmap/ic_app_icon" />

</RelativeLayout>

</pre>

<b>java file</b>

<pre>
private CanvasView customCanvas = findViewById(R.id.canvas_drawing);
ImageView imageView = findViewById(R.id.imageView);

Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.image);
imageView.setImageBitmap(bitmap);

customCanvas.paintColor(getResources().getColor(R.color.colorAccent));
customCanvas.paintStork(20);
customCanvas.clear();
</pre>


0 comments on commit c12c7ac

Please sign in to comment.