Update the add button

This commit is contained in:
Tommaso Berlose 2020-10-12 12:09:24 +02:00
parent 01d219d38c
commit 2bb30aae69
2 changed files with 16 additions and 26 deletions

View File

@ -1,10 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"
android:background="?android:attr/colorPrimary" android:background="?android:attr/colorPrimary"
tools:context=".ui.activities.MainActivity"> tools:context=".ui.activities.MainActivity">
<androidx.fragment.app.FragmentContainerView <androidx.fragment.app.FragmentContainerView
@ -13,30 +12,21 @@
app:defaultNavHost="true" app:defaultNavHost="true"
app:navGraph="@navigation/nav_graph" app:navGraph="@navigation/nav_graph"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="match_parent"/>
android:layout_weight="1"/>
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
<com.google.android.material.card.MaterialCardView android:layout_width="wrap_content"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_height="56dp"
android:visibility="gone"
app:cardBackgroundColor="@color/colorAccent"
app:cardCornerRadius="0dp"
android:id="@+id/action_add_widget" android:id="@+id/action_add_widget"
android:clickable="true" android:clickable="true"
android:focusable="true" android:focusable="true"
app:cardElevation="4dp"> android:visibility="gone"
<com.google.android.material.button.MaterialButton android:textColor="@android:color/white"
android:layout_width="match_parent" android:text="@string/add_widget"
android:layout_height="72dp" android:layout_alignParentEnd="true"
android:text="@string/add_widget" android:layout_alignParentBottom="true"
android:layout_marginTop="-8dp" android:layout_margin="16dp"
android:clickable="false" app:backgroundTint="@color/colorAccent"
android:focusable="false" app:icon="@drawable/round_add"
android:gravity="center" app:iconTint="@android:color/white"/>
android:textColor="@android:color/white" </RelativeLayout>
app:cornerRadius="0dp"
style="@style/Widget.MaterialComponents.Button.TextButton"/>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="app_name" translatable="false">Another Widget</string> <string name="app_name" translatable="false">Another Widget</string>
<string name="add_widget">Add</string> <string name="add_widget">Add Widget</string>
<!-- Display --> <!-- Display -->
<string name="settings_general_title">Display</string> <string name="settings_general_title">Display</string>