mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 10:25:35 +03:00
Merge pull request #4470 from vector-im/feature/bma/clean_style
Clean up styles
This commit is contained in:
commit
6ce5b19b05
13 changed files with 48 additions and 47 deletions
|
@ -1 +1 @@
|
|||
Poll Feature - Create Poll Screen
|
||||
Poll Feature - Create Poll Screen (Disabled for now)
|
|
@ -129,9 +129,9 @@
|
|||
<color name="vctr_chat_effect_snow_background_light">@color/black_alpha</color>
|
||||
<color name="vctr_chat_effect_snow_background_dark">@android:color/transparent</color>
|
||||
|
||||
<attr name="vctr_voice_message_toast_background" format="color" />
|
||||
<color name="vctr_voice_message_toast_background_light">@color/palette_black_900</color>
|
||||
<color name="vctr_voice_message_toast_background_dark">@color/palette_gray_400</color>
|
||||
<attr name="vctr_toast_background" format="color" />
|
||||
<color name="vctr_toast_background_light">@color/palette_black_900</color>
|
||||
<color name="vctr_toast_background_dark">@color/palette_gray_400</color>
|
||||
|
||||
<!-- Presence Indicator colors -->
|
||||
<attr name="vctr_presence_indicator_offline" format="color" />
|
||||
|
|
|
@ -10,6 +10,11 @@
|
|||
<item name="lineHeight">24sp</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Vector.Button.CallToAction" parent="Widget.Vector.Button">
|
||||
<item name="android:backgroundTint">@color/button_background_tint_selector</item>
|
||||
<item name="android:textColor">@android:color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Vector.Button.Destructive">
|
||||
<item name="android:minWidth">94dp</item>
|
||||
<item name="materialThemeOverlay">@style/VectorMaterialThemeOverlayDestructive</item>
|
||||
|
|
|
@ -1,14 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- Default style for TextInputLayout -->
|
||||
<style name="Widget.Vector.TextInputLayout" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox" />
|
||||
|
||||
<style name="Widget.Vector.TextInputLayout.Password">
|
||||
<item name="endIconMode">password_toggle</item>
|
||||
<item name="endIconTint">?vctr_content_secondary</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Vector.EditText.Composer" parent="Widget.AppCompat.EditText">
|
||||
<item name="android:background">@android:color/transparent</item>
|
||||
<item name="android:inputType">textCapSentences|textMultiLine</item>
|
||||
|
@ -19,9 +11,4 @@
|
|||
<item name="android:textColor">?vctr_message_text_color</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Vector.EditText.Form" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
<item name="boxStrokeColor">@color/form_edit_text_stroke_color_selector</item>
|
||||
<item name="android:textColorHint">@color/form_edit_text_hint_color_selector</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Widget.Vector.Button.CreatePoll" parent="Widget.Vector.Button">
|
||||
<item name="android:backgroundTint">@color/button_background_tint_selector</item>
|
||||
<item name="android:textAppearance">@style/TextAppearance.Vector.Button</item>
|
||||
<item name="android:textColor">@android:color/white</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- Default style for TextInputLayout -->
|
||||
<style name="Widget.Vector.TextInputLayout" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox" />
|
||||
|
||||
<style name="Widget.Vector.TextInputLayout.Password">
|
||||
<item name="endIconMode">password_toggle</item>
|
||||
<item name="endIconTint">?vctr_content_secondary</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Vector.TextInputLayout.Form">
|
||||
<item name="boxStrokeColor">@color/form_edit_text_stroke_color_selector</item>
|
||||
<item name="android:textColorHint">@color/form_edit_text_hint_color_selector</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
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>
|
||||
</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>
|
|
@ -140,8 +140,7 @@
|
|||
<!-- Keywords -->
|
||||
<item name="vctr_keyword_style">@style/Widget.Vector.Keyword</item>
|
||||
|
||||
<!-- Voice Message -->
|
||||
<item name="vctr_voice_message_toast_background">@color/vctr_voice_message_toast_background_dark</item>
|
||||
<item name="vctr_toast_background">@color/vctr_toast_background_dark</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Vector.Dark" parent="Base.Theme.Vector.Dark" />
|
||||
|
|
|
@ -143,8 +143,7 @@
|
|||
<!-- Keywords -->
|
||||
<item name="vctr_keyword_style">@style/Widget.Vector.Keyword</item>
|
||||
|
||||
<!-- Voice Message -->
|
||||
<item name="vctr_voice_message_toast_background">@color/vctr_voice_message_toast_background_light</item>
|
||||
<item name="vctr_toast_background">@color/vctr_toast_background_light</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Vector.Light" parent="Base.Theme.Vector.Light" />
|
||||
|
|
|
@ -69,11 +69,11 @@
|
|||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
app:layout_constraintBottom_toTopOf="@id/createPollButton"
|
||||
app:layout_constraintTop_toBottomOf="@+id/appBarLayout"
|
||||
tools:listitem="@layout/item_profile_action" />
|
||||
tools:listitem="@layout/item_form_text_input_with_delete" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/createPollButton"
|
||||
style="@style/Widget.Vector.Button.CreatePoll"
|
||||
style="@style/Widget.Vector.Button.CallToAction"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:layout_margin="16dp"
|
||||
|
@ -92,7 +92,7 @@
|
|||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="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" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/formTextInputTextInputLayout"
|
||||
style="@style/Widget.Vector.EditText.Form"
|
||||
style="@style/Widget.Vector.TextInputLayout.Form"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/layout_horizontal_margin"
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/formTextInputTextInputLayout"
|
||||
style="@style/Widget.Vector.EditText.Form"
|
||||
style="@style/Widget.Vector.TextInputLayout.Form"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/layout_horizontal_margin"
|
||||
|
|
Loading…
Reference in a new issue