let ThumbnailView handle remove button placement

Closes #3849
// FREEBIE
This commit is contained in:
Jake McGinty
2015-07-30 15:02:20 -07:00
committed by Moxie Marlinspike
parent 835f1efc76
commit 1641fd91cf
8 changed files with 85 additions and 37 deletions

View File

@@ -9,7 +9,7 @@
<item>
<shape android:shape="oval">
<size android:height="21dp" android:width="21dp"/>
<solid android:color="@color/textsecure_primary_dark"/>
<solid android:color="@color/red_600"/>
<stroke android:color="@android:color/transparent"
android:width="3dp"/>
</shape>

View File

@@ -29,7 +29,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:paddingTop="10dp"
android:background="?android:windowBackground"
android:visibility="gone">
@@ -41,13 +40,6 @@
android:contentDescription="@string/conversation_activity__attachment_thumbnail"
app:backgroundColorHint="?conversation_background" />
<ImageView android:id="@+id/remove_image_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/conversation_attachment_close_circle"
android:layout_marginRight="115dp"
android:layout_gravity="top|center_horizontal"/>
</FrameLayout>
<LinearLayout android:id="@+id/bottom_panel"

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView android:id="@+id/thumbnail_image"
android:layout_width="match_parent"
@@ -10,15 +9,15 @@
android:contentDescription="@string/conversation_item__mms_image_description"
android:layout_margin="@dimen/media_bubble_border_width" />
<com.pnikosis.materialishprogress.ProgressWheel
android:id="@+id/progress_wheel"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_gravity="center"
android:background="@drawable/progress_background"
android:visibility="gone"
app:matProg_barColor="@color/white"
app:matProg_linearProgress="true"
app:matProg_spinSpeed="0.333" />
<ViewStub android:id="@+id/progress_wheel_stub"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_gravity="center"
android:layout="@layout/thumbnail_view_progress_wheel" />
<ViewStub android:id="@+id/remove_button_stub"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|right"
android:layout="@layout/thumbnail_view_remove_button" />
</merge>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<com.pnikosis.materialishprogress.ProgressWheel
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/progress_wheel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/progress_background"
android:visibility="gone"
app:matProg_barColor="@color/white"
app:matProg_linearProgress="true"
app:matProg_spinSpeed="0.333" />

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/remove_image_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/conversation_attachment_close_circle" />