mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-07 14:34:33 +00:00
Merge pull request #1205 from bemusementpark/disable-unblock
Disable unblock button
This commit is contained in:
5
app/src/main/res/color/button_destructive.xml
Normal file
5
app/src/main/res/color/button_destructive.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="?android:textColorTertiary"/>
|
||||
<item android:color="@color/destructive"/>
|
||||
</selector>
|
||||
@@ -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="@color/destructive" />
|
||||
</shape>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/button_destructive">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="?colorPrimary"/>
|
||||
<corners android:radius="@dimen/medium_button_corner_radius" />
|
||||
<stroke
|
||||
android:color="@color/button_destructive"
|
||||
android:width="@dimen/border_thickness" />
|
||||
</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="?prominentButtonColor" />
|
||||
</shape>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="?prominentButtonColor">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="?colorPrimary"/>
|
||||
<corners android:radius="@dimen/medium_button_corner_radius" />
|
||||
<stroke
|
||||
android:color="?prominentButtonColor"
|
||||
android:width="@dimen/border_thickness" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
|
||||
@@ -4,28 +4,37 @@
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cardView"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/unblockButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/preference_single_no_padding"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:cardCornerRadius="?preferenceCornerRadius"
|
||||
app:cardElevation="0dp"
|
||||
app:cardBackgroundColor="?colorSettingsBackground"
|
||||
android:layout_marginHorizontal="@dimen/medium_spacing"
|
||||
android:layout_marginVertical="@dimen/large_spacing"
|
||||
/>
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
/>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/emptyStateMessageTextView"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@+id/recyclerView"
|
||||
app:layout_constraintTop_toTopOf="@+id/cardView"
|
||||
android:layout_marginTop="@dimen/medium_spacing"
|
||||
app:layout_constraintStart_toStartOf="@+id/recyclerView"
|
||||
app:layout_constraintEnd_toEndOf="@+id/recyclerView"
|
||||
app:layout_constraintStart_toStartOf="@+id/cardView"
|
||||
app:layout_constraintEnd_toEndOf="@+id/cardView"
|
||||
android:text="@string/blocked_contacts_empty_state"
|
||||
/>
|
||||
|
||||
@@ -38,7 +47,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/recyclerView"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cardView"
|
||||
android:id="@+id/unblockButton"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginVertical="@dimen/large_spacing"
|
||||
@@ -49,6 +58,6 @@
|
||||
android:id="@+id/nonEmptyStateGroup"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="unblockButton,recyclerView"/>
|
||||
app:constraint_referenced_ids="unblockButton,cardView"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -7,6 +7,7 @@
|
||||
android:paddingHorizontal="@dimen/medium_spacing"
|
||||
android:paddingVertical="@dimen/small_spacing"
|
||||
android:gravity="center_vertical"
|
||||
android:background="?selectableItemBackground"
|
||||
android:id="@+id/backgroundContainer">
|
||||
<include layout="@layout/view_profile_picture"
|
||||
android:id="@+id/profilePictureView"
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
<style name="Widget.Session.Button.Common.DestructiveOutline">
|
||||
<item name="android:background">@drawable/destructive_outline_button_medium_background</item>
|
||||
<item name="android:textColor">@color/destructive</item>
|
||||
<item name="android:textColor">@color/button_destructive</item>
|
||||
<item name="android:drawableTint">?android:textColorPrimary</item>
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user