Add storage management features.

This commit is contained in:
Alan Evans
2019-12-03 11:05:03 -05:00
committed by Greyson Parrelli
parent bceb69b284
commit 52447f5e97
78 changed files with 3343 additions and 1622 deletions

View File

@@ -1,87 +1,43 @@
<?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"
tools:context="org.thoughtcrime.securesms.components.AudioView">
xmlns:tools="http://schemas.android.com/tools"
tools:context="org.thoughtcrime.securesms.components.AudioView">
<LinearLayout android:id="@+id/audio_widget_container"
android:orientation="vertical"
android:layout_width="match_parent"
tools:background="#ff00ff"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/audio_widget_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:background="#ff00ff">
<LinearLayout android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal">
<org.thoughtcrime.securesms.components.AnimatingToggle
android:id="@+id/control_toggle"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="center"
android:gravity="center">
<include layout="@layout/audio_view_circle" />
<FrameLayout
android:id="@+id/progress_and_play"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.pnikosis.materialishprogress.ProgressWheel
android:id="@+id/download_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
app:matProg_barColor="@color/white"
app:matProg_linearProgress="true"
app:matProg_spinSpeed="0.333" />
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/play"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="center"
android:background="@drawable/circle_touch_highlight_background"
android:contentDescription="@string/audio_view__play_pause_accessibility_description"
android:gravity="center_vertical"
android:padding="12dp"
android:visibility="gone"
app:lottie_rawRes="@raw/lottie_play_pause"
tools:visibility="visible" />
</FrameLayout>
<ImageView android:id="@+id/download"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:clickable="true"
android:visibility="gone"
android:background="@drawable/circle_touch_highlight_background"
android:src="@drawable/ic_download_circle_fill_white_48dp"
android:contentDescription="@string/audio_view__download_accessibility_description"/>
</org.thoughtcrime.securesms.components.AnimatingToggle>
<SeekBar android:id="@+id/seek"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"/>
<SeekBar
android:id="@+id/seek"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical" />
</LinearLayout>
<TextView android:id="@+id/timestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="76dip"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?conversation_item_sent_text_secondary_color"
android:textSize="@dimen/conversation_item_date_text_size"
android:fontFamily="sans-serif-light"
android:autoLink="none"
android:visibility="gone"
tools:text="00:15"
tools:visibility="visible"
/>
<TextView
android:id="@+id/timestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="76dip"
android:autoLink="none"
android:fontFamily="sans-serif-light"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?conversation_item_sent_text_secondary_color"
android:textSize="@dimen/conversation_item_date_text_size"
android:visibility="gone"
tools:text="00:15"
tools:visibility="visible" />
</LinearLayout>

View File

@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<org.thoughtcrime.securesms.components.AnimatingToggle xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/control_toggle"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="center"
android:gravity="center"
tools:showIn="@layout/audio_view">
<FrameLayout
android:id="@+id/progress_and_play"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.pnikosis.materialishprogress.ProgressWheel
android:id="@+id/circle_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
app:matProg_barColor="@color/white"
app:matProg_linearProgress="true"
app:matProg_spinSpeed="0.333" />
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/play"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="center"
android:background="@drawable/circle_touch_highlight_background"
android:contentDescription="@string/audio_view__play_pause_accessibility_description"
android:gravity="center_vertical"
android:padding="12dp"
android:visibility="gone"
app:lottie_rawRes="@raw/lottie_play_pause"
tools:visibility="visible" />
</FrameLayout>
<ImageView
android:id="@+id/download"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="@drawable/circle_touch_highlight_background"
android:clickable="true"
android:contentDescription="@string/audio_view__download_accessibility_description"
android:focusable="true"
android:src="@drawable/ic_download_circle_fill_white_48dp"
android:visibility="gone" />
</org.thoughtcrime.securesms.components.AnimatingToggle>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="org.thoughtcrime.securesms.components.AudioView">
<LinearLayout
android:id="@+id/audio_widget_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:background="#ff00ff">
<include layout="@layout/audio_view_circle" />
<SeekBar
android:id="@+id/seek"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:visibility="gone" />
</LinearLayout>
</merge>

View File

@@ -1,39 +1,121 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
android:layout_width="match_parent"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:id="@+id/appBarLayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:background="?attr/media_overview_toolbar_background"
android:titleTextColor="?attr/media_overview_toolbar_foreground"
app:layout_scrollFlags="scroll|enterAlways"/>
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:background="?attr/media_overview_toolbar_background"
android:titleTextColor="?attr/media_overview_toolbar_foreground"
app:layout_scrollFlags="scroll|enterAlways" />
<org.thoughtcrime.securesms.components.ControllableTabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:background="?attr/media_overview_toolbar_background"
app:tabBackground="?attr/media_overview_toolbar_background"
app:tabIndicatorColor="@color/textsecure_primary"
app:tabSelectedTextColor="@color/textsecure_primary"/>
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:background="?attr/media_overview_toolbar_background"
app:tabBackground="?attr/media_overview_toolbar_background"
app:tabIndicatorColor="@color/textsecure_primary"
app:tabSelectedTextColor="@color/textsecure_primary" />
</com.google.android.material.appbar.AppBarLayout>
<org.thoughtcrime.securesms.components.ControllableViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
<View
android:id="@+id/sorting"
android:layout_width="0dp"
android:layout_height="32dp"
android:background="?attr/media_overview_toolbar_secondary_background"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/appBarLayout" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<TextView
android:id="@+id/sort_order"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:gravity="center_vertical"
android:textColor="?attr/media_overview_toolbar_foreground"
app:layout_constraintBottom_toBottomOf="@+id/sorting"
app:layout_constraintStart_toStartOf="@+id/sorting"
app:layout_constraintTop_toBottomOf="@+id/appBarLayout"
tools:text="@string/MediaOverviewActivity_Storage_used" />
<ImageView
android:id="@+id/sort_order_arrow"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:importantForAccessibility="no"
android:padding="4dp"
android:tint="?attr/media_overview_toolbar_foreground"
app:layout_constraintBottom_toBottomOf="@+id/sort_order"
app:layout_constraintStart_toEndOf="@+id/sort_order"
app:layout_constraintTop_toTopOf="@+id/sort_order"
app:srcCompat="@drawable/ic_arrow_down_14" />
<org.thoughtcrime.securesms.components.AnimatingToggle
android:id="@+id/grid_list_toggle"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_gravity="center"
android:gravity="center"
android:paddingStart="16dp"
android:paddingEnd="16dp"
app:layout_constraintBottom_toBottomOf="@+id/sorting"
app:layout_constraintEnd_toEndOf="@+id/sorting"
app:layout_constraintTop_toBottomOf="@+id/appBarLayout">
<ImageView
android:id="@+id/view_grid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="@drawable/circle_touch_highlight_background"
android:clickable="true"
android:contentDescription="@string/MediaOverviewActivity_Grid_view_description"
android:focusable="true"
android:gravity="center_vertical"
android:tint="?attr/media_overview_toolbar_foreground"
android:visibility="visible"
app:srcCompat="?attr/media_overview_grid_view_icon" />
<ImageView
android:id="@+id/view_detail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="@drawable/circle_touch_highlight_background"
android:clickable="true"
android:contentDescription="@string/MediaOverviewActivity_List_view_description"
android:focusable="true"
android:gravity="center_vertical"
android:tint="?attr/media_overview_toolbar_foreground"
android:visibility="gone"
app:srcCompat="?attr/media_overview_list_view_icon" />
</org.thoughtcrime.securesms.components.AnimatingToggle>
<org.thoughtcrime.securesms.components.ControllableViewPager
android:id="@+id/pager"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/sorting" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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">
<FrameLayout
android:id="@+id/image_container"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<org.thoughtcrime.securesms.components.AudioView
android:id="@+id/audio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:autoRewind="true"
app:small="true" />
<include layout="@layout/media_overview_selected_overlay" />
</FrameLayout>
<include layout="@layout/media_overview_detail_text" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<FrameLayout
android:id="@+id/image_container"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<FrameLayout
android:id="@+id/document_icon_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:clickable="false"
android:focusable="false"
android:gravity="center">
<ImageView
android:id="@+id/icon"
android:layout_width="38dp"
android:layout_height="50dp"
android:importantForAccessibility="no"
android:src="?attachment_document_icon_large" />
<TextView
android:id="@+id/document_extension"
style="@style/Signal.Text.Caption"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:clickable="false"
android:gravity="center"
android:scaleType="centerInside"
android:textAlignment="center"
android:textColor="@color/core_black"
android:textSize="10sp"
android:visibility="visible"
tools:text="PDF"
tools:visibility="visible" />
</FrameLayout>
<include layout="@layout/media_overview_selected_overlay" />
</FrameLayout>
<include layout="@layout/media_overview_detail_text" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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">
<FrameLayout
android:id="@+id/image_container"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/media_preview_activity__media_content_description" />
<include layout="@layout/media_overview_selected_overlay" />
</FrameLayout>
<include layout="@layout/media_overview_detail_text" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,46 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/image_container"
app:layout_constraintTop_toTopOf="parent"
tools:showIn="@layout/media_overview_detail_item_media">
<TextView
android:id="@+id/line1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:paddingStart="6dp"
android:paddingEnd="6dp"
android:textSize="14sp"
android:visibility="gone"
app:layout_constraintStart_toEndOf="@+id/image_container"
app:layout_constraintTop_toTopOf="parent"
tools:text="Sent voice note, 02:35"
tools:visibility="visible" />
<TextView
android:id="@+id/line2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:paddingStart="6dp"
android:paddingEnd="6dp"
android:textSize="14sp"
android:visibility="gone"
app:layout_constraintStart_toEndOf="@+id/image_container"
app:layout_constraintTop_toTopOf="parent"
tools:text="2.7 MB, 11.06.19 at 5:25 AM"
tools:visibility="visible" />
</LinearLayout>

View File

@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp">
<org.thoughtcrime.securesms.components.DocumentView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/document_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:visibility="visible"
app:doc_titleColor="?media_overview_document_primary"
app:doc_captionColor="?media_overview_document_secondary"
tools:visibility="visible"/>
<TextView android:id="@+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textSize="12sp"
android:textColor="?media_overview_document_secondary"
android:paddingTop="20dp"
tools:text="Jun 1"/>
</LinearLayout>

View File

@@ -1,22 +0,0 @@
<?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:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/media_overview_toolbar_background">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical" />
<TextView android:id="@+id/no_documents"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="24sp"
android:gravity="center"
android:visibility="gone"
android:text="@string/media_overview_documents_fragment__no_documents_found" />
</RelativeLayout>

View File

@@ -1,22 +0,0 @@
<?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:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/media_overview_toolbar_background">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/media_grid"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical" />
<TextView android:id="@+id/no_images"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="24sp"
android:gravity="center"
android:visibility="gone"
android:text="@string/media_overview_activity__no_media" />
</RelativeLayout>

View File

@@ -1,28 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<org.thoughtcrime.securesms.components.SquareFrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="2dp">
<org.thoughtcrime.securesms.components.SquareFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/media_preview_activity__media_content_description" />
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/media_preview_activity__media_content_description"
android:padding="2dp" />
<TextView
android:id="@+id/image_file_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="4dp"
android:background="@drawable/media_overview_size_pill_background"
android:gravity="center"
android:paddingStart="6dp"
android:paddingEnd="6dp"
android:textColor="@color/white"
android:textSize="12sp"
android:visibility="gone"
tools:text="1.3 MB"
tools:visibility="visible" />
<FrameLayout
android:id="@+id/selected_indicator"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/MediaOverview_Media_selected_overlay"
android:visibility="gone">
android:visibility="gone"
tools:showIn="@layout/media_overview_gallery_item"
tools:visibility="visible">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/check"
android:layout_gravity="center"/>
android:layout_marginTop="8dp"
android:layout_marginStart="8dp"
android:contentDescription="@string/MediaOverviewActivity_Selected_description"
app:srcCompat="@drawable/ic_check_circle_solid_20" />
</FrameLayout>
</org.thoughtcrime.securesms.components.SquareFrameLayout>

View File

@@ -1,18 +0,0 @@
<?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:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/media_overview_toolbar_background"
android:padding="16dp">
<TextView android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:textColor="?attr/media_overview_header_foreground"
android:textSize="14sp"
android:textStyle="bold"
android:textAllCaps="true"
tools:text="March 1, 2015" />
</FrameLayout>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/media_overview_toolbar_background">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/media_grid"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical" />
<TextView
android:id="@+id/no_images"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/media_overview_activity__no_media"
android:textSize="24sp"
android:visibility="gone" />
</RelativeLayout>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/selected_indicator"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/media_overview_toolbar_background"
android:visibility="gone"
tools:showIn="@layout/media_overview_detail_item_document"
tools:visibility="visible">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:contentDescription="@string/MediaOverviewActivity_Selected_description"
app:srcCompat="@drawable/ic_check_circle_solid_20" />
</FrameLayout>

View File

@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/total_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="28sp"
app:layout_constraintEnd_toEndOf="@+id/storageGraphView"
app:layout_constraintTop_toTopOf="parent"
tools:text="1.2GB" />
<org.thoughtcrime.securesms.preferences.widgets.StorageGraphView
android:id="@+id/storageGraphView"
android:layout_width="0dp"
android:layout_height="28dp"
android:layout_marginStart="32dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="32dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/total_size" />
<TextView
android:id="@+id/legend_photos"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:drawableStart="@drawable/storage_legend_photos"
android:drawablePadding="4dp"
android:text="@string/preferences_storage__photos"
android:textSize="12sp"
app:layout_constraintEnd_toStartOf="@+id/legend_videos"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="@+id/storageGraphView"
app:layout_constraintTop_toBottomOf="@+id/storageGraphView" />
<TextView
android:id="@+id/legend_videos"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableStart="@drawable/storage_legend_videos"
android:drawablePadding="4dp"
android:text="@string/preferences_storage__videos"
android:textSize="12sp"
app:layout_constraintEnd_toStartOf="@+id/legend_audio"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/legend_photos"
app:layout_constraintTop_toTopOf="@+id/legend_photos" />
<TextView
android:id="@+id/legend_audio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableStart="@drawable/storage_legend_files"
android:drawablePadding="4dp"
android:text="@string/preferences_storage__files"
android:textSize="12sp"
app:layout_constraintEnd_toStartOf="@+id/legend_files"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/legend_videos"
app:layout_constraintTop_toTopOf="@+id/legend_videos" />
<TextView
android:id="@+id/legend_files"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableStart="@drawable/storage_legend_audio"
android:drawablePadding="4dp"
android:text="@string/preferences_storage__audio"
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="@+id/storageGraphView"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/legend_audio"
app:layout_constraintTop_toTopOf="@+id/legend_audio" />
<TextView
android:id="@+id/free_up_space"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:text="@string/preferences_storage__review_storage"
android:textAllCaps="true"
android:textColor="@color/signal_primary_dark"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/legend_photos" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -30,7 +30,9 @@
android:layout_height="wrap_content"
android:padding="6dp"
android:src="@drawable/ic_caption_28"
android:visibility="gone" />
android:visibility="gone"
android:contentDescription="@string/ThumbnailView_Has_a_caption_description"
tools:visibility="visible" />
<FrameLayout
android:id="@+id/play_overlay"
@@ -43,12 +45,13 @@
tools:visibility="visible">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="12dp"
android:contentDescription="@string/ThumbnailView_Play_video_description"
android:paddingLeft="5dp"
android:tint="@color/core_blue"
android:scaleType="fitXY"
android:tint="@color/core_blue"
app:srcCompat="@drawable/triangle_right"
tools:ignore="RtlHardcoded,RtlSymmetry" />