mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-15 01:35:07 +08:00
Create file for Toast style (more generic)
And improve fragment_create_poll.xml preview rendering
This commit is contained in:
parent
223b33fa65
commit
6f13fb1634
@ -129,9 +129,9 @@
|
|||||||
<color name="vctr_chat_effect_snow_background_light">@color/black_alpha</color>
|
<color name="vctr_chat_effect_snow_background_light">@color/black_alpha</color>
|
||||||
<color name="vctr_chat_effect_snow_background_dark">@android:color/transparent</color>
|
<color name="vctr_chat_effect_snow_background_dark">@android:color/transparent</color>
|
||||||
|
|
||||||
<attr name="vctr_voice_message_toast_background" format="color" />
|
<attr name="vctr_toast_background" format="color" />
|
||||||
<color name="vctr_voice_message_toast_background_light">@color/palette_black_900</color>
|
<color name="vctr_toast_background_light">@color/palette_black_900</color>
|
||||||
<color name="vctr_voice_message_toast_background_dark">@color/palette_gray_400</color>
|
<color name="vctr_toast_background_dark">@color/palette_gray_400</color>
|
||||||
|
|
||||||
<!-- Presence Indicator colors -->
|
<!-- Presence Indicator colors -->
|
||||||
<attr name="vctr_presence_indicator_offline" format="color" />
|
<attr name="vctr_presence_indicator_offline" format="color" />
|
||||||
|
15
library/ui-styles/src/main/res/values/styles_toast.xml
Normal file
15
library/ui-styles/src/main/res/values/styles_toast.xml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<style name="Widget.Vector.TextView.Caption.Toast">
|
||||||
|
<item name="android:paddingTop">8dp</item>
|
||||||
|
<item name="android:paddingBottom">8dp</item>
|
||||||
|
<item name="android:paddingStart">12dp</item>
|
||||||
|
<item name="android:paddingEnd">12dp</item>
|
||||||
|
<item name="android:background">@drawable/bg_round_corner_8dp</item>
|
||||||
|
<item name="android:backgroundTint">?vctr_toast_background</item>
|
||||||
|
<item name="android:textColor">@color/palette_white</item>
|
||||||
|
<item name="android:gravity">center</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</resources>
|
@ -12,15 +12,4 @@
|
|||||||
<item name="direction">rightToLeft</item>
|
<item name="direction">rightToLeft</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Widget.Vector.TextView.Caption.Toast">
|
|
||||||
<item name="android:paddingTop">8dp</item>
|
|
||||||
<item name="android:paddingBottom">8dp</item>
|
|
||||||
<item name="android:paddingStart">12dp</item>
|
|
||||||
<item name="android:paddingEnd">12dp</item>
|
|
||||||
<item name="android:background">@drawable/bg_round_corner_8dp</item>
|
|
||||||
<item name="android:backgroundTint">?vctr_voice_message_toast_background</item>
|
|
||||||
<item name="android:textColor">@color/palette_white</item>
|
|
||||||
<item name="android:gravity">center</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
@ -140,8 +140,7 @@
|
|||||||
<!-- Keywords -->
|
<!-- Keywords -->
|
||||||
<item name="vctr_keyword_style">@style/Widget.Vector.Keyword</item>
|
<item name="vctr_keyword_style">@style/Widget.Vector.Keyword</item>
|
||||||
|
|
||||||
<!-- Voice Message -->
|
<item name="vctr_toast_background">@color/vctr_toast_background_dark</item>
|
||||||
<item name="vctr_voice_message_toast_background">@color/vctr_voice_message_toast_background_dark</item>
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Vector.Dark" parent="Base.Theme.Vector.Dark" />
|
<style name="Theme.Vector.Dark" parent="Base.Theme.Vector.Dark" />
|
||||||
|
@ -143,8 +143,7 @@
|
|||||||
<!-- Keywords -->
|
<!-- Keywords -->
|
||||||
<item name="vctr_keyword_style">@style/Widget.Vector.Keyword</item>
|
<item name="vctr_keyword_style">@style/Widget.Vector.Keyword</item>
|
||||||
|
|
||||||
<!-- Voice Message -->
|
<item name="vctr_toast_background">@color/vctr_toast_background_light</item>
|
||||||
<item name="vctr_voice_message_toast_background">@color/vctr_voice_message_toast_background_light</item>
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Vector.Light" parent="Base.Theme.Vector.Light" />
|
<style name="Theme.Vector.Light" parent="Base.Theme.Vector.Light" />
|
||||||
|
@ -69,7 +69,7 @@
|
|||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
app:layout_constraintBottom_toTopOf="@id/createPollButton"
|
app:layout_constraintBottom_toTopOf="@id/createPollButton"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/appBarLayout"
|
app:layout_constraintTop_toBottomOf="@+id/appBarLayout"
|
||||||
tools:listitem="@layout/item_profile_action" />
|
tools:listitem="@layout/item_form_text_input_with_delete" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/createPollButton"
|
android:id="@+id/createPollButton"
|
||||||
@ -92,7 +92,7 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
tools:text="@string/voice_message_release_to_send_toast"
|
tools:text="@string/create_poll_empty_question_error"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Reference in New Issue
Block a user