Added insert link to media/style toolbar

pull/185/head
M66B 4 years ago
parent a242ab9eff
commit 8937c77ab3

@ -479,7 +479,7 @@ public class FragmentCompose extends FragmentBase {
if (style != styling) {
styling = style;
media_bar.getMenu().clear();
media_bar.inflateMenu(styling ? R.menu.action_compose_style : R.menu.action_compose_media);
media_bar.inflateMenu(styling ? R.menu.action_compose_style_alt : R.menu.action_compose_media);
}
}
}, 20);
@ -1531,7 +1531,7 @@ public class FragmentCompose extends FragmentBase {
prefs.edit().putBoolean("compose_media", media).apply();
media_bar.setVisibility(media ? View.VISIBLE : View.GONE);
media_bar.getMenu().clear();
media_bar.inflateMenu(media && etBody.hasSelection() ? R.menu.action_compose_style : R.menu.action_compose_media);
media_bar.inflateMenu(media && etBody.hasSelection() ? R.menu.action_compose_style_alt : R.menu.action_compose_media);
}
private void onMenuCompact() {

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/menu_bold"
android:icon="@drawable/baseline_format_bold_24"
android:title="@string/title_style_bold" />
<item
android:id="@+id/menu_italic"
android:icon="@drawable/baseline_format_italic_24"
android:title="@string/title_style_italic" />
<item
android:id="@+id/menu_underline"
android:icon="@drawable/baseline_format_underlined_24"
android:title="@string/title_style_underline" />
<item
android:id="@+id/menu_style"
android:icon="@drawable/baseline_text_format_24"
android:title="@string/title_style" />
<item
android:id="@+id/menu_link"
android:icon="@drawable/baseline_insert_link_45_24"
android:title="@string/title_style_link" />
</menu>
Loading…
Cancel
Save