mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 16:33:39 +00:00
Merge branch 'dev' into utilise-dialog-dsl
This commit is contained in:
commit
b46b52ace4
@ -9,20 +9,15 @@ import androidx.preference.PreferenceViewHolder
|
||||
|
||||
class BlockedContactsPreference @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attributeSet: AttributeSet? = null) : PreferenceCategory(context, attributeSet), View.OnClickListener {
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
if (v is BlockedContactsLayout) {
|
||||
val intent = Intent(context, BlockedContactsActivity::class.java)
|
||||
context.startActivity(intent)
|
||||
}
|
||||
}
|
||||
attributeSet: AttributeSet? = null
|
||||
) : PreferenceCategory(context, attributeSet) {
|
||||
|
||||
override fun onBindViewHolder(holder: PreferenceViewHolder) {
|
||||
super.onBindViewHolder(holder)
|
||||
|
||||
val itemView = holder.itemView
|
||||
itemView.setOnClickListener(this)
|
||||
holder.itemView.setOnClickListener {
|
||||
val intent = Intent(context, BlockedContactsActivity::class.java)
|
||||
context.startActivity(intent)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,8 @@ package org.thoughtcrime.securesms.util
|
||||
import android.content.res.Resources
|
||||
import android.os.Build
|
||||
import androidx.annotation.ColorRes
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import kotlin.math.max
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
fun Resources.getColorWithID(@ColorRes id: Int, theme: Resources.Theme?): Int {
|
||||
@ -30,3 +32,8 @@ fun toDp(px: Float, resources: Resources): Float {
|
||||
val scale = resources.displayMetrics.density
|
||||
return (px / scale)
|
||||
}
|
||||
|
||||
val RecyclerView.isScrolledToBottom: Boolean
|
||||
get() = computeVerticalScrollOffset().coerceAtLeast(0) +
|
||||
computeVerticalScrollExtent() +
|
||||
toPx(50, resources) >= computeVerticalScrollRange()
|
||||
|
5
app/src/main/res/color/prominent_button_color.xml
Normal file
5
app/src/main/res/color/prominent_button_color.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="false" android:color="@color/grey"/>
|
||||
<item android:color="?prominentButtonColor"/>
|
||||
</selector>
|
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="?colorControlHighlight">
|
||||
<item android:id="@id/mask">
|
||||
<shape>
|
||||
<solid android:color="?colorPrimary"/>
|
||||
<corners android:radius="@dimen/medium_button_corner_radius" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
@ -1,11 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="@color/transparent" />
|
||||
|
||||
<corners android:radius="@dimen/dialog_button_corner_radius" />
|
||||
|
||||
<stroke android:width="@dimen/border_thickness" android:color="@color/transparent" />
|
||||
</shape>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="?colorControlHighlight">
|
||||
<item android:id="@android:id/mask">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="?android:textColorPrimary"/>
|
||||
<corners android:radius="@dimen/medium_button_corner_radius" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="?android:textColorPrimary">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="?colorDividerBackground"/>
|
||||
<corners android:radius="16dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
@ -1,11 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="?colorAccent" />
|
||||
|
||||
<corners android:radius="@dimen/medium_button_corner_radius" />
|
||||
|
||||
<stroke android:width="@dimen/border_thickness" android:color="?colorAccent" />
|
||||
</shape>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="?colorPrimary">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="?colorAccent"/>
|
||||
<corners android:radius="@dimen/medium_button_corner_radius" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
|
@ -1,11 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="@color/transparent" />
|
||||
|
||||
<corners android:radius="@dimen/dialog_button_corner_radius" />
|
||||
|
||||
<stroke android:width="@dimen/border_thickness" android:color="@color/transparent" />
|
||||
</shape>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="?colorControlHighlight">
|
||||
<item android:id="@android:id/mask">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="?android:textColorPrimary"/>
|
||||
<corners android:radius="@dimen/medium_button_corner_radius" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
|
@ -1,11 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="@color/transparent" />
|
||||
|
||||
<corners android:radius="@dimen/medium_button_corner_radius" />
|
||||
|
||||
<stroke android:width="@dimen/border_thickness" android:color="?android:textColorPrimary" />
|
||||
</shape>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="?android:textColorPrimary">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="?colorPrimary"/>
|
||||
<corners android:radius="@dimen/medium_button_corner_radius" />
|
||||
<stroke
|
||||
android:color="?android:textColorPrimary"
|
||||
android:width="@dimen/border_thickness" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
|
@ -52,6 +52,7 @@
|
||||
android:text="@string/activity_landing_restore_button_title" />
|
||||
|
||||
<Button
|
||||
style="@style/Widget.Session.Button.Common.Borderless"
|
||||
android:id="@+id/linkButton"
|
||||
android:contentDescription="@string/AccessibilityId_link_a_device"
|
||||
android:layout_width="match_parent"
|
||||
@ -59,7 +60,6 @@
|
||||
android:layout_marginLeft="@dimen/massive_spacing"
|
||||
android:layout_marginRight="@dimen/massive_spacing"
|
||||
android:gravity="center"
|
||||
android:background="@color/transparent"
|
||||
android:textAllCaps="false"
|
||||
android:textSize="@dimen/medium_font_size"
|
||||
android:text="@string/activity_link_device_link_device" />
|
||||
|
@ -50,15 +50,14 @@
|
||||
android:textAlignment="center"
|
||||
tools:text="nautical novelty populate onion awkward bent etiquette plant submarine itches vipers september axis maximum populate" />
|
||||
|
||||
<TextView
|
||||
<Button
|
||||
android:id="@+id/revealButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_width="196dp"
|
||||
android:layout_height="@dimen/onboarding_button_bottom_offset"
|
||||
android:textAlignment="center"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:alpha="0.6"
|
||||
style="@style/Widget.Session.Button.Common.Borderless"
|
||||
android:text="@string/activity_seed_reveal_button_title" />
|
||||
|
||||
<View
|
||||
|
@ -56,6 +56,7 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/searchViewContainer"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/AccessibilityId_search_icon"
|
||||
android:layout_width="@dimen/small_profile_picture_size"
|
||||
android:layout_height="@dimen/small_profile_picture_size"
|
||||
|
@ -52,13 +52,13 @@
|
||||
android:text="@string/activity_landing_restore_button_title" />
|
||||
|
||||
<Button
|
||||
style="@style/Widget.Session.Button.Common.Borderless"
|
||||
android:contentDescription="@string/AccessibilityId_link_a_device"
|
||||
android:id="@+id/linkButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/onboarding_button_bottom_offset"
|
||||
android:layout_marginHorizontal="@dimen/massive_spacing"
|
||||
android:gravity="center"
|
||||
android:background="@color/transparent"
|
||||
android:textAllCaps="false"
|
||||
android:textSize="@dimen/medium_font_size"
|
||||
android:text="@string/activity_link_device_link_device" />
|
||||
|
@ -42,7 +42,7 @@
|
||||
android:layout_marginRight="@dimen/very_large_spacing"
|
||||
android:padding="12dp"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/pn_option_background">
|
||||
android:background="@color/pn_option_border">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
|
@ -50,16 +50,16 @@
|
||||
android:textAlignment="center"
|
||||
tools:text="nautical novelty populate onion awkward bent etiquette plant submarine itches vipers september axis maximum populate" />
|
||||
|
||||
<TextView
|
||||
<Button
|
||||
android:id="@+id/revealButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_width="196dp"
|
||||
android:layout_height="@dimen/onboarding_button_bottom_offset"
|
||||
android:layout_marginHorizontal="@dimen/massive_spacing"
|
||||
android:textAlignment="center"
|
||||
android:textSize="14sp"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:alpha="0.6"
|
||||
android:visibility="gone"
|
||||
style="@style/Widget.Session.Button.Common.Borderless"
|
||||
android:text="@string/activity_seed_reveal_button_title" />
|
||||
|
||||
<View
|
||||
|
@ -121,6 +121,7 @@
|
||||
<!-- Path -->
|
||||
<RelativeLayout
|
||||
android:id="@+id/pathButton"
|
||||
android:background="?selectableItemBackground"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:paddingHorizontal="@dimen/large_spacing"
|
||||
@ -157,6 +158,7 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/privacyButton"
|
||||
android:background="?selectableItemBackground"
|
||||
android:paddingHorizontal="@dimen/large_spacing"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/setting_button_height">
|
||||
@ -190,6 +192,7 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/notificationsButton"
|
||||
android:background="?selectableItemBackground"
|
||||
android:paddingHorizontal="@dimen/large_spacing"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/setting_button_height"
|
||||
@ -226,6 +229,7 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/chatsButton"
|
||||
android:background="?selectableItemBackground"
|
||||
android:paddingHorizontal="@dimen/large_spacing"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/setting_button_height"
|
||||
@ -261,6 +265,7 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/messageRequestsButton"
|
||||
android:background="?selectableItemBackground"
|
||||
android:paddingHorizontal="@dimen/large_spacing"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/setting_button_height"
|
||||
@ -295,6 +300,7 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/appearanceButton"
|
||||
android:background="?selectableItemBackground"
|
||||
android:paddingHorizontal="@dimen/large_spacing"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/setting_button_height"
|
||||
@ -329,6 +335,7 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/inviteFriendButton"
|
||||
android:background="?selectableItemBackground"
|
||||
android:paddingHorizontal="@dimen/large_spacing"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/setting_button_height"
|
||||
@ -363,6 +370,7 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/seedButton"
|
||||
android:background="?selectableItemBackground"
|
||||
android:paddingHorizontal="@dimen/large_spacing"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/setting_button_height"
|
||||
@ -397,6 +405,7 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/helpButton"
|
||||
android:background="?selectableItemBackground"
|
||||
android:paddingHorizontal="@dimen/large_spacing"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/setting_button_height"
|
||||
@ -431,6 +440,7 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/clearAllDataButton"
|
||||
android:background="?selectableItemBackground"
|
||||
android:paddingHorizontal="@dimen/large_spacing"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/setting_button_height"
|
||||
|
@ -4,14 +4,15 @@
|
||||
android:layout_marginHorizontal="@dimen/large_spacing"
|
||||
android:layout_marginVertical="@dimen/medium_spacing"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
<Button
|
||||
android:contentDescription="@string/AccessibilityId_blocked_contacts"
|
||||
android:layout_width="match_parent"
|
||||
style="@style/Widget.Session.Button.Common.Borderless"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/medium_spacing"
|
||||
android:paddingHorizontal="@dimen/medium_spacing"
|
||||
android:text="@string/blocked_contacts_title"
|
||||
android:textColor="@color/destructive"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
</org.thoughtcrime.securesms.preferences.BlockedContactsLayout>
|
||||
</org.thoughtcrime.securesms.preferences.BlockedContactsLayout>
|
||||
|
@ -5,9 +5,7 @@
|
||||
android:layout_height="match_parent">
|
||||
<TextView
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/rounded_rectangle"
|
||||
android:backgroundTint="?colorDividerBackground"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
style="@style/Widget.Session.Button.Common.Filled"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/activity_help_settings__export_logs"
|
||||
android:paddingHorizontal="@dimen/medium_spacing"
|
||||
|
@ -22,9 +22,11 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/backButton"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="@dimen/small_spacing"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/medium_spacing"
|
||||
android:layout_marginStart="@dimen/small_spacing"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/new_conversation_dialog_back_button_content_description"
|
||||
android:focusable="true"
|
||||
@ -36,9 +38,11 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/closeButton"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="@dimen/small_spacing"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/medium_spacing"
|
||||
android:layout_marginEnd="@dimen/small_spacing"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/new_conversation_dialog_close_button_content_description"
|
||||
android:focusable="true"
|
||||
@ -91,12 +95,6 @@
|
||||
tools:itemCount="5"
|
||||
tools:listitem="@layout/view_user" />
|
||||
|
||||
<View
|
||||
android:background="?conversation_menu_border_color"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
app:layout_constraintTop_toTopOf="@id/recyclerView"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/createClosedGroupButton"
|
||||
style="@style/Widget.Session.Button.Common.ProminentOutline"
|
||||
@ -130,13 +128,6 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/titleText" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/massive_spacing"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/recyclerView"
|
||||
android:background="@drawable/conversation_menu_gradient"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/createNewPrivateChatButton"
|
||||
style="@style/Widget.Session.Button.Common.ProminentOutline"
|
||||
|
@ -20,6 +20,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/backButton"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="@dimen/small_spacing"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/medium_spacing"
|
||||
@ -34,6 +36,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/closeButton"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="@dimen/small_spacing"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/medium_spacing"
|
||||
@ -52,7 +56,6 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/titleText" />
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -32,11 +32,13 @@
|
||||
android:id="@+id/closeButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/small_spacing"
|
||||
android:layout_marginStart="@dimen/large_spacing"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/new_conversation_dialog_close_button_content_description"
|
||||
android:focusable="true"
|
||||
android:src="@drawable/ic_baseline_close_24"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
app:layout_constraintBottom_toTopOf="@id/title_divider"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@ -68,6 +70,7 @@
|
||||
android:text="@string/dialog_new_message_title"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="@dimen/medium_font_size"
|
||||
android:background="?selectableItemBackground"
|
||||
app:drawableStartCompat="@drawable/ic_message"
|
||||
app:layout_constraintBottom_toTopOf="@+id/new_message_divider"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@ -94,6 +97,7 @@
|
||||
android:text="@string/activity_create_group_title"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="@dimen/medium_font_size"
|
||||
android:background="?selectableItemBackground"
|
||||
app:drawableStartCompat="@drawable/ic_group"
|
||||
app:layout_constraintBottom_toTopOf="@+id/create_group_divider"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@ -120,6 +124,7 @@
|
||||
android:text="@string/dialog_join_community_title"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="@dimen/medium_font_size"
|
||||
android:background="?selectableItemBackground"
|
||||
app:drawableStartCompat="@drawable/ic_globe"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/backButton"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="@dimen/small_spacing"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/medium_spacing"
|
||||
@ -35,6 +37,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/closeButton"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="@dimen/small_spacing"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/medium_spacing"
|
||||
|
@ -39,13 +39,15 @@
|
||||
android:layout_height="wrap_content"/>
|
||||
<ImageView
|
||||
android:id="@+id/search_clear"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/ic_close_white_18dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
app:tint="?searchIconColor" />
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
<Button
|
||||
style="@style/Widget.Session.Button.Common.Borderless"
|
||||
android:layout_marginStart="@dimen/small_spacing"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="@string/cancel"
|
||||
|
@ -83,38 +83,31 @@
|
||||
<style name="Widget.Session.Button.Common.ProminentFilled">
|
||||
<item name="android:background">@drawable/prominent_filled_button_medium_background</item>
|
||||
<item name="android:textColor">@color/black</item>
|
||||
<item name="android:drawableTint">?android:textColorPrimary</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Session.Button.Common.Filled">
|
||||
<item name="android:background">@drawable/filled_button_medium_background</item>
|
||||
<item name="android:textColor">?android:textColorPrimary</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Session.Button.Common.ProminentOutline">
|
||||
<item name="android:background">@drawable/prominent_outline_button_medium_background</item>
|
||||
<item name="android:textColor">?attr/prominentButtonColor</item>
|
||||
<item name="android:drawableTint">?attr/prominentButtonColor</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Session.Button.Common.UnimportantFilled">
|
||||
<item name="android:background">@drawable/unimportant_filled_button_medium_background</item>
|
||||
<item name="android:textColor">?android:textColorPrimary</item>
|
||||
<item name="android:drawableTint">?android:textColorPrimary</item>
|
||||
<item name="android:textColor">@color/prominent_button_color</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Session.Button.Common.UnimportantOutline">
|
||||
<item name="android:background">@drawable/unimportant_outline_button_medium_background</item>
|
||||
<item name="android:textColor">?android:textColorPrimary</item>
|
||||
<item name="android:drawableTint">?android:textColorPrimary</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Session.Button.Common.UnimportantDestructive">
|
||||
<item name="android:background">@drawable/unimportant_outline_button_medium_background</item>
|
||||
<style name="Widget.Session.Button.Common.Borderless">
|
||||
<item name="android:background">@drawable/borderless_button_medium_background</item>
|
||||
<item name="android:textColor">?android:textColorPrimary</item>
|
||||
<item name="android:backgroundTint">@color/destructive</item>
|
||||
<item name="android:drawableTint">@color/destructive</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Session.Button.Common.DestructiveOutline">
|
||||
<item name="android:background">@drawable/destructive_outline_button_medium_background</item>
|
||||
<item name="android:textColor">@color/button_destructive</item>
|
||||
<item name="android:drawableTint">?android:textColorPrimary</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Session.Button.Dialog" parent="">
|
||||
@ -271,7 +264,7 @@
|
||||
<item name="android:padding">@dimen/normal_padding</item>
|
||||
<item name="android:gravity">center_vertical</item>
|
||||
<item name="android:selectable">true</item>
|
||||
<item name="android:foreground">?attr/selectableItemBackground</item>
|
||||
<item name="android:background">?attr/selectableItemBackground</item>
|
||||
</style>
|
||||
|
||||
<style name="PopupMenu.ConversationItem" parent="@style/Widget.AppCompat.PopupMenu">
|
||||
|
@ -4,8 +4,6 @@ import android.content.Context
|
||||
import android.util.TypedValue
|
||||
import androidx.annotation.AttrRes
|
||||
import androidx.annotation.ColorInt
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import kotlin.math.max
|
||||
|
||||
@ColorInt
|
||||
fun Context.getColorFromAttr(
|
||||
@ -16,6 +14,3 @@ fun Context.getColorFromAttr(
|
||||
theme.resolveAttribute(attrColor, typedValue, resolveRefs)
|
||||
return typedValue.data
|
||||
}
|
||||
|
||||
val RecyclerView.isScrolledToBottom: Boolean
|
||||
get() = max(0, computeVerticalScrollOffset()) + computeVerticalScrollExtent() >= computeVerticalScrollRange()
|
||||
|
Loading…
x
Reference in New Issue
Block a user