Improved color style menu

pull/199/head
M66B 4 years ago
parent 2e76898655
commit 80a2f93959

@ -178,9 +178,10 @@ public class StyleHelper {
public boolean onMenuItemClick(MenuItem item) { public boolean onMenuItemClick(MenuItem item) {
try { try {
int groupId = item.getGroupId(); int groupId = item.getGroupId();
int itemId = item.getItemId();
if (groupId == R.id.group_style_size) { if (groupId == R.id.group_style_size) {
return setSize(item); return setSize(item);
} else if (groupId == R.id.group_style_color) { } else if (itemId == R.id.menu_style_color) {
return setColor(item); return setColor(item);
} else if (groupId == R.id.group_style_font) { } else if (groupId == R.id.group_style_font) {
return setFont(item); return setFont(item);

@ -22,14 +22,15 @@
</menu> </menu>
</item> </item>
<group <item
android:id="@+id/group_style_color" android:id="@+id/menu_style_color"
android:orderInCategory="2"> android:icon="@drawable/twotone_palette_24"
<item android:orderInCategory="2"
android:id="@+id/menu_style_color" android:title="@string/title_color">
android:icon="@drawable/twotone_palette_24" <menu>
android:title="@string/title_style_color" /> <group android:id="@+id/group_style_color" />
</group> </menu>
</item>
<item <item
android:id="@+id/menu_style_font" android:id="@+id/menu_style_font"

@ -1080,7 +1080,6 @@
<string name="title_style_size_small">Small</string> <string name="title_style_size_small">Small</string>
<string name="title_style_size_medium">Medium</string> <string name="title_style_size_medium">Medium</string>
<string name="title_style_size_large">Large</string> <string name="title_style_size_large">Large</string>
<string name="title_style_color">Color &#8230;</string>
<string name="title_style_align">Align</string> <string name="title_style_align">Align</string>
<string name="title_style_align_start">Start</string> <string name="title_style_align_start">Start</string>
<string name="title_style_align_center">Center</string> <string name="title_style_align_center">Center</string>

Loading…
Cancel
Save