Add Snackbar and Toolbar Button to Forum List
This commit is a small change that replaces the custom UI elements in the forum list with a Snackbar and an Toolbar menu. Addresses one part (2b) of #305
|
Before Width: | Height: | Size: 716 B |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 583 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 830 B |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
@@ -22,15 +22,13 @@
|
||||
<FrameLayout
|
||||
android:id="@+id/content_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/default_background"/>
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/container_progress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:background="@color/default_background"
|
||||
android:visibility="invisible"
|
||||
tools:visibility="visible">
|
||||
|
||||
|
||||
12
briar-android/res/menu/forum_list_actions.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?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:id="@+id/action_create_forum"
|
||||
android:icon="@drawable/ic_add_white"
|
||||
android:title="@string/create_forum_button"
|
||||
app:showAsAction="ifRoom"/>
|
||||
|
||||
</menu>
|
||||
@@ -31,10 +31,11 @@
|
||||
<color name="briar_text_primary_inverse">#ffffff</color>
|
||||
<color name="briar_text_secondary">#333333</color>
|
||||
<color name="briar_text_tertiary">#333333</color>
|
||||
<color name="briar_button_positive">#06b9ff</color>
|
||||
<color name="briar_button_negative">#ff0000</color>
|
||||
|
||||
<!-- this is needed as preference_category_material layout uses this color as the text color -->
|
||||
<color name="preference_fallback_accent_color">@color/briar_accent</color>
|
||||
<color name="default_background">#ffffff</color>
|
||||
<color name="default_separator">#000000</color>
|
||||
<color name="default_separator_inverted">#ffffff</color>
|
||||
<color name="menu_background">#FFFFFF</color>
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
<item quantity="one">%d forum shared by contacts</item>
|
||||
<item quantity="other">%d forums shared by contacts</item>
|
||||
</plurals>
|
||||
<string name="show_forums">Show</string>
|
||||
<string name="unsubscribe">Unsubscribe</string>
|
||||
<string name="unsubscribed_toast">Unsubscribed</string>
|
||||
<string name="no_forum_posts">No posts</string>
|
||||
|
||||
@@ -67,13 +67,13 @@
|
||||
<style name="BriarButton.Default"/>
|
||||
|
||||
<style name="BriarButtonFlat.Negative" parent="Widget.AppCompat.Button.Borderless">
|
||||
<item name="android:textColor">#ff0000</item>
|
||||
<item name="android:textColor">@color/briar_button_negative</item>
|
||||
<item name="android:textSize">@dimen/text_size_medium</item>
|
||||
<item name="android:padding">@dimen/margin_large</item>
|
||||
</style>
|
||||
|
||||
<style name="BriarButtonFlat.Positive" parent="Widget.AppCompat.Button.Borderless">
|
||||
<item name="android:textColor">#06b9ff</item>
|
||||
<item name="android:textColor">@color/briar_button_positive</item>
|
||||
<item name="android:textSize">@dimen/text_size_medium</item>
|
||||
<item name="android:padding">@dimen/margin_large</item>
|
||||
</style>
|
||||
|
||||