add more thumbnail icons for various file types
|
@ -62,8 +62,19 @@ public class MediaPreviewAdapter extends RecyclerView.Adapter<MediaPreviewAdapte
|
|||
} else if (attachment.getType() == Attachment.Type.RECORDING) {
|
||||
attr = R.attr.media_preview_recording;
|
||||
} else {
|
||||
if (attachment.getMime() != null && attachment.getMime().startsWith("audio/")) {
|
||||
final String mime = attachment.getMime();
|
||||
if (mime == null) {
|
||||
attr = R.attr.media_preview_file;
|
||||
} else if (mime.startsWith("audio/")) {
|
||||
attr = R.attr.media_preview_audio;
|
||||
} else if (mime.equals("text/calendar") || (mime.equals("text/x-vcalendar"))) {
|
||||
attr = R.attr.media_preview_calendar;
|
||||
} else if (mime.equals("text/x-vcard")) {
|
||||
attr = R.attr.media_preview_contact;
|
||||
} else if (mime.equals("application/vnd.android.package-archive")) {
|
||||
attr = R.attr.media_preview_app;
|
||||
} else if (mime.equals("application/zip") || mime.equals("application/rar")) {
|
||||
attr = R.attr.media_preview_archive;
|
||||
} else {
|
||||
attr = R.attr.media_preview_file;
|
||||
}
|
||||
|
|
BIN
src/main/res/drawable-hdpi/ic_android_black_48dp.png
Normal file
After Width: | Height: | Size: 519 B |
BIN
src/main/res/drawable-hdpi/ic_android_white_48dp.png
Normal file
After Width: | Height: | Size: 536 B |
BIN
src/main/res/drawable-hdpi/ic_archive_black_48dp.png
Normal file
After Width: | Height: | Size: 377 B |
BIN
src/main/res/drawable-hdpi/ic_archive_white_48dp.png
Normal file
After Width: | Height: | Size: 390 B |
BIN
src/main/res/drawable-hdpi/ic_event_black_48dp.png
Normal file
After Width: | Height: | Size: 245 B |
BIN
src/main/res/drawable-hdpi/ic_event_white_48dp.png
Normal file
After Width: | Height: | Size: 254 B |
BIN
src/main/res/drawable-hdpi/ic_person_black_48dp.png
Normal file
After Width: | Height: | Size: 428 B |
BIN
src/main/res/drawable-hdpi/ic_person_white_48dp.png
Normal file
After Width: | Height: | Size: 440 B |
BIN
src/main/res/drawable-mdpi/ic_android_black_48dp.png
Normal file
After Width: | Height: | Size: 343 B |
BIN
src/main/res/drawable-mdpi/ic_android_white_48dp.png
Normal file
After Width: | Height: | Size: 356 B |
BIN
src/main/res/drawable-mdpi/ic_archive_black_48dp.png
Normal file
After Width: | Height: | Size: 261 B |
BIN
src/main/res/drawable-mdpi/ic_archive_white_48dp.png
Normal file
After Width: | Height: | Size: 267 B |
BIN
src/main/res/drawable-mdpi/ic_event_black_48dp.png
Normal file
After Width: | Height: | Size: 188 B |
BIN
src/main/res/drawable-mdpi/ic_event_white_48dp.png
Normal file
After Width: | Height: | Size: 193 B |
BIN
src/main/res/drawable-mdpi/ic_person_black_48dp.png
Normal file
After Width: | Height: | Size: 307 B |
BIN
src/main/res/drawable-mdpi/ic_person_white_48dp.png
Normal file
After Width: | Height: | Size: 312 B |
BIN
src/main/res/drawable-xhdpi/ic_android_black_48dp.png
Normal file
After Width: | Height: | Size: 641 B |
BIN
src/main/res/drawable-xhdpi/ic_android_white_48dp.png
Normal file
After Width: | Height: | Size: 665 B |
BIN
src/main/res/drawable-xhdpi/ic_archive_black_48dp.png
Normal file
After Width: | Height: | Size: 483 B |
BIN
src/main/res/drawable-xhdpi/ic_archive_white_48dp.png
Normal file
After Width: | Height: | Size: 489 B |
BIN
src/main/res/drawable-xhdpi/ic_event_black_48dp.png
Normal file
After Width: | Height: | Size: 316 B |
BIN
src/main/res/drawable-xhdpi/ic_event_white_48dp.png
Normal file
After Width: | Height: | Size: 326 B |
BIN
src/main/res/drawable-xhdpi/ic_person_black_48dp.png
Normal file
After Width: | Height: | Size: 565 B |
BIN
src/main/res/drawable-xhdpi/ic_person_white_48dp.png
Normal file
After Width: | Height: | Size: 577 B |
BIN
src/main/res/drawable-xxhdpi/ic_android_black_48dp.png
Normal file
After Width: | Height: | Size: 975 B |
BIN
src/main/res/drawable-xxhdpi/ic_android_white_48dp.png
Normal file
After Width: | Height: | Size: 1,012 B |
BIN
src/main/res/drawable-xxhdpi/ic_archive_black_48dp.png
Normal file
After Width: | Height: | Size: 718 B |
BIN
src/main/res/drawable-xxhdpi/ic_archive_white_48dp.png
Normal file
After Width: | Height: | Size: 738 B |
BIN
src/main/res/drawable-xxhdpi/ic_event_black_48dp.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
src/main/res/drawable-xxhdpi/ic_event_white_48dp.png
Normal file
After Width: | Height: | Size: 513 B |
BIN
src/main/res/drawable-xxhdpi/ic_person_black_48dp.png
Normal file
After Width: | Height: | Size: 846 B |
BIN
src/main/res/drawable-xxhdpi/ic_person_white_48dp.png
Normal file
After Width: | Height: | Size: 863 B |
BIN
src/main/res/drawable-xxxhdpi/ic_android_black_48dp.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
src/main/res/drawable-xxxhdpi/ic_android_white_48dp.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
src/main/res/drawable-xxxhdpi/ic_archive_black_48dp.png
Normal file
After Width: | Height: | Size: 945 B |
BIN
src/main/res/drawable-xxxhdpi/ic_archive_white_48dp.png
Normal file
After Width: | Height: | Size: 971 B |
BIN
src/main/res/drawable-xxxhdpi/ic_event_black_48dp.png
Normal file
After Width: | Height: | Size: 713 B |
BIN
src/main/res/drawable-xxxhdpi/ic_event_white_48dp.png
Normal file
After Width: | Height: | Size: 744 B |
BIN
src/main/res/drawable-xxxhdpi/ic_person_black_48dp.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
src/main/res/drawable-xxxhdpi/ic_person_white_48dp.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
|
@ -56,6 +56,10 @@
|
|||
<attr name="media_preview_recording" format="reference"/>
|
||||
<attr name="media_preview_audio" format="reference"/>
|
||||
<attr name="media_preview_location" format="reference"/>
|
||||
<attr name="media_preview_contact" format="reference"/>
|
||||
<attr name="media_preview_app" format="reference"/>
|
||||
<attr name="media_preview_calendar" format="reference"/>
|
||||
<attr name="media_preview_archive" format="reference" />
|
||||
|
||||
|
||||
<attr name="icon_add_group" format="reference"/>
|
||||
|
|
|
@ -67,6 +67,10 @@
|
|||
<item type="reference" name="media_preview_recording">@drawable/ic_mic_black_48dp</item>
|
||||
<item type="reference" name="media_preview_audio">@drawable/ic_headset_black_48dp</item>
|
||||
<item type="reference" name="media_preview_location">@drawable/ic_room_black_48dp</item>
|
||||
<item type="reference" name="media_preview_contact">@drawable/ic_person_black_48dp</item>
|
||||
<item type="reference" name="media_preview_app">@drawable/ic_android_black_48dp</item>
|
||||
<item type="reference" name="media_preview_calendar">@drawable/ic_event_black_48dp</item>
|
||||
<item type="reference" name="media_preview_archive">@drawable/ic_archive_black_48dp</item>
|
||||
|
||||
<item type="reference" name="icon_add_group">@drawable/ic_group_add_white_24dp</item>
|
||||
<item type="reference" name="icon_add_person">@drawable/ic_person_add_white_24dp</item>
|
||||
|
@ -173,6 +177,10 @@
|
|||
<item type="reference" name="media_preview_recording">@drawable/ic_mic_white_48dp</item>
|
||||
<item type="reference" name="media_preview_audio">@drawable/ic_headset_white_48dp</item>
|
||||
<item type="reference" name="media_preview_location">@drawable/ic_room_white_48dp</item>
|
||||
<item type="reference" name="media_preview_contact">@drawable/ic_person_white_48dp</item>
|
||||
<item type="reference" name="media_preview_app">@drawable/ic_android_white_48dp</item>
|
||||
<item type="reference" name="media_preview_calendar">@drawable/ic_event_white_48dp</item>
|
||||
<item type="reference" name="media_preview_archive">@drawable/ic_archive_white_48dp</item>
|
||||
|
||||
<item type="reference" name="icon_add_group">@drawable/ic_group_add_white_24dp</item>
|
||||
<item type="reference" name="icon_add_person">@drawable/ic_person_add_white_24dp</item>
|
||||
|
|