diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java | 15 | ||||
-rw-r--r-- | src/main/res/drawable-hdpi/ic_android_grey600_48dp.png | bin | 0 -> 866 bytes | |||
-rw-r--r-- | src/main/res/drawable-mdpi/ic_android_grey600_48dp.png | bin | 0 -> 511 bytes | |||
-rw-r--r-- | src/main/res/drawable-xhdpi/ic_android_grey600_48dp.png | bin | 0 -> 966 bytes | |||
-rw-r--r-- | src/main/res/drawable-xxhdpi/ic_android_grey600_48dp.png | bin | 0 -> 1865 bytes | |||
-rw-r--r-- | src/main/res/drawable-xxxhdpi/ic_android_grey600_48dp.png | bin | 0 -> 2224 bytes |
6 files changed, 10 insertions, 5 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java index 0dd5ffffa..788c8553e 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java @@ -408,10 +408,15 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie viewHolder.download_button.setText(add_contact); viewHolder.download_button.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_account_card_details_grey600_48dp, 0, 0, 0); viewHolder.download_button.setOnClickListener(v -> { - Intent intent = new Intent(Intent.ACTION_VIEW); - intent.setData(Uri.parse(body)); - activity.startActivity(intent); - activity.overridePendingTransition(R.animator.fade_in, R.animator.fade_out); + try { + Intent intent = new Intent(Intent.ACTION_VIEW); + intent.setData(Uri.parse(body)); + activity.startActivity(intent); + activity.overridePendingTransition(R.animator.fade_in, R.animator.fade_out); + } catch (Exception e) { + Toast.makeText(activity, R.string.no_application_found_to_view_contact, Toast.LENGTH_LONG).show(); + } + }); viewHolder.image.setVisibility(View.GONE); viewHolder.messageBody.setVisibility(View.GONE); @@ -635,7 +640,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie e.printStackTrace(); } } - viewHolder.download_button.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_file_grey600_48dp, 0, 0, 0); + viewHolder.download_button.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_android_grey600_48dp, 0, 0, 0); viewHolder.download_button.setText(activity.getString(R.string.open_x_file, UIHelper.getFileDescriptionString(activity, message) + APKName)); } diff --git a/src/main/res/drawable-hdpi/ic_android_grey600_48dp.png b/src/main/res/drawable-hdpi/ic_android_grey600_48dp.png Binary files differnew file mode 100644 index 000000000..3a39d9cc4 --- /dev/null +++ b/src/main/res/drawable-hdpi/ic_android_grey600_48dp.png diff --git a/src/main/res/drawable-mdpi/ic_android_grey600_48dp.png b/src/main/res/drawable-mdpi/ic_android_grey600_48dp.png Binary files differnew file mode 100644 index 000000000..5040f8ef2 --- /dev/null +++ b/src/main/res/drawable-mdpi/ic_android_grey600_48dp.png diff --git a/src/main/res/drawable-xhdpi/ic_android_grey600_48dp.png b/src/main/res/drawable-xhdpi/ic_android_grey600_48dp.png Binary files differnew file mode 100644 index 000000000..eeefeda38 --- /dev/null +++ b/src/main/res/drawable-xhdpi/ic_android_grey600_48dp.png diff --git a/src/main/res/drawable-xxhdpi/ic_android_grey600_48dp.png b/src/main/res/drawable-xxhdpi/ic_android_grey600_48dp.png Binary files differnew file mode 100644 index 000000000..42395613f --- /dev/null +++ b/src/main/res/drawable-xxhdpi/ic_android_grey600_48dp.png diff --git a/src/main/res/drawable-xxxhdpi/ic_android_grey600_48dp.png b/src/main/res/drawable-xxxhdpi/ic_android_grey600_48dp.png Binary files differnew file mode 100644 index 000000000..7e9d48b6a --- /dev/null +++ b/src/main/res/drawable-xxxhdpi/ic_android_grey600_48dp.png |