call SVGs 'vector graphic' instead of 'image'
|
@ -92,6 +92,8 @@ public class MediaAdapter extends RecyclerView.Adapter<MediaAdapter.MediaViewHol
|
||||||
attr = R.attr.media_preview_document;
|
attr = R.attr.media_preview_document;
|
||||||
} else if (mime.equals("application/gpx+xml")) {
|
} else if (mime.equals("application/gpx+xml")) {
|
||||||
attr = R.attr.media_preview_tour;
|
attr = R.attr.media_preview_tour;
|
||||||
|
} else if (mime.startsWith("image/")) {
|
||||||
|
attr = R.attr.media_preview_image;
|
||||||
} else {
|
} else {
|
||||||
attr = R.attr.media_preview_unknown;
|
attr = R.attr.media_preview_unknown;
|
||||||
}
|
}
|
||||||
|
|
|
@ -475,9 +475,6 @@ public class UIHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getFileDescriptionString(final Context context, final Message message) {
|
public static String getFileDescriptionString(final Context context, final Message message) {
|
||||||
if (message.getType() == Message.TYPE_IMAGE) {
|
|
||||||
return context.getString(R.string.image);
|
|
||||||
}
|
|
||||||
final String mime = message.getMimeType();
|
final String mime = message.getMimeType();
|
||||||
if (mime == null) {
|
if (mime == null) {
|
||||||
return context.getString(R.string.file);
|
return context.getString(R.string.file);
|
||||||
|
@ -487,7 +484,9 @@ public class UIHelper {
|
||||||
return context.getString(R.string.video);
|
return context.getString(R.string.video);
|
||||||
} else if (mime.equals("image/gif")) {
|
} else if (mime.equals("image/gif")) {
|
||||||
return context.getString(R.string.gif);
|
return context.getString(R.string.gif);
|
||||||
} else if (mime.startsWith("image/")) {
|
} else if (mime.equals("image/svg+xml")) {
|
||||||
|
return context.getString(R.string.vector_graphic);
|
||||||
|
} else if (mime.startsWith("image/") || message.getType() == Message.TYPE_IMAGE) {
|
||||||
return context.getString(R.string.image);
|
return context.getString(R.string.image);
|
||||||
} else if (mime.contains("pdf")) {
|
} else if (mime.contains("pdf")) {
|
||||||
return context.getString(R.string.pdf_document);
|
return context.getString(R.string.pdf_document);
|
||||||
|
|
BIN
src/main/res/drawable-hdpi/ic_image_black_48dp.png
Normal file
After Width: | Height: | Size: 424 B |
BIN
src/main/res/drawable-hdpi/ic_image_white_48dp.png
Normal file
After Width: | Height: | Size: 450 B |
BIN
src/main/res/drawable-mdpi/ic_image_black_48dp.png
Normal file
After Width: | Height: | Size: 295 B |
BIN
src/main/res/drawable-mdpi/ic_image_white_48dp.png
Normal file
After Width: | Height: | Size: 304 B |
BIN
src/main/res/drawable-xhdpi/ic_image_black_48dp.png
Normal file
After Width: | Height: | Size: 548 B |
BIN
src/main/res/drawable-xhdpi/ic_image_white_48dp.png
Normal file
After Width: | Height: | Size: 570 B |
BIN
src/main/res/drawable-xxhdpi/ic_image_black_48dp.png
Normal file
After Width: | Height: | Size: 807 B |
BIN
src/main/res/drawable-xxhdpi/ic_image_white_48dp.png
Normal file
After Width: | Height: | Size: 859 B |
BIN
src/main/res/drawable-xxxhdpi/ic_image_black_48dp.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
src/main/res/drawable-xxxhdpi/ic_image_white_48dp.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
|
@ -62,6 +62,7 @@
|
||||||
<attr name="icon_alpha" format="float" />
|
<attr name="icon_alpha" format="float" />
|
||||||
<attr name="delete_icon_alpha" format="float" />
|
<attr name="delete_icon_alpha" format="float" />
|
||||||
|
|
||||||
|
<attr name="media_preview_image" format="reference" />
|
||||||
<attr name="media_preview_document" format="reference" />
|
<attr name="media_preview_document" format="reference" />
|
||||||
<attr name="media_preview_recording" format="reference" />
|
<attr name="media_preview_recording" format="reference" />
|
||||||
<attr name="media_preview_audio" format="reference" />
|
<attr name="media_preview_audio" format="reference" />
|
||||||
|
|
|
@ -412,6 +412,7 @@
|
||||||
<string name="audio">audio</string>
|
<string name="audio">audio</string>
|
||||||
<string name="video">video</string>
|
<string name="video">video</string>
|
||||||
<string name="image">image</string>
|
<string name="image">image</string>
|
||||||
|
<string name="vector_graphic">vector graphic</string>
|
||||||
<string name="pdf_document">PDF document</string>
|
<string name="pdf_document">PDF document</string>
|
||||||
<string name="apk">Android App</string>
|
<string name="apk">Android App</string>
|
||||||
<string name="vcard">Contact</string>
|
<string name="vcard">Contact</string>
|
||||||
|
|
|
@ -80,8 +80,8 @@
|
||||||
<item name="dialog_horizontal_padding">24dp</item>
|
<item name="dialog_horizontal_padding">24dp</item>
|
||||||
<item name="dialog_vertical_padding">16dp</item>
|
<item name="dialog_vertical_padding">16dp</item>
|
||||||
|
|
||||||
<item name="media_preview_document" type="reference">@drawable/ic_description_black_48dp
|
<item name="media_preview_image" type="reference">@drawable/ic_image_black_48dp</item>
|
||||||
</item>
|
<item name="media_preview_document" type="reference">@drawable/ic_description_black_48dp</item>
|
||||||
<item name="media_preview_recording" type="reference">@drawable/ic_mic_black_48dp</item>
|
<item name="media_preview_recording" type="reference">@drawable/ic_mic_black_48dp</item>
|
||||||
<item name="media_preview_audio" type="reference">@drawable/ic_headset_black_48dp</item>
|
<item name="media_preview_audio" type="reference">@drawable/ic_headset_black_48dp</item>
|
||||||
<item name="media_preview_location" type="reference">@drawable/ic_room_black_48dp</item>
|
<item name="media_preview_location" type="reference">@drawable/ic_room_black_48dp</item>
|
||||||
|
@ -236,8 +236,8 @@
|
||||||
<item name="dialog_horizontal_padding">24dp</item>
|
<item name="dialog_horizontal_padding">24dp</item>
|
||||||
<item name="dialog_vertical_padding">16dp</item>
|
<item name="dialog_vertical_padding">16dp</item>
|
||||||
|
|
||||||
<item name="media_preview_document" type="reference">@drawable/ic_description_white_48dp
|
<item name="media_preview_image" type="reference">@drawable/ic_image_white_48dp</item>
|
||||||
</item>
|
<item name="media_preview_document" type="reference">@drawable/ic_description_white_48dp</item>
|
||||||
<item name="media_preview_recording" type="reference">@drawable/ic_mic_white_48dp</item>
|
<item name="media_preview_recording" type="reference">@drawable/ic_mic_white_48dp</item>
|
||||||
<item name="media_preview_audio" type="reference">@drawable/ic_headset_white_48dp</item>
|
<item name="media_preview_audio" type="reference">@drawable/ic_headset_white_48dp</item>
|
||||||
<item name="media_preview_location" type="reference">@drawable/ic_room_white_48dp</item>
|
<item name="media_preview_location" type="reference">@drawable/ic_room_white_48dp</item>
|
||||||
|
|