Merge pull request #923 from SamWhited/material-design-icons

Start experimenting with material design icons
This commit is contained in:
Daniel Gultsch 2015-01-29 23:28:41 +01:00
commit 26bc2d387f
145 changed files with 105 additions and 25 deletions

View File

@ -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],

View File

@ -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);

View File

@ -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);

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 870 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 739 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 743 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 875 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 935 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 946 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 948 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 994 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 717 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 843 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 731 B

Some files were not shown because too many files have changed in this diff Show More