mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-20 18:58:38 +00:00
Support for disappearing messages
// FREEBIE
This commit is contained in:
@@ -46,7 +46,8 @@
|
||||
android:layout_toRightOf="@id/contact_photo"
|
||||
android:layout_marginRight="35dp"
|
||||
android:background="@drawable/received_bubble"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
tools:backgroundTint="@color/blue_900">
|
||||
|
||||
<org.thoughtcrime.securesms.components.ThumbnailView
|
||||
android:id="@+id/image_view"
|
||||
@@ -115,14 +116,28 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingRight="4dp"
|
||||
android:paddingRight="2dp"
|
||||
android:paddingEnd="4dp"
|
||||
android:src="?menu_lock_icon_small"
|
||||
android:contentDescription="@string/conversation_item__secure_message_description"
|
||||
android:visibility="gone"
|
||||
android:tint="?conversation_item_received_text_secondary_color"
|
||||
android:tintMode="multiply"/>
|
||||
android:tintMode="multiply"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.ExpirationTimerView
|
||||
android:id="@+id/expiration_indicator"
|
||||
app:empty="@drawable/ic_hourglass_empty_white_18dp"
|
||||
app:full="@drawable/ic_hourglass_full_white_18dp"
|
||||
app:tint="?conversation_item_received_text_secondary_color"
|
||||
app:percentage="0"
|
||||
app:offset="0"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:alpha=".65"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="11dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.DeliveryStatusView
|
||||
android:id="@+id/delivery_status"
|
||||
@@ -141,7 +156,8 @@
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:autoLink="none"
|
||||
android:linksClickable="false"
|
||||
tools:text="Now"/>
|
||||
tools:text="Now"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<TextView android:id="@+id/sim_info"
|
||||
android:layout_width="wrap_content"
|
||||
|
@@ -120,7 +120,7 @@
|
||||
android:minWidth="15sp"
|
||||
android:linksClickable="false"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:layout_gravity="right"
|
||||
android:layout_gravity="right|bottom"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:textColor="?conversation_item_sent_text_secondary_color"
|
||||
android:textSize="@dimen/conversation_item_date_text_size"
|
||||
@@ -135,7 +135,7 @@
|
||||
android:minWidth="15sp"
|
||||
android:linksClickable="false"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:layout_gravity="right"
|
||||
android:layout_gravity="right|bottom"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:textColor="?conversation_item_sent_text_secondary_color"
|
||||
android:textSize="@dimen/conversation_item_date_text_size"
|
||||
@@ -151,8 +151,24 @@
|
||||
android:id="@+id/delivery_status"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha=".7"
|
||||
app:iconColor="?conversation_item_sent_text_secondary_color"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.ExpirationTimerView
|
||||
android:id="@+id/expiration_indicator"
|
||||
app:empty="@drawable/ic_hourglass_empty_white_18dp"
|
||||
app:full="@drawable/ic_hourglass_full_white_18dp"
|
||||
app:tint="@color/black"
|
||||
app:percentage="0"
|
||||
app:offset="0"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:alpha=".6"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="11dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<ImageView android:id="@+id/secure_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -160,10 +176,10 @@
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:paddingLeft="2dp"
|
||||
android:paddingBottom="3dp"
|
||||
android:tint="?conversation_item_sent_text_secondary_color"
|
||||
android:tintMode="multiply"
|
||||
android:contentDescription="@string/conversation_item__secure_message_description" />
|
||||
android:contentDescription="@string/conversation_item__secure_message_description"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
@@ -5,6 +5,8 @@
|
||||
android:id="@+id/conversation_update_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="true"
|
||||
android:background="@drawable/conversation_item_background"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
android:padding="20dp">
|
||||
|
@@ -1,10 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<FrameLayout android:id="@+id/pending_indicator_stub"
|
||||
android:layout_width="wrap_content"
|
||||
android:paddingRight="2dp"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
tools:visibility="gone"/>
|
||||
|
||||
<ImageView android:id="@+id/sent_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -24,6 +26,7 @@
|
||||
android:paddingLeft="2dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:visibility="gone"
|
||||
android:contentDescription="@string/conversation_item_sent__delivered_description" />
|
||||
android:contentDescription="@string/conversation_item_sent__delivered_description"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
</merge>
|
31
res/layout/expiration_dialog.xml
Normal file
31
res/layout/expiration_dialog.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center">
|
||||
|
||||
<cn.carbswang.android.numberpickerview.library.NumberPickerView
|
||||
android:id="@+id/expiration_number_picker"
|
||||
android:layout_alignParentTop="true"
|
||||
app:npv_WrapSelectorWheel="false"
|
||||
app:npv_DividerColor="#cbc8ea"
|
||||
app:npv_TextColorSelected="@color/black"
|
||||
app:npv_ItemPaddingVertical="20dp"
|
||||
app:npv_TextColorHint="@color/grey_600"
|
||||
app:npv_TextSizeNormal="16sp"
|
||||
app:npv_TextSizeSelected="16sp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<TextView android:id="@+id/expiration_details"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/expiration_number_picker"
|
||||
android:minLines="2"
|
||||
android:padding="20dp"/>
|
||||
|
||||
|
||||
</RelativeLayout>
|
26
res/layout/expiration_timer_menu.xml
Normal file
26
res/layout/expiration_timer_menu.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="?android:attr/actionButtonStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/menu_badge_icon"
|
||||
android:src="@drawable/ic_timer_white_24dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/expiration_badge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:gravity="center_horizontal|bottom"
|
||||
android:paddingBottom="3dp"
|
||||
android:paddingTop="1dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="10sp" />
|
||||
</FrameLayout>
|
@@ -75,6 +75,26 @@
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow android:id="@+id/expires_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/message_details_table_row_pad"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Disappears"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<TextView android:id="@+id/expires_in"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/message_details_table_row_pad"
|
||||
tools:text="1 week"/>
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/message_details_table_row_pad">
|
||||
|
Reference in New Issue
Block a user