replace the big icon with a drawable layer list
This commit is contained in:
parent
bc02c56d25
commit
5f5803d1a7
|
@ -133,7 +133,7 @@ public class MainActivity extends SimpleActivity {
|
||||||
|
|
||||||
private void changeIconColor(int colorId, ImageView imageView) {
|
private void changeIconColor(int colorId, ImageView imageView) {
|
||||||
final int appColor = getResources().getColor(colorId);
|
final int appColor = getResources().getColor(colorId);
|
||||||
imageView.getDrawable().mutate().setColorFilter(appColor, PorterDuff.Mode.SRC_IN);
|
imageView.getDrawable().mutate().setColorFilter(appColor, PorterDuff.Mode.SRC_ATOP);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item
|
||||||
|
android:width="60dp"
|
||||||
|
android:height="60dp"
|
||||||
|
android:left="60dp"
|
||||||
|
android:top="60dp">
|
||||||
|
<shape
|
||||||
|
android:shape="oval">
|
||||||
|
<stroke
|
||||||
|
android:width="15dp"
|
||||||
|
android:color="@android:color/white"/>
|
||||||
|
<solid android:color="@android:color/transparent"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:width="120dp"
|
||||||
|
android:height="120dp"
|
||||||
|
android:left="30dp"
|
||||||
|
android:top="30dp">
|
||||||
|
<shape
|
||||||
|
android:shape="oval">
|
||||||
|
<stroke
|
||||||
|
android:width="15dp"
|
||||||
|
android:color="@android:color/white"/>
|
||||||
|
<solid android:color="@android:color/transparent"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:width="180dp"
|
||||||
|
android:height="180dp">
|
||||||
|
<shape
|
||||||
|
android:shape="oval">
|
||||||
|
<stroke
|
||||||
|
android:width="15dp"
|
||||||
|
android:color="@android:color/white"/>
|
||||||
|
<solid android:color="@android:color/transparent"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
</layer-list>
|
|
@ -13,7 +13,7 @@
|
||||||
android:id="@+id/toggle_btn"
|
android:id="@+id/toggle_btn"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:src="@mipmap/flashlight_big"/>
|
android:src="@drawable/circles"/>
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/bright_display_btn"
|
android:id="@+id/bright_display_btn"
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 14 KiB |
Binary file not shown.
Before Width: | Height: | Size: 10 KiB |
Binary file not shown.
Before Width: | Height: | Size: 25 KiB |
Binary file not shown.
Before Width: | Height: | Size: 39 KiB |
Binary file not shown.
Before Width: | Height: | Size: 68 KiB |
Loading…
Reference in New Issue