Fixed presence led background in dark mode + reduced background padding a bit
This commit is contained in:
parent
b467569308
commit
7136a991b3
17 changed files with 25 additions and 17 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
||||
<solid android:color="@color/white_color"/>
|
||||
<solid android:color="?attr/backgroundColor"/>
|
||||
<size android:width="20dp" android:height="20dp"/>
|
||||
</shape>
|
||||
|
|
5
app/src/main/res/drawable/status_led_background.xml
Normal file
5
app/src/main/res/drawable/status_led_background.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
||||
<solid android:color="@color/white_color"/>
|
||||
<size android:width="20dp" android:height="20dp"/>
|
||||
</shape>
|
|
@ -47,7 +47,7 @@
|
|||
android:layout_marginStart="25dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/led_background"
|
||||
android:padding="2dp"
|
||||
android:padding="@dimen/contact_presence_badge_padding"
|
||||
app:presenceIcon="@{data.presenceStatus}"
|
||||
android:visibility="@{data.presenceStatus == ConsolidatedPresence.Offline ? View.GONE : View.VISIBLE, default=gone}" />
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
android:layout_marginStart="25dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/led_background"
|
||||
android:padding="2dp"
|
||||
android:padding="@dimen/contact_presence_badge_padding"
|
||||
app:presenceIcon="@{data.presenceStatus}"
|
||||
android:visibility="@{data.presenceStatus == ConsolidatedPresence.Offline ? View.GONE : View.VISIBLE, default=gone}" />
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
<import type="android.view.View"/>
|
||||
|
@ -34,7 +35,7 @@
|
|||
android:layout_marginStart="25dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/led_background"
|
||||
android:padding="2dp"
|
||||
android:padding="@dimen/contact_presence_badge_padding"
|
||||
app:presenceIcon="@{data.presenceStatus}"
|
||||
android:visibility="@{data.presenceStatus == ConsolidatedPresence.Offline ? View.GONE : View.VISIBLE, default=gone}" />
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
android:layout_marginStart="25dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/led_background"
|
||||
android:padding="2dp"
|
||||
android:padding="@dimen/contact_presence_badge_padding"
|
||||
app:presenceIcon="@{data.presenceStatus}"
|
||||
android:visibility="@{data.presenceStatus == ConsolidatedPresence.Offline ? View.GONE : View.VISIBLE, default=gone}"
|
||||
app:layout_constraintStart_toStartOf="@id/avatar"
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
android:layout_marginStart="70dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/led_background"
|
||||
android:padding="2dp"
|
||||
android:padding="@dimen/contact_presence_big_badge_padding"
|
||||
app:presenceIcon="@{viewModel.presenceStatus}"
|
||||
android:visibility="@{viewModel.presenceStatus == ConsolidatedPresence.Offline ? View.GONE : View.VISIBLE, default=gone}" />
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
android:layout_marginStart="25dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/led_background"
|
||||
android:padding="2dp"
|
||||
android:padding="@dimen/contact_presence_badge_padding"
|
||||
app:presenceIcon="@{viewModel.presenceStatus}"
|
||||
android:visibility="@{viewModel.presenceStatus == ConsolidatedPresence.Offline ? View.GONE : View.VISIBLE, default=gone}" />
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
android:layout_marginStart="25dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/led_background"
|
||||
android:padding="2dp"
|
||||
android:padding="@dimen/contact_presence_badge_padding"
|
||||
app:presenceIcon="@{data.presenceStatus}"
|
||||
android:visibility="@{data.presenceStatus == ConsolidatedPresence.Offline ? View.GONE : View.VISIBLE, default=gone}" />
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
android:layout_marginStart="70dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/led_background"
|
||||
android:padding="2dp"
|
||||
android:padding="@dimen/contact_presence_big_badge_padding"
|
||||
app:presenceIcon="@{viewModel.presenceStatus}"
|
||||
android:visibility="@{viewModel.presenceStatus == ConsolidatedPresence.Offline ? View.GONE : View.VISIBLE, default=gone}" />
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
android:layout_marginStart="25dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/led_background"
|
||||
android:padding="2dp"
|
||||
android:padding="@dimen/contact_presence_badge_padding"
|
||||
app:presenceIcon="@{viewModel.presenceStatus}"
|
||||
android:visibility="@{viewModel.presenceStatus == ConsolidatedPresence.Offline ? View.GONE : View.VISIBLE, default=gone}" />
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<ImageView
|
||||
android:id="@+id/led"
|
||||
android:background="@drawable/led_background"
|
||||
android:padding="2dp"
|
||||
android:padding="@dimen/contact_presence_badge_padding"
|
||||
android:src="@{data.iconResource, default=@drawable/led_not_registered}"
|
||||
android:contentDescription="@{data.iconContentDescription}"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="@dimen/settings_margin"
|
||||
android:padding="2dp" />
|
||||
android:padding="@dimen/contact_presence_badge_padding" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
android:layout_marginStart="45dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/led_background"
|
||||
android:padding="2dp"
|
||||
android:padding="@dimen/contact_presence_badge_padding"
|
||||
app:presenceIcon="@{viewModel.presenceStatus}"
|
||||
android:visibility="@{!viewModel.defaultAccountFound || viewModel.presenceStatus == ConsolidatedPresence.Offline ? View.GONE : View.VISIBLE, default=gone}" />
|
||||
|
||||
|
@ -128,7 +128,7 @@
|
|||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:padding="2dp" />
|
||||
android:padding="@dimen/contact_presence_badge_padding" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/status_led"
|
||||
android:background="@drawable/led_background"
|
||||
android:background="@drawable/status_led_background"
|
||||
android:src="@{viewModel.registrationStatusDrawable, default=@drawable/led_not_registered}"
|
||||
android:onClick="@{refreshClickListener}"
|
||||
android:contentDescription="@{viewModel.registrationStatusText}"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/status_led"
|
||||
android:background="@drawable/led_background"
|
||||
android:background="@drawable/status_led_background"
|
||||
android:src="@{viewModel.registrationStatusDrawable, default=@drawable/led_not_registered}"
|
||||
android:onClick="@{refreshClickListener}"
|
||||
android:contentDescription="@{viewModel.registrationStatusText}"
|
||||
|
|
|
@ -84,4 +84,6 @@
|
|||
<dimen name="chat_message_sending_icons_margin">5dp</dimen>
|
||||
<dimen name="contact_presence_badge_size">12dp</dimen>
|
||||
<dimen name="contact_presence_big_badge_size">25dp</dimen>
|
||||
<dimen name="contact_presence_badge_padding">1dp</dimen>
|
||||
<dimen name="contact_presence_big_badge_padding">2dp</dimen>
|
||||
</resources>
|
Loading…
Reference in a new issue