mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-13 12:33:42 +02:00
Styled FABs and actions
This commit is contained in:
5
app/src/main/res/color/action_foreground.xml
Normal file
5
app/src/main/res/color/action_foreground.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="?attr/colorActionForegroundDisabled" android:state_enabled="false" />
|
||||
<item android:color="?attr/colorActionForeground" />
|
||||
</selector>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@color/colorActionForegroundDisabled" android:state_enabled="false" />
|
||||
<item android:color="@color/colorActionForeground" />
|
||||
</selector>
|
||||
@@ -48,9 +48,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_margin="@dimen/fab_padding"
|
||||
android:tint="@color/colorActionForeground"
|
||||
android:tint="?attr/colorFabForeground"
|
||||
android:tooltipText="@string/title_compose"
|
||||
app:backgroundTint="?attr/colorAccent"
|
||||
app:backgroundTint="?attr/colorFabBackground"
|
||||
app:srcCompat="@drawable/baseline_edit_24" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
@@ -59,8 +59,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_margin="@dimen/fab_padding"
|
||||
android:tint="@color/colorActionForeground"
|
||||
android:tint="?attr/colorFabForeground"
|
||||
android:tooltipText="@string/title_add"
|
||||
app:backgroundTint="?attr/colorAccent"
|
||||
app:backgroundTint="?attr/colorFabBackground"
|
||||
app:srcCompat="@drawable/baseline_add_24" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
@@ -73,8 +73,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:itemIconTint="@color/bottomnav_foreground"
|
||||
app:itemTextColor="@color/bottomnav_foreground"
|
||||
app:itemIconTint="@color/action_foreground"
|
||||
app:itemTextColor="@color/action_foreground"
|
||||
app:labelVisibilityMode="labeled"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -48,8 +48,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_margin="@dimen/fab_padding"
|
||||
android:tint="@color/colorActionForeground"
|
||||
android:tint="?attr/colorFabForeground"
|
||||
android:tooltipText="@string/title_add"
|
||||
app:backgroundTint="?attr/colorAccent"
|
||||
app:backgroundTint="?attr/colorFabBackground"
|
||||
app:srcCompat="@drawable/baseline_add_24" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
@@ -416,9 +416,9 @@
|
||||
android:id="@+id/edit_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:background="?attr/colorSeparator"
|
||||
app:itemIconTint="@color/bottomnav_foreground"
|
||||
app:itemTextColor="@color/bottomnav_foreground"
|
||||
android:background="?attr/colorActionBackground"
|
||||
app:itemIconTint="@color/action_foreground"
|
||||
app:itemTextColor="@color/action_foreground"
|
||||
app:labelVisibilityMode="unlabeled"
|
||||
app:layout_constraintBottom_toTopOf="@+id/bottom_navigation"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -430,8 +430,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:itemIconTint="@color/bottomnav_foreground"
|
||||
app:itemTextColor="@color/bottomnav_foreground"
|
||||
app:itemIconTint="@color/action_foreground"
|
||||
app:itemTextColor="@color/action_foreground"
|
||||
app:labelVisibilityMode="labeled"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -128,9 +128,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_margin="@dimen/fab_padding"
|
||||
android:tint="@color/colorActionForeground"
|
||||
android:tint="?attr/colorFabForeground"
|
||||
android:tooltipText="@string/title_add"
|
||||
app:backgroundTint="?attr/colorAccent"
|
||||
app:backgroundTint="?attr/colorFabBackground"
|
||||
app:srcCompat="@drawable/baseline_create_new_folder_24" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
@@ -139,7 +139,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:layout_margin="@dimen/fab_padding"
|
||||
android:tint="@color/colorActionForeground"
|
||||
android:tint="?attr/colorFabForeground"
|
||||
android:tooltipText="@string/title_compose"
|
||||
app:backgroundTint="@color/colorError"
|
||||
app:srcCompat="@drawable/baseline_warning_24" />
|
||||
|
||||
@@ -48,8 +48,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_margin="@dimen/fab_padding"
|
||||
android:tint="@color/colorActionForeground"
|
||||
android:tint="?attr/colorFabForeground"
|
||||
android:tooltipText="@string/title_add"
|
||||
app:backgroundTint="?attr/colorAccent"
|
||||
app:backgroundTint="?attr/colorFabBackground"
|
||||
app:srcCompat="@drawable/baseline_add_24" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
@@ -182,7 +182,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_margin="@dimen/fab_padding"
|
||||
android:tint="@color/colorActionForeground"
|
||||
android:tint="?attr/colorFabForeground"
|
||||
app:backgroundTint="?attr/colorFabBackground"
|
||||
app:layout_constraintBottom_toTopOf="@+id/sbThread"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:srcCompat="@drawable/baseline_reply_24" />
|
||||
@@ -263,8 +264,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:itemIconTint="@color/bottomnav_foreground"
|
||||
app:itemTextColor="@color/bottomnav_foreground"
|
||||
app:itemIconTint="@color/action_foreground"
|
||||
app:itemTextColor="@color/action_foreground"
|
||||
app:labelVisibilityMode="unlabeled"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -310,9 +311,9 @@
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_marginEnd="@dimen/fab_padding"
|
||||
android:layout_marginBottom="90dp"
|
||||
android:tint="@color/colorActionForeground"
|
||||
android:tint="?attr/colorFabForeground"
|
||||
android:tooltipText="@string/title_more"
|
||||
app:backgroundTint="?attr/colorAccent"
|
||||
app:backgroundTint="?attr/colorFabBackground"
|
||||
app:srcCompat="@drawable/baseline_more_vert_24" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
@@ -321,9 +322,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_margin="@dimen/fab_padding"
|
||||
android:tint="@color/colorActionForeground"
|
||||
android:tint="?attr/colorFabForeground"
|
||||
android:tooltipText="@string/title_search_server"
|
||||
app:backgroundTint="?attr/colorAccent"
|
||||
app:backgroundTint="?attr/colorFabBackground"
|
||||
app:srcCompat="@drawable/baseline_youtube_searched_for_24" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
@@ -332,9 +333,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_margin="@dimen/fab_padding"
|
||||
android:tint="@color/colorActionForeground"
|
||||
android:tint="?attr/colorFabForeground"
|
||||
android:tooltipText="@string/title_compose"
|
||||
app:backgroundTint="?attr/colorAccent"
|
||||
app:backgroundTint="?attr/colorFabBackground"
|
||||
app:srcCompat="@drawable/baseline_edit_24" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
@@ -343,7 +344,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:layout_margin="@dimen/fab_padding"
|
||||
android:tint="@color/colorActionForeground"
|
||||
android:tint="?attr/colorFabForeground"
|
||||
android:tooltipText="@string/title_compose"
|
||||
app:backgroundTint="@color/colorError"
|
||||
app:srcCompat="@drawable/baseline_warning_24" />
|
||||
|
||||
@@ -671,8 +671,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:itemIconTint="@color/bottomnav_foreground"
|
||||
app:itemTextColor="@color/bottomnav_foreground"
|
||||
app:itemIconTint="@color/action_foreground"
|
||||
app:itemTextColor="@color/action_foreground"
|
||||
app:labelVisibilityMode="labeled"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -48,8 +48,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_margin="@dimen/fab_padding"
|
||||
android:tint="@color/colorActionForeground"
|
||||
android:tint="?attr/colorFabForeground"
|
||||
android:tooltipText="@string/title_add"
|
||||
app:backgroundTint="?attr/colorAccent"
|
||||
app:backgroundTint="?attr/colorFabBackground"
|
||||
app:srcCompat="@drawable/baseline_add_24" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="?attr/colorSeparator"
|
||||
app:itemIconTint="@color/bottomnav_foreground"
|
||||
app:itemTextColor="@color/bottomnav_foreground"
|
||||
android:background="?attr/colorActionBackground"
|
||||
app:itemIconTint="@color/action_foreground"
|
||||
app:itemTextColor="@color/action_foreground"
|
||||
app:labelVisibilityMode="labeled"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -24,8 +24,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:backgroundTint="?attr/colorActionBackground"
|
||||
android:contentDescription="@string/title_decrypt"
|
||||
android:tint="@color/bottomnav_foreground"
|
||||
android:tint="@color/action_foreground"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ibUnsubscribe"
|
||||
app:layout_constraintTop_toBottomOf="@id/bnvActions"
|
||||
app:srcCompat="@drawable/baseline_no_encryption_24" />
|
||||
@@ -36,8 +37,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:backgroundTint="?attr/colorActionBackground"
|
||||
android:contentDescription="@string/title_legend_show_unsubscribe"
|
||||
android:tint="@color/bottomnav_foreground"
|
||||
android:tint="@color/action_foreground"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ibImages"
|
||||
app:layout_constraintTop_toBottomOf="@id/bnvActions"
|
||||
app:srcCompat="@drawable/baseline_unsubscribe_24" />
|
||||
@@ -48,8 +50,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:backgroundTint="?attr/colorActionBackground"
|
||||
android:contentDescription="@string/title_legend_show_images"
|
||||
android:tint="@color/bottomnav_foreground"
|
||||
android:tint="@color/action_foreground"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ibFull"
|
||||
app:layout_constraintTop_toBottomOf="@id/bnvActions"
|
||||
app:srcCompat="@drawable/baseline_image_24" />
|
||||
@@ -59,8 +62,9 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:backgroundTint="?attr/colorActionBackground"
|
||||
android:contentDescription="@string/title_legend_show_full"
|
||||
android:tint="@color/bottomnav_foreground"
|
||||
android:tint="@color/action_foreground"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/bnvActions"
|
||||
app:srcCompat="@drawable/baseline_fullscreen_24" />
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
<color name="colorActionForeground">#fff</color>
|
||||
<color name="colorActionForegroundDisabled">#ccc</color>
|
||||
<color name="colorActionBackground">#ccc</color>
|
||||
|
||||
<color name="colorWidgetForeground">#fff</color>
|
||||
<color name="colorWidgetBackground">#7f000000</color>
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
<attr name="colorDrawerText" format="reference" />
|
||||
<attr name="colorDrawerBackground" format="reference" />
|
||||
<attr name="colorCardBackground" format="reference" />
|
||||
<attr name="colorActionForeground" format="reference" />
|
||||
<attr name="colorActionForegroundDisabled" format="reference" />
|
||||
<attr name="colorActionBackground" format="reference" />
|
||||
<attr name="colorFabForeground" format="reference" />
|
||||
<attr name="colorFabBackground" format="reference" />
|
||||
<attr name="colorToastForeground" format="reference" />
|
||||
<attr name="colorToastBackground" format="reference" />
|
||||
<attr name="activatableItemBackground" format="reference" />
|
||||
@@ -29,6 +34,13 @@
|
||||
|
||||
<item name="colorCardBackground">@color/lightColorCardBackground</item>
|
||||
|
||||
<item name="colorActionForeground">@color/colorActionForeground</item>
|
||||
<item name="colorActionForegroundDisabled">@color/colorActionForegroundDisabled</item>
|
||||
<item name="colorActionBackground">@color/colorActionBackground</item>
|
||||
|
||||
<item name="colorFabForeground">@android:color/white</item>
|
||||
<item name="colorFabBackground">@color/colorAccent</item>
|
||||
|
||||
<item name="colorToastForeground">@android:color/white</item>
|
||||
<item name="colorToastBackground">@color/colorPrimaryDark</item>
|
||||
|
||||
@@ -64,6 +76,9 @@
|
||||
|
||||
<item name="colorCardBackground">@color/darkColorCardBackground</item>
|
||||
|
||||
<item name="colorFabForeground">@android:color/white</item>
|
||||
<item name="colorFabBackground">@color/colorAccent</item>
|
||||
|
||||
<item name="colorToastForeground">@android:color/white</item>
|
||||
<item name="colorToastBackground">@color/colorPrimaryDark</item>
|
||||
|
||||
@@ -97,6 +112,8 @@
|
||||
|
||||
<item name="colorUnread">@color/greyAccent</item>
|
||||
|
||||
<item name="colorFabBackground">@color/greyAccent</item>
|
||||
|
||||
<item name="colorToastForeground">@android:color/white</item>
|
||||
<item name="colorToastBackground">@color/greyAccent</item>
|
||||
</style>
|
||||
@@ -110,6 +127,10 @@
|
||||
<item name="colorUnread">@color/greyAccent</item>
|
||||
<item name="colorSeparator">@color/greyPrimary</item>
|
||||
|
||||
<item name="colorActionBackground">@color/greyPrimary</item>
|
||||
|
||||
<item name="colorFabBackground">@color/greyAccent</item>
|
||||
|
||||
<item name="colorToastForeground">@android:color/white</item>
|
||||
<item name="colorToastBackground">@color/greyAccent</item>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user