Skip to content

Commit

Permalink
default tile mode CLAMP
Browse files Browse the repository at this point in the history
  • Loading branch information
AnupKumarPanwar committed Mar 23, 2019
1 parent 3291f69 commit 406a78e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
android:id="@+id/scratch_view"
android:layout_width="300dp"
android:layout_height="300dp"
app:overlay_image="@drawable/scratch_card"
app:tile_mode="CLAMP"
app:overlay_width="300dp"
app:overlay_height="300dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ private void init() {


String tileMode = arr.getString(R.styleable.ScratchView_tile_mode);
if (tileMode == null) {
tileMode = "CLAMP";
}

Bitmap scratchBitmap = BitmapFactory.decodeResource(getResources(), overlayImage);
scratchBitmap = Bitmap.createScaledBitmap(scratchBitmap, (int) overlayWidth, (int) overlayHeight, false);
Expand Down

0 comments on commit 406a78e

Please sign in to comment.