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);
|
||||||
|
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);
|
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) {
|
||||||
|
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);
|
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);
|
||||||
|
|
After Width: | Height: | Size: 222 B |
After Width: | Height: | Size: 870 B |
After Width: | Height: | Size: 510 B |
After Width: | Height: | Size: 751 B |
After Width: | Height: | Size: 893 B |
After Width: | Height: | Size: 363 B |
After Width: | Height: | Size: 348 B |
After Width: | Height: | Size: 338 B |
After Width: | Height: | Size: 366 B |
After Width: | Height: | Size: 419 B |
After Width: | Height: | Size: 490 B |
After Width: | Height: | Size: 277 B |
After Width: | Height: | Size: 354 B |
After Width: | Height: | Size: 722 B |
After Width: | Height: | Size: 599 B |
After Width: | Height: | Size: 414 B |
After Width: | Height: | Size: 739 B |
After Width: | Height: | Size: 743 B |
After Width: | Height: | Size: 683 B |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 217 B |
After Width: | Height: | Size: 403 B |
After Width: | Height: | Size: 871 B |
After Width: | Height: | Size: 780 B |
After Width: | Height: | Size: 540 B |
After Width: | Height: | Size: 198 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 393 B |
After Width: | Height: | Size: 510 B |
After Width: | Height: | Size: 645 B |
After Width: | Height: | Size: 290 B |
After Width: | Height: | Size: 287 B |
After Width: | Height: | Size: 270 B |
After Width: | Height: | Size: 299 B |
After Width: | Height: | Size: 341 B |
After Width: | Height: | Size: 378 B |
After Width: | Height: | Size: 210 B |
After Width: | Height: | Size: 277 B |
After Width: | Height: | Size: 484 B |
After Width: | Height: | Size: 464 B |
After Width: | Height: | Size: 330 B |
After Width: | Height: | Size: 513 B |
After Width: | Height: | Size: 449 B |
After Width: | Height: | Size: 423 B |
After Width: | Height: | Size: 637 B |
After Width: | Height: | Size: 197 B |
After Width: | Height: | Size: 324 B |
After Width: | Height: | Size: 591 B |
After Width: | Height: | Size: 572 B |
After Width: | Height: | Size: 421 B |
After Width: | Height: | Size: 269 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 645 B |
After Width: | Height: | Size: 893 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 533 B |
After Width: | Height: | Size: 435 B |
After Width: | Height: | Size: 397 B |
After Width: | Height: | Size: 406 B |
After Width: | Height: | Size: 493 B |
After Width: | Height: | Size: 632 B |
After Width: | Height: | Size: 282 B |
After Width: | Height: | Size: 351 B |
After Width: | Height: | Size: 935 B |
After Width: | Height: | Size: 759 B |
After Width: | Height: | Size: 502 B |
After Width: | Height: | Size: 946 B |
After Width: | Height: | Size: 948 B |
After Width: | Height: | Size: 909 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 212 B |
After Width: | Height: | Size: 504 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 994 B |
After Width: | Height: | Size: 639 B |
After Width: | Height: | Size: 356 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 893 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 717 B |
After Width: | Height: | Size: 631 B |
After Width: | Height: | Size: 574 B |
After Width: | Height: | Size: 566 B |
After Width: | Height: | Size: 656 B |
After Width: | Height: | Size: 843 B |
After Width: | Height: | Size: 351 B |
After Width: | Height: | Size: 514 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 768 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 278 B |
After Width: | Height: | Size: 731 B |