Merge remote-tracking branch 'upstream/dev' into libsession-integration

This commit is contained in:
0x330a 2023-06-28 17:46:50 +10:00
commit ff732b787b
30 changed files with 362 additions and 274 deletions

View File

@ -9,20 +9,15 @@ import androidx.preference.PreferenceViewHolder
class BlockedContactsPreference @JvmOverloads constructor( class BlockedContactsPreference @JvmOverloads constructor(
context: Context, context: Context,
attributeSet: AttributeSet? = null) : PreferenceCategory(context, attributeSet), View.OnClickListener { attributeSet: AttributeSet? = null
) : PreferenceCategory(context, attributeSet) {
override fun onClick(v: View?) {
if (v is BlockedContactsLayout) {
val intent = Intent(context, BlockedContactsActivity::class.java)
context.startActivity(intent)
}
}
override fun onBindViewHolder(holder: PreferenceViewHolder) { override fun onBindViewHolder(holder: PreferenceViewHolder) {
super.onBindViewHolder(holder) super.onBindViewHolder(holder)
val itemView = holder.itemView holder.itemView.setOnClickListener {
itemView.setOnClickListener(this) val intent = Intent(context, BlockedContactsActivity::class.java)
context.startActivity(intent)
}
} }
} }

View File

@ -78,8 +78,6 @@ class AppearanceSettingsActivity: PassphraseRequiredActionBarActivity(), View.On
viewModel.setNewAccent(R.style.PrimaryGreen) viewModel.setNewAccent(R.style.PrimaryGreen)
} }
} }
} else if (v == binding.systemSettingsSwitch) {
viewModel.setNewFollowSystemSettings((v as SwitchCompat).isChecked)
} }
} }
@ -115,12 +113,8 @@ class AppearanceSettingsActivity: PassphraseRequiredActionBarActivity(), View.On
super.onCreate(savedInstanceState, ready) super.onCreate(savedInstanceState, ready)
binding = ActivityAppearanceSettingsBinding.inflate(layoutInflater) binding = ActivityAppearanceSettingsBinding.inflate(layoutInflater)
setContentView(binding.root) setContentView(binding.root)
savedInstanceState?.let { bundle -> savedInstanceState?.getSparseParcelableArray<Parcelable>(SCROLL_PARCEL)
val scrollStateParcel = bundle.getSparseParcelableArray<Parcelable>(SCROLL_PARCEL) ?.let(binding.scrollView::restoreHierarchyState)
if (scrollStateParcel != null) {
binding.scrollView.restoreHierarchyState(scrollStateParcel)
}
}
supportActionBar!!.title = getString(R.string.activity_settings_message_appearance_button_title) supportActionBar!!.title = getString(R.string.activity_settings_message_appearance_button_title)
with (binding) { with (binding) {
// accent toggles // accent toggles
@ -132,7 +126,8 @@ class AppearanceSettingsActivity: PassphraseRequiredActionBarActivity(), View.On
it.setOnClickListener(this@AppearanceSettingsActivity) it.setOnClickListener(this@AppearanceSettingsActivity)
} }
// system settings toggle // system settings toggle
systemSettingsSwitch.setOnClickListener(this@AppearanceSettingsActivity) systemSettingsSwitch.setOnCheckedChangeListener { _, isChecked -> viewModel.setNewFollowSystemSettings(isChecked) }
systemSettingsSwitchHolder.setOnClickListener { systemSettingsSwitch.toggle() }
} }
lifecycleScope.launchWhenResumed { lifecycleScope.launchWhenResumed {
@ -148,6 +143,5 @@ class AppearanceSettingsActivity: PassphraseRequiredActionBarActivity(), View.On
} }
} }
} }
} }
} }

View 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>

View File

@ -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>

View File

@ -1,11 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape <ripple xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" android:color="?colorControlHighlight">
android:shape="rectangle"> <item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/transparent" /> <solid android:color="?android:textColorPrimary"/>
<corners android:radius="@dimen/medium_button_corner_radius" />
<corners android:radius="@dimen/dialog_button_corner_radius" /> </shape>
</item>
<stroke android:width="@dimen/border_thickness" android:color="@color/transparent" /> </ripple>
</shape>

View File

@ -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>

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?colorControlHighlight">
<item android:left="@dimen/medium_spacing" <item android:left="@dimen/medium_spacing"
android:right="@dimen/medium_spacing" android:right="@dimen/medium_spacing"
android:bottom="@dimen/small_spacing" android:bottom="@dimen/small_spacing"
@ -10,4 +11,4 @@
android:bottomRightRadius="?preferenceCornerRadius"/> android:bottomRightRadius="?preferenceCornerRadius"/>
</shape> </shape>
</item> </item>
</layer-list> </ripple>

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?colorControlHighlight">
<item android:left="@dimen/medium_spacing" <item android:left="@dimen/medium_spacing"
android:right="@dimen/medium_spacing"> android:right="@dimen/medium_spacing">
<shape android:shape="rectangle"> <shape android:shape="rectangle">
@ -14,4 +15,4 @@
<solid android:color="@color/transparent_white_15"/> <solid android:color="@color/transparent_white_15"/>
</shape> </shape>
</item> </item>
</layer-list> </ripple>

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?colorControlHighlight">
<item android:left="@dimen/medium_spacing" <item android:left="@dimen/medium_spacing"
android:top="@dimen/small_spacing" android:top="@dimen/small_spacing"
android:right="@dimen/medium_spacing" android:right="@dimen/medium_spacing"
@ -9,4 +10,4 @@
<corners android:radius="?preferenceCornerRadius"/> <corners android:radius="?preferenceCornerRadius"/>
</shape> </shape>
</item> </item>
</layer-list> </ripple>

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?colorControlHighlight">
<item android:left="@dimen/medium_spacing" <item android:left="@dimen/medium_spacing"
android:right="@dimen/medium_spacing" android:right="@dimen/medium_spacing"
android:top="@dimen/small_spacing" android:top="@dimen/small_spacing"
@ -18,4 +19,4 @@
<solid android:color="@color/transparent_white_15"/> <solid android:color="@color/transparent_white_15"/>
</shape> </shape>
</item> </item>
</layer-list> </ripple>

View File

@ -1,11 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape <ripple xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" android:color="?colorPrimary">
android:shape="rectangle"> <item>
<shape android:shape="rectangle">
<solid android:color="?colorAccent" /> <solid android:color="?colorAccent"/>
<corners android:radius="@dimen/medium_button_corner_radius" /> <corners android:radius="@dimen/medium_button_corner_radius" />
</shape>
<stroke android:width="@dimen/border_thickness" android:color="?colorAccent" /> </item>
</shape> </ripple>

View File

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?colorControlHighlight">
<item>
<selector>
<item android:state_selected="true"> <item android:state_selected="true">
<shape android:shape="oval"> <shape android:shape="oval">
<stroke android:width="1dp" android:color="?android:textColorPrimary"/> <stroke android:width="1dp" android:color="?android:textColorPrimary"/>
@ -9,4 +11,11 @@
<shape android:shape="oval"> <shape android:shape="oval">
</shape> </shape>
</item> </item>
</selector> </selector>
</item>
<item android:id="@android:id/mask">
<shape android:shape="oval">
<solid android:color="@color/black"/>
</shape>
</item>
</ripple>

View File

@ -1,11 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape <ripple xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" android:color="?colorControlHighlight">
android:shape="rectangle"> <item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/transparent" /> <solid android:color="?android:textColorPrimary"/>
<corners android:radius="@dimen/medium_button_corner_radius" />
<corners android:radius="@dimen/dialog_button_corner_radius" /> </shape>
</item>
<stroke android:width="@dimen/border_thickness" android:color="@color/transparent" /> </ripple>
</shape>

View File

@ -1,11 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape <ripple xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:textColorPrimary">
android:shape="rectangle"> <item>
<shape android:shape="rectangle">
<solid android:color="@color/transparent" /> <solid android:color="?colorPrimary"/>
<corners android:radius="@dimen/medium_button_corner_radius" /> <corners android:radius="@dimen/medium_button_corner_radius" />
<stroke
<stroke android:width="@dimen/border_thickness" android:color="?android:textColorPrimary" /> android:color="?android:textColorPrimary"
</shape> android:width="@dimen/border_thickness" />
</shape>
</item>
</ripple>

View File

@ -52,6 +52,7 @@
android:text="@string/activity_landing_restore_button_title" /> android:text="@string/activity_landing_restore_button_title" />
<Button <Button
style="@style/Widget.Session.Button.Common.Borderless"
android:id="@+id/linkButton" android:id="@+id/linkButton"
android:contentDescription="@string/AccessibilityId_link_a_device" android:contentDescription="@string/AccessibilityId_link_a_device"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -59,7 +60,6 @@
android:layout_marginLeft="@dimen/massive_spacing" android:layout_marginLeft="@dimen/massive_spacing"
android:layout_marginRight="@dimen/massive_spacing" android:layout_marginRight="@dimen/massive_spacing"
android:gravity="center" android:gravity="center"
android:background="@color/transparent"
android:textAllCaps="false" android:textAllCaps="false"
android:textSize="@dimen/medium_font_size" android:textSize="@dimen/medium_font_size"
android:text="@string/activity_link_device_link_device" /> android:text="@string/activity_link_device_link_device" />

View File

@ -50,15 +50,14 @@
android:textAlignment="center" android:textAlignment="center"
tools:text="nautical novelty populate onion awkward bent etiquette plant submarine itches vipers september axis maximum populate" /> tools:text="nautical novelty populate onion awkward bent etiquette plant submarine itches vipers september axis maximum populate" />
<TextView <Button
android:id="@+id/revealButton" android:id="@+id/revealButton"
android:layout_width="match_parent" android:layout_width="196dp"
android:layout_height="wrap_content" android:layout_height="@dimen/onboarding_button_bottom_offset"
android:layout_marginTop="12dp"
android:textAlignment="center" android:textAlignment="center"
android:textSize="16sp" android:textSize="16sp"
android:textColor="?android:textColorPrimary"
android:alpha="0.6" android:alpha="0.6"
style="@style/Widget.Session.Button.Common.Borderless"
android:text="@string/activity_seed_reveal_button_title" /> android:text="@string/activity_seed_reveal_button_title" />
<View <View

View File

@ -11,6 +11,7 @@
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<TextView <TextView
android:textColor="?android:textColorTertiary" android:textColor="?android:textColorTertiary"
android:textSize="@dimen/medium_font_size" android:textSize="@dimen/medium_font_size"
@ -20,13 +21,25 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/activity_appearance_themes_category"/> android:text="@string/activity_appearance_themes_category"/>
<androidx.cardview.widget.CardView
app:cardElevation="0dp"
app:cardCornerRadius="@dimen/dialog_corner_radius"
android:layout_marginHorizontal="@dimen/medium_spacing"
app:cardBackgroundColor="?colorSettingsBackground"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout <LinearLayout
android:id="@+id/theme_option_classic_dark" android:id="@+id/theme_option_classic_dark"
android:background="@drawable/preference_top" android:addStatesFromChildren="true"
android:background="?selectableItemBackground"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingHorizontal="@dimen/large_spacing" android:paddingHorizontal="@dimen/small_spacing"
android:paddingVertical="@dimen/medium_spacing" android:paddingVertical="@dimen/small_spacing"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageView
android:theme="@style/Classic.Dark" android:theme="@style/Classic.Dark"
@ -50,12 +63,20 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"/>
</LinearLayout> </LinearLayout>
<View
android:alpha="0.15"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:textColorPrimary"/>
<LinearLayout <LinearLayout
android:id="@+id/theme_option_classic_light" android:id="@+id/theme_option_classic_light"
android:addStatesFromChildren="true"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/preference_middle" android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/large_spacing" android:paddingHorizontal="@dimen/small_spacing"
android:paddingVertical="@dimen/small_spacing" android:paddingVertical="@dimen/small_spacing"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageView
@ -80,13 +101,22 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"/>
</LinearLayout> </LinearLayout>
<View
android:alpha="0.15"
android:layout_marginHorizontal="@dimen/medium_spacing"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:textColorPrimary"/>
<LinearLayout <LinearLayout
android:id="@+id/theme_option_ocean_dark" android:id="@+id/theme_option_ocean_dark"
android:addStatesFromChildren="true"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/preference_middle" android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/large_spacing" android:paddingHorizontal="@dimen/small_spacing"
android:paddingVertical="@dimen/medium_spacing" android:paddingVertical="@dimen/small_spacing"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageView
android:theme="@style/Ocean.Dark" android:theme="@style/Ocean.Dark"
@ -110,14 +140,22 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"/>
</LinearLayout> </LinearLayout>
<View
android:alpha="0.15"
android:layout_marginHorizontal="@dimen/medium_spacing"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:textColorPrimary"/>
<LinearLayout <LinearLayout
android:id="@+id/theme_option_ocean_light" android:id="@+id/theme_option_ocean_light"
android:addStatesFromChildren="true"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/preference_bottom" android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/large_spacing" android:paddingHorizontal="@dimen/small_spacing"
android:paddingTop="@dimen/medium_spacing" android:paddingVertical="@dimen/small_spacing"
android:paddingBottom="@dimen/large_spacing"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageView
android:theme="@style/Ocean.Light" android:theme="@style/Ocean.Light"
@ -141,6 +179,12 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"/>
</LinearLayout> </LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
<TextView <TextView
android:textColor="?android:textColorTertiary" android:textColor="?android:textColorTertiary"
android:textSize="@dimen/medium_font_size" android:textSize="@dimen/medium_font_size"
@ -208,8 +252,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_marginVertical="@dimen/medium_spacing" android:layout_marginVertical="@dimen/small_spacing"
android:layout_marginHorizontal="@dimen/large_spacing"> android:layout_marginHorizontal="@dimen/small_spacing">
<View <View
android:id="@+id/accent_green" android:id="@+id/accent_green"
android:background="@drawable/padded_circle_tintable" android:background="@drawable/padded_circle_tintable"
@ -270,12 +314,21 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/activity_appearance_follow_system_category"/> android:text="@string/activity_appearance_follow_system_category"/>
<LinearLayout <androidx.cardview.widget.CardView
android:padding="@dimen/medium_spacing" app:cardElevation="0dp"
android:elevation="0dp"
app:cardBackgroundColor="?colorSettingsBackground"
app:cardCornerRadius="@dimen/dialog_corner_radius"
android:layout_margin="@dimen/medium_spacing"
android:layout_marginBottom="@dimen/massive_spacing" android:layout_marginBottom="@dimen/massive_spacing"
android:background="@drawable/preference_single" android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/system_settings_switch_holder"
android:background="?selectableItemBackground"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:addStatesFromChildren="true"
android:gravity="center"> android:gravity="center">
<TextView <TextView
android:textColor="?android:textColorPrimary" android:textColor="?android:textColorPrimary"
@ -287,12 +340,13 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"/> android:layout_weight="1"/>
<androidx.appcompat.widget.SwitchCompat <com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/system_settings_switch" android:id="@+id/system_settings_switch"
android:paddingHorizontal="@dimen/large_spacing" android:paddingHorizontal="@dimen/large_spacing"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"/>
</LinearLayout> </LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>

View File

@ -57,6 +57,7 @@
<RelativeLayout <RelativeLayout
android:id="@+id/searchViewContainer" android:id="@+id/searchViewContainer"
android:background="?selectableItemBackgroundBorderless"
android:contentDescription="@string/AccessibilityId_search_icon" android:contentDescription="@string/AccessibilityId_search_icon"
android:layout_width="@dimen/small_profile_picture_size" android:layout_width="@dimen/small_profile_picture_size"
android:layout_height="@dimen/small_profile_picture_size" android:layout_height="@dimen/small_profile_picture_size"

View File

@ -52,13 +52,13 @@
android:text="@string/activity_landing_restore_button_title" /> android:text="@string/activity_landing_restore_button_title" />
<Button <Button
style="@style/Widget.Session.Button.Common.Borderless"
android:contentDescription="@string/AccessibilityId_link_a_device" android:contentDescription="@string/AccessibilityId_link_a_device"
android:id="@+id/linkButton" android:id="@+id/linkButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/onboarding_button_bottom_offset" android:layout_height="@dimen/onboarding_button_bottom_offset"
android:layout_marginHorizontal="@dimen/massive_spacing" android:layout_marginHorizontal="@dimen/massive_spacing"
android:gravity="center" android:gravity="center"
android:background="@color/transparent"
android:textAllCaps="false" android:textAllCaps="false"
android:textSize="@dimen/medium_font_size" android:textSize="@dimen/medium_font_size"
android:text="@string/activity_link_device_link_device" /> android:text="@string/activity_link_device_link_device" />

View File

@ -42,7 +42,7 @@
android:layout_marginRight="@dimen/very_large_spacing" android:layout_marginRight="@dimen/very_large_spacing"
android:padding="12dp" android:padding="12dp"
android:orientation="vertical" android:orientation="vertical"
android:background="@drawable/pn_option_background"> android:background="@color/pn_option_border">
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@ -50,16 +50,16 @@
android:textAlignment="center" android:textAlignment="center"
tools:text="nautical novelty populate onion awkward bent etiquette plant submarine itches vipers september axis maximum populate" /> tools:text="nautical novelty populate onion awkward bent etiquette plant submarine itches vipers september axis maximum populate" />
<TextView <Button
android:id="@+id/revealButton" android:id="@+id/revealButton"
android:layout_width="match_parent" android:layout_width="196dp"
android:layout_height="wrap_content" android:layout_height="@dimen/onboarding_button_bottom_offset"
android:layout_marginTop="6dp" android:layout_marginHorizontal="@dimen/massive_spacing"
android:textAlignment="center" android:textAlignment="center"
android:textSize="14sp" android:textSize="14sp"
android:textColor="?android:textColorPrimary"
android:alpha="0.6" android:alpha="0.6"
android:visibility="gone" android:visibility="gone"
style="@style/Widget.Session.Button.Common.Borderless"
android:text="@string/activity_seed_reveal_button_title" /> android:text="@string/activity_seed_reveal_button_title" />
<View <View

View File

@ -121,6 +121,7 @@
<!-- Path --> <!-- Path -->
<RelativeLayout <RelativeLayout
android:id="@+id/pathButton" android:id="@+id/pathButton"
android:background="?selectableItemBackground"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:paddingHorizontal="@dimen/large_spacing" android:paddingHorizontal="@dimen/large_spacing"
@ -157,6 +158,7 @@
<RelativeLayout <RelativeLayout
android:id="@+id/privacyButton" android:id="@+id/privacyButton"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/large_spacing" android:paddingHorizontal="@dimen/large_spacing"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/setting_button_height"> android:layout_height="@dimen/setting_button_height">
@ -190,6 +192,7 @@
<RelativeLayout <RelativeLayout
android:id="@+id/notificationsButton" android:id="@+id/notificationsButton"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/large_spacing" android:paddingHorizontal="@dimen/large_spacing"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/setting_button_height" android:layout_height="@dimen/setting_button_height"
@ -226,6 +229,7 @@
<RelativeLayout <RelativeLayout
android:id="@+id/chatsButton" android:id="@+id/chatsButton"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/large_spacing" android:paddingHorizontal="@dimen/large_spacing"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/setting_button_height" android:layout_height="@dimen/setting_button_height"
@ -261,6 +265,7 @@
<RelativeLayout <RelativeLayout
android:id="@+id/messageRequestsButton" android:id="@+id/messageRequestsButton"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/large_spacing" android:paddingHorizontal="@dimen/large_spacing"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/setting_button_height" android:layout_height="@dimen/setting_button_height"
@ -295,6 +300,7 @@
<RelativeLayout <RelativeLayout
android:id="@+id/appearanceButton" android:id="@+id/appearanceButton"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/large_spacing" android:paddingHorizontal="@dimen/large_spacing"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/setting_button_height" android:layout_height="@dimen/setting_button_height"
@ -329,6 +335,7 @@
<RelativeLayout <RelativeLayout
android:id="@+id/inviteFriendButton" android:id="@+id/inviteFriendButton"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/large_spacing" android:paddingHorizontal="@dimen/large_spacing"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/setting_button_height" android:layout_height="@dimen/setting_button_height"
@ -363,6 +370,7 @@
<RelativeLayout <RelativeLayout
android:id="@+id/seedButton" android:id="@+id/seedButton"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/large_spacing" android:paddingHorizontal="@dimen/large_spacing"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/setting_button_height" android:layout_height="@dimen/setting_button_height"
@ -397,6 +405,7 @@
<RelativeLayout <RelativeLayout
android:id="@+id/helpButton" android:id="@+id/helpButton"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/large_spacing" android:paddingHorizontal="@dimen/large_spacing"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/setting_button_height" android:layout_height="@dimen/setting_button_height"
@ -431,6 +440,7 @@
<RelativeLayout <RelativeLayout
android:id="@+id/clearAllDataButton" android:id="@+id/clearAllDataButton"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/large_spacing" android:paddingHorizontal="@dimen/large_spacing"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/setting_button_height" android:layout_height="@dimen/setting_button_height"

View File

@ -4,11 +4,12 @@
android:layout_marginHorizontal="@dimen/large_spacing" android:layout_marginHorizontal="@dimen/large_spacing"
android:layout_marginVertical="@dimen/medium_spacing" android:layout_marginVertical="@dimen/medium_spacing"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<TextView <Button
android:contentDescription="@string/AccessibilityId_blocked_contacts" 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:layout_height="wrap_content"
android:padding="@dimen/medium_spacing" android:paddingHorizontal="@dimen/medium_spacing"
android:text="@string/blocked_contacts_title" android:text="@string/blocked_contacts_title"
android:textColor="@color/destructive" android:textColor="@color/destructive"
android:textSize="16sp" android:textSize="16sp"

View File

@ -5,9 +5,7 @@
android:layout_height="match_parent"> android:layout_height="match_parent">
<TextView <TextView
android:layout_gravity="center" android:layout_gravity="center"
android:background="@drawable/rounded_rectangle" style="@style/Widget.Session.Button.Common.Filled"
android:backgroundTint="?colorDividerBackground"
android:textColor="?android:textColorPrimary"
android:textStyle="bold" android:textStyle="bold"
android:text="@string/activity_help_settings__export_logs" android:text="@string/activity_help_settings__export_logs"
android:paddingHorizontal="@dimen/medium_spacing" android:paddingHorizontal="@dimen/medium_spacing"

View File

@ -22,9 +22,11 @@
<ImageView <ImageView
android:id="@+id/backButton" android:id="@+id/backButton"
android:background="?selectableItemBackgroundBorderless"
android:padding="@dimen/small_spacing"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/medium_spacing" android:layout_marginStart="@dimen/small_spacing"
android:clickable="true" android:clickable="true"
android:contentDescription="@string/new_conversation_dialog_back_button_content_description" android:contentDescription="@string/new_conversation_dialog_back_button_content_description"
android:focusable="true" android:focusable="true"
@ -36,9 +38,11 @@
<ImageView <ImageView
android:id="@+id/closeButton" android:id="@+id/closeButton"
android:background="?selectableItemBackgroundBorderless"
android:padding="@dimen/small_spacing"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/medium_spacing" android:layout_marginEnd="@dimen/small_spacing"
android:clickable="true" android:clickable="true"
android:contentDescription="@string/new_conversation_dialog_close_button_content_description" android:contentDescription="@string/new_conversation_dialog_close_button_content_description"
android:focusable="true" android:focusable="true"
@ -91,12 +95,6 @@
tools:itemCount="5" tools:itemCount="5"
tools:listitem="@layout/view_user" /> 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 <Button
android:id="@+id/createClosedGroupButton" android:id="@+id/createClosedGroupButton"
style="@style/Widget.Session.Button.Common.ProminentOutline" style="@style/Widget.Session.Button.Common.ProminentOutline"
@ -130,13 +128,6 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/titleText" /> 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 <Button
android:id="@+id/createNewPrivateChatButton" android:id="@+id/createNewPrivateChatButton"
style="@style/Widget.Session.Button.Common.ProminentOutline" style="@style/Widget.Session.Button.Common.ProminentOutline"

View File

@ -20,6 +20,8 @@
<ImageView <ImageView
android:id="@+id/backButton" android:id="@+id/backButton"
android:background="?selectableItemBackgroundBorderless"
android:padding="@dimen/small_spacing"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/medium_spacing" android:layout_marginStart="@dimen/medium_spacing"
@ -34,6 +36,8 @@
<ImageView <ImageView
android:id="@+id/closeButton" android:id="@+id/closeButton"
android:background="?selectableItemBackgroundBorderless"
android:padding="@dimen/small_spacing"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/medium_spacing" android:layout_marginEnd="@dimen/medium_spacing"
@ -52,7 +56,6 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/titleText" /> app:layout_constraintTop_toBottomOf="@+id/titleText" />
<androidx.viewpager2.widget.ViewPager2 <androidx.viewpager2.widget.ViewPager2
android:id="@+id/viewPager" android:id="@+id/viewPager"
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@ -32,11 +32,13 @@
android:id="@+id/closeButton" android:id="@+id/closeButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="@dimen/small_spacing"
android:layout_marginStart="@dimen/large_spacing" android:layout_marginStart="@dimen/large_spacing"
android:clickable="true" android:clickable="true"
android:contentDescription="@string/new_conversation_dialog_close_button_content_description" android:contentDescription="@string/new_conversation_dialog_close_button_content_description"
android:focusable="true" android:focusable="true"
android:src="@drawable/ic_baseline_close_24" android:src="@drawable/ic_baseline_close_24"
android:background="?selectableItemBackgroundBorderless"
app:layout_constraintBottom_toTopOf="@id/title_divider" app:layout_constraintBottom_toTopOf="@id/title_divider"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -68,6 +70,7 @@
android:text="@string/dialog_new_message_title" android:text="@string/dialog_new_message_title"
android:textColor="?android:textColorPrimary" android:textColor="?android:textColorPrimary"
android:textSize="@dimen/medium_font_size" android:textSize="@dimen/medium_font_size"
android:background="?selectableItemBackground"
app:drawableStartCompat="@drawable/ic_message" app:drawableStartCompat="@drawable/ic_message"
app:layout_constraintBottom_toTopOf="@+id/new_message_divider" app:layout_constraintBottom_toTopOf="@+id/new_message_divider"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -94,6 +97,7 @@
android:text="@string/activity_create_group_title" android:text="@string/activity_create_group_title"
android:textColor="?android:textColorPrimary" android:textColor="?android:textColorPrimary"
android:textSize="@dimen/medium_font_size" android:textSize="@dimen/medium_font_size"
android:background="?selectableItemBackground"
app:drawableStartCompat="@drawable/ic_group" app:drawableStartCompat="@drawable/ic_group"
app:layout_constraintBottom_toTopOf="@+id/create_group_divider" app:layout_constraintBottom_toTopOf="@+id/create_group_divider"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -120,6 +124,7 @@
android:text="@string/dialog_join_community_title" android:text="@string/dialog_join_community_title"
android:textColor="?android:textColorPrimary" android:textColor="?android:textColorPrimary"
android:textSize="@dimen/medium_font_size" android:textSize="@dimen/medium_font_size"
android:background="?selectableItemBackground"
app:drawableStartCompat="@drawable/ic_globe" app:drawableStartCompat="@drawable/ic_globe"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"

View File

@ -21,6 +21,8 @@
<ImageView <ImageView
android:id="@+id/backButton" android:id="@+id/backButton"
android:background="?selectableItemBackgroundBorderless"
android:padding="@dimen/small_spacing"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/medium_spacing" android:layout_marginStart="@dimen/medium_spacing"
@ -35,6 +37,8 @@
<ImageView <ImageView
android:id="@+id/closeButton" android:id="@+id/closeButton"
android:background="?selectableItemBackgroundBorderless"
android:padding="@dimen/small_spacing"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/medium_spacing" android:layout_marginEnd="@dimen/medium_spacing"

View File

@ -39,13 +39,15 @@
android:layout_height="wrap_content"/> android:layout_height="wrap_content"/>
<ImageView <ImageView
android:id="@+id/search_clear" android:id="@+id/search_clear"
android:background="?selectableItemBackgroundBorderless"
android:src="@drawable/ic_close_white_18dp" android:src="@drawable/ic_close_white_18dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_width="16dp" android:layout_width="16dp"
android:layout_height="16dp" android:layout_height="16dp"
app:tint="?searchIconColor" /> app:tint="?searchIconColor" />
</LinearLayout> </LinearLayout>
<TextView <Button
style="@style/Widget.Session.Button.Common.Borderless"
android:layout_marginStart="@dimen/small_spacing" android:layout_marginStart="@dimen/small_spacing"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:text="@string/cancel" android:text="@string/cancel"

View File

@ -82,38 +82,31 @@
<style name="Widget.Session.Button.Common.ProminentFilled"> <style name="Widget.Session.Button.Common.ProminentFilled">
<item name="android:background">@drawable/prominent_filled_button_medium_background</item> <item name="android:background">@drawable/prominent_filled_button_medium_background</item>
<item name="android:textColor">@color/black</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>
<style name="Widget.Session.Button.Common.ProminentOutline"> <style name="Widget.Session.Button.Common.ProminentOutline">
<item name="android:background">@drawable/prominent_outline_button_medium_background</item> <item name="android:background">@drawable/prominent_outline_button_medium_background</item>
<item name="android:textColor">?attr/prominentButtonColor</item> <item name="android:textColor">@color/prominent_button_color</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>
</style> </style>
<style name="Widget.Session.Button.Common.UnimportantOutline"> <style name="Widget.Session.Button.Common.UnimportantOutline">
<item name="android:background">@drawable/unimportant_outline_button_medium_background</item> <item name="android:background">@drawable/unimportant_outline_button_medium_background</item>
<item name="android:textColor">?android:textColorPrimary</item> <item name="android:textColor">?android:textColorPrimary</item>
<item name="android:drawableTint">?android:textColorPrimary</item>
</style> </style>
<style name="Widget.Session.Button.Common.UnimportantDestructive"> <style name="Widget.Session.Button.Common.Borderless">
<item name="android:background">@drawable/unimportant_outline_button_medium_background</item> <item name="android:background">@drawable/borderless_button_medium_background</item>
<item name="android:textColor">?android:textColorPrimary</item> <item name="android:textColor">?android:textColorPrimary</item>
<item name="android:backgroundTint">@color/destructive</item>
<item name="android:drawableTint">@color/destructive</item>
</style> </style>
<style name="Widget.Session.Button.Common.DestructiveOutline"> <style name="Widget.Session.Button.Common.DestructiveOutline">
<item name="android:background">@drawable/destructive_outline_button_medium_background</item> <item name="android:background">@drawable/destructive_outline_button_medium_background</item>
<item name="android:textColor">@color/button_destructive</item> <item name="android:textColor">@color/button_destructive</item>
<item name="android:drawableTint">?android:textColorPrimary</item>
</style> </style>
<style name="Widget.Session.Button.Dialog" parent=""> <style name="Widget.Session.Button.Dialog" parent="">
@ -269,7 +262,7 @@
<item name="android:padding">@dimen/normal_padding</item> <item name="android:padding">@dimen/normal_padding</item>
<item name="android:gravity">center_vertical</item> <item name="android:gravity">center_vertical</item>
<item name="android:selectable">true</item> <item name="android:selectable">true</item>
<item name="android:foreground">?attr/selectableItemBackground</item> <item name="android:background">?attr/selectableItemBackground</item>
</style> </style>
<style name="PopupMenu.ConversationItem" parent="@style/Widget.AppCompat.PopupMenu"> <style name="PopupMenu.ConversationItem" parent="@style/Widget.AppCompat.PopupMenu">