From f1cce707bd4b465f225466a4aaf3816e461d2c14 Mon Sep 17 00:00:00 2001 From: rafalense Date: Thu, 19 Nov 2015 10:11:51 +0100 Subject: [PATCH] - Now header gets color in android recent apps list (lollipop and up) - Mention list size increased in chat screen - Now also channels can be muted from main screen - Added mod to set header avatar radius in chat screen - Added mod to set 'typing' text color in chat header - Bug fixes --- TMessagesProj/build.gradle | 4 +- .../telegram/messenger/ApplicationLoader.java | 5 +- .../org/telegram/ui/Cells/ChatBaseCell.java | 1 + .../org/telegram/ui/Cells/ChatMediaCell.java | 24 ++---- .../ui/Cells/TextInfoPrivacyCell.java | 18 ++-- .../telegram/ui/Cells/TextSettingsCell.java | 22 +++-- .../java/org/telegram/ui/ChatActivity.java | 52 ++++++++---- .../ui/Components/ChatActivityEnterView.java | 2 +- .../ui/Components/RecordStatusDrawable.java | 2 +- .../ui/Components/SendingFileDrawable.java | 2 +- .../ui/Components/SendingFileEx2Drawable.java | 2 +- .../ui/Components/SendingFileExDrawable.java | 2 +- .../ui/Components/TypingDotsDrawable.java | 2 +- .../telegram/ui/DocumentSelectActivity.java | 8 +- .../java/org/telegram/ui/LaunchActivity.java | 11 +++ .../java/org/telegram/ui/MediaActivity.java | 8 +- .../java/org/telegram/ui/ProfileActivity.java | 8 +- .../org/telegram/ui/ThemingChatActivity.java | 82 +++++++++++++++---- .../telegram/ui/ThemingDrawerActivity.java | 6 +- .../src/main/res/values-ar/strings.xml | 2 +- .../src/main/res/values-ca/strings.xml | 39 +++++---- .../src/main/res/values-de/strings.xml | 15 ++-- .../src/main/res/values-es/strings.xml | 4 +- .../src/main/res/values-fr/strings.xml | 2 +- .../src/main/res/values-gl/strings.xml | 12 ++- .../src/main/res/values-hi/strings.xml | 2 +- .../src/main/res/values-hr/strings.xml | 2 +- .../src/main/res/values-it/strings.xml | 6 +- .../src/main/res/values-ko/strings.xml | 2 +- .../src/main/res/values-nl/strings.xml | 2 +- .../src/main/res/values-pt-rBR/strings.xml | 9 +- .../src/main/res/values-pt-rPT/strings.xml | 2 +- .../src/main/res/values-ru/strings.xml | 11 ++- .../src/main/res/values-tr/strings.xml | 2 +- .../src/main/res/values-zh-rCN/strings.xml | 4 +- .../src/main/res/values-zh-rTW/strings.xml | 4 +- TMessagesProj/src/main/res/values/strings.xml | 4 +- 37 files changed, 255 insertions(+), 130 deletions(-) diff --git a/TMessagesProj/build.gradle b/TMessagesProj/build.gradle index f03b80e7..41ea4945 100644 --- a/TMessagesProj/build.gradle +++ b/TMessagesProj/build.gradle @@ -89,7 +89,7 @@ android { applicationId "org.telegram.plus" minSdkVersion 8 targetSdkVersion 23 - versionCode 655 - versionName "3.2.6.0" + versionCode 660 + versionName "3.2.6.2" } } diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/ApplicationLoader.java b/TMessagesProj/src/main/java/org/telegram/messenger/ApplicationLoader.java index 5e81fce1..96dd3f4d 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/ApplicationLoader.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/ApplicationLoader.java @@ -301,8 +301,7 @@ public class ApplicationLoader extends Application { if (preferences.getBoolean("pushService", true)) { applicationContext.startService(new Intent(applicationContext, NotificationsService.class)); - - if (android.os.Build.VERSION.SDK_INT >= 19) { + //if (android.os.Build.VERSION.SDK_INT >= 19) { FileLog.e("ApplicationLoader", "startPushService"); Calendar cal = Calendar.getInstance(); PendingIntent pintent = PendingIntent.getService(applicationContext, 0, new Intent(applicationContext, NotificationsService.class), 0); @@ -312,7 +311,7 @@ public class ApplicationLoader extends Application { //PendingIntent pintent = PendingIntent.getService(applicationContext, 0, new Intent(applicationContext, NotificationsService.class), 0); //AlarmManager alarm = (AlarmManager)applicationContext.getSystemService(Context.ALARM_SERVICE); //alarm.cancel(pintent); - } + //} } else { stopPushService(); } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatBaseCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatBaseCell.java index cb44a84d..b363f918 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatBaseCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatBaseCell.java @@ -213,6 +213,7 @@ public class ChatBaseCell extends BaseCell implements MediaController.FileDownlo leftBound = aSize + AndroidUtilities.dp(3); //Log.e("ChatBaseCell", "leftBound " + leftBound); } + private void updateTheme(){ SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE); int defColor = themePrefs.getInt("themeColor", AndroidUtilities.defColor); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMediaCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMediaCell.java index 9a2b9330..4fd53f97 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMediaCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMediaCell.java @@ -538,6 +538,7 @@ public class ChatMediaCell extends ChatBaseCell { } if (currentNameString == null || !currentNameString.equals(name)) { currentNameString = name; + maxWidth = maxWidth + AndroidUtilities.dp(1); //to fix 2 lines bug nameLayout = StaticLayoutEx.createStaticLayout(currentNameString, namePaint, maxWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false, TextUtils.TruncateAt.END, maxWidth, 1); if (nameLayout.getLineCount() > 0) { nameWidth = Math.min(maxWidth, (int) Math.ceil(nameLayout.getLineWidth(0))); @@ -545,26 +546,16 @@ public class ChatMediaCell extends ChatBaseCell { } else { nameWidth = maxWidth; } - nameWidth = Math.min(maxWidth, (int) Math.ceil(namePaint.measureText(currentNameString))); - CharSequence str = TextUtils.ellipsize(currentNameString, namePaint, nameWidth, TextUtils.TruncateAt.END); - nameLayout = new StaticLayout(str, namePaint, nameWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false); + //nameWidth = Math.min(maxWidth, (int) Math.ceil(namePaint.measureText(currentNameString))); + //CharSequence str = TextUtils.ellipsize(currentNameString, namePaint, nameWidth, TextUtils.TruncateAt.END); + //nameLayout = new StaticLayout(str, namePaint, nameWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false); } - String fileName = messageObject.getFileName(); - int idx = fileName.lastIndexOf("."); - String ext = null; - if (idx != -1) { - ext = fileName.substring(idx + 1); - } - if (ext == null || ext.length() == 0) { - ext = messageObject.messageOwner.media.document.mime_type; - } - ext = ext.toUpperCase(); - String str = AndroidUtilities.formatFileSize(messageObject.messageOwner.media.document.size) + " " + messageObject.getExtension(); if (currentInfoString == null || !currentInfoString.equals(str)) { currentInfoString = str; + infoOffset = 0; infoWidth = Math.min(maxWidth, (int) Math.ceil(infoPaint.measureText(currentInfoString))); infoLayout2 = null; @@ -635,8 +626,9 @@ public class ChatMediaCell extends ChatBaseCell { infoOffset = 0; infoLayout = null; if(isChat){ - infoWidth = (int) Math.ceil(senderPaint.measureText(currentInfoString)); - infoLayout = new StaticLayout(currentInfoString, senderPaint, infoWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false); + infoWidth = (int) Math.min(Math.ceil(namePaint.measureText(currentNameString)), Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) * 0.5f); + CharSequence str = TextUtils.ellipsize(currentNameString, senderPaint, infoWidth, TextUtils.TruncateAt.END); + infoLayout = new StaticLayout(str, senderPaint, infoWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false); } } nameLayout = null; diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/TextInfoPrivacyCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/TextInfoPrivacyCell.java index b44a3437..679783f1 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/TextInfoPrivacyCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/TextInfoPrivacyCell.java @@ -55,13 +55,19 @@ public class TextInfoPrivacyCell extends FrameLayout { private void setTheme(){ SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE); - int shadowColor = preferences.getInt("prefShadowColor", 0xfff0f0f0); - if(shadowColor != 0xfff0f0f0) { - setBackgroundColor(shadowColor); - } else { - setBackgroundResource(R.drawable.greydivider); - } + int summaryColor = preferences.getInt("prefSummaryColor", 0xff808080); + int shadowColor = preferences.getInt("prefShadowColor", 0xfff0f0f0); + String tag = getTag() != null ? getTag().toString() : ""; + if(tag.contains("Profile")){ + summaryColor = preferences.getInt("profileSummaryColor", 0xff808080); + }else{ + if(shadowColor != 0xfff0f0f0) { + setBackgroundColor(shadowColor); + } else { + setBackgroundResource(R.drawable.greydivider); + } + } textView.setTextColor(summaryColor); } } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/TextSettingsCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/TextSettingsCell.java index 57910d05..3d86232c 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/TextSettingsCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/TextSettingsCell.java @@ -153,14 +153,26 @@ public class TextSettingsCell extends FrameLayout { private void setTheme(){ SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE); - int bgColor = preferences.getInt("prefBGColor", 0xffffffff); - setBackgroundColor(bgColor); int defColor = preferences.getInt("themeColor", AndroidUtilities.defColor); + + int bgColor = preferences.getInt("prefBGColor", 0xffffffff); int divColor = preferences.getInt("prefDividerColor", 0xffd9d9d9); int titleColor = preferences.getInt("prefTitleColor", 0xff212121); int sColor = preferences.getInt("prefSectionColor", defColor); - textView.setTextColor(titleColor); - paint.setColor(divColor); - valueTextView.setTextColor(sColor); + String tag = getTag() != null ? getTag().toString() : ""; + if(tag.contains("Profile")){ + bgColor = preferences.getInt("profileRowColor", 0xffffffff); + setBackgroundColor(bgColor); + if(bgColor != 0xffffffff)paint.setColor(bgColor); + titleColor = preferences.getInt("profileTitleColor", 0xff212121); + textView.setTextColor(titleColor); + if(bgColor != 0xffffffff)valueTextView.setTextColor(0x00000000); + }else{ + setBackgroundColor(bgColor); + textView.setTextColor(titleColor); + paint.setColor(divColor); + valueTextView.setTextColor(sColor); + } + } } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java index 54590ed4..a95b265d 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java @@ -1722,13 +1722,13 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not if (Build.VERSION.SDK_INT > 8) { mentionListView.setOverScrollMode(ListView.OVER_SCROLL_NEVER); } - contentView.addView(mentionListView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 110, Gravity.LEFT | Gravity.BOTTOM)); + contentView.addView(mentionListView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 210, Gravity.LEFT | Gravity.BOTTOM)); mentionListView.setAdapter(mentionsAdapter = new MentionsAdapter(context, false, new MentionsAdapter.MentionsAdapterDelegate() { @Override public void needChangePanelVisibility(boolean show) { if (show) { - FrameLayout.LayoutParams layoutParams3 = (FrameLayout.LayoutParams) mentionListView.getLayoutParams(); + FrameLayout.LayoutParams layoutParams3 = (FrameLayout.LayoutParams) mentionListView.getLayoutParams(); int height = 36 * Math.min(3, mentionsAdapter.getCount()) + (mentionsAdapter.getCount() > 3 ? 18 : 0); layoutParams3.height = AndroidUtilities.dp(2 + height); layoutParams3.topMargin = -AndroidUtilities.dp(height); @@ -1945,7 +1945,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not @Override public void onWindowSizeChanged(int size) { - if (size < AndroidUtilities.dp(72) + ActionBar.getCurrentActionBarHeight()) { + if (size < AndroidUtilities.dp(72) + ActionBar.getCurrentActionBarHeight()) { allowStickersPanel = false; if (stickersPanel.getVisibility() == View.VISIBLE) { stickersPanel.clearAnimation(); @@ -1965,6 +1965,16 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not mentionListView.clearAnimation(); mentionListView.setVisibility(View.VISIBLE); } + //plus + if (mentionListView != null) { + int height = AndroidUtilities.dp(37 * Math.min(10/(AndroidUtilities.displaySize.y / size), mentionsAdapter.getCount())); + FrameLayout.LayoutParams layoutParams3 = (FrameLayout.LayoutParams) mentionListView.getLayoutParams(); + if(height != layoutParams3.height) { + layoutParams3.height = height; + layoutParams3.topMargin = -height; + mentionListView.setLayoutParams(layoutParams3); + } + } } updateMessagesVisisblePart(); } @@ -2574,9 +2584,12 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not int textColor = themePrefs.getInt("chatEditTextColor", 0xff999999); replyObjectTextView.setTextColor(textColor); //int rColor = themePrefs.getInt("chatForwardRColor", defColor); - Drawable delete = getParentActivity().getResources().getDrawable(R.drawable.delete_reply); - delete.setColorFilter(iColor, PorterDuff.Mode.SRC_IN); - deleteIconImageView.setImageDrawable(delete); + if(getParentActivity() != null) { + Drawable delete = getParentActivity().getResources().getDrawable(R.drawable.delete_reply); + delete.setColorFilter(iColor, PorterDuff.Mode.SRC_IN); + deleteIconImageView.setImageDrawable(delete); + } + if (messageObject != null) { String name; if (messageObject.messageOwner.from_id > 0) { @@ -3387,15 +3400,18 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not //int leftIcon = currentEncryptedChat != null ? R.drawable.ic_lock_header : 0; int rightIcon = MessagesController.getInstance().isDialogMuted(dialog_id) ? R.drawable.mute_fixed : 0; //nameTextView.setCompoundDrawablesWithIntrinsicBounds(leftIcon, 0, rightIcon, 0); - Drawable lock = getParentActivity().getResources().getDrawable(R.drawable.ic_lock_header); - SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE); - int color = themePrefs.getInt("chatHeaderIconsColor", 0xffffffff); - lock.setColorFilter(color, PorterDuff.Mode.MULTIPLY); - lock = currentEncryptedChat != null ? lock : null; - Drawable mute = getParentActivity().getResources().getDrawable(R.drawable.mute_blue); - mute.setColorFilter(color, PorterDuff.Mode.SRC_IN); - mute = MessagesController.getInstance().isDialogMuted(dialog_id) ? mute : null; - nameTextView.setCompoundDrawablesWithIntrinsicBounds(lock, null, mute, null); + if(getParentActivity() != null) { + Drawable lock = getParentActivity().getResources().getDrawable(R.drawable.ic_lock_header); + SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE); + int color = themePrefs.getInt("chatHeaderIconsColor", 0xffffffff); + lock.setColorFilter(color, PorterDuff.Mode.MULTIPLY); + + lock = currentEncryptedChat != null ? lock : null; + Drawable mute = getParentActivity().getResources().getDrawable(R.drawable.mute_blue); + mute.setColorFilter(color, PorterDuff.Mode.SRC_IN); + mute = MessagesController.getInstance().isDialogMuted(dialog_id) ? mute : null; + nameTextView.setCompoundDrawablesWithIntrinsicBounds(lock, null, mute, null); + } if (rightIcon != 0) { muteItem.setText(LocaleController.getString("UnmuteNotifications", R.string.UnmuteNotifications)); } else { @@ -3476,6 +3492,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not lastStatus = newStatus; onlineTextView.setText(newStatus); } + //plus if(newStatus.equals(LocaleController.getString("Online", R.string.Online))){ onlineTextView.setTextColor(themePrefs.getInt("chatOnlineColor", themePrefs.getInt("chatStatusColor", lightColor))); } @@ -3485,6 +3502,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not lastPrintString = printString; onlineTextView.setText(printString); setTypingAnimation(true); + //plus + onlineTextView.setTextColor(themePrefs.getInt("chatTypingColor", themePrefs.getInt("chatStatusColor", lightColor))); + } } @@ -3579,7 +3599,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not avatarDrawable = new AvatarDrawable(currentChat); } //Chat header photo - int radius = AndroidUtilities.dp(AndroidUtilities.getIntDef("chatAvatarRadius", 32)); + int radius = AndroidUtilities.dp(AndroidUtilities.getIntDef("chatHeaderAvatarRadius", 32)); if(avatarImageView != null)avatarImageView.setRoundRadius(radius); if(avatarDrawable != null)avatarDrawable.setRadius(radius); // diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java index a0987248..163fd3ee 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java @@ -1503,7 +1503,7 @@ public class ChatActivityEnterView extends FrameLayoutFixed implements Notificat } } if (!keyboardHidden && messageEditText.length() == 0 && !isPopupShowing()) { - showPopup(1, 1); + //showPopup(1, 1); //hide botbuttons by default } } else { if (isPopupShowing() && currentPopupContentType == 1) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/RecordStatusDrawable.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/RecordStatusDrawable.java index 4f0e6a8c..39aeab51 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/RecordStatusDrawable.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/RecordStatusDrawable.java @@ -31,7 +31,7 @@ public class RecordStatusDrawable extends Drawable { super(); //paint.setColor(0xffd7e8f7); SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE); - paint.setColor(themePrefs.getInt("chatStatusColor", AndroidUtilities.getIntDarkerColor("themeColor", -0x40))); + paint.setColor(themePrefs.getInt("chatTypingColor",themePrefs.getInt("chatStatusColor", AndroidUtilities.getIntDarkerColor("themeColor", -0x40)))); paint.setStyle(Paint.Style.STROKE); paint.setStrokeWidth(AndroidUtilities.dp(2)); paint.setStrokeCap(Paint.Cap.ROUND); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/SendingFileDrawable.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/SendingFileDrawable.java index b74314b5..676c7acc 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/SendingFileDrawable.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/SendingFileDrawable.java @@ -37,7 +37,7 @@ public class SendingFileDrawable extends Drawable { super(); //paint.setColor(0xffd7e8f7); SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE); - paint.setColor(themePrefs.getInt("chatStatusColor", AndroidUtilities.getIntDarkerColor("themeColor", -0x40))); + paint.setColor(themePrefs.getInt("chatTypingColor",themePrefs.getInt("chatStatusColor", AndroidUtilities.getIntDarkerColor("themeColor", -0x40)))); paint.setStyle(Paint.Style.STROKE); paint.setStrokeWidth(AndroidUtilities.dp(2)); paint.setStrokeCap(Paint.Cap.ROUND); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/SendingFileEx2Drawable.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/SendingFileEx2Drawable.java index 9a6f2857..9bb4918e 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/SendingFileEx2Drawable.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/SendingFileEx2Drawable.java @@ -29,7 +29,7 @@ public class SendingFileEx2Drawable extends Drawable { super(); //paint.setColor(0xffd7e8f7); SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE); - paint.setColor(themePrefs.getInt("chatStatusColor", AndroidUtilities.getIntDarkerColor("themeColor", -0x40))); + paint.setColor(themePrefs.getInt("chatTypingColor",themePrefs.getInt("chatStatusColor", AndroidUtilities.getIntDarkerColor("themeColor", -0x40)))); paint.setStyle(Paint.Style.STROKE); paint.setStrokeWidth(AndroidUtilities.dp(3)); paint.setStrokeCap(Paint.Cap.ROUND); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/SendingFileExDrawable.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/SendingFileExDrawable.java index 22af5a8b..91f49f8f 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/SendingFileExDrawable.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/SendingFileExDrawable.java @@ -29,7 +29,7 @@ public class SendingFileExDrawable extends Drawable { super(); //paint.setColor(0xffd7e8f7); SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE); - paint.setColor(themePrefs.getInt("chatStatusColor", AndroidUtilities.getIntDarkerColor("themeColor", -0x40))); + paint.setColor(themePrefs.getInt("chatTypingColor",themePrefs.getInt("chatStatusColor", AndroidUtilities.getIntDarkerColor("themeColor", -0x40)))); paint.setStyle(Paint.Style.STROKE); paint.setStrokeWidth(AndroidUtilities.dp(2)); paint.setStrokeCap(Paint.Cap.ROUND); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/TypingDotsDrawable.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/TypingDotsDrawable.java index d25ca387..567f8001 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/TypingDotsDrawable.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/TypingDotsDrawable.java @@ -33,7 +33,7 @@ public class TypingDotsDrawable extends Drawable { super(); //paint.setColor(0xffd7e8f7); SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE); - paint.setColor(themePrefs.getInt("chatStatusColor", AndroidUtilities.getIntDarkerColor("themeColor", -0x40))); + paint.setColor(themePrefs.getInt("chatTypingColor",themePrefs.getInt("chatStatusColor", AndroidUtilities.getIntDarkerColor("themeColor", -0x40)))); } public void setIsChat(boolean value) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/DocumentSelectActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/DocumentSelectActivity.java index 2ec465e5..ce02760b 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/DocumentSelectActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/DocumentSelectActivity.java @@ -14,7 +14,9 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; +import android.content.SharedPreferences; import android.content.res.Configuration; +import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Environment; import android.os.StatFs; @@ -149,7 +151,11 @@ public class DocumentSelectActivity extends BaseFragment { ApplicationLoader.applicationContext.registerReceiver(receiver, filter); } - actionBar.setBackButtonDrawable(new BackDrawable(false)); + //actionBar.setBackButtonDrawable(new BackDrawable(false)); + SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE); + Drawable d = new BackDrawable(false); + ((BackDrawable) d).setColor(themePrefs.getInt("chatHeaderIconsColor", 0xffffffff)); + actionBar.setBackButtonDrawable(d); actionBar.setAllowOverlayTitle(true); actionBar.setTitle(LocaleController.getString("SelectFile", R.string.SelectFile)); actionBar.setActionBarMenuOnItemClick(new ActionBar.ActionBarMenuOnItemClick() { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java index 7c8e6d49..6816e64d 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java @@ -152,7 +152,18 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa requestWindowFeature(Window.FEATURE_NO_TITLE); setTheme(R.style.Theme_TMessages); getWindow().setBackgroundDrawableResource(R.drawable.transparent); + //plus + /*if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE); + int def = themePrefs.getInt("themeColor", AndroidUtilities.defColor); + int hColor = themePrefs.getInt("chatsHeaderColor", def); + Bitmap bm = BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher); + ActivityManager.TaskDescription td = new ActivityManager.TaskDescription(null, bm, hColor); + + setTaskDescription(td); + bm.recycle(); + }*/ super.onCreate(savedInstanceState); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/MediaActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/MediaActivity.java index 66661d85..170013ac 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/MediaActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/MediaActivity.java @@ -13,8 +13,10 @@ import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; +import android.content.SharedPreferences; import android.content.res.Configuration; import android.graphics.Bitmap; +import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Build; import android.os.Bundle; @@ -234,7 +236,11 @@ private final static int quoteforward = 33; @Override public View createView(Context context) { - actionBar.setBackButtonDrawable(new BackDrawable(false)); + //actionBar.setBackButtonDrawable(new BackDrawable(false)); + SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE); + Drawable d = new BackDrawable(false); + ((BackDrawable) d).setColor(themePrefs.getInt("chatHeaderIconsColor", 0xffffffff)); + actionBar.setBackButtonDrawable(d); actionBar.setTitle(""); actionBar.setAllowOverlayTitle(false); actionBar.setActionBarMenuOnItemClick(new ActionBar.ActionBarMenuOnItemClick() { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java index 9b052e63..976ef318 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java @@ -2105,7 +2105,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. TextCell textCell = (TextCell) holder.itemView; //textCell.setTextColor(0xff212121); textCell.setTextColor(tColor); - + int vColor = themePrefs.getInt("profileTitleColor", def); if (i == sharedMediaRow) { String value; if (totalMediaCount == -1) { @@ -2115,7 +2115,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. } textCell.setMultiline(false); textCell.setTextAndValue(LocaleController.getString("SharedMedia", R.string.SharedMedia), value); - textCell.setValueColor(themePrefs.getInt("profileTitleColor", def)); + textCell.setValueColor(vColor); } else if (i == settingsTimerRow) { TLRPC.EncryptedChat encryptedChat = MessagesController.getInstance().getEncryptedChat((int)(dialog_id >> 32)); String value; @@ -2126,6 +2126,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. } textCell.setMultiline(false); textCell.setTextAndValue(LocaleController.getString("MessageLifetime", R.string.MessageLifetime), value); + textCell.setValueColor(vColor); } else if (i == settingsNotificationsRow) { textCell.setMultiline(false); //textCell.setTextAndIcon(LocaleController.getString("NotificationsAndSounds", R.string.NotificationsAndSounds), R.drawable.profile_list); @@ -2164,6 +2165,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. textCell.setMultiline(false); if (info != null) { textCell.setTextAndValue(LocaleController.getString("ChannelMembers", R.string.ChannelMembers), String.format("%d", info.participants_count)); + textCell.setValueColor(vColor); } else { textCell.setText(LocaleController.getString("ChannelMembers", R.string.ChannelMembers)); } @@ -2171,6 +2173,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. textCell.setMultiline(false); if (info != null) { textCell.setTextAndValue(LocaleController.getString("ChannelAdministrators", R.string.ChannelAdministrators), String.format("%d", info.admins_count)); + textCell.setValueColor(vColor); } else { textCell.setText(LocaleController.getString("ChannelAdministrators", R.string.ChannelAdministrators)); } @@ -2178,6 +2181,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. textCell.setMultiline(false); if (info != null) { textCell.setTextAndValue(LocaleController.getString("ChannelBlockedUsers", R.string.ChannelBlockedUsers), String.format("%d", info.kicked_count)); + textCell.setValueColor(vColor); } else { textCell.setText(LocaleController.getString("ChannelBlockedUsers", R.string.ChannelBlockedUsers)); } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ThemingChatActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ThemingChatActivity.java index 8689b335..1920c627 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ThemingChatActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ThemingChatActivity.java @@ -57,6 +57,7 @@ public class ThemingChatActivity extends BaseFragment { private int muteColorRow; private int headerColorRow; private int headerIconsColorRow; + private int headerAvatarRadiusRow; private int rowsSectionRow; private int rowsSection2Row; @@ -111,6 +112,7 @@ public class ThemingChatActivity extends BaseFragment { private int headerGradientRow; private int headerGradientColorRow; private int onlineColorRow; + private int typingColorRow; private int editTextBGGradientRow; private int editTextBGGradientColorRow; @@ -136,6 +138,7 @@ public class ThemingChatActivity extends BaseFragment { headerGradientRow = rowCount++; headerGradientColorRow = rowCount++; headerIconsColorRow = rowCount++; + headerAvatarRadiusRow = rowCount++; //muteColorRow = rowCount++; nameSizeRow = rowCount++; @@ -143,6 +146,7 @@ public class ThemingChatActivity extends BaseFragment { statusSizeRow = rowCount++; statusColorRow = rowCount++; onlineColorRow = rowCount++; + typingColorRow = rowCount++; rowsSectionRow = rowCount++; rowsSection2Row = rowCount++; @@ -397,7 +401,7 @@ public class ThemingChatActivity extends BaseFragment { builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null); showDialog(builder.create()); } else if (i == commandColorCheckRow) { - boolean b = themePrefs.getBoolean( key, true); + boolean b = themePrefs.getBoolean( key, false); SharedPreferences.Editor editor = themePrefs.edit(); editor.putBoolean(key, !b); editor.commit(); @@ -409,7 +413,7 @@ public class ThemingChatActivity extends BaseFragment { } } else if (i == solidBGColorCheckRow) { - boolean b = themePrefs.getBoolean( key, true); + boolean b = themePrefs.getBoolean( key, false); SharedPreferences.Editor editor = themePrefs.edit(); editor.putBoolean(key, !b); editor.commit(); @@ -422,25 +426,31 @@ public class ThemingChatActivity extends BaseFragment { } } else if (i == memberColorCheckRow) { - boolean b = themePrefs.getBoolean( key, true); + boolean b = themePrefs.getBoolean( key, false); SharedPreferences.Editor editor = themePrefs.edit(); editor.putBoolean( key, !b); editor.commit(); if (view instanceof TextCheckCell) { ((TextCheckCell) view).setChecked(!b); } + if (listView != null) { + listView.invalidateViews(); + } } else if (i == showUsernameCheckRow) { - boolean b = themePrefs.getBoolean( key, true); + boolean b = themePrefs.getBoolean( key, false); SharedPreferences.Editor editor = themePrefs.edit(); editor.putBoolean( key, !b); editor.commit(); if (view instanceof TextCheckCell) { ((TextCheckCell) view).setChecked(!b); } + if (listView != null) { + listView.invalidateViews(); + } } else if (i == avatarAlignTopRow) { - boolean b = themePrefs.getBoolean( key, true); + boolean b = themePrefs.getBoolean( key, false); SharedPreferences.Editor editor = themePrefs.edit(); editor.putBoolean( key, !b); editor.commit(); @@ -449,7 +459,7 @@ public class ThemingChatActivity extends BaseFragment { } } else if (i == ownAvatarAlignTopRow) { - boolean b = themePrefs.getBoolean( key, true); + boolean b = themePrefs.getBoolean( key, false); SharedPreferences.Editor editor = themePrefs.edit(); editor.putBoolean( key, !b); editor.commit(); @@ -458,7 +468,7 @@ public class ThemingChatActivity extends BaseFragment { } } else if (i == showContactAvatar) { - boolean b = themePrefs.getBoolean( key, true); + boolean b = themePrefs.getBoolean( key, false); SharedPreferences.Editor editor = themePrefs.edit(); editor.putBoolean( key, !b); editor.commit(); @@ -467,7 +477,7 @@ public class ThemingChatActivity extends BaseFragment { } } else if (i == showOwnAvatar) { - boolean b = themePrefs.getBoolean( key, true); + boolean b = themePrefs.getBoolean( key, false); SharedPreferences.Editor editor = themePrefs.edit(); editor.putBoolean( key, !b); editor.commit(); @@ -476,7 +486,7 @@ public class ThemingChatActivity extends BaseFragment { } } else if (i == showOwnAvatarGroup) { - boolean b = themePrefs.getBoolean( key, true); + boolean b = themePrefs.getBoolean( key, false); SharedPreferences.Editor editor = themePrefs.edit(); editor.putBoolean( key, !b); editor.commit(); @@ -1007,6 +1017,19 @@ public class ThemingChatActivity extends BaseFragment { } },themePrefs.getInt("chatOnlineColor", themePrefs.getInt("chatStatusColor", lightColor)), CENTER, 0, false); colorDialog.show(); + } else if (i == typingColorRow) { + if (getParentActivity() == null) { + return; + } + LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE); + li.inflate(R.layout.colordialog, null, false); + ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() { + @Override + public void colorChanged(int color) { + commitInt("chatTypingColor", color); + } + },themePrefs.getInt("chatTypingColor", themePrefs.getInt("chatStatusColor", lightColor)), CENTER, 0, false); + colorDialog.show(); } else if (i == commandColorRow) { if (getParentActivity() == null) { return; @@ -1049,6 +1072,27 @@ public class ThemingChatActivity extends BaseFragment { },themePrefs.getInt("chatChecksColor", defColor), CENTER, 0, true); colorDialog.show(); + } else if (i == headerAvatarRadiusRow) { + if (getParentActivity() == null) { + return; + } + AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity()); + builder.setTitle(LocaleController.getString("AvatarRadius", R.string.AvatarRadius)); + final NumberPicker numberPicker = new NumberPicker(getParentActivity()); + final int currentValue = themePrefs.getInt( key, 32); + numberPicker.setMinValue(1); + numberPicker.setMaxValue(32); + numberPicker.setValue(currentValue); + builder.setView(numberPicker); + builder.setNegativeButton(LocaleController.getString("Done", R.string.Done), new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + if (numberPicker.getValue() != currentValue) { + commitInt( key, numberPicker.getValue()); + } + } + }); + showDialog(builder.create()); } else if (i == avatarRadiusRow) { if (getParentActivity() == null) { return; @@ -1286,6 +1330,8 @@ public class ThemingChatActivity extends BaseFragment { resetPref("chatStatusColor"); } else if (i == onlineColorRow) { resetPref("chatOnlineColor"); + } else if (i == typingColorRow) { + resetPref("chatOnlineColor"); } else if (i == statusSizeRow) { resetPref("chatStatusSize"); } else if (i == rTimeColorRow) { @@ -1447,8 +1493,8 @@ public class ThemingChatActivity extends BaseFragment { public boolean isEnabled(int i) { boolean b = AndroidUtilities.getBoolPref("chatSolidBGColorCheck"); int g = AndroidUtilities.getIntDef("chatGradientBG", 0); - return i == headerColorRow || i == headerGradientRow || AndroidUtilities.getIntDef("chatHeaderGradient", 0) != 0 && i == headerGradientColorRow || i == muteColorRow || i == headerIconsColorRow || i == rBubbleColorRow || i == lBubbleColorRow || i == bubblesRow || - i == solidBGColorCheckRow || b && i == solidBGColorRow || b && i == gradientBGRow || (g != 0 && i == gradientBGColorRow) || i == avatarRadiusRow || i == avatarSizeRow || i == avatarMarginLeftRow || i == avatarAlignTopRow || i == ownAvatarAlignTopRow || i == showContactAvatar || i == showOwnAvatar || i == showOwnAvatarGroup || i == nameColorRow || i == nameSizeRow || i == statusColorRow || i == onlineColorRow || i == statusSizeRow || + return i == headerColorRow || i == headerGradientRow || AndroidUtilities.getIntDef("chatHeaderGradient", 0) != 0 && i == headerGradientColorRow || i == muteColorRow || i == headerIconsColorRow || i == headerAvatarRadiusRow || i == rBubbleColorRow || i == lBubbleColorRow || i == bubblesRow || + i == solidBGColorCheckRow || b && i == solidBGColorRow || b && i == gradientBGRow || (g != 0 && i == gradientBGColorRow) || i == avatarRadiusRow || i == avatarSizeRow || i == avatarMarginLeftRow || i == avatarAlignTopRow || i == ownAvatarAlignTopRow || i == showContactAvatar || i == showOwnAvatar || i == showOwnAvatarGroup || i == nameColorRow || i == nameSizeRow || i == statusColorRow || i == onlineColorRow || i == typingColorRow || i == statusSizeRow || i == textSizeRow || i == timeSizeRow || AndroidUtilities.getBoolPref("chatCommandColorCheck") && i == commandColorRow || i == commandColorCheckRow || i == dateColorRow || i == dateSizeRow || i == dateBubbleColorRow || i == rTextColorRow || i == rLinkColorRow || i == lTextColorRow || i == lLinkColorRow || i == rTimeColorRow|| i == lTimeColorRow || i == checksColorRow || i == memberColorCheckRow || AndroidUtilities.getBoolPref("chatMemberColorCheck") && i == memberColorRow || i == contactNameColorRow || i == forwardRightNameColorRow || i == forwardLeftNameColorRow || i == showUsernameCheckRow || i == editTextSizeRow || i == editTextColorRow || i == editTextIconsColorRow || i == sendColorRow || i == editTextBGColorRow || i == editTextBGGradientRow || AndroidUtilities.getIntDef("chatEditTextBGGradient", 0) != 0 && i == editTextBGGradientColorRow || i == attachBGColorRow || i == attachBGGradientRow || AndroidUtilities.getIntDef("chatAttachBGGradient", 0) != 0 && i == attachBGGradientColorRow || i == attachTextColorRow || @@ -1500,7 +1546,11 @@ public class ThemingChatActivity extends BaseFragment { view = new TextSettingsCell(mContext); } TextSettingsCell textCell = (TextSettingsCell) view; - if (i == avatarRadiusRow) { + if (i == headerAvatarRadiusRow) { + textCell.setTag("chatHeaderAvatarRadius"); + int size = themePrefs.getInt("chatHeaderAvatarRadius", AndroidUtilities.isTablet() ? 35 : 32); + textCell.setTextAndValue(LocaleController.getString("AvatarRadius", R.string.AvatarRadius), String.format("%d", size), true); + } else if (i == avatarRadiusRow) { textCell.setTag("chatAvatarRadius"); int size = themePrefs.getInt("chatAvatarRadius", AndroidUtilities.isTablet() ? 35 : 32); textCell.setTextAndValue(LocaleController.getString("AvatarRadius", R.string.AvatarRadius), String.format("%d", size), true); @@ -1623,7 +1673,9 @@ public class ThemingChatActivity extends BaseFragment { } else if (i == statusColorRow) { textCell.setTextAndColor(LocaleController.getString("StatusColor", R.string.StatusColor), themePrefs.getInt("chatStatusColor", lightColor), true); } else if (i == onlineColorRow) { - textCell.setTextAndColor(LocaleController.getString("OnlineColor", R.string.OnlineColor), themePrefs.getInt("chatOnlineColor", themePrefs.getInt("chatStatusColor", lightColor)), false); + textCell.setTextAndColor(LocaleController.getString("OnlineColor", R.string.OnlineColor), themePrefs.getInt("chatOnlineColor", themePrefs.getInt("chatStatusColor", lightColor)), true); + } else if (i == typingColorRow) { + textCell.setTextAndColor(LocaleController.getString("TypingColor", R.string.TypingColor), themePrefs.getInt("chatTypingColor", themePrefs.getInt("chatStatusColor", lightColor)), false); } else if (i == rTimeColorRow) { textCell.setTextAndColor(LocaleController.getString("RTimeColor", R.string.RTimeColor), themePrefs.getInt("chatRTimeColor", darkColor), true); } else if (i == lTimeColorRow) { @@ -1751,12 +1803,12 @@ public class ThemingChatActivity extends BaseFragment { else if ( i == headerSection2Row || i == rowsSection2Row ) { return 1; } - else if ( i == avatarRadiusRow || i == avatarSizeRow || i == avatarMarginLeftRow || i == nameSizeRow || i == statusSizeRow || i == textSizeRow || i == timeSizeRow || i == dateSizeRow || i == editTextSizeRow || i == bubblesRow) { + else if ( i == headerAvatarRadiusRow || i == avatarRadiusRow || i == avatarSizeRow || i == avatarMarginLeftRow || i == nameSizeRow || i == statusSizeRow || i == textSizeRow || i == timeSizeRow || i == dateSizeRow || i == editTextSizeRow || i == bubblesRow) { return 2; } else if ( i == headerColorRow || i == headerGradientColorRow || i == muteColorRow || i == headerIconsColorRow || - i == solidBGColorRow || i == gradientBGColorRow || i == rBubbleColorRow || i == lBubbleColorRow || i == nameColorRow || i == statusColorRow || i == onlineColorRow || i == commandColorRow || i == dateColorRow || i == dateBubbleColorRow || + i == solidBGColorRow || i == gradientBGColorRow || i == rBubbleColorRow || i == lBubbleColorRow || i == nameColorRow || i == statusColorRow || i == onlineColorRow || i == typingColorRow || i == commandColorRow || i == dateColorRow || i == dateBubbleColorRow || i == rTextColorRow || i == rLinkColorRow || i == lTextColorRow || i == lLinkColorRow || i == rLinkColorRow || i == rTimeColorRow || i == lTimeColorRow || i == checksColorRow || i == memberColorRow || i == contactNameColorRow || i == forwardRightNameColorRow || i == forwardLeftNameColorRow || i == sendColorRow || i == editTextColorRow || i == editTextBGColorRow || i == editTextBGGradientColorRow || i == editTextIconsColorRow || i == attachBGColorRow || i == attachBGGradientColorRow || i == attachTextColorRow || i == emojiViewBGColorRow || i == emojiViewBGGradientColorRow || i == emojiViewTabIconColorRow || i == emojiViewTabColorRow) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ThemingDrawerActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ThemingDrawerActivity.java index aecb2386..95d84090 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ThemingDrawerActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ThemingDrawerActivity.java @@ -235,7 +235,7 @@ public class ThemingDrawerActivity extends BaseFragment { },themePrefs.getInt("drawerHeaderGradientColor", defColor), CENTER, 0, true); colorDialog.show(); } else if (i == headerBackgroundCheckRow) { - boolean b = themePrefs.getBoolean( key, true); + boolean b = themePrefs.getBoolean( key, false); SharedPreferences.Editor editor = themePrefs.edit(); editor.putBoolean(key, !b); editor.commit(); @@ -244,7 +244,7 @@ public class ThemingDrawerActivity extends BaseFragment { } } else if (i == hideBackgroundShadowRow) { - boolean b = themePrefs.getBoolean( key, true); + boolean b = themePrefs.getBoolean( key, false); SharedPreferences.Editor editor = themePrefs.edit(); editor.putBoolean(key, !b); editor.commit(); @@ -253,7 +253,7 @@ public class ThemingDrawerActivity extends BaseFragment { } } else if (i == centerAvatarRow) { - boolean b = themePrefs.getBoolean( key, true); + boolean b = themePrefs.getBoolean( key, false); SharedPreferences.Editor editor = themePrefs.edit(); editor.putBoolean(key, !b); editor.commit(); diff --git a/TMessagesProj/src/main/res/values-ar/strings.xml b/TMessagesProj/src/main/res/values-ar/strings.xml index ad632a91..848a1105 100644 --- a/TMessagesProj/src/main/res/values-ar/strings.xml +++ b/TMessagesProj/src/main/res/values-ar/strings.xml @@ -977,7 +977,7 @@ %1$s الساعة %2$s تم تحديث تيليجرام على الأندرويد. الجديد في النسخة رقم 3.2.6:\n\n- تحسين للواجهة البصرية للتطبيق\n- دعم للإيموجي الجديدة\n- تحسينات أخرى وإصلاح للثغرات - 657 + 660 بلاس مسنجر للأندرويد diff --git a/TMessagesProj/src/main/res/values-ca/strings.xml b/TMessagesProj/src/main/res/values-ca/strings.xml index aa2c4126..ac6dfd8b 100644 --- a/TMessagesProj/src/main/res/values-ca/strings.xml +++ b/TMessagesProj/src/main/res/values-ca/strings.xml @@ -982,13 +982,16 @@ Si no us interessa, us suggerim crear un canal privat. - Animacions noves i moltes millores visuals - Compatibilitat amb els emojis nous - Altres millores i correcció d\'errors -657 - +660 + Plus Messenger per Android Aparença Codi de color hexadecimal no vàlid. @@ -1034,7 +1037,7 @@ Novetats a la versió 3.2.6.1: Color de fons de l\'entrada de text Color de fons dels emoji Color de la pestanya d\'emojis activa - Color de la icona de la pestanya d\'emojis + Color de la icona a la pestanya d\'emojis Color de «en línia» Música Desa el tema @@ -1127,24 +1130,26 @@ Novetats a la versió 3.2.6.1: Mostra el nom d\'usuari als missatges No aturis els àudios Color del divisor de llista - Centra l\'avatar, el nom i el número de telèfon + Centra l\'avatar, el nom i el telèfon Gradient - Color de gradient - Deshabilitat + Color del gradient + Inhabilitat De dalt a baix D\'esquerra a dreta - Dalt-Esquerra Baix-Dreta - Baix-Esquerra Dalt-Dreta + Dalt-Esquerra, Baix-Dreta + Baix-Esquerra, Dalt-Dreta Aplica el gradient al fons de la llista S\'ha copiat %s al porta-retalls - - -Afegiu-vos al canal oficial del Plus Messenger: https://telegram.me/plusmsgres - Baixa nous temes + \n\nAfegiu-vos al canal oficial del Plus Messenger (en castellà): https://telegram.me/plusmsgres + Baixa temes nous Canal oficial - Diàlegs - En tocar la imatge d\'un contacte - En tocar la imatge d\'un grup + En tocar... + Imatge d\'un contacte + Imatge d\'un grup Perfil Fotos de perfil + Color de fons dels comptadors silenciats + Color a les ordres del bots + Color de les ordres dels bots + Color de cerca ressaltada diff --git a/TMessagesProj/src/main/res/values-de/strings.xml b/TMessagesProj/src/main/res/values-de/strings.xml index 42e4835c..1ce0defd 100644 --- a/TMessagesProj/src/main/res/values-de/strings.xml +++ b/TMessagesProj/src/main/res/values-de/strings.xml @@ -974,9 +974,9 @@ %1$s um %2$s Plus Messenger für Android wurde aktualisiert. Neu in Version 3.2.6:\n\n- Neue Animationen und optische Verbesserungen\n- Neue Emoji\n- Sonstige Verbesserungen und Fehlerbehebungen - 657 - - \n\nNeues in Version 3.2.6.1:\n\n- Fehlerbeseitigung + 660 + Plus Messenger für Android Themen bearbeiten Ungültiger Hex-Code! @@ -1093,7 +1093,7 @@ Sprechblase rechts Name weiterleiten Sprechblase links Name weiterleiten Symbol - Einstellungen Thema bearbeiten + Einstellungen Thema bearbeiten Hintergrund Trennbalken Überschrift @@ -1125,8 +1125,7 @@ von unten Links nach oben Rechts Hintergrund Farbverlauf Liste oder Seite %s in die Zwischenablage kopiert - -\n\nPlus Messenger Mitglied werden im offiziellen Kanal: https://telegram.me/plusmsgr + \n\nPlus Messenger Mitglied werden im offiziellen Kanal: https://telegram.me/plusmsgr Themen herunterladen Offizieller Kanal Dialoge @@ -1134,4 +1133,8 @@ Zeige bei Tip auf Gruppenbild Profil Profilbilder + Stumm im Hintergrund zählen + Bot Befehl Farbprüfung + Bot Befehl + Höhepunkt Suche \ No newline at end of file diff --git a/TMessagesProj/src/main/res/values-es/strings.xml b/TMessagesProj/src/main/res/values-es/strings.xml index f232ea29..42cc8962 100644 --- a/TMessagesProj/src/main/res/values-es/strings.xml +++ b/TMessagesProj/src/main/res/values-es/strings.xml @@ -974,9 +974,9 @@ %1$s a las %2$s Plus Messenger para Android ha sido actualizada. Novedades en la versión 3.2.6:\n\n- Nuevas animaciones y muchas mejoras visuales\n- Soporte para los nuevos emojis\n- Soporte para Android 6.0 (Now on Tap - Direct Share - Soporte para huella digital en el código de acceso)\n- Otras mejoras y correcciones de errores - 657 + 660 - \n\nNovedades en 3.2.6.1:\n\n- Añadido mod para color de comando en pantalla chat\n- Añadido mod para fondo de contador para chat/grupo/canal silenciado en pantalla principal\n- Añadido mod de color de resaltado de búsqueda en pantalla principal\n- Corrección de errores + \n\nNovedades en 3.2.6.2:\n\n- Cabecera en lista de apps recientes ya toma color de cabecera principal (a partir de lollipop)\n- Tamaño de lista de menciones en pantalla chat aumentado\n- Ahora los canales también se pueden silenciar desde la pantalla principal\n- Añadido mod para ajustar radio de avatar de cabecera en pantalla chat\n- Añadido mod para cambiar color de texto \'escribiendo\' en pantalla chat\n- Corrección de errores Plus Messenger para Android Tematización ¡Color hexadecimal inválido! diff --git a/TMessagesProj/src/main/res/values-fr/strings.xml b/TMessagesProj/src/main/res/values-fr/strings.xml index c62d340f..e56c47d2 100644 --- a/TMessagesProj/src/main/res/values-fr/strings.xml +++ b/TMessagesProj/src/main/res/values-fr/strings.xml @@ -974,7 +974,7 @@ %1$s à %2$s Telegram pour Android a été mis à jour. Nouveau dans la version 3.2.6:\n\n- De nouvelles animations et de nombreuses améliorations visuelles.\n- Support pour de nouveaux emoji\n- Autres améliorations et corrections de bogues. - 657 + 660 Plus Messenger pour Android Thème diff --git a/TMessagesProj/src/main/res/values-gl/strings.xml b/TMessagesProj/src/main/res/values-gl/strings.xml index e16da3a5..d1865b4a 100644 --- a/TMessagesProj/src/main/res/values-gl/strings.xml +++ b/TMessagesProj/src/main/res/values-gl/strings.xml @@ -975,9 +975,9 @@ e introduce o teu número. %1$s ás %2$s Telegram para Android foi actualizada. Novidades na versión 3.2.6:\n\n- Novas animacións e moitas melloras visuais\n- Soporte para os novos emoji\n- Outras melloras e correccións de erros - 657 - - \n\nNovidades na versión 3.2.6.1:\n\n- Corrección de erros + 660 + Plus Messenger para Android Tematización Cor hexadecimal inválida! @@ -1126,7 +1126,7 @@ e introduce o teu número. Abaixo-Esquerda Arriba-Dereita Aplicar gradiente ao fondo do listado %s copiado ao portapapeis - \n\nÚnete á canle oficial de Plus Messenger: https://telegram.me/plusmsgres + \n\nÚnete á canle oficial de Plus Messenger en español: https://telegram.me/plusmsgres Descargar temas Canle oficial Conversas @@ -1134,4 +1134,8 @@ e introduce o teu número. Clic na foto do grupo Perfil Fotos do perfil + Cor do fondo do contador en silencio + Activar cor do comando + Cor do comando + Cor do resaltado da busca diff --git a/TMessagesProj/src/main/res/values-hi/strings.xml b/TMessagesProj/src/main/res/values-hi/strings.xml index d97fef78..4ac0b82e 100644 --- a/TMessagesProj/src/main/res/values-hi/strings.xml +++ b/TMessagesProj/src/main/res/values-hi/strings.xml @@ -515,7 +515,7 @@ %1$s पर %2$s - 657 + 660 Android के लिए प्लस मैसेंजर diff --git a/TMessagesProj/src/main/res/values-hr/strings.xml b/TMessagesProj/src/main/res/values-hr/strings.xml index f963fc7b..6e4a5857 100644 --- a/TMessagesProj/src/main/res/values-hr/strings.xml +++ b/TMessagesProj/src/main/res/values-hr/strings.xml @@ -750,7 +750,7 @@ h:mm a %1$s u %2$s - 657 + 660 Plus Messenger za Android Izrada teme diff --git a/TMessagesProj/src/main/res/values-it/strings.xml b/TMessagesProj/src/main/res/values-it/strings.xml index 6bdb27f2..7e445237 100644 --- a/TMessagesProj/src/main/res/values-it/strings.xml +++ b/TMessagesProj/src/main/res/values-it/strings.xml @@ -974,10 +974,10 @@ %1$s alle %2$s Plus Messenger per Android si è aggiornato. Nuovo nella versione 3.2.6:\n\n- Nuove animazioni e miglioramenti di interfaccia\n- Supporto per le nuove emoji\n- Altri miglioramenti e risoluzione di problemi - 657 - + 660 + Plus Messenger per Android Personalizzazione Codice del colore esadecimale non valido! diff --git a/TMessagesProj/src/main/res/values-ko/strings.xml b/TMessagesProj/src/main/res/values-ko/strings.xml index 6672b14c..cf3151b7 100644 --- a/TMessagesProj/src/main/res/values-ko/strings.xml +++ b/TMessagesProj/src/main/res/values-ko/strings.xml @@ -977,5 +977,5 @@ %1$s %2$s 텔레그램 안드로이드 버전이 업데이트 되었습니다. 새로운 버전은 3.2.6 입니다:\n\n- 새로운 애니메이션 및 다양한 비쥬얼 향상\n- 신규 이모티콘 지원\n- 기타 기능 향상 및 버그 수정 - 657 + 660 \ No newline at end of file diff --git a/TMessagesProj/src/main/res/values-nl/strings.xml b/TMessagesProj/src/main/res/values-nl/strings.xml index 8713bee7..15c7e770 100644 --- a/TMessagesProj/src/main/res/values-nl/strings.xml +++ b/TMessagesProj/src/main/res/values-nl/strings.xml @@ -974,7 +974,7 @@ %1$s om %2$s Plus Messenger voor Android is bijgewerkt. Nieuw in versie 3.2.6:\n\n- Nieuwe animaties en andere visuele verbeteringen\n- Ondersteuning voor nieuwe Emoji\n-Tijdsaanduiding voor laatst gezien gelijk aan iOS\n-Probleemoplossing en andere verbeteringen - 657 + 660 Plus Messenger voor Android diff --git a/TMessagesProj/src/main/res/values-pt-rBR/strings.xml b/TMessagesProj/src/main/res/values-pt-rBR/strings.xml index a29a6135..62e4718d 100644 --- a/TMessagesProj/src/main/res/values-pt-rBR/strings.xml +++ b/TMessagesProj/src/main/res/values-pt-rBR/strings.xml @@ -974,10 +974,10 @@ %1$s às %2$s Plus Messenger para Android foi atualizado. Novidades na versão 3.2.6:\n\n- Novas animações e melhorias no visual\n- Suporte para novos emojis\n- Outras melhorias e resoluções de bugs - 657 - + 660 + Plus Messenger para Android Personalização Código de cor HEX inválido! @@ -1071,7 +1071,7 @@ Título do Cabeçalho Encaminhar sem mencionar Desativar Pop-up ao Clicar - Perfil de Contato/Grupo + Perfil Ocultar Capa Personalizada Cor do Link Direito Cor do Link Esquerdo @@ -1138,4 +1138,5 @@ Fundo do Contador Silenciado Definir Cor de Comando Bot Cor de Comando Bot + Cor Destaque de Busca \ No newline at end of file diff --git a/TMessagesProj/src/main/res/values-pt-rPT/strings.xml b/TMessagesProj/src/main/res/values-pt-rPT/strings.xml index 1c7d8e93..8dd300b8 100644 --- a/TMessagesProj/src/main/res/values-pt-rPT/strings.xml +++ b/TMessagesProj/src/main/res/values-pt-rPT/strings.xml @@ -977,7 +977,7 @@ %1$s às %2$s Plus Messenger para Android foi atualizado. Novidades na versão 3.2.6:\n\n- Novas animações e melhorias no visual\n- Suporte para novos emojis\n- Outras melhorias e resoluções de bugs - 657 + 660 Plus Messenger para Android Temas diff --git a/TMessagesProj/src/main/res/values-ru/strings.xml b/TMessagesProj/src/main/res/values-ru/strings.xml index 62f817ff..a0a3fb30 100644 --- a/TMessagesProj/src/main/res/values-ru/strings.xml +++ b/TMessagesProj/src/main/res/values-ru/strings.xml @@ -973,11 +973,10 @@ h:mm a %1$s в %2$s - Telegram для Android обновлён. Новое в версии 3.2.5:\n\n- Новые анимации и множество визуальных усовершенствований\n- Поддержка новых эмодзи\n- Прочие улучшения и исправления ошибок - 657 + Telegram для Android обновлён. Новое в версии 3.2.6:\n\n- Новые анимации и множество визуальных усовершенствований\n- Поддержка новых эмодзи\n- Прочие улучшения и исправления ошибок + 660 - -\n\nНовое в версииn 3.2.6.1:\n\n- Исправление ошибок + \n\nНовое в версии 3.2.6.2:\n\n- Теперь заголовок берёт цвет в списке недавних приложений Andriod\n- Увеличен размер списка упоминаний на экране чата\n- Теперь каналы можно перевести в беззвучный режим из основного экранаn\n- Добавлена настройка закругления аватара в заголовке экрана чата\n- Добавлена настройка цвета для уведомления печати в заголовке чата\n- Исправление ошибок Plus Messenger для Android Кастомизация Неверный hex-код цвета! @@ -1135,4 +1134,8 @@ Касание аватарки группы Профиль Аватарки + Цвет фона счётчика сообщений с откл. уведомлениями + Изменить цвет команд бота + Цвет команд бота + Цвет подсветки поиска diff --git a/TMessagesProj/src/main/res/values-tr/strings.xml b/TMessagesProj/src/main/res/values-tr/strings.xml index cbea87f0..eb4c863c 100644 --- a/TMessagesProj/src/main/res/values-tr/strings.xml +++ b/TMessagesProj/src/main/res/values-tr/strings.xml @@ -830,7 +830,7 @@ %1$s %2$s - 657 + 660 diff --git a/TMessagesProj/src/main/res/values-zh-rCN/strings.xml b/TMessagesProj/src/main/res/values-zh-rCN/strings.xml index 29622330..d4ad0900 100644 --- a/TMessagesProj/src/main/res/values-zh-rCN/strings.xml +++ b/TMessagesProj/src/main/res/values-zh-rCN/strings.xml @@ -897,9 +897,9 @@ %1$s 的 %2$s - 657 + 660 + \n\n在 3.2.6.2 版的新功能:\n\n- 添加设置使用手机字体选项\n- 添加聊天/群组聊天内搜索聊天记录选项\n- 在设置/主题调整界面里添加标头颜色、标题颜色和标头图标颜色的设置\n- 添加主界面群组图标颜色的设置\n- 添加导航栏中头像大小的设置\n- 错误修复--> Plus Messenger for Android 主题调整 无效的颜色代码! diff --git a/TMessagesProj/src/main/res/values-zh-rTW/strings.xml b/TMessagesProj/src/main/res/values-zh-rTW/strings.xml index 5d289741..a374a00a 100644 --- a/TMessagesProj/src/main/res/values-zh-rTW/strings.xml +++ b/TMessagesProj/src/main/res/values-zh-rTW/strings.xml @@ -947,10 +947,10 @@ 於時間 %1$s %2$s + 660--> +\n\n在 3.2.6.2 版的新功能:\n\n- 新的模組在聊天畫面顯示擁有的大頭照\n- 加入新的泡泡邊緣 (感謝 Edwin Macalopu)\n- 錯誤修復--> 適用於 Android 的 Plus Messenger 自製佈景主題 無效的十六進位顏色代碼! diff --git a/TMessagesProj/src/main/res/values/strings.xml b/TMessagesProj/src/main/res/values/strings.xml index 8dd11b20..a46bd2ad 100644 --- a/TMessagesProj/src/main/res/values/strings.xml +++ b/TMessagesProj/src/main/res/values/strings.xml @@ -978,9 +978,9 @@ %1$s at %2$s Plus Messenger for Android has been updated. New in version 3.2.6:\n\n- New animations and many visual improvements\n- Support for new emoji\n- Android 6.0 support (Now on Tap - Direct Share - Fingerprint support for Passcodes)\n- Other improvements and bug fixes - 657 + 660 - \n\nNew in version 3.2.6.1:\n\n- Added mod for command color in chat screen\n- Added mod for counter color background for muted chat/group/channel in main screen\n- Added highlight search color mod in main screen\n- Bug fixes + \n\nNew in version 3.2.6.2:\n\n- Now header gets color in android recent apps list (lollipop and up)\n- Mention list size increased in chat screen\n- Now also channels can be muted from main screen\n- Added mod to set header avatar radius in chat screen\n- Added mod to set typing text color in chat header\n- Bug fixes Plus Messenger for Android Theming Invalid color hex code!