mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-16 12:00:03 +03:00
UI review fixes.
This commit is contained in:
parent
b1c088a03b
commit
e93a2d7c5d
12 changed files with 20 additions and 15 deletions
|
@ -27,7 +27,7 @@ import im.vector.riotx.R
|
|||
import im.vector.riotx.core.platform.SimpleTextWatcher
|
||||
|
||||
fun EditText.setupAsSearch(@DrawableRes searchIconRes: Int = R.drawable.ic_filter,
|
||||
@DrawableRes clearIconRes: Int = R.drawable.ic_x_green) {
|
||||
@DrawableRes clearIconRes: Int = R.drawable.ic_x_gray) {
|
||||
addTextChangedListener(object : SimpleTextWatcher() {
|
||||
override fun afterTextChanged(s: Editable) {
|
||||
val clearIcon = if (s.isNotEmpty()) clearIconRes else 0
|
||||
|
|
|
@ -21,8 +21,11 @@ import android.graphics.Typeface
|
|||
import android.util.AttributeSet
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.preference.PreferenceCategory
|
||||
import androidx.preference.PreferenceViewHolder
|
||||
import im.vector.riotx.R
|
||||
import im.vector.riotx.features.themes.ThemeUtils
|
||||
|
||||
/**
|
||||
* Customize PreferenceCategory class to redefine some attributes.
|
||||
|
@ -46,6 +49,7 @@ class VectorPreferenceCategory : PreferenceCategory {
|
|||
val titleTextView = holder.itemView.findViewById<TextView>(android.R.id.title)
|
||||
|
||||
titleTextView?.setTypeface(null, Typeface.BOLD)
|
||||
titleTextView?.setTextColor(ThemeUtils.getColor(context, R.attr.riotx_text_primary))
|
||||
|
||||
// "isIconSpaceReserved = false" does not work for preference category, so remove the padding
|
||||
if (!isIconSpaceReserved) {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<item android:state_checked="true">
|
||||
<shape>
|
||||
<solid android:color="#10000000" />
|
||||
<solid android:color="@android:color/white" />
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
||||
</item>
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
android:pathData="M4,6.5h16"
|
||||
android:strokeWidth="1.8"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#03B381"
|
||||
android:strokeColor="#9E9E9E"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M6,12.5h12M9,18.5h6"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#03B381"
|
||||
android:strokeColor="#9E9E9E"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#03B381"
|
||||
android:strokeColor="#9E9E9E"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M19,19l-4.35,-4.35"
|
||||
|
@ -17,6 +17,6 @@
|
|||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#03B381"
|
||||
android:strokeColor="#9E9E9E"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#03B381"
|
||||
android:strokeColor="#9E9E9E"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
|
@ -45,7 +45,7 @@
|
|||
android:layout_marginTop="24dp"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textColor="?riotx_text_secondary"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintEnd_toStartOf="@id/homeDrawerHeaderSettingsView"
|
||||
app:layout_constraintStart_toStartOf="@+id/homeDrawerHeaderAvatarView"
|
||||
|
@ -59,7 +59,7 @@
|
|||
android:layout_marginBottom="17dp"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textColor="?riotx_text_secondary"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/homeDrawerHeaderSettingsView"
|
||||
|
@ -75,7 +75,7 @@
|
|||
android:contentDescription="@string/room_sliding_menu_settings"
|
||||
android:padding="16dp"
|
||||
android:src="@drawable/ic_settings_x"
|
||||
android:tint="@android:color/white"
|
||||
android:tint="?riotx_text_secondary"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
|
@ -85,7 +85,7 @@
|
|||
android:id="@+id/homeDrawerGroupListContainer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="?riotx_header_panel_background"
|
||||
android:background="@android:color/white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
android:background="?riotx_background"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:textColor="?riotx_header_panel_text_primary"
|
||||
android:textColor="?riotx_header_panel_text_secondary"
|
||||
android:textSize="15sp"
|
||||
tools:text="@tools:sample/date/day_of_week" />
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<item
|
||||
android:id="@+id/menu_home_filter"
|
||||
android:icon="@drawable/ic_search"
|
||||
app:iconTint="?riotx_text_secondary"
|
||||
android:title="@string/home_filter_placeholder_home"
|
||||
app:showAsAction="always" />
|
||||
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
android:id="@+id/roomProfileShareAction"
|
||||
android:icon="@drawable/ic_material_share"
|
||||
android:title="@string/share"
|
||||
app:iconTint="?attr/colorAccent"
|
||||
app:iconTint="?attr/riotx_text_secondary"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
|
@ -50,7 +50,7 @@
|
|||
<color name="riotx_background_black">#FF000000</color>
|
||||
|
||||
<attr name="riotx_base" format="color" />
|
||||
<color name="riotx_base_light">#FF27303A</color>
|
||||
<color name="riotx_base_light">#FFF5F7FA</color>
|
||||
<color name="riotx_base_dark">#FF22282F</color>
|
||||
<color name="riotx_base_black">#FF000000</color>
|
||||
|
||||
|
|
|
@ -202,7 +202,7 @@
|
|||
|
||||
<style name="VectorSearchView" parent="Widget.AppCompat.SearchView">
|
||||
<item name="searchIcon">@drawable/ic_search</item>
|
||||
<item name="closeIcon">@drawable/ic_x_green</item>
|
||||
<item name="closeIcon">@drawable/ic_x_gray</item>
|
||||
<item name="iconifiedByDefault">false</item>
|
||||
</style>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue