Improved FAB and added translation for showcase button

This commit is contained in:
Christian Basler 2017-08-14 19:51:16 +02:00
parent 4622ad68f0
commit 625848bd9d
6 changed files with 42 additions and 15 deletions

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="#55000000" />
<corners android:radius="5dp" />
</shape>
</item>
<item android:top="0.2dp" android:left="0.2dp" android:right="0.2dp" android:bottom="1dp">
<shape android:shape="rectangle">
<solid android:color="@color/colorAccent" />
<corners android:radius="5dp" />
</shape>
</item>
</layer-list>

View File

@ -8,7 +8,7 @@
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="0dp"
android:layout_height="?attr/actionBarSize"
android:layout_height="64dp"
android:background="?attr/colorPrimary"
android:elevation="4dp"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
@ -17,22 +17,21 @@
app:layout_constraintTop_toTopOf="parent"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
tools:ignore="UnusedAttribute"
tools:layout_editor_absoluteX="8dp" />
tools:layout_editor_absoluteX="0dp" />
<android.support.constraint.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.382" />
app:layout_constraintGuide_percent="0.382"
tools:layout_editor_absoluteX="306dp"
tools:layout_editor_absoluteY="0dp" />
<FrameLayout
android:id="@+id/item_list"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/toolbar"
android:background="@drawable/bg_white"
android:elevation="2dp"
app:layout_constraintBottom_toBottomOf="parent"
@ -40,8 +39,9 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/toolbar"
tools:context=".MessageListActivity"
tools:ignore="UnusedAttribute"
tools:layout="@layout/fragment_message_list"
tools:ignore="UnusedAttribute" />
tools:layout_editor_absoluteX="0dp" />
<FrameLayout
android:id="@+id/message_detail_container"
@ -56,14 +56,22 @@
app:layout_constraintStart_toEndOf="@+id/guideline"
app:layout_constraintTop_toBottomOf="@+id/toolbar"
tools:ignore="InconsistentLayout"
tools:layout="@layout/fragment_message_detail" />
tools:layout="@layout/fragment_message_detail"
tools:layout_editor_absoluteX="306dp" />
<io.github.kobakei.materialfabspeeddial.FabSpeedDial
android:id="@+id/fab"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_width="0dp"
android:layout_height="0dp"
android:elevation="4dp"
app:fab_miniFabTextBackground="@drawable/mini_fab_text_background"
app:fab_miniFabTextColor="@color/colorPrimaryDarkText"
app:fab_useTouchGuard="true"
app:fab_miniFabTextBackground="@color/colorAccent"
app:fab_miniFabTextColor="@color/colorPrimaryDarkText" />
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="UnusedAttribute"
tools:layout_editor_absoluteX="8dp" />
</android.support.constraint.ConstraintLayout>

View File

@ -29,7 +29,9 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
app:fab_useTouchGuard="true"
app:fab_miniFabTextBackground="@color/colorAccent"
app:fab_miniFabTextColor="@color/colorPrimaryDarkText" />
android:elevation="4dp"
app:fab_miniFabTextBackground="@drawable/mini_fab_text_background"
app:fab_miniFabTextColor="@color/colorPrimaryDarkText"
tools:ignore="UnusedAttribute" />
</RelativeLayout>

View File

@ -3,7 +3,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/material_showcase_button_bg"
android:text="Got it"
android:text="@string/got_it"
android:textAllCaps="true"
android:textColor="@android:color/white"
android:textSize="13sp"

View File

@ -123,4 +123,5 @@ Als Alternative kann in den Einstellungen ein vertrauenswürdiger Knoten konfigu
<string name="export_data_summary">Alle Nachrichten und Kontakte exportieren (aber keine Identitäten)</string>
<string name="request_acknowledgements">Bestätigungen verlangen</string>
<string name="request_acknowledgements_summary">Bestätigungen stellen sicher dass eine Nachricht empfangen wurde, benötigen aber zusätzliche Zeit zum versenden</string>
<string name="got_it">Alles klar</string>
</resources>

View File

@ -122,4 +122,5 @@ As an alternative you could configure a trusted node in the settings, but as of
<string name="export_data_summary">Export all messages and contacts (but not identities)</string>
<string name="request_acknowledgements">Request acknowledgements</string>
<string name="request_acknowledgements_summary">Acknowledges allow making sure a message was received, but require additional time to send</string>
<string name="got_it">Got it</string>
</resources>