Use Material Design Icons on API 21+
@ -4,6 +4,7 @@ resolutions={
|
|||||||
'hdpi' => 1.5,
|
'hdpi' => 1.5,
|
||||||
'xhdpi' => 2,
|
'xhdpi' => 2,
|
||||||
'xxhdpi' => 3,
|
'xxhdpi' => 3,
|
||||||
|
'xxxhdpi' => 4,
|
||||||
}
|
}
|
||||||
images = {
|
images = {
|
||||||
'conversations_baloon.svg' => ['ic_launcher', 48],
|
'conversations_baloon.svg' => ['ic_launcher', 48],
|
||||||
|
@ -270,7 +270,8 @@ public class NotificationService {
|
|||||||
}
|
}
|
||||||
if ((message = getFirstDownloadableMessage(messages)) != null) {
|
if ((message = getFirstDownloadableMessage(messages)) != null) {
|
||||||
mBuilder.addAction(
|
mBuilder.addAction(
|
||||||
R.drawable.ic_action_download,
|
Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP ?
|
||||||
|
R.drawable.ic_file_download_white_24dp : R.drawable.ic_action_download,
|
||||||
mXmppConnectionService.getResources().getString(R.string.download_x_file,
|
mXmppConnectionService.getResources().getString(R.string.download_x_file,
|
||||||
UIHelper.getFileDescriptionString(mXmppConnectionService, message)),
|
UIHelper.getFileDescriptionString(mXmppConnectionService, message)),
|
||||||
createDownloadIntent(message)
|
createDownloadIntent(message)
|
||||||
@ -446,18 +447,24 @@ public class NotificationService {
|
|||||||
|
|
||||||
public Notification createForegroundNotification() {
|
public Notification createForegroundNotification() {
|
||||||
final NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(mXmppConnectionService);
|
final NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(mXmppConnectionService);
|
||||||
mBuilder.setSmallIcon(R.drawable.ic_stat_communication_import_export);
|
|
||||||
mBuilder.setContentTitle(mXmppConnectionService.getString(R.string.conversations_foreground_service));
|
mBuilder.setContentTitle(mXmppConnectionService.getString(R.string.conversations_foreground_service));
|
||||||
mBuilder.setContentText(mXmppConnectionService.getString(R.string.touch_to_open_conversations));
|
mBuilder.setContentText(mXmppConnectionService.getString(R.string.touch_to_open_conversations));
|
||||||
mBuilder.addAction(R.drawable.ic_action_cancel,
|
|
||||||
mXmppConnectionService.getString(R.string.disable_foreground_service),
|
|
||||||
createDisableForeground());
|
|
||||||
mBuilder.setContentIntent(createOpenConversationsIntent());
|
mBuilder.setContentIntent(createOpenConversationsIntent());
|
||||||
mBuilder.setWhen(0);
|
mBuilder.setWhen(0);
|
||||||
mBuilder.setPriority(NotificationCompat.PRIORITY_MIN);
|
mBuilder.setPriority(NotificationCompat.PRIORITY_MIN);
|
||||||
|
final int cancelIcon;
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
mBuilder.setCategory(Notification.CATEGORY_SERVICE);
|
mBuilder.setCategory(Notification.CATEGORY_SERVICE);
|
||||||
|
mBuilder.setSmallIcon(R.drawable.ic_import_export_white_48dp);
|
||||||
|
cancelIcon = R.drawable.ic_cancel_white_24dp;
|
||||||
|
} else {
|
||||||
|
mBuilder.setSmallIcon(R.drawable.ic_stat_communication_import_export);
|
||||||
|
cancelIcon = R.drawable.ic_action_cancel;
|
||||||
}
|
}
|
||||||
|
mBuilder.addAction(cancelIcon,
|
||||||
|
mXmppConnectionService.getString(R.string.disable_foreground_service),
|
||||||
|
createDisableForeground());
|
||||||
setNotificationColor(mBuilder);
|
setNotificationColor(mBuilder);
|
||||||
return mBuilder.build();
|
return mBuilder.build();
|
||||||
}
|
}
|
||||||
@ -487,7 +494,11 @@ public class NotificationService {
|
|||||||
}
|
}
|
||||||
mBuilder.setOngoing(true);
|
mBuilder.setOngoing(true);
|
||||||
//mBuilder.setLights(0xffffffff, 2000, 4000);
|
//mBuilder.setLights(0xffffffff, 2000, 4000);
|
||||||
mBuilder.setSmallIcon(R.drawable.ic_stat_alert_warning);
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
|
mBuilder.setSmallIcon(R.drawable.ic_warning_white_36dp);
|
||||||
|
} else {
|
||||||
|
mBuilder.setSmallIcon(R.drawable.ic_stat_alert_warning);
|
||||||
|
}
|
||||||
final TaskStackBuilder stackBuilder = TaskStackBuilder.create(mXmppConnectionService);
|
final TaskStackBuilder stackBuilder = TaskStackBuilder.create(mXmppConnectionService);
|
||||||
stackBuilder.addParentStack(ConversationActivity.class);
|
stackBuilder.addParentStack(ConversationActivity.class);
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ import android.content.DialogInterface.OnClickListener;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentSender.SendIntentException;
|
import android.content.IntentSender.SendIntentException;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
import android.provider.MediaStore;
|
import android.provider.MediaStore;
|
||||||
@ -296,8 +297,12 @@ public class ConversationActivity extends XmppActivity
|
|||||||
if (this.getSelectedConversation() != null) {
|
if (this.getSelectedConversation() != null) {
|
||||||
if (this.getSelectedConversation().getLatestMessage()
|
if (this.getSelectedConversation().getLatestMessage()
|
||||||
.getEncryption() != Message.ENCRYPTION_NONE) {
|
.getEncryption() != Message.ENCRYPTION_NONE) {
|
||||||
menuSecure.setIcon(R.drawable.ic_action_secure);
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
}
|
menuSecure.setIcon(R.drawable.ic_lock_outline_white_48dp);
|
||||||
|
} else {
|
||||||
|
menuSecure.setIcon(R.drawable.ic_action_secure);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (this.getSelectedConversation().getMode() == Conversation.MODE_MULTI) {
|
if (this.getSelectedConversation().getMode() == Conversation.MODE_MULTI) {
|
||||||
menuContactDetails.setVisible(false);
|
menuContactDetails.setVisible(false);
|
||||||
menuAttach.setVisible(false);
|
menuAttach.setVisible(false);
|
||||||
|
BIN
src/main/res/drawable-hdpi/ic_add_white_48dp.png
Normal file
After Width: | Height: | Size: 222 B |
BIN
src/main/res/drawable-hdpi/ic_attach_file_white_48dp.png
Normal file
After Width: | Height: | Size: 870 B |
BIN
src/main/res/drawable-hdpi/ic_cancel_white_24dp.png
Normal file
After Width: | Height: | Size: 510 B |
BIN
src/main/res/drawable-hdpi/ic_cancel_white_36dp.png
Normal file
After Width: | Height: | Size: 751 B |
BIN
src/main/res/drawable-hdpi/ic_cancel_white_48dp.png
Normal file
After Width: | Height: | Size: 893 B |
BIN
src/main/res/drawable-hdpi/ic_chat_white_48dp.png
Normal file
After Width: | Height: | Size: 363 B |
BIN
src/main/res/drawable-hdpi/ic_content_copy_grey600_36dp.png
Normal file
After Width: | Height: | Size: 348 B |
BIN
src/main/res/drawable-hdpi/ic_delete_white_48dp.png
Normal file
After Width: | Height: | Size: 338 B |
BIN
src/main/res/drawable-hdpi/ic_edit_black_48dp.png
Normal file
After Width: | Height: | Size: 366 B |
BIN
src/main/res/drawable-hdpi/ic_edit_grey600_36dp.png
Normal file
After Width: | Height: | Size: 419 B |
BIN
src/main/res/drawable-hdpi/ic_edit_white_48dp.png
Normal file
After Width: | Height: | Size: 490 B |
BIN
src/main/res/drawable-hdpi/ic_file_download_white_24dp.png
Normal file
After Width: | Height: | Size: 277 B |
BIN
src/main/res/drawable-hdpi/ic_file_download_white_36dp.png
Normal file
After Width: | Height: | Size: 354 B |
BIN
src/main/res/drawable-hdpi/ic_group_add_white_48dp.png
Normal file
After Width: | Height: | Size: 722 B |
BIN
src/main/res/drawable-hdpi/ic_group_white_48dp.png
Normal file
After Width: | Height: | Size: 599 B |
BIN
src/main/res/drawable-hdpi/ic_import_export_white_48dp.png
Normal file
After Width: | Height: | Size: 414 B |
BIN
src/main/res/drawable-hdpi/ic_lock_open_white_48dp.png
Normal file
After Width: | Height: | Size: 739 B |
BIN
src/main/res/drawable-hdpi/ic_lock_outline_white_48dp.png
Normal file
After Width: | Height: | Size: 743 B |
BIN
src/main/res/drawable-hdpi/ic_person_add_white_48dp.png
Normal file
After Width: | Height: | Size: 683 B |
BIN
src/main/res/drawable-hdpi/ic_refresh_white_48dp.png
Normal file
After Width: | Height: | Size: 875 B |
BIN
src/main/res/drawable-hdpi/ic_remove_grey600_36dp.png
Normal file
After Width: | Height: | Size: 217 B |
BIN
src/main/res/drawable-hdpi/ic_search_white_18dp.png
Normal file
After Width: | Height: | Size: 403 B |
BIN
src/main/res/drawable-hdpi/ic_search_white_48dp.png
Normal file
After Width: | Height: | Size: 871 B |
BIN
src/main/res/drawable-hdpi/ic_settings_grey600_36dp.png
Normal file
After Width: | Height: | Size: 780 B |
BIN
src/main/res/drawable-hdpi/ic_warning_white_36dp.png
Normal file
After Width: | Height: | Size: 540 B |
BIN
src/main/res/drawable-mdpi/ic_add_white_48dp.png
Normal file
After Width: | Height: | Size: 198 B |
BIN
src/main/res/drawable-mdpi/ic_attach_file_white_48dp.png
Normal file
After Width: | Height: | Size: 576 B |
BIN
src/main/res/drawable-mdpi/ic_cancel_white_24dp.png
Normal file
After Width: | Height: | Size: 393 B |
BIN
src/main/res/drawable-mdpi/ic_cancel_white_36dp.png
Normal file
After Width: | Height: | Size: 510 B |
BIN
src/main/res/drawable-mdpi/ic_cancel_white_48dp.png
Normal file
After Width: | Height: | Size: 645 B |
BIN
src/main/res/drawable-mdpi/ic_chat_white_48dp.png
Normal file
After Width: | Height: | Size: 290 B |
BIN
src/main/res/drawable-mdpi/ic_content_copy_grey600_36dp.png
Normal file
After Width: | Height: | Size: 287 B |
BIN
src/main/res/drawable-mdpi/ic_delete_white_48dp.png
Normal file
After Width: | Height: | Size: 270 B |
BIN
src/main/res/drawable-mdpi/ic_edit_black_48dp.png
Normal file
After Width: | Height: | Size: 299 B |
BIN
src/main/res/drawable-mdpi/ic_edit_grey600_36dp.png
Normal file
After Width: | Height: | Size: 341 B |
BIN
src/main/res/drawable-mdpi/ic_edit_white_48dp.png
Normal file
After Width: | Height: | Size: 378 B |
BIN
src/main/res/drawable-mdpi/ic_file_download_white_24dp.png
Normal file
After Width: | Height: | Size: 210 B |
BIN
src/main/res/drawable-mdpi/ic_file_download_white_36dp.png
Normal file
After Width: | Height: | Size: 277 B |
BIN
src/main/res/drawable-mdpi/ic_group_add_white_48dp.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
src/main/res/drawable-mdpi/ic_group_white_48dp.png
Normal file
After Width: | Height: | Size: 464 B |
BIN
src/main/res/drawable-mdpi/ic_import_export_white_48dp.png
Normal file
After Width: | Height: | Size: 330 B |
BIN
src/main/res/drawable-mdpi/ic_lock_open_white_48dp.png
Normal file
After Width: | Height: | Size: 513 B |
BIN
src/main/res/drawable-mdpi/ic_lock_outline_white_48dp.png
Normal file
After Width: | Height: | Size: 449 B |
BIN
src/main/res/drawable-mdpi/ic_person_add_white_48dp.png
Normal file
After Width: | Height: | Size: 423 B |
BIN
src/main/res/drawable-mdpi/ic_refresh_white_48dp.png
Normal file
After Width: | Height: | Size: 637 B |
BIN
src/main/res/drawable-mdpi/ic_remove_grey600_36dp.png
Normal file
After Width: | Height: | Size: 197 B |
BIN
src/main/res/drawable-mdpi/ic_search_white_18dp.png
Normal file
After Width: | Height: | Size: 324 B |
BIN
src/main/res/drawable-mdpi/ic_search_white_48dp.png
Normal file
After Width: | Height: | Size: 591 B |
BIN
src/main/res/drawable-mdpi/ic_settings_grey600_36dp.png
Normal file
After Width: | Height: | Size: 572 B |
BIN
src/main/res/drawable-mdpi/ic_warning_white_36dp.png
Normal file
After Width: | Height: | Size: 421 B |
BIN
src/main/res/drawable-xhdpi/ic_add_white_48dp.png
Normal file
After Width: | Height: | Size: 269 B |
BIN
src/main/res/drawable-xhdpi/ic_attach_file_white_48dp.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
src/main/res/drawable-xhdpi/ic_cancel_white_24dp.png
Normal file
After Width: | Height: | Size: 645 B |
BIN
src/main/res/drawable-xhdpi/ic_cancel_white_36dp.png
Normal file
After Width: | Height: | Size: 893 B |
BIN
src/main/res/drawable-xhdpi/ic_cancel_white_48dp.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/main/res/drawable-xhdpi/ic_chat_white_48dp.png
Normal file
After Width: | Height: | Size: 533 B |
BIN
src/main/res/drawable-xhdpi/ic_content_copy_grey600_36dp.png
Normal file
After Width: | Height: | Size: 435 B |
BIN
src/main/res/drawable-xhdpi/ic_delete_white_48dp.png
Normal file
After Width: | Height: | Size: 397 B |
BIN
src/main/res/drawable-xhdpi/ic_edit_black_48dp.png
Normal file
After Width: | Height: | Size: 406 B |
BIN
src/main/res/drawable-xhdpi/ic_edit_grey600_36dp.png
Normal file
After Width: | Height: | Size: 493 B |
BIN
src/main/res/drawable-xhdpi/ic_edit_white_48dp.png
Normal file
After Width: | Height: | Size: 632 B |
BIN
src/main/res/drawable-xhdpi/ic_file_download_white_24dp.png
Normal file
After Width: | Height: | Size: 282 B |
BIN
src/main/res/drawable-xhdpi/ic_file_download_white_36dp.png
Normal file
After Width: | Height: | Size: 351 B |
BIN
src/main/res/drawable-xhdpi/ic_group_add_white_48dp.png
Normal file
After Width: | Height: | Size: 935 B |
BIN
src/main/res/drawable-xhdpi/ic_group_white_48dp.png
Normal file
After Width: | Height: | Size: 759 B |
BIN
src/main/res/drawable-xhdpi/ic_import_export_white_48dp.png
Normal file
After Width: | Height: | Size: 502 B |
BIN
src/main/res/drawable-xhdpi/ic_lock_open_white_48dp.png
Normal file
After Width: | Height: | Size: 946 B |
BIN
src/main/res/drawable-xhdpi/ic_lock_outline_white_48dp.png
Normal file
After Width: | Height: | Size: 948 B |
BIN
src/main/res/drawable-xhdpi/ic_person_add_white_48dp.png
Normal file
After Width: | Height: | Size: 909 B |
BIN
src/main/res/drawable-xhdpi/ic_refresh_white_48dp.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
src/main/res/drawable-xhdpi/ic_remove_grey600_36dp.png
Normal file
After Width: | Height: | Size: 212 B |
BIN
src/main/res/drawable-xhdpi/ic_search_white_18dp.png
Normal file
After Width: | Height: | Size: 504 B |
BIN
src/main/res/drawable-xhdpi/ic_search_white_48dp.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
src/main/res/drawable-xhdpi/ic_settings_grey600_36dp.png
Normal file
After Width: | Height: | Size: 994 B |
BIN
src/main/res/drawable-xhdpi/ic_warning_white_36dp.png
Normal file
After Width: | Height: | Size: 639 B |
BIN
src/main/res/drawable-xxhdpi/ic_add_white_48dp.png
Normal file
After Width: | Height: | Size: 356 B |
BIN
src/main/res/drawable-xxhdpi/ic_attach_file_white_48dp.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
src/main/res/drawable-xxhdpi/ic_cancel_white_24dp.png
Normal file
After Width: | Height: | Size: 893 B |
BIN
src/main/res/drawable-xxhdpi/ic_cancel_white_36dp.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
src/main/res/drawable-xxhdpi/ic_cancel_white_48dp.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
src/main/res/drawable-xxhdpi/ic_chat_white_48dp.png
Normal file
After Width: | Height: | Size: 717 B |
BIN
src/main/res/drawable-xxhdpi/ic_content_copy_grey600_36dp.png
Normal file
After Width: | Height: | Size: 631 B |
BIN
src/main/res/drawable-xxhdpi/ic_delete_white_48dp.png
Normal file
After Width: | Height: | Size: 574 B |
BIN
src/main/res/drawable-xxhdpi/ic_edit_black_48dp.png
Normal file
After Width: | Height: | Size: 566 B |
BIN
src/main/res/drawable-xxhdpi/ic_edit_grey600_36dp.png
Normal file
After Width: | Height: | Size: 656 B |
BIN
src/main/res/drawable-xxhdpi/ic_edit_white_48dp.png
Normal file
After Width: | Height: | Size: 843 B |
BIN
src/main/res/drawable-xxhdpi/ic_file_download_white_24dp.png
Normal file
After Width: | Height: | Size: 351 B |
BIN
src/main/res/drawable-xxhdpi/ic_file_download_white_36dp.png
Normal file
After Width: | Height: | Size: 514 B |
BIN
src/main/res/drawable-xxhdpi/ic_group_add_white_48dp.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
src/main/res/drawable-xxhdpi/ic_group_white_48dp.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/main/res/drawable-xxhdpi/ic_import_export_white_48dp.png
Normal file
After Width: | Height: | Size: 768 B |
BIN
src/main/res/drawable-xxhdpi/ic_lock_open_white_48dp.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
src/main/res/drawable-xxhdpi/ic_lock_outline_white_48dp.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
src/main/res/drawable-xxhdpi/ic_person_add_white_48dp.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
src/main/res/drawable-xxhdpi/ic_refresh_white_48dp.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
src/main/res/drawable-xxhdpi/ic_remove_grey600_36dp.png
Normal file
After Width: | Height: | Size: 278 B |
BIN
src/main/res/drawable-xxhdpi/ic_search_white_18dp.png
Normal file
After Width: | Height: | Size: 731 B |