Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ID divider color #1213

Merged
merged 2 commits into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

6 changes: 6 additions & 0 deletions app/src/main/res/drawable/view_separator.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<stroke android:color="?colorDividerBackground" android:width="1dp"/>
<corners android:radius="16dp"/>
<solid android:color="?colorPrimary"/>
</shape>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

</RelativeLayout>

<org.thoughtcrime.securesms.components.LabeledSeparatorView
<include layout="@layout/view_separator"
android:id="@+id/separatorView"
android:layout_width="match_parent"
android:layout_height="32dp"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_enter_public_key.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/promptTextView">

<org.thoughtcrime.securesms.components.LabeledSeparatorView
<include layout="@layout/view_separator"
android:id="@+id/separatorView"
android:layout_width="match_parent"
android:layout_height="32dp"
Expand Down
38 changes: 27 additions & 11 deletions app/src/main/res/layout/view_separator.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content">

<TextView
android:id="@+id/titleTextView"
<View
android:layout_gravity="center"
android:background="?colorDividerBackground"
android:layout_width="match_parent"
android:layout_height="1dp"/>

<FrameLayout
android:layout_gravity="center"
android:background="@drawable/view_separator"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:textColor="?android:textColorTertiary"
android:textSize="@dimen/small_font_size"
android:text="@string/your_session_id" />
android:layout_height="wrap_content">

<TextView
android:id="@+id/titleTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:textColor="?android:textColorTertiary"
android:textSize="@dimen/small_font_size"
android:text="@string/your_session_id" />
</FrameLayout>

</RelativeLayout>
</FrameLayout>