Cherish: Add more FOD icons [2/2]
Signed-off-by: Ayan Mukherjee <mukherjeeayan725@gmail.com> Change-Id: I1f145a081430bcca164dc137747e7d5b90d4387b Signed-off-by: Ayan Mukherjee <mukherjeeayan725@gmail.com> 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 |
@@ -344,7 +344,17 @@
|
|||||||
android:id="@+id/fodicon25_button"
|
android:id="@+id/fodicon25_button"
|
||||||
android:layout_width="@dimen/fod_picker_item_size"
|
android:layout_width="@dimen/fod_picker_item_size"
|
||||||
android:layout_height="@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:scaleType="centerInside"
|
||||||
android:padding="@dimen/fod_picker_item_padding"
|
android:padding="@dimen/fod_picker_item_padding"
|
||||||
android:layout_margin="@dimen/fod_picker_item_margin"
|
android:layout_margin="@dimen/fod_picker_item_margin"
|
||||||
@@ -352,4 +362,21 @@
|
|||||||
|
|
||||||
</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>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -71,6 +71,8 @@ public class FODIconPicker extends LayoutPreference {
|
|||||||
private static ImageButton Button23;
|
private static ImageButton Button23;
|
||||||
private static ImageButton Button24;
|
private static ImageButton Button24;
|
||||||
private static ImageButton Button25;
|
private static ImageButton Button25;
|
||||||
|
private static ImageButton Button26;
|
||||||
|
private static ImageButton Button27;
|
||||||
|
|
||||||
private static final String TAG = "FODIconPicker";
|
private static final String TAG = "FODIconPicker";
|
||||||
|
|
||||||
@@ -136,6 +138,8 @@ public class FODIconPicker extends LayoutPreference {
|
|||||||
Button23 = findViewById(R.id.fodicon23_button);
|
Button23 = findViewById(R.id.fodicon23_button);
|
||||||
Button24 = findViewById(R.id.fodicon24_button);
|
Button24 = findViewById(R.id.fodicon24_button);
|
||||||
Button25 = findViewById(R.id.fodicon25_button);
|
Button25 = findViewById(R.id.fodicon25_button);
|
||||||
|
Button26 = findViewById(R.id.fodicon26_button);
|
||||||
|
Button27 = findViewById(R.id.fodicon27_button);
|
||||||
|
|
||||||
int defaultfodicon = Settings.System.getInt(
|
int defaultfodicon = Settings.System.getInt(
|
||||||
context.getContentResolver(), Settings.System.FOD_ICON, 0);
|
context.getContentResolver(), Settings.System.FOD_ICON, 0);
|
||||||
@@ -191,6 +195,10 @@ public class FODIconPicker extends LayoutPreference {
|
|||||||
updateHighlightedItem(Button24, context);
|
updateHighlightedItem(Button24, context);
|
||||||
} else if (defaultfodicon == 25) {
|
} else if (defaultfodicon == 25) {
|
||||||
updateHighlightedItem(Button25, context);
|
updateHighlightedItem(Button25, context);
|
||||||
|
} else if (defaultfodicon == 26) {
|
||||||
|
updateHighlightedItem(Button25, context);
|
||||||
|
} else if (defaultfodicon == 27) {
|
||||||
|
updateHighlightedItem(Button25, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
Button0.setOnClickListener(new View.OnClickListener() {
|
Button0.setOnClickListener(new View.OnClickListener() {
|
||||||
@@ -375,6 +383,20 @@ public class FODIconPicker extends LayoutPreference {
|
|||||||
updateHighlightedItem(Button25, context);
|
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) {
|
private void updateSettings(int fodicon, Context context) {
|
||||||
@@ -410,6 +432,8 @@ public class FODIconPicker extends LayoutPreference {
|
|||||||
Button23.setBackgroundTintList(defaulttint);
|
Button23.setBackgroundTintList(defaulttint);
|
||||||
Button24.setBackgroundTintList(defaulttint);
|
Button24.setBackgroundTintList(defaulttint);
|
||||||
Button25.setBackgroundTintList(defaulttint);
|
Button25.setBackgroundTintList(defaulttint);
|
||||||
|
Button26.setBackgroundTintList(defaulttint);
|
||||||
|
Button27.setBackgroundTintList(defaulttint);
|
||||||
activebutton.setBackgroundTintList(Utils.getColorAttr(getContext(), android.R.attr.colorAccent));
|
activebutton.setBackgroundTintList(Utils.getColorAttr(getContext(), android.R.attr.colorAccent));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user