mirror of
https://github.com/gsantner/dandelion
synced 2025-12-09 05:41:12 +01:00
Top toolbar with overflow icons and light/dark theme
This commit is contained in:
parent
aaa2445bef
commit
a96e91aefb
14 changed files with 108 additions and 119 deletions
|
|
@ -28,22 +28,5 @@
|
|||
android:layout_height="fill_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:theme="@style/AppTheme.AppBarOverlay"
|
||||
app:layout_behavior="com.github.dfa.diaspora_android.ui.BottomBarBehavior">
|
||||
|
||||
<android.support.v7.widget.ActionMenuView
|
||||
android:id="@+id/main__bottombar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:background="@color/colorPrimary"
|
||||
android:theme="@style/BottomToolbarMenuOverflowStyle"
|
||||
app:layout_scrollFlags="scroll|enterAlways|snap"
|
||||
app:popupTheme="@style/Theme.AppCompat.NoActionBar" />
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
|
@ -4,29 +4,5 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:ignore="AlwaysShowAction">
|
||||
|
||||
<item
|
||||
android:icon="@drawable/ic_share_white_48px"
|
||||
android:orderInCategory="300"
|
||||
android:title="@string/action_share_dotdotdot"
|
||||
app:showAsAction="always">
|
||||
<menu>
|
||||
<item
|
||||
android:id="@+id/action_share_screenshot"
|
||||
android:title="@string/share__share_screenshot" />
|
||||
<item
|
||||
android:id="@+id/action_take_screenshot"
|
||||
android:title="@string/share__take_screenshot" />
|
||||
<item
|
||||
android:id="@+id/action_share_link"
|
||||
android:title="@string/share__share_link_as_text" />
|
||||
</menu>
|
||||
</item>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_go_to_top"
|
||||
android:icon="@drawable/ic_arrow_upward_white_48px"
|
||||
android:orderInCategory="400"
|
||||
android:title="@string/action_go_to_top"
|
||||
app:showAsAction="always" />
|
||||
|
||||
</menu>
|
||||
|
|
@ -1,10 +1,36 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:icon="@drawable/ic_share_white_48px"
|
||||
android:orderInCategory="300"
|
||||
android:title="@string/action_share_dotdotdot"
|
||||
app:showAsAction="never">
|
||||
<menu>
|
||||
<item
|
||||
android:id="@+id/action_share_screenshot"
|
||||
android:title="@string/share__share_screenshot" />
|
||||
<item
|
||||
android:id="@+id/action_take_screenshot"
|
||||
android:title="@string/share__take_screenshot" />
|
||||
<item
|
||||
android:id="@+id/action_share_link"
|
||||
android:title="@string/share__share_link_as_text" />
|
||||
</menu>
|
||||
</item>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_go_to_top"
|
||||
android:icon="@drawable/ic_arrow_upward_white_48px"
|
||||
android:orderInCategory="400"
|
||||
android:title="@string/action_go_to_top"
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_reload"
|
||||
android:icon="@drawable/ic_refresh_white_48px"
|
||||
android:orderInCategory="1000"
|
||||
android:title="@string/reload"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="never" />
|
||||
</menu>
|
||||
|
|
@ -29,4 +29,13 @@
|
|||
<item name="android:textColor">@color/accent</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.PopupOverlay.Light" parent="ThemeOverlay.AppCompat.Light">
|
||||
<item name="android:colorBackground">@color/white</item>
|
||||
<item name="android:textColor">@color/black</item>
|
||||
</style>
|
||||
<style name="AppTheme.PopupOverlay.Dark" parent="ThemeOverlay.AppCompat.Dark">
|
||||
<item name="android:colorBackground">@color/black</item>
|
||||
<item name="android:textColor">@color/white</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue