Cherish: add more FOD icons [2/2]
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
BIN
res/drawable/fod_icon_gxzw.webp
Normal file
BIN
res/drawable/fod_icon_gxzw.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.0 KiB |
BIN
res/drawable/fod_icon_light.png
Normal file
BIN
res/drawable/fod_icon_light.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@@ -341,7 +341,17 @@
|
||||
android:id="@+id/fodicon25_button"
|
||||
android:layout_width="@dimen/fod_picker_item_size"
|
||||
android:layout_height="@dimen/fod_picker_item_size"
|
||||
android:src="@drawable/fod_icon_transparent"
|
||||
android:src="@drawable/fod_icon_light"
|
||||
android:scaleType="centerInside"
|
||||
android:padding="@dimen/fod_picker_item_padding"
|
||||
android:layout_margin="@dimen/fod_picker_item_margin"
|
||||
android:background="@drawable/fod_picker_item_background"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/fodicon26_button"
|
||||
android:layout_width="@dimen/fod_picker_item_size"
|
||||
android:layout_height="@dimen/fod_picker_item_size"
|
||||
android:src="@drawable/fod_icon_gxzw"
|
||||
android:scaleType="centerInside"
|
||||
android:padding="@dimen/fod_picker_item_padding"
|
||||
android:layout_margin="@dimen/fod_picker_item_margin"
|
||||
@@ -349,4 +359,23 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/fodicon27_button"
|
||||
android:layout_width="@dimen/fod_picker_item_size"
|
||||
android:layout_height="@dimen/fod_picker_item_size"
|
||||
android:src="@drawable/fod_icon_transparent"
|
||||
android:scaleType="centerInside"
|
||||
android:padding="@dimen/fod_picker_item_padding"
|
||||
android:layout_margin="@dimen/fod_picker_item_margin"
|
||||
android:background="@drawable/fod_picker_item_background"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -71,6 +71,8 @@ public class FODIconPicker extends LayoutPreference {
|
||||
private static ImageButton Button23;
|
||||
private static ImageButton Button24;
|
||||
private static ImageButton Button25;
|
||||
private static ImageButton Button26;
|
||||
private static ImageButton Button27;
|
||||
|
||||
private static final String TAG = "FODIconPicker";
|
||||
|
||||
@@ -136,6 +138,8 @@ public class FODIconPicker extends LayoutPreference {
|
||||
Button23 = findViewById(R.id.fodicon23_button);
|
||||
Button24 = findViewById(R.id.fodicon24_button);
|
||||
Button25 = findViewById(R.id.fodicon25_button);
|
||||
Button26 = findViewById(R.id.fodicon26_button);
|
||||
Button27 = findViewById(R.id.fodicon27_button);
|
||||
|
||||
int defaultfodicon = Settings.System.getInt(
|
||||
context.getContentResolver(), Settings.System.FOD_ICON, 0);
|
||||
@@ -191,6 +195,10 @@ public class FODIconPicker extends LayoutPreference {
|
||||
updateHighlightedItem(Button24, context);
|
||||
} else if (defaultfodicon == 25) {
|
||||
updateHighlightedItem(Button25, context);
|
||||
} else if (defaultfodicon == 26) {
|
||||
updateHighlightedItem(Button25, context);
|
||||
} else if (defaultfodicon == 27) {
|
||||
updateHighlightedItem(Button25, context);
|
||||
}
|
||||
|
||||
Button0.setOnClickListener(new View.OnClickListener() {
|
||||
@@ -375,6 +383,20 @@ public class FODIconPicker extends LayoutPreference {
|
||||
updateHighlightedItem(Button25, context);
|
||||
}
|
||||
});
|
||||
Button26.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
updateSettings(26, context);
|
||||
updateHighlightedItem(Button26, context);
|
||||
}
|
||||
});
|
||||
Button27.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
updateSettings(27, context);
|
||||
updateHighlightedItem(Button27, context);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void updateSettings(int fodicon, Context context) {
|
||||
@@ -410,6 +432,8 @@ public class FODIconPicker extends LayoutPreference {
|
||||
Button23.setBackgroundTintList(defaulttint);
|
||||
Button24.setBackgroundTintList(defaulttint);
|
||||
Button25.setBackgroundTintList(defaulttint);
|
||||
Button26.setBackgroundTintList(defaulttint);
|
||||
Button27.setBackgroundTintList(defaulttint);
|
||||
activebutton.setBackgroundTintList(Utils.getColorAttr(getContext(), android.R.attr.colorAccent));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user