Updated reply-to UI.

All UI components are now properly styled and functioning according to
spec.
This commit is contained in:
Greyson Parrelli
2018-04-02 16:17:32 -07:00
committed by Moxie Marlinspike
parent d567534609
commit fa99e8f0d0
32 changed files with 604 additions and 221 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" android:exitFadeDuration="1000">
<item android:drawable="@color/textsecure_primary_alpha33" android:state_selected="true" />
<item android:drawable="@color/signal_primary_alpha_focus" android:state_focused="true" />
</selector>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval" >
<solid android:color="#99ffffff" />
</shape>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/gray5"/>
<stroke android:color="@color/gray10" android:width="1dp"/>
<corners android:radius="5dp" />
<stroke android:color="@color/grey_400_transparent" android:width="@dimen/quote_outline_width"/>
<corners android:radius="@dimen/quote_corner_radius" />
</shape>

View File

@@ -34,7 +34,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
app:quote_dismissable="true"
app:message_type="preview"
tools:visibility="visible"/>
<LinearLayout android:layout_width="match_parent"

View File

@@ -79,8 +79,9 @@
android:id="@+id/quote_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:visibility="gone"
app:quote_dismissable="false"
app:message_type="incoming"
tools:visibility="visible"/>
<ViewStub

View File

@@ -42,8 +42,9 @@
android:id="@+id/quote_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:visibility="gone"
app:quote_dismissable="false"
app:message_type="outgoing"
tools:visibility="visible"/>
<ViewStub

View File

@@ -1,101 +1,141 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/quote_container"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:layout_margin="3dp"
android:background="@drawable/quote_background"
tools:visibility="visible"
tools:parentTag="android.widget.LinearLayout">
<merge
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/quote_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone"
android:layout_margin="3dp"
tools:visibility="visible">
<ImageView android:id="@+id/quote_bar"
android:layout_width="5dp"
android:layout_height="match_parent"
android:src="@drawable/quote_bar"
tools:tint="@color/purple_400"/>
<FrameLayout
android:id="@+id/quote_root"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/quote_background">
<LinearLayout android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:layout_marginRight="10dp"
android:layout_marginEnd="10dp"
android:paddingBottom="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView android:id="@+id/quote_author"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:maxLines="1"
tools:textColor="@color/purple_400"
tools:text="Riya"/>
<ImageView
android:id="@+id/quote_bar"
android:layout_width="@dimen/quote_corner_radius"
android:layout_height="match_parent"
android:src="@color/white"
tools:tint="@color/purple_400" />
<LinearLayout android:id="@+id/media_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="7dp"
android:orientation="horizontal"
android:visibility="gone"
tools:visibility="visible">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:layout_marginRight="8dp"
android:layout_marginEnd="8dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:orientation="vertical"
android:layout_weight="1">
<ImageView android:id="@+id/media_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:tint="@color/gray50"
android:src="@drawable/ic_insert_photo_white_18dp"/>
<TextView
android:id="@+id/quote_author"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-medium"
android:maxLines="1"
tools:text="Peter Parker"
tools:textColor="@color/purple_400" />
<TextView android:id="@+id/media_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:textSize="11sp"
tools:text="Photo"/>
<TextView
android:id="@+id/media_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="8dp"
android:paddingTop="4dp"
android:textSize="12sp"
android:textStyle="italic"
android:visibility="gone"
tools:text="Photo"
tools:visibility="visible" />
<TextView
android:id="@+id/quote_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="3"
tools:text="With great power comes great responsibility."
tools:visibility="visible" />
</LinearLayout>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/quote_attachment"
android:layout_width="60dp"
android:layout_height="60dp"
android:scaleType="centerCrop"
android:visibility="gone"
tools:visibility="gone" />
<ImageView
android:id="@+id/quote_video_overlay"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_gravity="center"
android:padding="18dp"
android:src="@drawable/ic_play_arrow_white_24dp"
android:background="@color/transparent_black_30"
android:visibility="gone"
tools:visibility="gone"/>
</FrameLayout>
<FrameLayout
android:id="@+id/quote_attachment_icon_container"
android:layout_width="60dp"
android:layout_height="60dp"
android:visibility="gone"
tools:visibility="visible">
<ImageView
android:id="@+id/quote_attachment_icon_background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="8dp"
android:src="@drawable/circle_tintable" />
<ImageView
android:id="@+id/quote_attachment_icon"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="15dp"
tools:src="@drawable/ic_insert_drive_file_white_24dp"
tools:tint="@color/purple_400" />
</FrameLayout>
</LinearLayout>
<TextView android:id="@+id/quote_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:maxLines="3"
android:ellipsize="end"
tools:text="Short text."
/>
<ImageView
android:id="@+id/quote_dismiss"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="4dp"
android:layout_marginRight="4dp"
android:layout_marginTop="4dp"
android:layout_gravity="top|end"
android:background="@drawable/dismiss_background"
android:src="@drawable/ic_close_white_18dp"
android:tint="@color/gray70" />
</LinearLayout>
<FrameLayout android:layout_width="wrap_content"
android:layout_height="match_parent">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/quote_attachment"
android:layout_width="80dp"
android:layout_height="match_parent"
app:riv_corner_radius_top_right="5dp"
app:riv_corner_radius_bottom_right="5dp"
android:scaleType="centerCrop"
android:visibility="gone"
tools:src="@drawable/surfwalk2"
tools:visibility="visible"/>
<ImageView android:id="@+id/quote_dismiss"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:src="@drawable/ic_close_white_18dp"
android:tint="@color/gray70"
android:background="@drawable/circle_alpha"
android:layout_marginTop="5dp"
android:layout_marginRight="5dp"
android:layout_marginEnd="5dp"/>
</FrameLayout>
</merge>

View File

@@ -243,7 +243,11 @@
</declare-styleable>
<declare-styleable name="QuoteView">
<attr name="quote_dismissable" format="boolean"/>
<attr name="message_type" format="enum">
<enum name="preview" value="0" />
<enum name="outgoing" value="1" />
<enum name="incoming" value="2" />
</attr>
</declare-styleable>

View File

@@ -34,6 +34,7 @@
<color name="transparent_white_20">#20ffffff</color>
<color name="transparent_white_30">#30ffffff</color>
<color name="transparent_white_40">#40ffffff</color>
<color name="transparent_white_70">#70ffffff</color>
<color name="transparent_white_aa">#aaffffff</color>
<color name="conversation_compose_divider">#32000000</color>

View File

@@ -26,6 +26,9 @@
<dimen name="media_bubble_min_height">100dp</dimen>
<dimen name="media_bubble_max_height">320dp</dimen>
<dimen name="quote_corner_radius">3dp</dimen>
<dimen name="quote_outline_width">1dp</dimen>
<integer name="media_overview_cols">3</integer>
<dimen name="message_details_table_row_pad">10dp</dimen>

View File

@@ -194,6 +194,7 @@
<string name="ConversationFragment_sms">SMS</string>
<string name="ConversationFragment_deleting">Deleting</string>
<string name="ConversationFragment_deleting_messages">Deleting messages...</string>
<string name="ConversationFragment_quoted_message_not_found">Quoted message not found</string>
<!-- ConversationListActivity -->
<string name="ConversationListActivity_there_is_no_browser_installed_on_your_device">There is no browser installed on your device.</string>
@@ -813,6 +814,13 @@
<string name="audio_view__pause_accessibility_description">Pause</string>
<string name="audio_view__download_accessibility_description">Download</string>
<!-- QuoteView -->
<string name="QuoteView_audio">Audio</string>
<string name="QuoteView_video">Video</string>
<string name="QuoteView_photo">Photo</string>
<string name="QuoteView_document">Document</string>
<string name="QuoteView_you">You</string>
<!-- conversation_fragment_cab -->
<string name="conversation_fragment_cab__batch_selection_mode">Batch selection mode</string>
<string name="conversation_fragment_cab__batch_selection_amount">%s selected</string>