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(
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)
}
}
}

View File

@ -78,8 +78,6 @@ class AppearanceSettingsActivity: PassphraseRequiredActionBarActivity(), View.On
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)
binding = ActivityAppearanceSettingsBinding.inflate(layoutInflater)
setContentView(binding.root)
savedInstanceState?.let { bundle ->
val scrollStateParcel = bundle.getSparseParcelableArray<Parcelable>(SCROLL_PARCEL)
if (scrollStateParcel != null) {
binding.scrollView.restoreHierarchyState(scrollStateParcel)
}
}
savedInstanceState?.getSparseParcelableArray<Parcelable>(SCROLL_PARCEL)
?.let(binding.scrollView::restoreHierarchyState)
supportActionBar!!.title = getString(R.string.activity_settings_message_appearance_button_title)
with (binding) {
// accent toggles
@ -132,7 +126,8 @@ class AppearanceSettingsActivity: PassphraseRequiredActionBarActivity(), View.On
it.setOnClickListener(this@AppearanceSettingsActivity)
}
// system settings toggle
systemSettingsSwitch.setOnClickListener(this@AppearanceSettingsActivity)
systemSettingsSwitch.setOnCheckedChangeListener { _, isChecked -> viewModel.setNewFollowSystemSettings(isChecked) }
systemSettingsSwitchHolder.setOnClickListener { systemSettingsSwitch.toggle() }
}
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"?>
<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>

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"?>
<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"
android:right="@dimen/medium_spacing"
android:bottom="@dimen/small_spacing"
@ -10,4 +11,4 @@
android:bottomRightRadius="?preferenceCornerRadius"/>
</shape>
</item>
</layer-list>
</ripple>

View File

@ -1,5 +1,6 @@
<?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"
android:right="@dimen/medium_spacing">
<shape android:shape="rectangle">
@ -14,4 +15,4 @@
<solid android:color="@color/transparent_white_15"/>
</shape>
</item>
</layer-list>
</ripple>

View File

@ -1,5 +1,6 @@
<?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"
android:top="@dimen/small_spacing"
android:right="@dimen/medium_spacing"
@ -9,4 +10,4 @@
<corners android:radius="?preferenceCornerRadius"/>
</shape>
</item>
</layer-list>
</ripple>

View File

@ -1,5 +1,6 @@
<?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"
android:right="@dimen/medium_spacing"
android:top="@dimen/small_spacing"
@ -18,4 +19,4 @@
<solid android:color="@color/transparent_white_15"/>
</shape>
</item>
</layer-list>
</ripple>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -11,6 +11,7 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:textColor="?android:textColorTertiary"
android:textSize="@dimen/medium_font_size"
@ -20,127 +21,170 @@
android:layout_height="wrap_content"
android:text="@string/activity_appearance_themes_category"/>
<LinearLayout
android:id="@+id/theme_option_classic_dark"
android:background="@drawable/preference_top"
<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"
android:paddingHorizontal="@dimen/large_spacing"
android:paddingVertical="@dimen/medium_spacing"
android:orientation="horizontal">
<ImageView
android:theme="@style/Classic.Dark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_themepreview"/>
<TextView
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
android:lines="1"
android:textSize="16sp"
android:text="@string/classic_dark_theme_name"
android:padding="@dimen/medium_spacing"
android:layout_gravity="center"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/theme_radio_classic_dark"
android:layout_gravity="center"
android:layout_margin="@dimen/small_spacing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout
android:id="@+id/theme_option_classic_light"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/preference_middle"
android:paddingHorizontal="@dimen/large_spacing"
android:paddingVertical="@dimen/small_spacing"
android:orientation="horizontal">
<ImageView
android:theme="@style/Classic.Light"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_themepreview"/>
<TextView
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
android:textSize="16sp"
android:lines="1"
android:text="@string/classic_light_theme_name"
android:padding="@dimen/medium_spacing"
android:layout_gravity="center"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/theme_radio_classic_light"
android:layout_gravity="center"
android:layout_margin="@dimen/small_spacing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout
android:id="@+id/theme_option_ocean_dark"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/preference_middle"
android:paddingHorizontal="@dimen/large_spacing"
android:paddingVertical="@dimen/medium_spacing"
android:orientation="horizontal">
<ImageView
android:theme="@style/Ocean.Dark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_themepreview"/>
<TextView
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
android:textSize="16sp"
android:lines="1"
android:text="@string/ocean_dark_theme_name"
android:padding="@dimen/medium_spacing"
android:layout_gravity="center"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/theme_radio_ocean_dark"
android:layout_gravity="center"
android:layout_margin="@dimen/small_spacing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout
android:id="@+id/theme_option_ocean_light"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/preference_bottom"
android:paddingHorizontal="@dimen/large_spacing"
android:paddingTop="@dimen/medium_spacing"
android:paddingBottom="@dimen/large_spacing"
android:orientation="horizontal">
<ImageView
android:theme="@style/Ocean.Light"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_themepreview"/>
<TextView
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
android:textSize="16sp"
android:lines="1"
android:text="@string/ocean_light_theme_name"
android:padding="@dimen/medium_spacing"
android:layout_gravity="center"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/theme_radio_ocean_light"
android:layout_gravity="center"
android:layout_margin="@dimen/small_spacing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
android:layout_height="wrap_content">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/theme_option_classic_dark"
android:addStatesFromChildren="true"
android:background="?selectableItemBackground"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="@dimen/small_spacing"
android:paddingVertical="@dimen/small_spacing"
android:orientation="horizontal">
<ImageView
android:theme="@style/Classic.Dark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_themepreview"/>
<TextView
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
android:lines="1"
android:textSize="16sp"
android:text="@string/classic_dark_theme_name"
android:padding="@dimen/medium_spacing"
android:layout_gravity="center"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/theme_radio_classic_dark"
android:layout_gravity="center"
android:layout_margin="@dimen/small_spacing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<View
android:alpha="0.15"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:textColorPrimary"/>
<LinearLayout
android:id="@+id/theme_option_classic_light"
android:addStatesFromChildren="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/small_spacing"
android:paddingVertical="@dimen/small_spacing"
android:orientation="horizontal">
<ImageView
android:theme="@style/Classic.Light"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_themepreview"/>
<TextView
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
android:textSize="16sp"
android:lines="1"
android:text="@string/classic_light_theme_name"
android:padding="@dimen/medium_spacing"
android:layout_gravity="center"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/theme_radio_classic_light"
android:layout_gravity="center"
android:layout_margin="@dimen/small_spacing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</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
android:id="@+id/theme_option_ocean_dark"
android:addStatesFromChildren="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/small_spacing"
android:paddingVertical="@dimen/small_spacing"
android:orientation="horizontal">
<ImageView
android:theme="@style/Ocean.Dark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_themepreview"/>
<TextView
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
android:textSize="16sp"
android:lines="1"
android:text="@string/ocean_dark_theme_name"
android:padding="@dimen/medium_spacing"
android:layout_gravity="center"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/theme_radio_ocean_dark"
android:layout_gravity="center"
android:layout_margin="@dimen/small_spacing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</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
android:id="@+id/theme_option_ocean_light"
android:addStatesFromChildren="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:paddingHorizontal="@dimen/small_spacing"
android:paddingVertical="@dimen/small_spacing"
android:orientation="horizontal">
<ImageView
android:theme="@style/Ocean.Light"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_themepreview"/>
<TextView
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
android:textSize="16sp"
android:lines="1"
android:text="@string/ocean_light_theme_name"
android:padding="@dimen/medium_spacing"
android:layout_gravity="center"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/theme_radio_ocean_light"
android:layout_gravity="center"
android:layout_margin="@dimen/small_spacing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
<TextView
android:textColor="?android:textColorTertiary"
android:textSize="@dimen/medium_font_size"
@ -208,8 +252,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginVertical="@dimen/medium_spacing"
android:layout_marginHorizontal="@dimen/large_spacing">
android:layout_marginVertical="@dimen/small_spacing"
android:layout_marginHorizontal="@dimen/small_spacing">
<View
android:id="@+id/accent_green"
android:background="@drawable/padded_circle_tintable"
@ -270,29 +314,39 @@
android:layout_height="wrap_content"
android:text="@string/activity_appearance_follow_system_category"/>
<LinearLayout
android:padding="@dimen/medium_spacing"
<androidx.cardview.widget.CardView
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:background="@drawable/preference_single"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center">
<TextView
android:textColor="?android:textColorPrimary"
android:textStyle="bold"
android:textSize="@dimen/medium_font_size"
android:paddingHorizontal="@dimen/large_spacing"
android:paddingVertical="@dimen/small_spacing"
android:text="@string/activity_appearance_follow_system_explanation"
android:layout_width="0dp"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/system_settings_switch_holder"
android:background="?selectableItemBackground"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/system_settings_switch"
android:paddingHorizontal="@dimen/large_spacing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
android:addStatesFromChildren="true"
android:gravity="center">
<TextView
android:textColor="?android:textColorPrimary"
android:textStyle="bold"
android:textSize="@dimen/medium_font_size"
android:paddingHorizontal="@dimen/large_spacing"
android:paddingVertical="@dimen/small_spacing"
android:text="@string/activity_appearance_follow_system_explanation"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/system_settings_switch"
android:paddingHorizontal="@dimen/large_spacing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
</ScrollView>

View File

@ -57,6 +57,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"

View File

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

View File

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

View File

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

View File

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

View File

@ -4,11 +4,12 @@
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"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -82,38 +82,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="">
@ -269,7 +262,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">