Persistent media in multi-send.

This commit is contained in:
Greyson Parrelli
2019-03-01 10:50:48 -08:00
parent a79df7d815
commit eb1dd58a0b
33 changed files with 359 additions and 187 deletions

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/decelerate_interpolator">
<translate
android:duration="150"
android:fromXDelta="-100%"
android:toXDelta="0%" />
</set>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/decelerate_interpolator">
<translate
android:duration="150"
android:fromXDelta="0%"
android:toXDelta="-100%" />
</set>

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 923 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/transparent_white_40">
<item android:id="@+id/mask">
<shape>
<corners android:radius="1000dp" />
<solid android:color="@color/white" />
</shape>
</item>
<item android:drawable="@drawable/pill" />
</ripple>

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="1000dp" />
<solid android:color="@color/signal_primary" />
</shape>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="1000dp" />
<solid android:color="@color/core_white" />
</shape>

5
res/drawable/pill.xml Normal file
View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="1000dp" />
<solid android:color="@color/signal_primary" />
</shape>

View File

@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/mediapicker_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>

View File

@@ -6,14 +6,16 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="2dp"
android:layout_marginBottom="2dp">
android:layout_marginBottom="2dp"
android:animateLayoutChanges="true">
<org.thoughtcrime.securesms.components.SquareImageView
android:id="@+id/mediapicker_image_item_thumbnail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="centerCrop"/>
android:scaleType="centerCrop"
tools:src="@drawable/empty_inbox_1"/>
<View
android:layout_width="match_parent"
@@ -28,7 +30,7 @@
android:layout_gravity="center"
android:longClickable="false"
android:visibility="gone"
tools:visibility="visible">
tools:visibility="gone">
<ImageView
android:layout_width="15dp"
@@ -41,20 +43,29 @@
</FrameLayout>
<FrameLayout
android:id="@+id/mediapicker_selected"
<View
android:id="@+id/mediapicker_select_overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/transparent_black_90"
android:visibility="gone">
android:background="@color/transparent_black_90" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_check_white_24dp" />
<ImageView
android:id="@+id/mediapicker_select_on"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|right|end"
android:padding="6dp"
android:src="@drawable/ic_select_on"
android:visibility="gone"
tools:visibility="visible" />
</FrameLayout>
<ImageView
android:id="@+id/mediapicker_select_off"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|right|end"
android:padding="6dp"
android:src="@drawable/ic_select_off"
android:visibility="gone" />
</FrameLayout>

View File

@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/mediasend_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<LinearLayout
android:id="@+id/mediasend_count_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="32dp"
android:layout_marginRight="32dp"
android:layout_gravity="bottom|right|end"
android:padding="8dp"
android:gravity="center"
android:orientation="horizontal"
android:background="@drawable/media_count_button_background"
android:elevation="4dp"
tools:parentTag="android.widget.LinearLayout">
<TextView
android:id="@+id/mediasend_count_button_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="28dp"
android:paddingLeft="7dp"
android:paddingRight="7dp"
android:paddingTop="2dp"
android:paddingBottom="2dp"
android:gravity="center"
android:background="@drawable/media_count_number_background"
android:textColor="@color/signal_primary"
android:textSize="18sp"
tools:text="3" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_marginLeft="2dp"
android:layout_marginStart="2dp"
android:src="@drawable/ic_arrow_right"
android:tint="@color/core_white"/>
</LinearLayout>
</FrameLayout>