User view is now compatible with light theme.

This commit is contained in:
Anton Chekulaev 2020-08-24 13:34:34 +10:00
parent da20dc1d4f
commit fd52fdd042
13 changed files with 58 additions and 43 deletions

View File

@ -1,6 +1,12 @@
<vector android:height="24dp" android:viewportHeight="15" <vector
android:viewportWidth="15" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> xmlns:android="http://schemas.android.com/apk/res/android"
<path android:fillColor="#00000000" android:height="24dp"
android:width="24dp"
android:viewportWidth="15"
android:viewportHeight="15"
android:tint="?colorControlNormal">
<path
android:pathData="M7.5,7.5m-6.5,0a6.5,6.5 0,1 1,13 0a6.5,6.5 0,1 1,-13 0" android:pathData="M7.5,7.5m-6.5,0a6.5,6.5 0,1 1,13 0a6.5,6.5 0,1 1,-13 0"
android:strokeColor="#FFFFFF" android:strokeWidth="1"/> android:strokeColor="@android:color/white"
android:strokeWidth="1"/>
</vector> </vector>

View File

@ -1,7 +1,15 @@
<vector android:height="24dp" android:viewportHeight="15" <vector
android:viewportWidth="15" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> xmlns:android="http://schemas.android.com/apk/res/android"
<path android:fillColor="#00000000" android:height="24dp"
android:width="24dp"
android:viewportWidth="15"
android:viewportHeight="15"
android:tint="?colorControlNormal">
<path
android:pathData="M7.5,7.5m-6.5,0a6.5,6.5 0,1 1,13 0a6.5,6.5 0,1 1,-13 0" android:pathData="M7.5,7.5m-6.5,0a6.5,6.5 0,1 1,13 0a6.5,6.5 0,1 1,-13 0"
android:strokeColor="#FFFFFF" android:strokeWidth="1"/> android:strokeColor="@android:color/white"
<path android:fillColor="#FFFFFF" android:pathData="M4.77,7.61c-0.15,-0.15 -0.38,-0.15 -0.53,0c-0.15,0.15 -0.15,0.38 0,0.53l1.88,1.88c0.15,0.15 0.38,0.15 0.53,0l4.13,-4.12c0.15,-0.15 0.15,-0.38 0,-0.53c-0.15,-0.15 -0.38,-0.15 -0.53,0L6.38,9.22L4.77,7.61z"/> android:strokeWidth="1"/>
<path
android:fillColor="@android:color/white"
android:pathData="M4.77,7.61c-0.15,-0.15 -0.38,-0.15 -0.53,0c-0.15,0.15 -0.15,0.38 0,0.53l1.88,1.88c0.15,0.15 0.38,0.15 0.53,0l4.13,-4.12c0.15,-0.15 0.15,-0.38 0,-0.53c-0.15,-0.15 -0.38,-0.15 -0.53,0L6.38,9.22L4.77,7.61z"/>
</vector> </vector>

View File

@ -1,5 +0,0 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/>
</vector>

View File

@ -1,5 +1,10 @@
<vector android:height="24dp" android:tint="#FFFFFF" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:viewportHeight="24" android:viewportWidth="24" android:width="24dp"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> android:height="24dp"
<path android:fillColor="@android:color/white" android:pathData="M6,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM18,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z"/> android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M6,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM18,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z" />
</vector> </vector>

View File

@ -71,6 +71,6 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
android:background="@color/separator" /> android:background="?android:dividerHorizontal" />
</LinearLayout> </LinearLayout>

View File

@ -24,7 +24,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
android:background="@color/separator" /> android:background="?android:dividerHorizontal" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView" android:id="@+id/recyclerView"

View File

@ -89,7 +89,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
android:background="@color/separator" /> android:background="?android:dividerHorizontal" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -126,7 +126,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
android:background="@color/separator" /> android:background="?android:dividerHorizontal" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView" android:id="@+id/recyclerView"

View File

@ -109,7 +109,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
android:layout_marginTop="@dimen/large_spacing" android:layout_marginTop="@dimen/large_spacing"
android:background="@color/separator" /> android:background="?android:dividerHorizontal" />
<TextView <TextView
android:id="@+id/themeSwitchButton" android:id="@+id/themeSwitchButton"
@ -125,7 +125,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
android:background="@color/separator" /> android:background="?android:dividerHorizontal" />
<TextView <TextView
android:id="@+id/privacyButton" android:id="@+id/privacyButton"
@ -141,7 +141,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
android:background="@color/separator" /> android:background="?android:dividerHorizontal" />
<TextView <TextView
android:id="@+id/notificationsButton" android:id="@+id/notificationsButton"
@ -157,7 +157,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
android:background="@color/separator" /> android:background="?android:dividerHorizontal" />
<TextView <TextView
android:id="@+id/chatsButton" android:id="@+id/chatsButton"
@ -174,7 +174,7 @@
android:id="@+id/linkedDevicesButtonTopSeparator" android:id="@+id/linkedDevicesButtonTopSeparator"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
android:background="@color/separator" /> android:background="?android:dividerHorizontal" />
<TextView <TextView
android:id="@+id/linkedDevicesButton" android:id="@+id/linkedDevicesButton"
@ -191,7 +191,7 @@
android:id="@+id/seedButtonTopSeparator" android:id="@+id/seedButtonTopSeparator"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
android:background="@color/separator" /> android:background="?android:dividerHorizontal" />
<TextView <TextView
android:id="@+id/seedButton" android:id="@+id/seedButton"
@ -207,7 +207,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
android:background="@color/separator" /> android:background="?android:dividerHorizontal" />
<TextView <TextView
android:id="@+id/clearAllDataButton" android:id="@+id/clearAllDataButton"
@ -224,7 +224,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
android:layout_marginBottom="@dimen/medium_spacing" android:layout_marginBottom="@dimen/medium_spacing"
android:background="@color/separator" /> android:background="?android:dividerHorizontal" />
<TextView <TextView
android:id="@+id/versionTextView" android:id="@+id/versionTextView"

View File

@ -159,14 +159,14 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
android:background="@color/separator" /> android:background="?android:dividerHorizontal" />
<include layout="@layout/view_mention_candidate_selection" /> <include layout="@layout/view_mention_candidate_selection" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
android:background="@color/separator" /> android:background="?android:dividerHorizontal" />
</LinearLayout> </LinearLayout>

View File

@ -11,7 +11,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
android:background="@color/separator" /> android:background="?android:dividerHorizontal" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -68,6 +68,6 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
android:background="@color/separator" /> android:background="?android:dividerHorizontal" />
</LinearLayout> </LinearLayout>

View File

@ -71,6 +71,6 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
android:background="@color/separator" /> android:background="?android:dividerHorizontal" />
</LinearLayout> </LinearLayout>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/conversation_view_background" android:background="@drawable/conversation_view_background"
@ -29,22 +29,23 @@
android:ellipsize="end" android:ellipsize="end"
android:textSize="@dimen/medium_font_size" android:textSize="@dimen/medium_font_size"
android:textStyle="bold" android:textStyle="bold"
android:textColor="@color/text" android:layout_weight="1"
android:text="Spiderman" android:textColor="?android:textColorPrimary"
android:layout_weight="1"/> tools:text="Spiderman" />
<ImageView <ImageView
android:id="@+id/actionIndicatorImageView" android:id="@+id/actionIndicatorImageView"
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:layout_marginStart="@dimen/medium_spacing" android:layout_marginStart="@dimen/medium_spacing"
android:src="@drawable/ic_circle" /> android:src="@drawable/ic_circle"
android:tint="?android:textColorPrimary"/>
</LinearLayout> </LinearLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
android:background="@color/separator" /> android:background="?android:dividerHorizontal" />
</LinearLayout> </LinearLayout>

View File

@ -66,7 +66,7 @@ class UserView : LinearLayout {
profilePictureView.additionalPublicKey = null profilePictureView.additionalPublicKey = null
profilePictureView.isRSSFeed = false profilePictureView.isRSSFeed = false
} }
actionIndicatorImageView.setImageResource(R.drawable.ic_edit_white_24dp) actionIndicatorImageView.setImageResource(R.drawable.ic_baseline_edit_24)
profilePictureView.glide = glide profilePictureView.glide = glide
profilePictureView.update() profilePictureView.update()
nameTextView.text = user.name ?: "Unknown Contact" nameTextView.text = user.name ?: "Unknown Contact"