diff --git a/res/drawable-hdpi/ic_document_large_dark.png b/res/drawable-hdpi/ic_document_large_dark.png deleted file mode 100644 index f17a5078a..000000000 Binary files a/res/drawable-hdpi/ic_document_large_dark.png and /dev/null differ diff --git a/res/drawable-hdpi/ic_document_large_light.png b/res/drawable-hdpi/ic_document_large_light.png deleted file mode 100644 index 1c3bd34be..000000000 Binary files a/res/drawable-hdpi/ic_document_large_light.png and /dev/null differ diff --git a/res/drawable-hdpi/ic_document_small_dark.png b/res/drawable-hdpi/ic_document_small_dark.png deleted file mode 100644 index 4142741f3..000000000 Binary files a/res/drawable-hdpi/ic_document_small_dark.png and /dev/null differ diff --git a/res/drawable-hdpi/ic_document_small_light.png b/res/drawable-hdpi/ic_document_small_light.png deleted file mode 100644 index a68e1c5a6..000000000 Binary files a/res/drawable-hdpi/ic_document_small_light.png and /dev/null differ diff --git a/res/drawable-mdpi/ic_document_large_dark.png b/res/drawable-mdpi/ic_document_large_dark.png deleted file mode 100644 index 52f8d3654..000000000 Binary files a/res/drawable-mdpi/ic_document_large_dark.png and /dev/null differ diff --git a/res/drawable-mdpi/ic_document_large_light.png b/res/drawable-mdpi/ic_document_large_light.png deleted file mode 100644 index d0b6f2a2f..000000000 Binary files a/res/drawable-mdpi/ic_document_large_light.png and /dev/null differ diff --git a/res/drawable-mdpi/ic_document_small_dark.png b/res/drawable-mdpi/ic_document_small_dark.png deleted file mode 100644 index 2dad4a5dd..000000000 Binary files a/res/drawable-mdpi/ic_document_small_dark.png and /dev/null differ diff --git a/res/drawable-mdpi/ic_document_small_light.png b/res/drawable-mdpi/ic_document_small_light.png deleted file mode 100644 index 8972c8b62..000000000 Binary files a/res/drawable-mdpi/ic_document_small_light.png and /dev/null differ diff --git a/res/drawable-xhdpi/ic_document_large_dark.png b/res/drawable-xhdpi/ic_document_large_dark.png deleted file mode 100644 index cb4e3f6de..000000000 Binary files a/res/drawable-xhdpi/ic_document_large_dark.png and /dev/null differ diff --git a/res/drawable-xhdpi/ic_document_large_light.png b/res/drawable-xhdpi/ic_document_large_light.png deleted file mode 100644 index 24027f545..000000000 Binary files a/res/drawable-xhdpi/ic_document_large_light.png and /dev/null differ diff --git a/res/drawable-xhdpi/ic_document_small_dark.png b/res/drawable-xhdpi/ic_document_small_dark.png deleted file mode 100644 index 801b63381..000000000 Binary files a/res/drawable-xhdpi/ic_document_small_dark.png and /dev/null differ diff --git a/res/drawable-xhdpi/ic_document_small_light.png b/res/drawable-xhdpi/ic_document_small_light.png deleted file mode 100644 index d2378b177..000000000 Binary files a/res/drawable-xhdpi/ic_document_small_light.png and /dev/null differ diff --git a/res/drawable-xxhdpi/ic_document_large_dark.png b/res/drawable-xxhdpi/ic_document_large_dark.png deleted file mode 100644 index f6f21a9cd..000000000 Binary files a/res/drawable-xxhdpi/ic_document_large_dark.png and /dev/null differ diff --git a/res/drawable-xxhdpi/ic_document_large_light.png b/res/drawable-xxhdpi/ic_document_large_light.png deleted file mode 100644 index 26c2172db..000000000 Binary files a/res/drawable-xxhdpi/ic_document_large_light.png and /dev/null differ diff --git a/res/drawable-xxhdpi/ic_document_small_dark.png b/res/drawable-xxhdpi/ic_document_small_dark.png deleted file mode 100644 index 9b9e773af..000000000 Binary files a/res/drawable-xxhdpi/ic_document_small_dark.png and /dev/null differ diff --git a/res/drawable-xxhdpi/ic_document_small_light.png b/res/drawable-xxhdpi/ic_document_small_light.png deleted file mode 100644 index 4bf082e0d..000000000 Binary files a/res/drawable-xxhdpi/ic_document_small_light.png and /dev/null differ diff --git a/res/drawable-xxxhdpi/ic_document_large_dark.png b/res/drawable-xxxhdpi/ic_document_large_dark.png deleted file mode 100644 index 911a1c2f4..000000000 Binary files a/res/drawable-xxxhdpi/ic_document_large_dark.png and /dev/null differ diff --git a/res/drawable-xxxhdpi/ic_document_large_light.png b/res/drawable-xxxhdpi/ic_document_large_light.png deleted file mode 100644 index fdcf64d6b..000000000 Binary files a/res/drawable-xxxhdpi/ic_document_large_light.png and /dev/null differ diff --git a/res/drawable-xxxhdpi/ic_document_small_dark.png b/res/drawable-xxxhdpi/ic_document_small_dark.png deleted file mode 100644 index 182067089..000000000 Binary files a/res/drawable-xxxhdpi/ic_document_small_dark.png and /dev/null differ diff --git a/res/drawable-xxxhdpi/ic_document_small_light.png b/res/drawable-xxxhdpi/ic_document_small_light.png deleted file mode 100644 index e3aaf73f6..000000000 Binary files a/res/drawable-xxxhdpi/ic_document_small_light.png and /dev/null differ diff --git a/res/layout/conversation_activity_attachment_editor_stub.xml b/res/layout/conversation_activity_attachment_editor_stub.xml index 26cb27dbb..f52a8bded 100644 --- a/res/layout/conversation_activity_attachment_editor_stub.xml +++ b/res/layout/conversation_activity_attachment_editor_stub.xml @@ -56,9 +56,7 @@ android:paddingBottom="8dp" android:paddingLeft="@dimen/message_bubble_horizontal_padding" android:paddingRight="@dimen/message_bubble_horizontal_padding" - android:background="@drawable/message_bubble_background_sent_alone" - app:doc_titleColor="?attr/conversation_item_outgoing_text_primary_color" - app:doc_captionColor="?attr/conversation_item_outgoing_text_secondary_color"/> + android:background="@drawable/message_bubble_background_sent_alone"/> diff --git a/res/layout/conversation_item_received_document.xml b/res/layout/conversation_item_received_document.xml index 992247438..e4000485f 100644 --- a/res/layout/conversation_item_received_document.xml +++ b/res/layout/conversation_item_received_document.xml @@ -7,6 +7,4 @@ android:layout_width="210dp" android:layout_height="wrap_content" android:visibility="gone" - app:doc_titleColor="?conversation_item_incoming_text_primary_color" - app:doc_captionColor="?conversation_item_incoming_text_secondary_color" tools:visibility="visible"/> diff --git a/res/layout/conversation_item_sent_document.xml b/res/layout/conversation_item_sent_document.xml index 2381b7122..e4000485f 100644 --- a/res/layout/conversation_item_sent_document.xml +++ b/res/layout/conversation_item_sent_document.xml @@ -7,6 +7,4 @@ android:layout_width="210dp" android:layout_height="wrap_content" android:visibility="gone" - app:doc_titleColor="?conversation_item_outgoing_text_primary_color" - app:doc_captionColor="?conversation_item_outgoing_text_secondary_color" tools:visibility="visible"/> diff --git a/res/layout/document_view.xml b/res/layout/document_view.xml index 518e09765..053c26560 100644 --- a/res/layout/document_view.xml +++ b/res/layout/document_view.xml @@ -12,52 +12,17 @@ android:gravity="center_vertical" android:orientation="horizontal"> - - - - - - - - - - - + diff --git a/res/values/attrs.xml b/res/values/attrs.xml index eaea83bcf..1104b3d73 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -3,8 +3,6 @@ - - @@ -211,11 +209,6 @@ - - - - - diff --git a/res/values/core_colors.xml b/res/values/core_colors.xml index 24b03a74c..543b7ba67 100644 --- a/res/values/core_colors.xml +++ b/res/values/core_colors.xml @@ -7,7 +7,7 @@ #f68751 #ed824e #34a0f4 - #3093e0 + #34a0f4 #608496 #a47ad9 #66BB6A diff --git a/res/values/themes.xml b/res/values/themes.xml index ef0871cf8..ea60aad1a 100644 --- a/res/values/themes.xml +++ b/res/values/themes.xml @@ -87,8 +87,6 @@ @color/white - @drawable/ic_document_small_light - @drawable/ic_document_large_light @drawable/conversation_list_item_background @color/gray20 @@ -239,8 +237,6 @@ @style/AppCompatDialogStyleDark @color/gray95 - @drawable/ic_document_small_dark - @drawable/ic_document_large_dark @drawable/conversation_list_item_background_dark @color/import_export_item_background_dark diff --git a/src/org/thoughtcrime/securesms/components/DocumentView.java b/src/org/thoughtcrime/securesms/components/DocumentView.java index ded5bf101..1b46bd235 100644 --- a/src/org/thoughtcrime/securesms/components/DocumentView.java +++ b/src/org/thoughtcrime/securesms/components/DocumentView.java @@ -23,12 +23,9 @@ public class DocumentView extends FrameLayout { private static final String TAG = DocumentView.class.getSimpleName(); - private final @NonNull AnimatingToggle controlToggle; private final @NonNull View container; - private final @NonNull ViewGroup iconContainer; private final @NonNull TextView fileName; private final @NonNull TextView fileSize; - private final @NonNull TextView document; private @Nullable SlideClickListener viewListener; private @Nullable DocumentSlide documentSlide; @@ -46,21 +43,8 @@ public class DocumentView extends FrameLayout { inflate(context, R.layout.document_view, this); this.container = findViewById(R.id.document_container); - this.iconContainer = findViewById(R.id.icon_container); - this.controlToggle = findViewById(R.id.control_toggle); this.fileName = findViewById(R.id.file_name); this.fileSize = findViewById(R.id.file_size); - this.document = findViewById(R.id.document); - - if (attrs != null) { - TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(attrs, R.styleable.DocumentView, 0, 0); - int titleColor = typedArray.getInt(R.styleable.DocumentView_doc_titleColor, Color.BLACK); - int captionColor = typedArray.getInt(R.styleable.DocumentView_doc_captionColor, Color.BLACK); - typedArray.recycle(); - - fileName.setTextColor(titleColor); - fileSize.setTextColor(captionColor); - } } public void setDocumentClickListener(@Nullable SlideClickListener listener) { @@ -69,13 +53,15 @@ public class DocumentView extends FrameLayout { public void setDocument(final @NonNull DocumentSlide documentSlide) { - controlToggle.displayQuick(iconContainer); this.documentSlide = documentSlide; this.fileName.setText(documentSlide.getFileName().or(getContext().getString(R.string.unknown))); - this.fileSize.setText(Util.getPrettyFileSize(documentSlide.getFileSize())); - this.document.setText(getFileType(documentSlide.getFileName())); + + String fileSize = Util.getPrettyFileSize(documentSlide.getFileSize()) + + " " + getFileType(documentSlide.getFileName()).toUpperCase(); + this.fileSize.setText(fileSize); + this.setOnClickListener(new OpenClickedListener(documentSlide)); }