mirror of
https://github.com/gsantner/dandelion
synced 2024-11-25 05:42:10 +01:00
Merge extended notifications menu into main menu
This commit is contained in:
parent
cb811d8236
commit
aaa2445bef
3 changed files with 50 additions and 60 deletions
|
@ -679,6 +679,8 @@ public class MainActivity extends ThemedActivity
|
|||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
AppLog.v(this, "onCreateOptionsMenu()");
|
||||
boolean cache;
|
||||
|
||||
//Clear the menus
|
||||
menu.clear();
|
||||
toolbarBottom.getMenu().clear();
|
||||
|
@ -691,10 +693,10 @@ public class MainActivity extends ThemedActivity
|
|||
///Hide bottom _toolbar
|
||||
toolbarBottom.setVisibility(View.GONE);
|
||||
} else {
|
||||
getMenuInflater().inflate(_appSettings.isExtendedNotificationsActivated() ?
|
||||
R.menu.main__menu_top__notifications_dropdown : R.menu.main__menu_top, menu);
|
||||
getMenuInflater().inflate(R.menu.main__menu_bottom, toolbarBottom.getMenu());
|
||||
top.onCreateBottomOptionsMenu(toolbarBottom.getMenu(), getMenuInflater());
|
||||
cache = _appSettings.isExtendedNotificationsActivated();
|
||||
getMenuInflater().inflate(R.menu.main__menu_top, menu);
|
||||
menu.findItem(R.id.action_notifications).setVisible(!cache);
|
||||
menu.findItem(R.id.action_notifications_extended).setVisible(cache);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -10,6 +10,50 @@
|
|||
android:orderInCategory="100"
|
||||
android:title="@string/notifications"
|
||||
app:showAsAction="always" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_notifications_extended"
|
||||
android:icon="@drawable/ic_notifications_white_48px__layer"
|
||||
android:orderInCategory="100"
|
||||
android:title="@string/notifications"
|
||||
app:showAsAction="always">
|
||||
<menu>
|
||||
<item
|
||||
android:id="@+id/action_notifications_all"
|
||||
android:icon="@drawable/ic_dashboard_black_48px"
|
||||
android:title="@string/notifications__all" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_notifications_also_commented"
|
||||
android:icon="@drawable/ic_question_answer_black_48px"
|
||||
android:title="@string/notifications__also_commented" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_notifications_comment_on_post"
|
||||
android:icon="@drawable/ic_comment_black_48px"
|
||||
android:title="@string/notifications__comment_on_post" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_notifications_liked"
|
||||
android:icon="@drawable/ic_thumb_up_black_48px"
|
||||
android:title="@string/notifications__liked" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_notifications_mentioned"
|
||||
android:icon="@drawable/ic_person_pin_black_48px"
|
||||
android:title="@string/notifications__mentioned" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_notifications_reshared"
|
||||
android:icon="@drawable/ic_repeat_black_48px"
|
||||
android:title="@string/notifications__reshared" />
|
||||
<item
|
||||
android:id="@+id/action_notifications_started_sharing"
|
||||
android:icon="@drawable/ic_person_add_black_48px"
|
||||
android:title="@string/notifications__started_sharing" />
|
||||
</menu>
|
||||
</item>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_conversations"
|
||||
android:icon="@drawable/ic_mail_white_48px__layer"
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="com.github.dfa.diaspora_android22.activity.MainActivity"
|
||||
tools:ignore="AlwaysShowAction">
|
||||
|
||||
<item
|
||||
android:id="@+id/action_notifications"
|
||||
android:icon="@drawable/ic_notifications_white_48px__layer"
|
||||
android:orderInCategory="100"
|
||||
android:title="@string/notifications"
|
||||
app:showAsAction="always">
|
||||
<menu>
|
||||
<item
|
||||
android:id="@+id/action_notifications_all"
|
||||
android:icon="@drawable/ic_dashboard_black_48px"
|
||||
android:title="@string/notifications__all" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_notifications_also_commented"
|
||||
android:icon="@drawable/ic_question_answer_black_48px"
|
||||
android:title="@string/notifications__also_commented" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_notifications_comment_on_post"
|
||||
android:icon="@drawable/ic_comment_black_48px"
|
||||
android:title="@string/notifications__comment_on_post" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_notifications_liked"
|
||||
android:icon="@drawable/ic_thumb_up_black_48px"
|
||||
android:title="@string/notifications__liked" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_notifications_mentioned"
|
||||
android:icon="@drawable/ic_person_pin_black_48px"
|
||||
android:title="@string/notifications__mentioned" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_notifications_reshared"
|
||||
android:icon="@drawable/ic_repeat_black_48px"
|
||||
android:title="@string/notifications__reshared" />
|
||||
<item
|
||||
android:id="@+id/action_notifications_started_sharing"
|
||||
android:icon="@drawable/ic_person_add_black_48px"
|
||||
android:title="@string/notifications__started_sharing" />
|
||||
</menu>
|
||||
</item>
|
||||
<item
|
||||
android:id="@+id/action_conversations"
|
||||
android:icon="@drawable/ic_mail_white_48px__layer"
|
||||
android:orderInCategory="200"
|
||||
android:title="@string/conversations"
|
||||
app:showAsAction="always" />
|
||||
|
||||
</menu>
|
Loading…
Reference in a new issue