1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2025-12-09 13:51:18 +01:00

toolbar/actions/menu changes, replaced fab

This commit is contained in:
Gregor Santner 2016-06-04 17:10:24 +02:00
parent 234335e696
commit f7ce310703
8 changed files with 177 additions and 179 deletions

View file

@ -14,7 +14,7 @@
android:layout_height="match_parent" />
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:id="@+id/main__navigaion_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"

View file

@ -24,56 +24,19 @@
<include layout="@layout/main__content" />
<com.getbase.floatingactionbutton.FloatingActionsMenu
android:id="@+id/fab_menubutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_gravity="bottom|end"
android:layout_marginBottom="4dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:visibility="gone"
app:layout_behavior=".ui.FloatingActionsMenuBehavior"
fab:fab_addButtonColorNormal="@color/fab_big"
fab:fab_addButtonColorPressed="@color/fab_big_pressed"
fab:fab_addButtonPlusIconColor="@color/white"
fab:fab_labelStyle="@style/menu_labels_style">
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_top"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="fab3_click"
fab:fab_colorNormal="@color/fab_small"
fab:fab_colorPressed="@color/fab_small_pressed"
fab:fab_icon="@drawable/fab_top"
fab:fab_labelStyle="@style/menu_labels_style"
fab:fab_size="mini"
fab:fab_title="@string/fab3_title" />
<android.support.v7.widget.ActionMenuView
android:id="@+id/toolbar2"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="fab2_click"
fab:fab_colorNormal="@color/fab_small"
fab:fab_colorPressed="@color/fab_small_pressed"
fab:fab_icon="@drawable/fab_search"
fab:fab_labelStyle="@style/menu_labels_style"
fab:fab_size="mini"
fab:fab_title="@string/fab2_title" />
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_compose"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="fab1_click"
fab:fab_colorNormal="@color/fab_small"
fab:fab_colorPressed="@color/fab_small_pressed"
fab:fab_icon="@drawable/fab_compose"
fab:fab_size="mini"
fab:fab_title="@string/fab1_title" />
</com.getbase.floatingactionbutton.FloatingActionsMenu>
</android.support.design.widget.AppBarLayout>
</android.support.design.widget.CoordinatorLayout>

View file

@ -0,0 +1,53 @@
<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=".activity.MainActivity">
<item
android:id="@+id/action_search"
android:icon="@drawable/fab_search"
app:showAsAction="always"
android:title="@string/search_by_tags_or_persons" />
<item
android:id="@+id/action_compose"
android:icon="@drawable/fab_compose"
app:showAsAction="always"
android:title="@string/compose" />
<item
android:id="@+id/action_share"
android:icon="@drawable/ic_share_white_24dp"
android:title="@string/jb_share"
app:showAsAction="always" />
<!--
<item
android:id="@+id/action_share2"
android:icon="@drawable/ic_share_white_24dp"
android:title="@string/jb_share"
app:showAsAction="always" >
<menu>
<item android:id="@+id/item1" android:title="@string/search_alert_people"></item>
<item android:id="@+id/item2" android:title="@string/search_alert_tag"></item>
</menu>
</item> -->
<!-- Keep right most -->
<item
android:id="@+id/action_go_to_top"
android:icon="@drawable/fab_top"
android:title="@string/go_to_top"
app:showAsAction="always"/>
<!-- overflow menu -->
<item
android:id="@+id/action_exit"
android:icon="@drawable/ic_sync_white_24dp"
android:title="@string/exit_app"
app:showAsAction="never" />
</menu>

View file

@ -1,7 +1,7 @@
<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_android.activity.MainActivity">
tools:context=".activity.MainActivity">
<item
android:id="@+id/action_notifications"
@ -15,16 +15,4 @@
android:title="@string/messages"
app:showAsAction="always" />
<item
android:id="@+id/action_share"
android:icon="@drawable/ic_share_white_24dp"
android:title="@string/jb_share"
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_exit"
android:icon="@drawable/ic_sync_white_24dp"
android:title="@string/exit_app"
app:showAsAction="never" />
</menu>

View file

@ -48,9 +48,9 @@
// Floating Action Buttons - Titles
<string name="fab3_title">Nach oben scrollen</string>
<string name="fab2_title">Suche nach Tags oder Personen …</string>
<string name="fab1_title">Neuer Beitrag</string>
<string name="go_to_top">Nach oben scrollen</string>
<string name="search_by_tags_or_persons">Suche nach Tags oder Personen …</string>
<string name="compose">Neuer Beitrag</string>
<string name="search_alert_title">Suche</string>
<string name="search_alert_tag">nach Tags</string>
@ -147,8 +147,8 @@ along with this program. If not, see http://www.gnu.org/licenses.&lt;br> &lt;br
&lt;i>Die Bilder des Startbildschirms können auf Flickr gefunden werden:
https://www.flickr.com/photos/129581906@N06/sets/72157651933980136/with/16594947123.
Sie wurden von \"Lydia\" veröffentlicht und stehen unter der cc by-nc-sa Lizenz.&lt;/i></string>
<string name="fab2_title_person">Suche nach Personen …</string>
<string name="fab2_title_tag">Suche nach Tags …</string>
<string name="search_by_person">Suche nach Personen …</string>
<string name="search_by_tag">Suche nach Tags …</string>
<string name="splash_screen_description">Startbildschirm</string>
<string name="new_conversations">Ungelesene Unterhaltung. Öffnen?</string>
<string name="new_notifications">Ungelesene Benachrichtigung. Lesen?</string>

View file

@ -81,11 +81,11 @@
// Floating Action Buttons - Titles
<string name="fab3_title">Go to top</string>
<string name="fab2_title">Search by tags or persons</string>
<string name="fab2_title_tag">Search for tag …</string>
<string name="fab2_title_person">Search for person …</string>
<string name="fab1_title">New message</string>
<string name="go_to_top">Go to top</string>
<string name="search_by_tags_or_persons">Search by tags or persons</string>
<string name="search_by_tag">Search for tag …</string>
<string name="search_by_person">Search for person …</string>
<string name="compose">New message</string>
<string name="search_alert_title">Search</string>