Update icons and colors.

This commit is contained in:
Greyson Parrelli
2020-03-04 08:14:21 -05:00
parent a62183c9e0
commit df4422369d
130 changed files with 256 additions and 245 deletions

View File

@@ -270,8 +270,8 @@ public class ExperienceUpgradeActivity extends BaseActionBarActivity
!TextSecurePreferences.isPasswordDisabled(context))
{
Notification notification = new NotificationCompat.Builder(context, NotificationChannels.OTHER)
.setSmallIcon(R.drawable.icon_notification)
.setColor(context.getResources().getColor(R.color.signal_primary))
.setSmallIcon(R.drawable.ic_notification)
.setColor(context.getResources().getColor(R.color.core_ultramarine))
.setContentTitle(context.getString(R.string.ExperienceUpgradeActivity_unlock_to_complete_update))
.setContentText(context.getString(R.string.ExperienceUpgradeActivity_please_unlock_signal_to_complete_update))
.setStyle(new NotificationCompat.BigTextStyle().bigText(context.getString(R.string.ExperienceUpgradeActivity_please_unlock_signal_to_complete_update)))
@@ -299,8 +299,8 @@ public class ExperienceUpgradeActivity extends BaseActionBarActivity
dismissIntent.setAction(DISMISS_ACTION);
Notification notification = new NotificationCompat.Builder(context, NotificationChannels.OTHER)
.setSmallIcon(R.drawable.icon_notification)
.setColor(context.getResources().getColor(R.color.signal_primary))
.setSmallIcon(R.drawable.ic_notification)
.setColor(context.getResources().getColor(R.color.core_ultramarine))
.setContentTitle(context.getString(experienceUpgrade.get().getNotificationTitle()))
.setContentText(context.getString(experienceUpgrade.get().getNotificationText()))
.setStyle(new NotificationCompat.BigTextStyle().bigText(context.getString(experienceUpgrade.get().getNotificationBigText())))

View File

@@ -175,17 +175,17 @@ public class InviteActivity extends PassphraseRequiredActionBarActivity implemen
}
private void setPrimaryColorsToolbarForSms() {
primaryToolbar.setBackgroundColor(ContextCompat.getColor(this, R.color.signal_primary));
primaryToolbar.setBackgroundColor(ContextCompat.getColor(this, R.color.core_ultramarine));
primaryToolbar.getNavigationIcon().setColorFilter(ThemeUtil.getThemedColor(this, R.attr.conversation_subtitle_color), PorterDuff.Mode.SRC_IN);
primaryToolbar.setTitleTextColor(ThemeUtil.getThemedColor(this, R.attr.conversation_title_color));
if (Build.VERSION.SDK_INT >= 23) {
getWindow().setStatusBarColor(ContextCompat.getColor(this, R.color.signal_primary));
getWindow().setStatusBarColor(ContextCompat.getColor(this, R.color.core_ultramarine));
WindowUtil.clearLightStatusBar(getWindow());
}
if (Build.VERSION.SDK_INT >= 27) {
getWindow().setNavigationBarColor(ContextCompat.getColor(this, R.color.signal_primary));
getWindow().setNavigationBarColor(ContextCompat.getColor(this, R.color.core_ultramarine));
WindowUtil.clearLightNavigationBar(getWindow());
}
}

View File

@@ -238,7 +238,7 @@ public class PassphrasePromptActivity extends PassphraseActivity {
EditorInfo.IME_ACTION_DONE);
fingerprintPrompt.setImageResource(R.drawable.ic_fingerprint_white_48dp);
fingerprintPrompt.getBackground().setColorFilter(getResources().getColor(R.color.signal_primary), PorterDuff.Mode.SRC_IN);
fingerprintPrompt.getBackground().setColorFilter(getResources().getColor(R.color.core_ultramarine), PorterDuff.Mode.SRC_IN);
lockScreenButton.setOnClickListener(v -> resumeScreenLock());
}
@@ -358,7 +358,7 @@ public class PassphrasePromptActivity extends PassphraseActivity {
handleAuthenticated();
fingerprintPrompt.setImageResource(R.drawable.ic_fingerprint_white_48dp);
fingerprintPrompt.getBackground().setColorFilter(getResources().getColor(R.color.signal_primary), PorterDuff.Mode.SRC_IN);
fingerprintPrompt.getBackground().setColorFilter(getResources().getColor(R.color.core_ultramarine), PorterDuff.Mode.SRC_IN);
}
}).start();
}
@@ -381,7 +381,7 @@ public class PassphrasePromptActivity extends PassphraseActivity {
@Override
public void onAnimationEnd(Animation animation) {
fingerprintPrompt.setImageResource(R.drawable.ic_fingerprint_white_48dp);
fingerprintPrompt.getBackground().setColorFilter(getResources().getColor(R.color.signal_primary), PorterDuff.Mode.SRC_IN);
fingerprintPrompt.getBackground().setColorFilter(getResources().getColor(R.color.core_ultramarine), PorterDuff.Mode.SRC_IN);
}
@Override

View File

@@ -109,7 +109,7 @@ public class TransportOptions {
public static @NonNull TransportOption getPushTransportOption(@NonNull Context context) {
return new TransportOption(Type.TEXTSECURE,
R.drawable.ic_send_lock_24,
context.getResources().getColor(R.color.textsecure_primary),
context.getResources().getColor(R.color.core_ultramarine),
context.getString(R.string.ConversationActivity_transport_signal),
context.getString(R.string.conversation_activity__type_message_push),
new PushCharacterCalculator());

View File

@@ -235,7 +235,7 @@ public class ContactSelectionListAdapter extends CursorRecyclerViewAdapter<ViewH
final String headerString = getHeaderString(position);
if (isPush(position)) {
SpannableString spannable = new SpannableString(headerString);
spannable.setSpan(new ForegroundColorSpan(getContext().getResources().getColor(R.color.signal_primary)), 0, headerString.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
spannable.setSpan(new ForegroundColorSpan(getContext().getResources().getColor(R.color.core_ultramarine)), 0, headerString.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
return spannable;
} else {
return headerString;

View File

@@ -1787,7 +1787,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
inputPanel.setMediaKeyboardToggleMode(true);
TooltipPopup.forTarget(inputPanel.getMediaKeyboardToggleAnchorView())
.setBackgroundTint(getResources().getColor(R.color.core_blue))
.setBackgroundTint(getResources().getColor(R.color.core_ultramarine))
.setTextColor(getResources().getColor(R.color.core_white))
.setText(R.string.ConversationActivity_new_say_it_with_stickers)
.setOnDismissListener(() -> {

View File

@@ -1015,7 +1015,7 @@ public class ConversationFragment extends Fragment
TooltipPopup.forTarget(requireActivity().findViewById(R.id.menu_context_reply))
.setText(text)
.setTextColor(getResources().getColor(R.color.core_white))
.setBackgroundTint(getResources().getColor(R.color.core_blue))
.setBackgroundTint(getResources().getColor(R.color.core_ultramarine))
.show(TooltipPopup.POSITION_BELOW);
TextSecurePreferences.setHasSeenSwipeToReplyTooltip(requireContext(), true);

View File

@@ -108,7 +108,7 @@ public class GiphyActivity extends PassphraseRequiredActionBarActivity
}
private @ColorInt int getConversationColor() {
return getIntent().getIntExtra(EXTRA_COLOR, ActivityCompat.getColor(this, R.color.signal_primary));
return getIntent().getIntExtra(EXTRA_COLOR, ActivityCompat.getColor(this, R.color.core_ultramarine));
}
@Override

View File

@@ -125,7 +125,7 @@ public class FcmRefreshJob extends BaseJob {
PendingIntent pendingIntent = PendingIntent.getActivity(context, 1122, intent, PendingIntent.FLAG_CANCEL_CURRENT);
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, NotificationChannels.FAILURES);
builder.setSmallIcon(R.drawable.icon_notification);
builder.setSmallIcon(R.drawable.ic_notification);
builder.setLargeIcon(BitmapFactory.decodeResource(context.getResources(),
R.drawable.ic_action_warning_red));
builder.setContentTitle(context.getString(R.string.GcmRefreshJob_Permanent_Signal_communication_failure));

View File

@@ -137,7 +137,7 @@ public final class PushDecryptMessageJob extends BaseJob {
// TODO [greyson] Navigation
NotificationManagerCompat.from(context).notify(494949,
new NotificationCompat.Builder(context, NotificationChannels.getMessagesChannel(context))
.setSmallIcon(R.drawable.icon_notification)
.setSmallIcon(R.drawable.ic_notification)
.setPriority(NotificationCompat.PRIORITY_HIGH)
.setCategory(NotificationCompat.CATEGORY_MESSAGE)
.setContentTitle(context.getString(R.string.PushDecryptJob_new_locked_message))

View File

@@ -308,7 +308,7 @@ public class CameraXFragment extends Fragment implements CameraFragment {
TooltipPopup.forTarget(captureButton)
.setOnDismissListener(this::neverDisplayVideoRecordingTooltipAgain)
.setBackgroundTint(ContextCompat.getColor(requireContext(), R.color.signal_primary))
.setBackgroundTint(ContextCompat.getColor(requireContext(), R.color.core_ultramarine))
.setTextColor(ThemeUtil.getThemedColor(requireContext(), R.attr.conversation_title_color))
.setText(R.string.CameraXFragment_tap_for_photo_hold_for_video)
.show(displayRotation == Surface.ROTATION_0 || displayRotation == Surface.ROTATION_180 ? TooltipPopup.POSITION_ABOVE : TooltipPopup.POSITION_START);

View File

@@ -727,7 +727,7 @@ public class MediaSendActivity extends PassphraseRequiredActionBarActivity imple
case VIEW_ONCE_TOOLTIP:
TooltipPopup.forTarget(revealButton)
.setText(R.string.MediaSendActivity_tap_here_to_make_this_message_disappear_after_it_is_viewed)
.setBackgroundTint(getResources().getColor(R.color.core_blue))
.setBackgroundTint(getResources().getColor(R.color.core_ultramarine))
.setTextColor(getResources().getColor(R.color.core_white))
.setOnDismissListener(() -> TextSecurePreferences.setHasSeenViewOnceTooltip(this, true))
.show(TooltipPopup.POSITION_ABOVE);

View File

@@ -14,7 +14,7 @@ public class FailedNotificationBuilder extends AbstractNotificationBuilder {
public FailedNotificationBuilder(Context context, NotificationPrivacyPreference privacy, Intent intent) {
super(context, privacy);
setSmallIcon(R.drawable.icon_notification);
setSmallIcon(R.drawable.ic_notification);
setLargeIcon(BitmapFactory.decodeResource(context.getResources(),
R.drawable.ic_action_warning_red));
setContentTitle(context.getString(R.string.MessageNotifier_message_delivery_failed));

View File

@@ -25,8 +25,8 @@ public class MultipleRecipientNotificationBuilder extends AbstractNotificationBu
public MultipleRecipientNotificationBuilder(Context context, NotificationPrivacyPreference privacy) {
super(context, privacy);
setColor(context.getResources().getColor(R.color.textsecure_primary));
setSmallIcon(R.drawable.icon_notification);
setColor(context.getResources().getColor(R.color.core_ultramarine));
setSmallIcon(R.drawable.ic_notification);
setContentTitle(context.getString(R.string.app_name));
// TODO [greyson] Navigation
setContentIntent(PendingIntent.getActivity(context, 0, new Intent(context, MainActivity.class), 0));

View File

@@ -20,8 +20,8 @@ public class PendingMessageNotificationBuilder extends AbstractNotificationBuild
// TODO [greyson] Navigation
Intent intent = new Intent(context, MainActivity.class);
setSmallIcon(R.drawable.icon_notification);
setColor(context.getResources().getColor(R.color.textsecure_primary));
setSmallIcon(R.drawable.ic_notification);
setColor(context.getResources().getColor(R.color.core_ultramarine));
setCategory(NotificationCompat.CATEGORY_MESSAGE);
setContentTitle(context.getString(R.string.MessageNotifier_you_may_have_new_messages));

View File

@@ -62,8 +62,8 @@ public class SingleRecipientNotificationBuilder extends AbstractNotificationBuil
{
super(new ContextThemeWrapper(context, R.style.TextSecure_LightTheme), privacy);
setSmallIcon(R.drawable.icon_notification);
setColor(context.getResources().getColor(R.color.textsecure_primary));
setSmallIcon(R.drawable.ic_notification);
setColor(context.getResources().getColor(R.color.core_ultramarine));
setCategory(NotificationCompat.CATEGORY_MESSAGE);
if (!NotificationChannels.supported()) {

View File

@@ -68,7 +68,7 @@ public class ContactPreference extends Preference {
int color;
if (secure) {
color = getContext().getResources().getColor(R.color.textsecure_primary);
color = getContext().getResources().getColor(R.color.core_ultramarine);
} else {
color = getContext().getResources().getColor(R.color.grey_600);
}

View File

@@ -128,8 +128,8 @@ public class ApplicationMigrationService extends Service
private NotificationCompat.Builder initializeBackgroundNotification() {
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, NotificationChannels.OTHER);
builder.setSmallIcon(R.drawable.icon_notification);
builder.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.icon_notification));
builder.setSmallIcon(R.drawable.ic_notification);
builder.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.ic_notification));
builder.setContentTitle(getString(R.string.ApplicationMigrationService_importing_text_messages));
builder.setContentText(getString(R.string.ApplicationMigrationService_import_in_progress));
builder.setOngoing(true);
@@ -183,7 +183,7 @@ public class ApplicationMigrationService extends Service
@Override
public void onReceive(Context context, Intent intent) {
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, NotificationChannels.OTHER);
builder.setSmallIcon(R.drawable.icon_notification);
builder.setSmallIcon(R.drawable.ic_notification);
builder.setContentTitle(context.getString(R.string.ApplicationMigrationService_import_complete));
builder.setContentText(context.getString(R.string.ApplicationMigrationService_system_database_import_is_complete));
// TODO [greyson] Navigation

View File

@@ -67,8 +67,8 @@ public class UpdateApkReadyListener extends BroadcastReceiver {
.setOngoing(true)
.setContentTitle(context.getString(R.string.UpdateApkReadyListener_Signal_update))
.setContentText(context.getString(R.string.UpdateApkReadyListener_a_new_version_of_signal_is_available_tap_to_update))
.setSmallIcon(R.drawable.icon_notification)
.setColor(context.getResources().getColor(R.color.textsecure_primary))
.setSmallIcon(R.drawable.ic_notification)
.setColor(context.getResources().getColor(R.color.core_ultramarine))
.setPriority(NotificationCompat.PRIORITY_HIGH)
.setCategory(NotificationCompat.CATEGORY_REMINDER)
.setContentIntent(pendingIntent)

View File

@@ -302,7 +302,7 @@ final class StickerManagementAdapter extends SectionedRecyclerViewAdapter<String
Drawable badge = ContextCompat.getDrawable(context, R.drawable.ic_check_circle_white_18dp);
badge.setBounds(0, 0, badge.getIntrinsicWidth(), badge.getIntrinsicHeight());
badge.setColorFilter(ContextCompat.getColor(context, R.color.core_blue), PorterDuff.Mode.MULTIPLY);
badge.setColorFilter(ContextCompat.getColor(context, R.color.core_ultramarine), PorterDuff.Mode.MULTIPLY);
badgeSpan.setSpan(new ImageSpan(badge), 1, badgeSpan.length(), 0);
return badgeSpan;