Merge branch 'dev' of https://github.com/loki-project/session-android into permission-refactoring

This commit is contained in:
Anton Chekulaev
2020-09-09 17:12:46 +10:00
85 changed files with 814 additions and 388 deletions

View File

@@ -76,7 +76,8 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:clipChildren="false">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"

View File

@@ -23,7 +23,8 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_margin="@dimen/large_spacing">
android:layout_margin="@dimen/large_spacing"
android:clipChildren="false">
<LinearLayout
android:id="@+id/pathRowsContainer"

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/contentView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
@@ -30,7 +31,7 @@
android:textColor="@color/text"
android:text="There are two ways Session can notify you of new messages." />
<LinearLayout
<org.thoughtcrime.securesms.loki.views.PNModeView
android:id="@+id/fcmOptionView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -66,9 +67,9 @@
android:textStyle="bold"
android:text="@string/activity_pn_mode_recommended_option_tag" />
</LinearLayout>
</org.thoughtcrime.securesms.loki.views.PNModeView>
<LinearLayout
<org.thoughtcrime.securesms.loki.views.PNModeView
android:id="@+id/backgroundPollingOptionView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -95,7 +96,7 @@
android:textColor="@color/text"
android:text="Session will occasionally check for new messages in the background. Full metadata protection is guaranteed, but message notifications will be unreliable." />
</LinearLayout>
</org.thoughtcrime.securesms.loki.views.PNModeView>
<View
android:layout_width="match_parent"

View File

@@ -20,9 +20,15 @@
android:gravity="center_vertical"
android:orientation="horizontal">
<org.thoughtcrime.securesms.loki.views.ProfilePictureView
android:id="@+id/profilePictureView"
android:layout_width="@dimen/medium_profile_picture_size"
android:layout_height="@dimen/medium_profile_picture_size" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/medium_spacing"
android:orientation="vertical">
<TextView

View File

@@ -9,5 +9,5 @@
android:visibility="gone"
app:doc_titleColor="?conversation_item_sent_text_primary_color"
app:doc_captionColor="?conversation_item_sent_text_secondary_color"
app:doc_downloadButtonTint="?conversation_item_sent_download_icon_color"
app:doc_downloadButtonTint="?android:colorControlNormal"
tools:visibility="visible"/>

View File

@@ -9,13 +9,20 @@
app:behavior_hideable="true"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
<TextView
android:id="@+id/detailsTextView"
style="@style/BottomSheetActionItem"
android:drawableStart="@drawable/ic_info_outline_white_24dp"
android:drawableTint="?attr/colorControlNormal"
android:text="@string/details" />
<TextView
android:id="@+id/blockTextView"
style="@style/BottomSheetActionItem"
android:drawableStart="?attr/menu_block_icon"
android:text="@string/RecipientPreferenceActivity_block"
android:visibility="gone"
tools:visibility="visible"/>
tools:visibility="visible" />
<TextView
android:id="@+id/unblockTextView"
@@ -23,7 +30,7 @@
android:drawableStart="?attr/menu_accept_icon"
android:text="@string/RecipientPreferenceActivity_unblock"
android:visibility="gone"
tools:visibility="visible"/>
tools:visibility="visible" />
<TextView
android:id="@+id/deleteTextView"

View File

@@ -9,7 +9,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:background="?attr/search_background"
android:background="?android:windowBackground"
android:visibility="gone" />
<androidx.recyclerview.widget.RecyclerView

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_horizontal"
android:paddingLeft="@dimen/large_spacing"
android:paddingRight="@dimen/large_spacing"
android:paddingBottom="@dimen/large_spacing"
app:behavior_hideable="true"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
<org.thoughtcrime.securesms.loki.views.ProfilePictureView
android:id="@+id/profilePictureView"
android:layout_width="@dimen/large_profile_picture_size"
android:layout_height="@dimen/large_profile_picture_size"
android:layout_marginTop="@dimen/large_spacing" />
<TextView
android:id="@+id/nameTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_spacing"
android:textSize="@dimen/massive_font_size"
android:textStyle="bold"
android:textColor="@color/text"
android:text="Spiderman" />
<TextView
style="@style/SessionIDTextView"
android:id="@+id/publicKeyTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/large_font_size"
android:layout_marginTop="@dimen/large_spacing"
android:textIsSelectable="true"
android:text="05987d601943c267879be41830888066c6a024cbdc9a548d06813924bf3372ea78" />
<Button
style="@style/Widget.Session.Button.Common.ProminentOutline"
android:id="@+id/copyButton"
android:layout_width="wrap_content"
android:layout_height="@dimen/medium_button_height"
android:layout_marginTop="@dimen/medium_spacing"
android:paddingLeft="@dimen/large_spacing"
android:paddingRight="@dimen/large_spacing"
android:text="@string/copy" />
</LinearLayout>

View File

@@ -13,8 +13,7 @@
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="vertical"
android:padding="10dp"
android:background="?attr/invite_background">
android:padding="10dp">
<ImageView android:id="@+id/heart"
android:layout_width="wrap_content"

View File

@@ -17,7 +17,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:padding="6dp"
android:src="@drawable/ic_search_white_24dp"
android:src="@drawable/ic_baseline_search_24"
android:tint="?media_keyboard_button_color"
android:background="?selectableItemBackgroundBorderless"
android:visibility="invisible"
@@ -98,7 +98,7 @@
android:tint="?media_keyboard_button_color"
android:visibility="gone"
android:background="?selectableItemBackground"
app:srcCompat="@drawable/ic_plus_24"
app:srcCompat="@drawable/ic_baseline_add_24"
app:layout_constraintBottom_toBottomOf="@id/media_keyboard_tabs"
app:layout_constraintTop_toTopOf="@id/media_keyboard_tabs"
app:layout_constraintEnd_toStartOf="@id/media_keyboard_backspace_backup"

View File

@@ -6,7 +6,8 @@
android:id="@+id/prompt_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:orientation="vertical"
tools:context="org.thoughtcrime.securesms.PassphrasePromptActivity">
<View android:id="@+id/shim"
android:layout_width="match_parent"
@@ -25,7 +26,7 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_marginTop="20dp">
android:layout_alignParentTop="true">
<ImageView
android:layout_width="wrap_content"
@@ -78,7 +79,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="60dp"
tools:visibility="gone">
tools:visibility="visible">
<EditText android:id="@+id/passphrase_edit"
android:layout_width="match_parent"
@@ -88,55 +89,56 @@
android:layout_marginEnd="50dp"
android:singleLine="true"
android:paddingStart="10dp"
android:paddingEnd="40dp"/>
android:paddingEnd="40dp"
tools:text="password"/>
<!-- <org.thoughtcrime.securesms.components.AnimatingToggle-->
<!-- android:id="@+id/button_toggle"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_alignRight="@+id/passphrase_edit"-->
<!-- android:layout_centerVertical="true"-->
<!-- android:layout_gravity="center"-->
<!-- android:gravity="center">-->
<org.thoughtcrime.securesms.components.AnimatingToggle
android:id="@+id/button_toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/passphrase_edit"
android:layout_centerVertical="true"
android:layout_gravity="center"
android:gravity="center">
<!-- <ImageButton android:id="@+id/passphrase_visibility"-->
<!-- android:src="?ic_visibility"-->
<!-- android:background="@drawable/touch_highlight_background"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:paddingStart="8dp"-->
<!-- android:paddingEnd="8dp"-->
<!-- android:paddingTop="3dp"-->
<!-- android:paddingBottom="3dp"-->
<!-- android:layout_centerVertical="true" />-->
<ImageButton android:id="@+id/passphrase_visibility"
android:src="?ic_visibility_on"
android:background="@drawable/touch_highlight_background"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:layout_centerVertical="true" />
<!-- <ImageButton android:id="@+id/passphrase_visibility_off"-->
<!-- android:src="?ic_visibility_off"-->
<!-- android:background="@drawable/touch_highlight_background"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:paddingStart="8dp"-->
<!-- android:paddingEnd="8dp"-->
<!-- android:paddingTop="3dp"-->
<!-- android:paddingBottom="3dp"-->
<!-- android:layout_centerVertical="true" />-->
<ImageButton android:id="@+id/passphrase_visibility_off"
android:src="?ic_visibility_off"
android:background="@drawable/touch_highlight_background"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:layout_centerVertical="true" />
<!-- </org.thoughtcrime.securesms.components.AnimatingToggle>-->
</org.thoughtcrime.securesms.components.AnimatingToggle>
<!-- <ImageButton android:id="@+id/ok_button"-->
<!-- android:src="?ic_arrow_forward"-->
<!-- android:contentDescription="@string/PassphrasePromptActivity_ok_button_content_description"-->
<!-- android:background="@null"-->
<!-- android:text="@string/prompt_passphrase_activity__unlock"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_alignParentEnd="true"-->
<!-- android:layout_centerVertical="true"-->
<!-- android:textAppearance="?android:attr/textAppearanceMedium"-->
<!-- android:paddingStart="5dp"-->
<!-- android:paddingTop="5dp"-->
<!-- android:paddingEnd="10dp"-->
<!-- android:paddingBottom="5dp"/>-->
<ImageButton android:id="@+id/ok_button"
android:src="?ic_arrow_forward"
android:contentDescription="@string/PassphrasePromptActivity_ok_button_content_description"
android:background="@null"
android:text="@string/prompt_passphrase_activity__unlock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:paddingStart="5dp"
android:paddingTop="5dp"
android:paddingEnd="10dp"
android:paddingBottom="5dp"/>
</RelativeLayout>
</LinearLayout>

View File

@@ -5,6 +5,7 @@
android:layout_height="wrap_content"
android:paddingLeft="@dimen/very_large_spacing"
android:paddingRight="@dimen/very_large_spacing"
android:paddingBottom="@dimen/medium_spacing"
android:orientation="vertical">
<TextView

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto">
<RelativeLayout
android:id="@+id/doubleModeImageViewContainer"