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) {
try {
int groupId = item.getGroupId();
int itemId = item.getItemId();
if (groupId == R.id.group_style_size) {
return setSize(item);
} else if (groupId == R.id.group_style_color) {
} else if (itemId == R.id.menu_style_color) {
return setColor(item);
} else if (groupId == R.id.group_style_font) {
return setFont(item);

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

@ -1080,7 +1080,6 @@
<string name="title_style_size_small">Small</string>
<string name="title_style_size_medium">Medium</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_start">Start</string>
<string name="title_style_align_center">Center</string>

Loading…
Cancel
Save