Update to 2.5.2.2 (Added Russian, Turkish, Catalan and Galician, navigation Drawer can be themed now, more theming options for Main and Chat screen)

This commit is contained in:
rafalense 2015-03-07 11:56:46 +01:00
parent 640d2bb9be
commit e4c9e62f1b
45 changed files with 1684 additions and 401 deletions

View File

@ -7,13 +7,13 @@ It adds some extra features to the official Telegram app:
**THEMING:**
Change colors and sizes of many objects as texts, icons, headers... and create your own theme.
Save your theme and share it easily with your friends.
Apply themes shared by other users
Apply themes shared by other users.
**MEDIA:** Audio files can be shared easily from Chat Screen
**PRIVACY:** Mobile number can be hidden from Menu Drawer and Settings menu
**SOCIAL:** Get in touch with other Telegram+ users trough [our Google+ community](https://plus.google.com/communities/106927015963860485525)
**SOCIAL:** Get in touch with other Telegram+ users through [our Google+ community](https://plus.google.com/communities/106927015963860485525)
This repo contains the source code for [Telegram+ App for Android](https://play.google.com/store/apps/details?id=org.telegram.plus).
@ -22,3 +22,8 @@ This repo contains the source code for [Telegram+ App for Android](https://play.
First of all, take a look at **src/main/java/org/telegram/messenger/BuildVars.java** and fill it with correct values.
Import the root folder into your IDE (tested on Android Studio), then run project.
### LOCALIZATION
Join our translation project if you want to collaborate: https://www.transifex.com/projects/p/telegramplus/

View File

@ -88,7 +88,7 @@ android {
applicationId "org.telegram.plus"
minSdkVersion 8
targetSdkVersion 21
versionCode 458
versionName "2.5.2.1"
versionCode 459
versionName "2.5.2.2"
}
}

View File

@ -613,9 +613,9 @@ public class AndroidUtilities {
return themePrefs.getInt(key, def);
}
public static int getIntAlphaColor(String key, float factor){
public static int getIntAlphaColor(String key, int def, float factor){
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(THEME_PREFS, Activity.MODE_PRIVATE);
int color = themePrefs.getInt(key, defColor);
int color = themePrefs.getInt(key, def);
int alpha = Math.round(Color.alpha(color) * factor);
int red = Color.red(color);
int green = Color.green(color);
@ -677,9 +677,9 @@ public class AndroidUtilities {
e.commit();
}
public static boolean getBoolPref(Context context,String key){
public static boolean getBoolPref(String key){
boolean s = false;
if (context.getSharedPreferences(THEME_PREFS, 0).getBoolean(key, false)) s=true;
if (ApplicationLoader.applicationContext.getSharedPreferences(THEME_PREFS, 0).getBoolean(key, false)) s=true;
return s;
}
@ -746,7 +746,7 @@ public class AndroidUtilities {
public static Drawable paintDrawable(Context c, int resId, int resIdW, String color){
Drawable d = c.getResources().getDrawable(resId);
if(color.contains("_check")){
if(getBoolPref(c, color)){
if(getBoolPref(color)){
d = c.getResources().getDrawable(resIdW);
d.setColorFilter(getIntPref(c, color.replace("_check", "_picker")), PorterDuff.Mode.MULTIPLY);
}

View File

@ -158,6 +158,22 @@ public class LocaleController {
"tr", "vi", "wo", "yo", "zh", "bo", "dz", "id", "jv", "ka", "km", "kn", "ms", "th"}, new PluralRules_None());
LocaleInfo localeInfo = new LocaleInfo();
localeInfo.name = "Català";
localeInfo.nameEnglish = "Catalan";
localeInfo.shortName = "ca";
localeInfo.pathToFile = null;
sortedLanguages.add(localeInfo);
languagesDict.put(localeInfo.shortName, localeInfo);
localeInfo = new LocaleInfo();
localeInfo.name = "Deutsch";
localeInfo.nameEnglish = "German";
localeInfo.shortName = "de";
localeInfo.pathToFile = null;
sortedLanguages.add(localeInfo);
languagesDict.put(localeInfo.shortName, localeInfo);
localeInfo = new LocaleInfo();
localeInfo.name = "English";
localeInfo.nameEnglish = "English";
localeInfo.shortName = "en";
@ -166,10 +182,9 @@ public class LocaleController {
languagesDict.put(localeInfo.shortName, localeInfo);
localeInfo = new LocaleInfo();
localeInfo.name = "Italiano";
localeInfo.nameEnglish = "Italian";
localeInfo.shortName = "it";
localeInfo.pathToFile = null;
localeInfo.name = "Français";
localeInfo.nameEnglish = "French";
localeInfo.shortName = "fr";
sortedLanguages.add(localeInfo);
languagesDict.put(localeInfo.shortName, localeInfo);
@ -181,13 +196,20 @@ public class LocaleController {
languagesDict.put(localeInfo.shortName, localeInfo);
localeInfo = new LocaleInfo();
localeInfo.name = "Deutsch";
localeInfo.nameEnglish = "German";
localeInfo.shortName = "de";
localeInfo.pathToFile = null;
localeInfo.name = "Galego";
localeInfo.nameEnglish = "Galician";
localeInfo.shortName = "gl";
sortedLanguages.add(localeInfo);
languagesDict.put(localeInfo.shortName, localeInfo);
localeInfo = new LocaleInfo();
localeInfo.name = "Italiano";
localeInfo.nameEnglish = "Italian";
localeInfo.shortName = "it";
localeInfo.pathToFile = null;
sortedLanguages.add(localeInfo);
languagesDict.put(localeInfo.shortName, localeInfo);
localeInfo = new LocaleInfo();
localeInfo.name = "Nederlands";
localeInfo.nameEnglish = "Dutch";
@ -220,6 +242,21 @@ public class LocaleController {
sortedLanguages.add(localeInfo);
languagesDict.put(localeInfo.shortName, localeInfo);
localeInfo = new LocaleInfo();
localeInfo.name = "русский";
localeInfo.nameEnglish = "Russian";
localeInfo.shortName = "ru";
sortedLanguages.add(localeInfo);
languagesDict.put(localeInfo.shortName, localeInfo);
localeInfo = new LocaleInfo();
localeInfo.name = "Türkçe";
localeInfo.nameEnglish = "Turkish";
localeInfo.shortName = "tr";
localeInfo.pathToFile = null;
sortedLanguages.add(localeInfo);
languagesDict.put(localeInfo.shortName, localeInfo);
localeInfo = new LocaleInfo();
localeInfo.name = "한국어";
localeInfo.nameEnglish = "Korean";

View File

@ -49,6 +49,8 @@ public class MessageObject {
public ArrayList<TLRPC.PhotoSize> photoThumbs;
private static TextPaint textPaint;
private static TextPaint textPaintRight = new TextPaint(Paint.ANTI_ALIAS_FLAG);
private static TextPaint textPaintLeft = new TextPaint(Paint.ANTI_ALIAS_FLAG);
public int lastLineWidth;
public int textWidth;
public int textHeight;
@ -72,16 +74,21 @@ public class MessageObject {
textPaint.linkColor = 0xff316f9f;
}
int color = AndroidUtilities.getIntDef("chatRTextColor", 0xff000000);
textPaint.setColor(color);
if(color != 0xff000000){
textPaint.linkColor = AndroidUtilities.getIntDarkerColor("chatRTextColor", -0x50);
}
textPaint.setTextSize(AndroidUtilities.dp(MessagesController.getInstance().fontSize));
messageOwner = message;
textPaintLeft.setColor(AndroidUtilities.getIntDef("chatLTextColor", 0xff000000));
textPaintLeft.linkColor = AndroidUtilities.getIntDarkerColor("chatLTextColor", -0x10);
textPaintLeft.setTextSize(AndroidUtilities.dp(MessagesController.getInstance().fontSize));
textPaint = textPaintLeft;
textPaintRight.setColor(AndroidUtilities.getIntDef("chatRTextColor", 0xff000000));
textPaintRight.linkColor = AndroidUtilities.getIntDarkerColor("chatRTextColor", -0x10);
textPaintRight.setTextSize(AndroidUtilities.dp(MessagesController.getInstance().fontSize));
messageOwner = message;
if(isOut()){
textPaint = textPaintRight;
}
if (message instanceof TLRPC.TL_messageService) {
if (message.action != null) {
TLRPC.User fromUser = null;

View File

@ -3399,7 +3399,13 @@ public class MessagesController implements NotificationCenter.NotificationCenter
if (dialog != null) {
dialog.notify_settings.mute_until = 0;
}
editor.remove("notify2_" + dialog_id);
//editor.remove("notify2_" + dialog_id);
//Smart Notifications
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Activity.MODE_PRIVATE);
if (preferences.getInt("notify2_" + dialog_id, 0) != 4) {
editor.remove("notify2_" + dialog_id);
}
//
MessagesStorage.getInstance().setDialogFlags(dialog_id, 0);
}

View File

@ -43,7 +43,9 @@ import org.telegram.ui.PopupNotificationActivity;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
public class NotificationsController {
@ -352,7 +354,32 @@ public class NotificationsController {
if (!notifyAboutLast || notify_override == 2 || (!preferences.getBoolean("EnableAll", true) || chat_id != 0 && !preferences.getBoolean("EnableGroup", true)) && notify_override == 0) {
notifyDisabled = true;
}
//Smart notifications
boolean use_smart_notify = preferences.getBoolean("smart_notify_" + dialog_id, false);
Long smart_notify_timeframe = preferences.getLong("smart_notify_timeframe_" + dialog_id, 1);
int smart_notify_max_count = preferences.getInt("smart_notify_max_count_" + dialog_id, 1);
if (chat_id != 0 && use_smart_notify)
{
if (chat.sound_timestamps == null)
chat.sound_timestamps = new LinkedList<>();
boolean shouldAdd = true;
Date firstNotification = chat.sound_timestamps.peek();
Date currentDate = new Date();
if (firstNotification != null) {
if (currentDate.getTime() - firstNotification.getTime() < smart_notify_timeframe * 1000 && chat.sound_timestamps.size () >= smart_notify_max_count) {
shouldAdd = false;
}
}
if (!shouldAdd) {
notifyDisabled = true;
}
else {
if (chat.sound_timestamps.size() >= smart_notify_max_count)
chat.sound_timestamps.poll();
chat.sound_timestamps.add(currentDate);
}
}
//
String defaultPath = Settings.System.DEFAULT_NOTIFICATION_URI.getPath();
if (!notifyDisabled) {
inAppSounds = preferences.getBoolean("EnableInAppSounds", true);

View File

@ -5857,6 +5857,9 @@ public class TLRPC {
public boolean checked_in;
public int version;
public boolean left;
//Smart Notifications
public java.util.Queue<java.util.Date> sound_timestamps = null;
//
}
public static class TL_chatForbidden extends Chat {

View File

@ -294,6 +294,15 @@ public class ActionBar extends FrameLayout {
titleTextView.setCompoundDrawablePadding(padding);
}
public void setTitleColor(int color) {
if (titleTextView == null) {
createTitleTextView();
}
if (titleTextView != null) {
titleTextView.setTextColor(color);
}
}
public Drawable getSubTitleIcon() {
return subTitleTextView.getCompoundDrawables()[0];
}

View File

@ -9,7 +9,9 @@
package org.telegram.ui.ActionBar;
import android.content.Context;
import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.text.Editable;
import android.text.TextWatcher;
@ -497,6 +499,11 @@ public class ActionBarMenuItem extends FrameLayoutFixed {
popupWindow.update(this, -AndroidUtilities.dp(8), getOffsetY(), -1, -1);
}
}
if(clearButton!=null){
Drawable clear = getResources().getDrawable(R.drawable.ic_close_white);
clear.setColorFilter(AndroidUtilities.getIntDef("chatsHeaderIconsColor", 0xffffffff), PorterDuff.Mode.MULTIPLY);
clearButton.setImageDrawable(clear);
}
}
public void hideSubItem(int id) {

View File

@ -14,6 +14,7 @@ import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.Log;
import android.view.Gravity;
import android.view.MotionEvent;
import android.view.VelocityTracker;
@ -437,6 +438,7 @@ public class DrawerLayoutContainer extends FrameLayout {
child.measure(drawerWidthSpec, drawerHeightSpec);
}
}
getDrawerLayout().setBackgroundColor(AndroidUtilities.getIntDef("drawerListColor",0xffffffff));
}
@Override

View File

@ -87,6 +87,11 @@ public class MenuDrawable extends Drawable {
canvas.drawLine(startXDiff, -startYDiff, endXDiff, -endYDiff, paint);
canvas.drawLine(startXDiff, startYDiff, endXDiff, endYDiff, paint);
canvas.restore();
updateTheme();
}
private void updateTheme(){
paint.setColor(AndroidUtilities.getIntDef("chatsHeaderIconsColor", 0xffffffff));
}
@Override

View File

@ -126,11 +126,11 @@ public class DialogsAdapter extends BaseFragmentAdapter {
((DialogCell) view).setDialog(dialog, i, serverOnly);
}
}
updateColors(viewGroup);
updateTheme(viewGroup);
return view;
}
private void updateColors(ViewGroup viewGroup){
private void updateTheme(ViewGroup viewGroup){
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
viewGroup.setBackgroundColor(themePrefs.getInt("chatsRowColor", 0xffffffff));
}

View File

@ -14,6 +14,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import org.telegram.android.AndroidUtilities;
import org.telegram.android.LocaleController;
import org.telegram.android.MessagesController;
import org.telegram.messenger.ApplicationLoader;
@ -95,21 +96,21 @@ public class DrawerLayoutAdapter extends BaseAdapter {
}
DrawerActionCell actionCell = (DrawerActionCell) view;
if (i == 2) {
actionCell.setTextAndIcon(LocaleController.getString("NewGroup", R.string.NewGroup), R.drawable.menu_newgroup);
actionCell.setTextAndIcon(LocaleController.getString("NewGroup", R.string.NewGroup), R.drawable.menu_newgroup_white);
} else if (i == 3) {
actionCell.setTextAndIcon(LocaleController.getString("NewSecretChat", R.string.NewSecretChat), R.drawable.menu_secret);
actionCell.setTextAndIcon(LocaleController.getString("NewSecretChat", R.string.NewSecretChat), R.drawable.menu_secret_white);
} else if (i == 4) {
actionCell.setTextAndIcon(LocaleController.getString("NewBroadcastList", R.string.NewBroadcastList), R.drawable.menu_broadcast);
actionCell.setTextAndIcon(LocaleController.getString("NewBroadcastList", R.string.NewBroadcastList), R.drawable.menu_broadcast_white);
} else if (i == 6) {
actionCell.setTextAndIcon(LocaleController.getString("Contacts", R.string.Contacts), R.drawable.menu_contacts);
actionCell.setTextAndIcon(LocaleController.getString("Contacts", R.string.Contacts), R.drawable.menu_contacts_white);
}/* else if (i == 7) {
actionCell.setTextAndIcon(LocaleController.getString("InviteFriends", R.string.InviteFriends), R.drawable.menu_invite);
}*/ else if (i == themingRow) {
actionCell.setTextAndIcon(LocaleController.getString("Theming", R.string.Theming), R.drawable.menu_theming);
actionCell.setTextAndIcon(LocaleController.getString("Theming", R.string.Theming), R.drawable.menu_theming_white);
} else if (i == 8) {
actionCell.setTextAndIcon(LocaleController.getString("Settings", R.string.Settings), R.drawable.menu_settings);
actionCell.setTextAndIcon(LocaleController.getString("Settings", R.string.Settings), R.drawable.menu_settings_white);
} else if (i == communityRow) {
actionCell.setTextAndIcon(LocaleController.getString("Community", R.string.Community), R.drawable.menu_forum);
actionCell.setTextAndIcon(LocaleController.getString("Community", R.string.Community), R.drawable.menu_forum_white);
} /*else if (i == 10) {
actionCell.setTextAndIcon(LocaleController.getString("TelegramFaq", R.string.TelegramFaq), R.drawable.menu_help);
}*/
@ -119,12 +120,13 @@ public class DrawerLayoutAdapter extends BaseAdapter {
try {
PackageInfo pInfo = ApplicationLoader.applicationContext.getPackageManager().getPackageInfo(ApplicationLoader.applicationContext.getPackageName(), 0);
((TextInfoCell) view).setText(String.format(Locale.US, LocaleController.getString("TelegramForAndroid", R.string.TelegramForAndroid)+" v%s (%d)", pInfo.versionName, pInfo.versionCode));
//((TextInfoCell) view).setTextColor(AndroidUtilities.getIntDef("drawerVersionColor",0xffa3a3a3));
//((TextInfoCell) view).setTextSize(AndroidUtilities.getIntDef("drawerVersionSize",13));
} catch (Exception e) {
FileLog.e("tmessages", e);
}
}
}
return view;
}
@ -154,4 +156,5 @@ public class DrawerLayoutAdapter extends BaseAdapter {
public boolean isEmpty() {
return !UserConfig.isClientActivated();
}
}

View File

@ -73,7 +73,6 @@ public class ChatActionCell extends BaseCell {
backgroundBlue = getResources().getDrawable(R.drawable.system_blue);
backgroundWhite = getResources().getDrawable(R.drawable.system_white);
backgroundBlue = backgroundWhite;
textPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
textPaint.setColor(0xffffffff);
@ -226,7 +225,7 @@ public class ChatActionCell extends BaseCell {
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
updateColor();
updateTheme();
if (currentMessageObject == null) {
setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec), textHeight + AndroidUtilities.dp(14));
return;
@ -275,9 +274,9 @@ public class ChatActionCell extends BaseCell {
Drawable backgroundDrawable = null;
if (useBlackBackground) {
backgroundDrawable = backgroundBlack;
backgroundDrawable = backgroundWhite;//backgroundBlack;
} else {
backgroundDrawable = backgroundBlue;
backgroundDrawable = backgroundWhite;//backgroundBlue;
}
backgroundDrawable.setBounds(textX - AndroidUtilities.dp(5), AndroidUtilities.dp(5), textX + textWidth + AndroidUtilities.dp(5), AndroidUtilities.dp(9) + textHeight);
backgroundDrawable.draw(canvas);
@ -294,13 +293,13 @@ public class ChatActionCell extends BaseCell {
}
}
private void updateColor(){
private void updateTheme(){
int color = AndroidUtilities.getIntDef("chatDateColor", 0xffffffff);
textPaint.setColor(color);
if(color != 0xffffffff){
textPaint.linkColor = AndroidUtilities.getIntDarkerColor("chatDateColor", -0x50);
}
textPaint.setTextSize(AndroidUtilities.dp(AndroidUtilities.getIntDef("chatDateSize",16)));//16
backgroundWhite.setColorFilter(AndroidUtilities.getIntDef("chatDateBubbleColor",0x59000000), PorterDuff.Mode.MULTIPLY);
textPaint.setTextSize(AndroidUtilities.dp(AndroidUtilities.getIntDef("chatDateSize", 16)));//16
backgroundWhite.setColorFilter(AndroidUtilities.getIntDef("chatDateBubbleColor", 0x59000000), PorterDuff.Mode.MULTIPLY);
}
}

View File

@ -179,7 +179,7 @@ public class ChatBaseCell extends BaseCell {
avatarDrawable = new AvatarDrawable();
}
private void updateColors(){
private void updateTheme(){
int tColor = AndroidUtilities.getIntColor("themeColor");
int lColor = AndroidUtilities.getIntDarkerColor("themeColor",-0x80);
int dColor = AndroidUtilities.getIntDarkerColor("themeColor",0x15);
@ -465,7 +465,7 @@ public class ChatBaseCell extends BaseCell {
@Override
protected void onDraw(Canvas canvas) {
updateColors();
updateTheme();
if (currentMessageObject == null) {
return;
}
@ -524,7 +524,11 @@ public class ChatBaseCell extends BaseCell {
if (drawName && nameLayout != null) {
canvas.save();
canvas.translate(currentBackgroundDrawable.getBounds().left + AndroidUtilities.dp(19) - nameOffsetX, AndroidUtilities.dp(10));
namePaint.setColor(AvatarDrawable.getNameColorForId(currentUser.id));
if(AndroidUtilities.getBoolPref("chatMemberColorCheck")){
namePaint.setColor(AndroidUtilities.getIntDef("chatMemberColor", AndroidUtilities.getIntDarkerColor("themeColor", 0x15)));
}else{
namePaint.setColor(AvatarDrawable.getNameColorForId(currentUser.id));
}
nameLayout.draw(canvas);
canvas.restore();
}
@ -532,11 +536,13 @@ public class ChatBaseCell extends BaseCell {
if (drawForwardedName && forwardedNameLayout != null) {
canvas.save();
if (currentMessageObject.isOut()) {
forwardNamePaint.setColor(0xff4a923c);
//forwardNamePaint.setColor(0xff4a923c);
forwardNamePaint.setColor(AndroidUtilities.getIntDef("chatForwardColor", 0xff4a923c));
forwardNameX = currentBackgroundDrawable.getBounds().left + AndroidUtilities.dp(10);
forwardNameY = AndroidUtilities.dp(10 + (drawName ? 18 : 0));
} else {
forwardNamePaint.setColor(0xff006fc8);
//forwardNamePaint.setColor(0xff006fc8);
forwardNamePaint.setColor(AndroidUtilities.getIntDef("chatForwardColor", 0xff006fc8));
forwardNameX = currentBackgroundDrawable.getBounds().left + AndroidUtilities.dp(19);
forwardNameY = AndroidUtilities.dp(10 + (drawName ? 18 : 0));
}

View File

@ -12,6 +12,7 @@ import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.RectF;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
@ -53,6 +54,7 @@ public class ChatMediaCell extends ChatBaseCell implements MediaController.FileD
private static Drawable videoIconDrawable;
private static Drawable docMenuInDrawable;
private static Drawable docMenuOutDrawable;
private static Drawable docMenuWhiteDrawable;
private static Drawable[] buttonStatesDrawables = new Drawable[8];
private static Drawable[][] buttonStatesDrawablesDoc = new Drawable[3][2];
private static TextPaint infoPaint;
@ -121,11 +123,15 @@ public class ChatMediaCell extends ChatBaseCell implements MediaController.FileD
docMenuInDrawable = getResources().getDrawable(R.drawable.doc_actions_b);
docMenuOutDrawable = getResources().getDrawable(R.drawable.doc_actions_g);
docMenuWhiteDrawable = getResources().getDrawable(R.drawable.doc_actions_w);
docMenuWhiteDrawable.setColorFilter(AndroidUtilities.getIntDef("chatFileInfoColor", 0xff70b15c), PorterDuff.Mode.MULTIPLY);
infoPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
infoPaint.setTextSize(AndroidUtilities.dp(12));
namePaint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
namePaint.setColor(0xff212121);
//namePaint.setColor(0xff212121);
namePaint.setColor(AndroidUtilities.getIntDef("chatFileInfoColor", 0xff212121));
namePaint.setTextSize(AndroidUtilities.dp(16));
docBackPaint = new Paint();
@ -864,14 +870,22 @@ public class ChatMediaCell extends ChatBaseCell implements MediaController.FileD
if (currentMessageObject.type == 9) {
Drawable menuDrawable = null;
int color = AndroidUtilities.getIntDef("chatRTextColor", 0xff000000);
if (currentMessageObject.isOut()) {
infoPaint.setColor(0xff70b15c);
//infoPaint.setColor(0xff70b15c);
infoPaint.setColor(color);
docBackPaint.setColor(0xffdaf5c3);
menuDrawable = docMenuOutDrawable;
docMenuWhiteDrawable.setColorFilter(AndroidUtilities.getIntDef("chatRTimeColor", AndroidUtilities.getIntDarkerColor("themeColor",0x15)), PorterDuff.Mode.MULTIPLY);
menuDrawable = docMenuOutDrawable = docMenuWhiteDrawable;
namePaint.setColor(color);
} else {
infoPaint.setColor(0xffa1adbb);
color = AndroidUtilities.getIntDef("chatLTextColor", 0xff000000);
//infoPaint.setColor(0xffa1adbb);
infoPaint.setColor(color);
docBackPaint.setColor(0xffebf0f5);
menuDrawable = docMenuInDrawable;
docMenuWhiteDrawable.setColorFilter(AndroidUtilities.getIntDef("chatLTimeColor", 0xffa1adbb), PorterDuff.Mode.MULTIPLY);
menuDrawable = docMenuInDrawable = docMenuWhiteDrawable;
namePaint.setColor(color);
}
setDrawableBounds(menuDrawable, photoImage.getImageX() + backgroundWidth - AndroidUtilities.dp(44), AndroidUtilities.dp(10));

View File

@ -20,6 +20,7 @@ import android.text.Layout;
import android.text.StaticLayout;
import android.text.TextPaint;
import android.text.TextUtils;
import android.util.Log;
import org.telegram.android.AndroidUtilities;
import org.telegram.PhoneFormat.PhoneFormat;
@ -43,6 +44,7 @@ public class DialogCell extends BaseCell {
private static TextPaint nameUnknownPaint;
private static TextPaint messagePaint;
private static TextPaint messagePrintingPaint;
private static TextPaint messageTypingPaint;
private static TextPaint timePaint;
private static TextPaint countPaint;
@ -152,6 +154,10 @@ public class DialogCell extends BaseCell {
messagePrintingPaint.setTextSize(AndroidUtilities.dp(16));
messagePrintingPaint.setColor(0xff4d83b3);
messageTypingPaint = new TextPaint(TextPaint.ANTI_ALIAS_FLAG);
messageTypingPaint.setTextSize(AndroidUtilities.dp(16));
messageTypingPaint.setColor(0xff4d83b3);
timePaint = new TextPaint(TextPaint.ANTI_ALIAS_FLAG);
timePaint.setTextSize(AndroidUtilities.dp(13));
timePaint.setColor(0xff999999);
@ -185,7 +191,7 @@ public class DialogCell extends BaseCell {
broadcastDrawable = broadcastWhiteDrawable;
muteWhiteDrawable = getResources().getDrawable(R.drawable.mute_white);
muteDrawable = muteWhiteDrawable;
updateColors();
updateTheme();
}
}
@ -194,10 +200,9 @@ public class DialogCell extends BaseCell {
init();
avatarImage = new ImageReceiver(this);
avatarImage.setRoundRadius(AndroidUtilities.dp(26));
//avatarImage.setRoundRadius(AndroidUtilities.dp(5));
avatarDrawable = new AvatarDrawable();
//avatarDrawable.setRadius(5);
}
public void setDialog(TLRPC.TL_dialog dialog, int i, boolean server) {
currentDialogId = dialog.id;
isDialogCell = true;
@ -303,7 +308,8 @@ public class DialogCell extends BaseCell {
if (message == null) {
if (printingString != null) {
lastPrintString = messageString = printingString;
currentMessagePaint = messagePrintingPaint;
//currentMessagePaint = messagePrintingPaint;
currentMessagePaint = messageTypingPaint;
} else {
lastPrintString = null;
if (encryptedChat != null) {
@ -349,7 +355,8 @@ public class DialogCell extends BaseCell {
}
if (printingString != null) {
lastPrintString = messageString = printingString;
currentMessagePaint = messagePrintingPaint;
//currentMessagePaint = messagePrintingPaint;
currentMessagePaint = messageTypingPaint;
} else {
lastPrintString = null;
if (message.messageOwner instanceof TLRPC.TL_messageService) {
@ -372,7 +379,7 @@ public class DialogCell extends BaseCell {
checkMessage = false;
String hexColor = String.format("#%06X", (0xFFFFFF & AndroidUtilities.getIntColor("themeColor")));
String hexMsgColor = String.format("#%06X", (0xFFFFFF & AndroidUtilities.getIntDef("chatsMessageColor",0xff8f8f8f)));
String hexDarkColor = String.format("#%06X", (0xFFFFFF & AndroidUtilities.getIntDef("chatsParticipantColor", AndroidUtilities.getIntDarkerColor("themeColor",0x15))));
String hexDarkColor = String.format("#%06X", (0xFFFFFF & AndroidUtilities.getIntDef("chatsMemberColor", AndroidUtilities.getIntDarkerColor("themeColor",0x15))));
if (message.messageOwner.media != null && !(message.messageOwner.media instanceof TLRPC.TL_messageMediaEmpty)) {
currentMessagePaint = messagePrintingPaint;
//messageString = Emoji.replaceEmoji(Html.fromHtml(String.format("<font color=#4d83b3>%s:</font> <font color=#4d83b3>%s</font>", name, message.messageText)), messagePaint.getFontMetricsInt(), AndroidUtilities.dp(20));
@ -654,7 +661,7 @@ public class DialogCell extends BaseCell {
}
public void update(int mask) {
updateColors();
updateTheme();
if (isDialogCell) {
TLRPC.TL_dialog dialog = MessagesController.getInstance().dialogs_dict.get(currentDialogId);
if (dialog != null && mask == 0) {
@ -846,7 +853,7 @@ public class DialogCell extends BaseCell {
avatarImage.draw(canvas);
}
private void updateColors(){
private void updateTheme(){
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
int tColor = AndroidUtilities.getIntColor("themeColor");
int dColor = AndroidUtilities.getIntDarkerColor("themeColor",0x15);
@ -862,9 +869,12 @@ public class DialogCell extends BaseCell {
messagePaint.setTextSize(AndroidUtilities.dp(themePrefs.getInt("chatsMessageSize", 16)));
messagePaint.setColor(themePrefs.getInt("chatsMessageColor", 0xff8f8f8f));
//Audio Archivo ... te expulsó
messagePrintingPaint.setTextSize(AndroidUtilities.dp(themePrefs.getInt("chatsMessageSize", 16)));
messagePrintingPaint.setColor(themePrefs.getInt("chatsMessageColor", tColor));//0xff4d83b3
messagePrintingPaint.setColor(AndroidUtilities.getIntDef("chatsMessageColor", tColor));
messageTypingPaint.setTextSize(AndroidUtilities.dp(themePrefs.getInt("chatsMessageSize", 16)));
messageTypingPaint.setColor(AndroidUtilities.getIntDef("chatsTypingColor", tColor));
timePaint.setTextSize(AndroidUtilities.dp(themePrefs.getInt("chatsTimeSize", 13)));
timePaint.setColor(themePrefs.getInt("chatsTimeColor", 0xff999999));
@ -884,5 +894,11 @@ public class DialogCell extends BaseCell {
int mColor = themePrefs.getInt("chatsMuteColor", 0xffa8a8a8);
muteWhiteDrawable.setColorFilter(mColor, PorterDuff.Mode.MULTIPLY);
linePaint.setColor(themePrefs.getInt("chatsDividerColor", 0xffdcdcdc));
//int radius = AndroidUtilities.dp(AndroidUtilities.getIntDef("chatsAvatarRadius", 32));
//if(avatarImage != null)avatarImage.setRoundRadius(radius);
//if(avatarDrawable != null)avatarDrawable.setRadius(radius/3);
}
}

View File

@ -9,12 +9,15 @@
package org.telegram.ui.Cells;
import android.content.Context;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.util.TypedValue;
import android.view.Gravity;
import android.widget.FrameLayout;
import android.widget.TextView;
import org.telegram.android.AndroidUtilities;
import org.telegram.messenger.R;
public class DrawerActionCell extends FrameLayout {
@ -45,10 +48,32 @@ public class DrawerActionCell extends FrameLayout {
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(48), MeasureSpec.EXACTLY));
updateTheme();
}
public void setTextAndIcon(String text, int resId) {
textView.setText(text);
textView.setCompoundDrawablesWithIntrinsicBounds(resId, 0, 0, 0);
//textView.setCompoundDrawablesWithIntrinsicBounds(resId, 0, 0, 0);
textView.setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(resId), null, null, null);
}
private void updateTheme(){
textView.setTextColor(AndroidUtilities.getIntDef("drawerOptionColor", 0xff444444));
textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, AndroidUtilities.getIntDef("drawerOptionSize", 15));
int color = AndroidUtilities.getIntDef("drawerIconColor", 0xff737373);
Drawable icon = getResources().getDrawable(R.drawable.menu_newgroup_white);
icon.setColorFilter(color, PorterDuff.Mode.MULTIPLY);
icon = getResources().getDrawable(R.drawable.menu_secret_white);
icon.setColorFilter(color, PorterDuff.Mode.MULTIPLY);
icon = getResources().getDrawable(R.drawable.menu_broadcast_white);
icon.setColorFilter(color, PorterDuff.Mode.MULTIPLY);
icon = getResources().getDrawable(R.drawable.menu_contacts_white);
icon.setColorFilter(color, PorterDuff.Mode.MULTIPLY);
icon = getResources().getDrawable(R.drawable.menu_theming_white);
icon.setColorFilter(color, PorterDuff.Mode.MULTIPLY);
icon = getResources().getDrawable(R.drawable.menu_settings_white);
icon.setColorFilter(color, PorterDuff.Mode.MULTIPLY);
icon = getResources().getDrawable(R.drawable.menu_forum_white);
icon.setColorFilter(color, PorterDuff.Mode.MULTIPLY);
}
}

View File

@ -10,25 +10,26 @@ package org.telegram.ui.Cells;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.graphics.Bitmap;
import android.os.Build;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.TextView;
import org.telegram.PhoneFormat.PhoneFormat;
import org.telegram.android.AndroidUtilities;
import org.telegram.android.ContactsController;
import org.telegram.android.MessageObject;
import org.telegram.android.MessagesController;
import org.telegram.messenger.TLRPC;
import org.telegram.messenger.UserConfig;
import org.telegram.ui.Components.AvatarDrawable;
import org.telegram.ui.Components.BackupImageView;
import org.telegram.ui.PhotoViewer;
public class DrawerProfileCell extends FrameLayout {
public class DrawerProfileCell extends FrameLayout implements PhotoViewer.PhotoViewerProvider{
private BackupImageView avatarImageView;
private TextView nameTextView;
@ -48,6 +49,20 @@ public class DrawerProfileCell extends FrameLayout {
layoutParams.leftMargin = AndroidUtilities.dp(16);
layoutParams.bottomMargin = AndroidUtilities.dp(67);
avatarImageView.setLayoutParams(layoutParams);
final Activity activity = (Activity) context;
avatarImageView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (activity == null) {
return;
}
TLRPC.User user = MessagesController.getInstance().getUser(UserConfig.getClientUserId());
if (user.photo != null && user.photo.photo_big != null) {
PhotoViewer.getInstance().setParentActivity(activity);
PhotoViewer.getInstance().openPhoto(user.photo.photo_big, DrawerProfileCell.this);
}
}
});
nameTextView = new TextView(context);
nameTextView.setTextColor(0xffffffff);
@ -92,7 +107,7 @@ public class DrawerProfileCell extends FrameLayout {
} else {
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(148), MeasureSpec.EXACTLY));
}
updateColors();
updateTheme();
}
public void setUser(TLRPC.User user) {
@ -110,18 +125,82 @@ public class DrawerProfileCell extends FrameLayout {
avatarImageView.setImage(photo, "50_50", avatarDrawable);
}
private void updateColors(){
setBackgroundColor(AndroidUtilities.getIntColor("themeColor"));
phoneTextView.setTextColor(AndroidUtilities.getIntDarkerColor("themeColor",-0x40));
@Override
public void updatePhotoAtIndex(int index) {}
@Override
public PhotoViewer.PlaceProviderObject getPlaceForPhoto(MessageObject messageObject, TLRPC.FileLocation fileLocation, int index) {
if (fileLocation == null) {
return null;
}
TLRPC.User user = MessagesController.getInstance().getUser(UserConfig.getClientUserId());
if (user != null && user.photo != null && user.photo.photo_big != null) {
TLRPC.FileLocation photoBig = user.photo.photo_big;
if (photoBig.local_id == fileLocation.local_id && photoBig.volume_id == fileLocation.volume_id && photoBig.dc_id == fileLocation.dc_id) {
int coords[] = new int[2];
avatarImageView.getLocationInWindow(coords);
PhotoViewer.PlaceProviderObject object = new PhotoViewer.PlaceProviderObject();
object.viewX = coords[0];
object.viewY = coords[1] - AndroidUtilities.statusBarHeight;
object.parentView = avatarImageView;
object.imageReceiver = avatarImageView.imageReceiver;
object.user_id = UserConfig.getClientUserId();
object.thumb = object.imageReceiver.getBitmap();
object.size = -1;
object.radius = avatarImageView.imageReceiver.getRoundRadius();
return object;
}
}
return null;
}
@Override
public Bitmap getThumbForPhoto(MessageObject messageObject, TLRPC.FileLocation fileLocation, int index) {
return null;
}
@Override
public void willSwitchFromPhoto(MessageObject messageObject, TLRPC.FileLocation fileLocation, int index) { }
@Override
public void willHidePhotoViewer() {
avatarImageView.imageReceiver.setVisible(true, true);
}
@Override
public boolean isPhotoChecked(int index) { return false; }
@Override
public void setPhotoChecked(int index) { }
@Override
public void cancelButtonPressed() { }
@Override
public void sendButtonPressed(int index) { }
@Override
public int getSelectedCount() { return 0; }
private void updateTheme(){
int tColor = AndroidUtilities.getIntColor("themeColor");
int dColor = AndroidUtilities.getIntDarkerColor("themeColor",-0x40);
setBackgroundColor(AndroidUtilities.getIntDef("drawerHeaderColor", tColor));
nameTextView.setTextColor(AndroidUtilities.getIntDef("drawerNameColor", 0xffffffff));
nameTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, AndroidUtilities.getIntDef("drawerNameSize", 15));
phoneTextView.setTextColor(AndroidUtilities.getIntDef("drawerPhoneColor", dColor));
phoneTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, AndroidUtilities.getIntDef("drawerPhoneSize", 13));
TLRPC.User user = MessagesController.getInstance().getUser(UserConfig.getClientUserId());
TLRPC.FileLocation photo = null;
if (user.photo != null) {
photo = user.photo.photo_small;
}
AvatarDrawable avatarDrawable = new AvatarDrawable(user);
avatarDrawable.setColor(AndroidUtilities.getIntDarkerColor("themeColor",0x15));
avatarDrawable.setColor(AndroidUtilities.getIntDef("drawerAvatarColor",AndroidUtilities.getIntDarkerColor("themeColor", 0x15)));
//int radius = AndroidUtilities.dp(AndroidUtilities.getIntDef("drawerAvatarRadius", 32));
//avatarDrawable.setRadius(radius/2);
//avatarImageView.imageReceiver.setRoundRadius(AndroidUtilities.dp(radius));
avatarImageView.setImage(photo, "50_50", avatarDrawable);
if(AndroidUtilities.getBoolMain("hideMobile")){
phoneTextView.setVisibility(GONE);
}else{

View File

@ -9,12 +9,18 @@
package org.telegram.ui.Cells;
import android.content.Context;
import android.util.Log;
import android.util.TypedValue;
import android.view.Gravity;
import android.widget.FrameLayout;
import android.widget.TextView;
import org.telegram.android.AndroidUtilities;
import org.telegram.android.LocaleController;
import org.telegram.messenger.R;
import org.telegram.ui.LaunchActivity;
import java.util.Locale;
public class TextInfoCell extends FrameLayout {
@ -41,9 +47,21 @@ public class TextInfoCell extends FrameLayout {
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
if( textView.getContext() instanceof LaunchActivity ){
textView.setTextColor(AndroidUtilities.getIntDef("drawerVersionColor", 0xffa3a3a3));
textView.setTextSize(AndroidUtilities.getIntDef("drawerVersionSize", 13));
}
}
public void setText(String text) {
textView.setText(text);
}
/*
public void setTextColor(int color) {
textView.setTextColor(color);
}
public void setTextSize(int size) {
textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP,size);
}*/
}

View File

@ -239,6 +239,9 @@ public class UserCell extends FrameLayout {
statusTextView.setTextSize(AndroidUtilities.getIntDef("contactsStatusSize", 14));
imageView.setVisibility(currentDrawable == 0 ? GONE : VISIBLE);
imageView.setImageResource(currentDrawable);
//int radius = AndroidUtilities.dp(AndroidUtilities.getIntDef("contactsAvatarRadius", 32));
//avatarImageView.imageReceiver.setRoundRadius(radius);
//avatarDrawable.setRadius(radius/3);
avatarImageView.setImage(photo, "50_50", avatarDrawable);
}
}

View File

@ -18,7 +18,9 @@ import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.media.ExifInterface;
import android.net.Uri;
import android.os.Build;
@ -276,6 +278,12 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
return false;
}
}
//Smart Notifications
if (chatId > 0){
if (currentChat.sound_timestamps != null)
currentChat.sound_timestamps.clear();
}
//
if (chatId > 0) {
dialog_id = -chatId;
} else {
@ -968,7 +976,10 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
attachItem.addSubItem(attach_location, LocaleController.getString("ChatLocation", R.string.ChatLocation), R.drawable.ic_attach_location);
attachItem.setVisibility(View.INVISIBLE);
menuItem = menu.addItem(chat_menu_attach, R.drawable.ic_ab_attach);
Drawable clip = getParentActivity().getResources().getDrawable(R.drawable.ic_ab_attach_white);
clip.setColorFilter(AndroidUtilities.getIntDef("chatEditTextIconsColor", 0xffadadad), PorterDuff.Mode.MULTIPLY);
menuItem = menu.addItem(chat_menu_attach, clip);
//menuItem = menu.addItem(chat_menu_attach, R.drawable.ic_ab_attach);
menuItem.addSubItem(attach_photo, LocaleController.getString("ChatTakePhoto", R.string.ChatTakePhoto), R.drawable.ic_attach_photo);
menuItem.addSubItem(attach_gallery, LocaleController.getString("ChatGallery", R.string.ChatGallery), R.drawable.ic_attach_gallery);
menuItem.addSubItem(attach_music, LocaleController.getString("ChatMusic", R.string.ChatMusic), R.drawable.ic_attach_music);
@ -3179,10 +3190,10 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
chatListView.setOnItemLongClickListener(onItemLongClickListener);
chatListView.setOnItemClickListener(onItemClickListener);
chatListView.setLongClickable(true);
updateColors();
updateTheme();
}
private void updateColors(){
private void updateTheme(){
actionBar.setBackgroundColor(AndroidUtilities.getIntDef("chatHeaderColor", AndroidUtilities.getIntColor("themeColor")));
nameTextView.setTextColor(AndroidUtilities.getIntDef("chatNameColor", 0xffffffff));
nameTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, AndroidUtilities.getIntDef("chatNameSize", 18));

View File

@ -53,7 +53,7 @@ public class AvatarDrawable extends Drawable {
private boolean isProfile;
private boolean drawBrodcast;
private boolean drawPhoto;
private int radius;
//private int radius;
public AvatarDrawable() {
super();
@ -65,7 +65,7 @@ public class AvatarDrawable extends Drawable {
broadcastDrawable = ApplicationLoader.applicationContext.getResources().getDrawable(R.drawable.broadcast_w);
}
radius = 26;
//radius = 32;
}
public AvatarDrawable(TLRPC.User user) {
@ -158,11 +158,15 @@ public class AvatarDrawable extends Drawable {
public void setColor(int value) {
color = value;
}
/*
public void setRadius(int value) {
radius = value;
}
public int getRadius() {
return radius;
}
*/
public void setInfo(int id, String firstName, String lastName, boolean isBroadcast) {
if (isProfile) {
color = arrColorsProfiles[getColorIndex(id)];
@ -244,9 +248,10 @@ public class AvatarDrawable extends Drawable {
canvas.save();
canvas.translate(bounds.left, bounds.top);
canvas.drawCircle(size / 2, size / 2, size / 2, paint);
//Rect rect = new Rect(0, 0, size, size);
//RectF rectF = new RectF(rect);
//canvas.drawRoundRect( rectF, AndroidUtilities.dp(26), AndroidUtilities.dp(26), paint);
/*Rect rect = new Rect(0, 0, size, size);
RectF rectF = new RectF(rect);
int r = getRadius();
canvas.drawRoundRect( rectF, AndroidUtilities.dp(r), AndroidUtilities.dp(r), paint);*/
if (drawBrodcast && broadcastDrawable != null) {
int x = (size - broadcastDrawable.getIntrinsicWidth()) / 2;

View File

@ -136,7 +136,10 @@ public class ChatActivityEnterView extends LinearLayout implements NotificationC
frameLayout.setLayoutParams(layoutParams);
emojiButton = new ImageView(context);
emojiButton.setImageResource(R.drawable.ic_msg_panel_smiles);
//emojiButton.setImageResource(R.drawable.ic_msg_panel_smiles);
Drawable emoji = parentActivity.getResources().getDrawable(R.drawable.ic_msg_panel_smiles_white);
emoji.setColorFilter(AndroidUtilities.getIntDef("chatEditTextIconsColor", 0xffadadad), PorterDuff.Mode.MULTIPLY);
emojiButton.setImageDrawable(emoji);
emojiButton.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
emojiButton.setPadding(AndroidUtilities.dp(4), AndroidUtilities.dp(1), 0, 0);
frameLayout.addView(emojiButton);
@ -362,8 +365,12 @@ public class ChatActivityEnterView extends LinearLayout implements NotificationC
audioSendButton = new ImageView(context);
audioSendButton.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
audioSendButton.setImageResource(R.drawable.mic_button_states);
audioSendButton.setBackgroundColor(0xffffffff);
//audioSendButton.setImageResource(R.drawable.mic_button_states);
//audioSendButton.setBackgroundColor(0xffffffff);
Drawable mic = parentActivity.getResources().getDrawable(R.drawable.mic_white);
mic.setColorFilter(AndroidUtilities.getIntDef("chatEditTextIconsColor", 0xffadadad), PorterDuff.Mode.MULTIPLY);
audioSendButton.setImageDrawable(mic);
audioSendButton.setBackgroundColor(0x00000000);
audioSendButton.setPadding(0, 0, AndroidUtilities.dp(4), 0);
frameLayout1.addView(audioSendButton);
layoutParams1 = (FrameLayout.LayoutParams) audioSendButton.getLayoutParams();
@ -373,7 +380,11 @@ public class ChatActivityEnterView extends LinearLayout implements NotificationC
audioSendButton.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
Drawable mic = parentActivity.getResources().getDrawable(R.drawable.mic_white);
if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
mic.setColorFilter(0xffda564d, PorterDuff.Mode.MULTIPLY);
audioSendButton.setImageDrawable(mic);
if (parentFragment != null) {
String action = null;
TLRPC.Chat currentChat = null;
@ -396,6 +407,8 @@ public class ChatActivityEnterView extends LinearLayout implements NotificationC
updateAudioRecordIntefrace();
audioSendButton.getParent().requestDisallowInterceptTouchEvent(true);
} else if (motionEvent.getAction() == MotionEvent.ACTION_UP || motionEvent.getAction() == MotionEvent.ACTION_CANCEL) {
mic.setColorFilter(AndroidUtilities.getIntDef("chatEditTextIconsColor", 0xffadadad), PorterDuff.Mode.MULTIPLY);
audioSendButton.setImageDrawable(mic);
startedDraggingX = -1;
MediaController.getInstance().stopRecording(true);
recordingAudio = false;
@ -467,18 +480,18 @@ public class ChatActivityEnterView extends LinearLayout implements NotificationC
checkSendButton(false);
updateColors();
updateTheme();
}
private void updateColors() {
private void updateTheme() {
Drawable send = parentActivity.getResources().getDrawable(R.drawable.ic_send_white);
send.setColorFilter(AndroidUtilities.getIntDef("chatSendIconColor", AndroidUtilities.getIntColor("themeColor")), PorterDuff.Mode.MULTIPLY);
sendButton.setImageDrawable(send);
messsageEditText.setTextColor(AndroidUtilities.getIntDef("chatEditTextColor",0xff000000));
messsageEditText.setHintTextColor(AndroidUtilities.getIntAlphaColor("chatEditTextColor", 0xff000000, 0.35f));
messsageEditText.setTextSize(AndroidUtilities.getIntDef("chatEditTextSize",18));
int color = AndroidUtilities.getIntDef("chatEditTextBGColor", 0xffffffff);
setBackgroundColor(color);
audioSendButton.setBackgroundColor(0x00000000);
}
public void onDestroy() {
@ -878,18 +891,27 @@ public class ChatActivityEnterView extends LinearLayout implements NotificationC
if (!keyboardVisible) {
if (sizeNotifierRelativeLayout != null) {
sizeNotifierRelativeLayout.setPadding(0, 0, 0, currentHeight);
emojiButton.setImageResource(R.drawable.ic_msg_panel_hide);
//emojiButton.setImageResource(R.drawable.ic_msg_panel_hide);
Drawable hide = parentActivity.getResources().getDrawable(R.drawable.ic_msg_panel_hide_white);
hide.setColorFilter(AndroidUtilities.getIntDef("chatEditTextIconsColor", 0xffadadad), PorterDuff.Mode.MULTIPLY);
emojiButton.setImageDrawable(hide);
if (delegate != null) {
delegate.onWindowSizeChanged(sizeNotifierRelativeLayout.getHeight() - sizeNotifierRelativeLayout.getPaddingBottom());
}
}
return;
}
emojiButton.setImageResource(R.drawable.ic_msg_panel_kb);
//emojiButton.setImageResource(R.drawable.ic_msg_panel_kb);
Drawable kb = parentActivity.getResources().getDrawable(R.drawable.ic_msg_panel_kb_white);
kb.setColorFilter(AndroidUtilities.getIntDef("chatEditTextIconsColor", 0xffadadad), PorterDuff.Mode.MULTIPLY);
emojiButton.setImageDrawable(kb);
return;
}
if (emojiButton != null) {
emojiButton.setImageResource(R.drawable.ic_msg_panel_smiles);
//emojiButton.setImageResource(R.drawable.ic_msg_panel_smiles);
Drawable emoji = parentActivity.getResources().getDrawable(R.drawable.ic_msg_panel_smiles_white);
emoji.setColorFilter(AndroidUtilities.getIntDef("chatEditTextIconsColor", 0xffadadad), PorterDuff.Mode.MULTIPLY);
emojiButton.setImageDrawable(emoji);
}
if (emojiPopup != null) {
try {

View File

@ -159,10 +159,10 @@ public class EmojiView extends LinearLayout {
pager.setCurrentItem(1);
}
updateColors(tabs);
updateTheme(tabs);
}
private void updateColors(PagerSlidingTabStrip tabs) {
private void updateTheme(PagerSlidingTabStrip tabs) {
setBackgroundColor(AndroidUtilities.getIntDef("chatEmojiViewBGColor",0xff222222));
tabs.setIndicatorColor(AndroidUtilities.getIntDef("chatEmojiViewTabColor",AndroidUtilities.getIntDarkerColor("themeColor",0x15)));//0xff33b5e5
}

View File

@ -419,7 +419,7 @@ public class Switch extends CompoundButton {
if (mTrackDrawable != null) {
//mTrackDrawable.setColorFilter(new PorterDuffColorFilter(checked ? 0xffa0d6fa : 0xffc7c7c7, PorterDuff.Mode.MULTIPLY));
mTrackDrawable.setColorFilter(new PorterDuffColorFilter(checked ? AndroidUtilities.getIntAlphaColor("themeColor",0.5f) : 0xffc7c7c7, PorterDuff.Mode.MULTIPLY));
mTrackDrawable.setColorFilter(new PorterDuffColorFilter(checked ? AndroidUtilities.getIntAlphaColor("themeColor", AndroidUtilities.defColor, 0.5f) : 0xffc7c7c7, PorterDuff.Mode.MULTIPLY));
}
if (mThumbDrawable != null) {
//mThumbDrawable.setColorFilter(new PorterDuffColorFilter(checked ? 0xff45abef : 0xffededed, PorterDuff.Mode.MULTIPLY));

View File

@ -450,10 +450,10 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
if (listViewAdapter != null) {
listViewAdapter.notifyDataSetChanged();
}
updateColors();
updateTheme();
}
private void updateColors(){
private void updateTheme(){
actionBar.setBackgroundColor(AndroidUtilities.getIntDef("contactsHeaderColor", AndroidUtilities.getIntColor("themeColor")));
}

View File

@ -22,6 +22,7 @@ import android.os.Build;
import android.os.Bundle;
import android.os.Parcelable;
import android.provider.ContactsContract;
import android.util.Log;
import android.view.ActionMode;
import android.view.KeyEvent;
import android.view.MotionEvent;

View File

@ -15,9 +15,11 @@ import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.Outline;
import android.graphics.PorterDuff;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
@ -164,7 +166,9 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
passcodeItem = menu.addItem(passcode_menu_item, R.drawable.lock_close);
updatePasscodeButton();
}
ActionBarMenuItem item = menu.addItem(0, R.drawable.ic_ab_search).setIsSearchField(true).setActionBarMenuItemSearchListener(new ActionBarMenuItem.ActionBarMenuItemSearchListener() {
//ActionBarMenuItem item = menu.addItem(0, R.drawable.ic_ab_search).setIsSearchField(true).setActionBarMenuItemSearchListener(new ActionBarMenuItem.ActionBarMenuItemSearchListener() {
Drawable search = getParentActivity().getResources().getDrawable(R.drawable.ic_ab_search);
ActionBarMenuItem item = menu.addItem(0, search).setIsSearchField(true).setActionBarMenuItemSearchListener(new ActionBarMenuItem.ActionBarMenuItemSearchListener() {
@Override
public void onSearchExpand() {
searching = true;
@ -232,8 +236,12 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
}
});
item.getSearchField().setHint(LocaleController.getString("Search", R.string.Search));
item.getSearchField().setTextColor(AndroidUtilities.getIntDef("chatsHeaderTitleColor", 0xffffffff));
if (onlySelect) {
actionBar.setBackButtonImage(R.drawable.ic_ab_back);
//actionBar.setBackButtonImage(R.drawable.ic_ab_back);
Drawable back = getParentActivity().getResources().getDrawable(R.drawable.ic_ab_back);
back.setColorFilter(AndroidUtilities.getIntDef("chatsHeaderIconsColor", 0xffffffff), PorterDuff.Mode.MULTIPLY);
actionBar.setBackButtonDrawable(back);
actionBar.setTitle(LocaleController.getString("SelectChat", R.string.SelectChat));
} else {
actionBar.setBackButtonDrawable(new MenuDrawable());
@ -558,10 +566,11 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
if (dialogsSearchAdapter != null) {
dialogsSearchAdapter.notifyDataSetChanged();
}
updateColors();
updateTheme();
}
private void updateColors(){
private void updateTheme(){
updateActionBarTitle();
actionBar.setBackgroundColor(AndroidUtilities.getIntDef("chatsHeaderColor", AndroidUtilities.getIntColor("themeColor")));
Drawable floatingDrawableWhite = fragmentView.getResources().getDrawable(R.drawable.floating_white);
floatingDrawableWhite.setColorFilter(AndroidUtilities.getIntDef("chatsFloatingBGColor", AndroidUtilities.getIntColor("themeColor")), PorterDuff.Mode.MULTIPLY);
@ -569,6 +578,20 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
Drawable pencilDrawableWhite = fragmentView.getResources().getDrawable(R.drawable.floating_pencil);
pencilDrawableWhite.setColorFilter(AndroidUtilities.getIntDef("chatsFloatingPencilColor", 0xffffffff), PorterDuff.Mode.MULTIPLY);
floatingButton.setImageDrawable(pencilDrawableWhite);
Drawable search = getParentActivity().getResources().getDrawable(R.drawable.ic_ab_search);
search.setColorFilter(AndroidUtilities.getIntDef("chatsHeaderIconsColor", 0xffffffff), PorterDuff.Mode.MULTIPLY);
}
private void updateActionBarTitle(){
String value = LocaleController.getString("AppName", R.string.AppName);
if(AndroidUtilities.getBoolPref("chatsUsernameTitle")){
TLRPC.User user = UserConfig.getCurrentUser();
if (user != null && user.username != null && user.username.length() != 0) {
value = user.username;
}
}
actionBar.setTitle(value);
actionBar.setTitleColor(AndroidUtilities.getIntDef("chatsHeaderTitleColor", 0xffffffff));
}
@Override

View File

@ -24,27 +24,30 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.FrameLayout;
import android.widget.ListView;
import android.widget.Spinner;
import org.telegram.android.AndroidUtilities;
import org.telegram.android.LocaleController;
import org.telegram.android.MessagesController;
import org.telegram.android.MessagesStorage;
import org.telegram.android.NotificationCenter;
import org.telegram.android.NotificationsController;
import org.telegram.messenger.ApplicationLoader;
import org.telegram.messenger.ConnectionsManager;
import org.telegram.messenger.FileLog;
import org.telegram.android.LocaleController;
import org.telegram.android.NotificationCenter;
import org.telegram.messenger.R;
import org.telegram.messenger.TLRPC;
import org.telegram.ui.ActionBar.ActionBar;
import org.telegram.ui.ActionBar.BaseFragment;
import org.telegram.ui.Adapters.BaseFragmentAdapter;
import org.telegram.ui.Cells.TextColorCell;
import org.telegram.ui.Cells.TextDetailSettingsCell;
import org.telegram.ui.ActionBar.ActionBar;
import org.telegram.ui.ActionBar.BaseFragment;
import org.telegram.ui.Components.AvatarDrawable;
import org.telegram.ui.Components.ColorPickerView;
import org.telegram.ui.Components.NumberPicker;
public class ProfileNotificationsActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate {
@ -55,6 +58,7 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
private int settingsVibrateRow;
private int settingsSoundRow;
private int settingsPriorityRow;
private int settingsSmartNotifyRow;
private int settingsLedRow;
private int rowCount = 0;
@ -66,6 +70,12 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
@Override
public boolean onFragmentCreate() {
settingsNotificationsRow = rowCount++;
if (dialog_id < 0) {
settingsSmartNotifyRow = rowCount++;
}
else {
settingsSmartNotifyRow = -1;
}
settingsVibrateRow = rowCount++;
settingsSoundRow = rowCount++;
if (Build.VERSION.SDK_INT >= 21) {
@ -155,7 +165,8 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
}
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("AppName", R.string.AppName));
builder.setItems(new CharSequence[] {
//Smart Notifications
/*builder.setItems(new CharSequence[] {
LocaleController.getString("Default", R.string.Default),
LocaleController.getString("Enabled", R.string.Enabled),
LocaleController.getString("NotificationsDisabled", R.string.NotificationsDisabled)
@ -179,7 +190,69 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
}
NotificationsController.updateServerNotificationsSettings(dialog_id);
}
});
});*/
if (dialog_id < 0) {
builder.setItems(new CharSequence[]{
LocaleController.getString("Default", R.string.Default),
LocaleController.getString("Enabled", R.string.Enabled),
LocaleController.getString("NotificationsDisabled", R.string.NotificationsDisabled),
LocaleController.getString("Smart Notification", R.string.SmartNotification)
}, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Activity.MODE_PRIVATE);
SharedPreferences.Editor editor = preferences.edit();
if (which == 3) {
which = 4; //Leave space for "Mute group for D duration"
editor.putBoolean("smart_notify_" + dialog_id, true);
} else {
editor.putBoolean("smart_notify_" + dialog_id, false);
}
editor.putInt("notify2_" + dialog_id, which);
MessagesStorage.getInstance().setDialogFlags(dialog_id, which == 2 ? 1 : 0);
editor.commit();
TLRPC.TL_dialog tl_dialog = MessagesController.getInstance().dialogs_dict.get(dialog_id);
if (tl_dialog != null) {
tl_dialog.notify_settings = new TLRPC.TL_peerNotifySettings();
if (which == 2) {
tl_dialog.notify_settings.mute_until = Integer.MAX_VALUE;
}
}
if (listView != null) {
listView.invalidateViews();
}
NotificationsController.updateServerNotificationsSettings(dialog_id);
}
});
}
else {
builder.setItems(new CharSequence[]{
LocaleController.getString("Default", R.string.Default),
LocaleController.getString("Enabled", R.string.Enabled),
LocaleController.getString("NotificationsDisabled", R.string.NotificationsDisabled),
}, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Activity.MODE_PRIVATE);
SharedPreferences.Editor editor = preferences.edit();
editor.putInt("notify2_" + dialog_id, which);
MessagesStorage.getInstance().setDialogFlags(dialog_id, which == 2 ? 1 : 0);
editor.commit();
TLRPC.TL_dialog tl_dialog = MessagesController.getInstance().dialogs_dict.get(dialog_id);
if (tl_dialog != null) {
tl_dialog.notify_settings = new TLRPC.TL_peerNotifySettings();
if (which == 2) {
tl_dialog.notify_settings.mute_until = Integer.MAX_VALUE;
}
}
if (listView != null) {
listView.invalidateViews();
}
NotificationsController.updateServerNotificationsSettings(dialog_id);
}
});
}
//
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
showAlertDialog(builder);
} else if (i == settingsSoundRow) {
@ -291,6 +364,73 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
showAlertDialog(builder);
}
//Smart Notifications
else if (i == settingsSmartNotifyRow) {
if (getParentActivity() == null) {
return;
}
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.settings_smart_notify, null, false);
String[] timeUnits = {
LocaleController.getString("Seconds", R.string.TimeUnitSeconds),
LocaleController.getString("Minutes", R.string.TimeUnitMinutes),
LocaleController.getString("Hours", R.string.TimeUnitHours),
LocaleController.getString("Days", R.string.TimeUnitDays)
};
final Spinner timeframeUnitSpinner = (Spinner) view.findViewById(R.id.timeframeunitSpinner);
ArrayAdapter<String> adapter = new ArrayAdapter<String> (li.getContext(), android.R.layout.simple_spinner_item, timeUnits);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
timeframeUnitSpinner.setAdapter(adapter);
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Activity.MODE_PRIVATE);
final NumberPicker maxcountNumberPicker = (NumberPicker) view.findViewById(R.id.maxcountNumberPicker);
maxcountNumberPicker.setMinValue(1);
maxcountNumberPicker.setMaxValue(10);
maxcountNumberPicker.setValue(preferences.getInt ("smart_notify_max_count_" + dialog_id, 1));
final NumberPicker timeframeNumberPicker = (NumberPicker) view.findViewById(R.id.timeframeNumberPicker);
timeframeNumberPicker.setMinValue(1);
timeframeNumberPicker.setMaxValue(100);
long timeframe = preferences.getLong("smart_notify_timeframe_" + dialog_id, 1);
long multiplier = (timeframe % 86400L == 0L) ? 86400L : ((timeframe % 3600L == 0L) ? 3600L : ((timeframe % 60L == 0L) ? 60L : 1L));
timeframe = timeframe / multiplier;
timeframeUnitSpinner.setSelection((multiplier == 1L) ? 0 : ((multiplier == 60L) ? 1 : (multiplier == 3600L) ? 2 : 3));
timeframeNumberPicker.setValue((int)timeframe);
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("Smart Notification", R.string.SmartNotification));
builder.setView(view);
builder.setPositiveButton(LocaleController.getString("Set", R.string.Set), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int which) {
final SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Activity.MODE_PRIVATE);
SharedPreferences.Editor editor = preferences.edit();
int unit = timeframeUnitSpinner.getSelectedItemPosition();
long multiplier = (unit == 0) ? 1L : ((unit == 1) ? 60L : ((unit == 2) ? 3600L : 86400L));
editor.putInt("smart_notify_max_count_" + dialog_id, maxcountNumberPicker.getValue());
editor.putLong("smart_notify_timeframe_" + dialog_id, timeframeNumberPicker.getValue() * multiplier);
editor.commit();
listView.invalidateViews();
}
});
builder.setNegativeButton(LocaleController.getString("Default", R.string.Default), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
final SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Activity.MODE_PRIVATE);
SharedPreferences.Editor editor = preferences.edit();
editor.putInt("smart_notify_max_count_" + dialog_id, 1);
editor.putLong("smart_notify_timeframe_" + dialog_id, 1);
editor.commit();
listView.invalidateViews();
}
});
showAlertDialog(builder);
}
//
}
});
} else {
@ -355,11 +495,23 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
@Override
public boolean areAllItemsEnabled() {
return true;
//return true;
//Smart Notifications
return false;
//
}
@Override
public boolean isEnabled(int i) {
//Smart Notifications
if (i < 0)
return false;
if (i == settingsSmartNotifyRow) {
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Activity.MODE_PRIVATE);
if (!preferences.getBoolean("smart_notify_" + dialog_id, false))
return false;
}
//
return true;
}
@ -436,6 +588,11 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
textCell.setTextAndValue(LocaleController.getString("Notifications", R.string.Notifications), LocaleController.getString("NotificationsDisabled", R.string.NotificationsDisabled), true);
}
}
//Smart Notifications
else if (value == 4) {
textCell.setTextAndValue(LocaleController.getString("Notifications", R.string.Notifications), LocaleController.getString("Smart Notification", R.string.SmartNotification), true);
}
//
} else if (i == settingsSoundRow) {
String value = preferences.getString("sound_" + dialog_id, LocaleController.getString("Default", R.string.Default));
if (value.equals("NoSound")) {
@ -454,6 +611,36 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
textCell.setTextAndValue(LocaleController.getString("NotificationsPriority", R.string.NotificationsPriority), LocaleController.getString("SettingsDefault", R.string.SettingsDefault), true);
}
}
//Smart Notifications
else if (i == settingsSmartNotifyRow) {
String value = LocaleController.getString("Disabled", R.string.Disabled);
if (preferences.getBoolean("smart_notify_" + dialog_id, false)) {
long timeframe = preferences.getLong("smart_notify_timeframe_" + dialog_id, 1);
long multiplier = (timeframe % 86400L == 0L) ? 86400L : ((timeframe % 3600L == 0L) ? 3600L : ((timeframe % 60L == 0L) ? 60L : 1L));
timeframe = timeframe / multiplier;
String[] timeUnits = {
LocaleController.getString("Seconds", R.string.TimeUnitSeconds),
LocaleController.getString("Minutes", R.string.TimeUnitMinutes),
LocaleController.getString("Hours", R.string.TimeUnitHours),
LocaleController.getString("Days", R.string.TimeUnitDays)
};
value = LocaleController.getString("Sound at most", R.string.settings_smart_notify_begin);
value += " ";
value += preferences.getInt("smart_notify_max_count_" + dialog_id, 1);
value += " ";
value += preferences.getInt("smart_notify_max_count_" + dialog_id, 1) == 1 ? LocaleController.getString("time", R.string.settings_smart_notify_mid11) : LocaleController.getString("time(s)", R.string.settings_smart_notify_mid1);
value += " ";
value += LocaleController.getString("within", R.string.settings_smart_notify_mid2);
value += " ";
value += timeframe;
value += " ";
value += timeUnits [((multiplier == 1L)? 0: (multiplier == 60L)? 1 : (multiplier == 3600L)? 2 : 3)];
//value += " ";
//value += LocaleController.getString(".", R.string.settings_smart_notify_end);
}
textCell.setTextAndValue(LocaleController.getString("Smart Notification", R.string.SmartNotification), value, true);
}
//
} else if (type == 1) {
if (view == null) {
view = new TextColorCell(mContext);

View File

@ -341,6 +341,30 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
if (user.photo != null && user.photo.photo_big != null) {
PhotoViewer.getInstance().setParentActivity(getParentActivity());
PhotoViewer.getInstance().openPhoto(user.photo.photo_big, SettingsActivity.this);
} else{
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
CharSequence[] items;
boolean fullMenu = false;
if (user.photo != null && user.photo.photo_big != null && !(user.photo instanceof TLRPC.TL_userProfilePhotoEmpty)) {
items = new CharSequence[] {LocaleController.getString("FromCamera", R.string.FromCamera), LocaleController.getString("FromGalley", R.string.FromGalley), LocaleController.getString("DeletePhoto", R.string.DeletePhoto)};
fullMenu = true;
} else {
items = new CharSequence[] {LocaleController.getString("FromCamera", R.string.FromCamera), LocaleController.getString("FromGalley", R.string.FromGalley)};
}
builder.setItems(items, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
if (i == 0) {
avatarUpdater.openCamera();
} else if (i == 1) {
avatarUpdater.openGallery();
} else if (i == 2) {
MessagesController.getInstance().deleteUserPhoto(null);
}
}
});
showAlertDialog(builder);
}
}
});

View File

@ -62,6 +62,7 @@ public class ThemingActivity extends BaseFragment {
private int chatsRow;
private int chatRow;
private int contactsRow;
private int drawerRow;
private int themesSectionRow;
private int themesSection2Row;
@ -86,6 +87,7 @@ public class ThemingActivity extends BaseFragment {
chatsRow = rowCount++;
chatRow = rowCount++;
contactsRow = rowCount++;
drawerRow = rowCount++;
themesSectionRow = rowCount++;
themesSection2Row = rowCount++;
@ -311,6 +313,8 @@ public class ThemingActivity extends BaseFragment {
presentFragment(new ThemingChatActivity());
} else if (i == contactsRow) {
presentFragment(new ThemingContactsActivity());
} else if (i == drawerRow) {
presentFragment(new ThemingDrawerActivity());
}
}
});
@ -411,7 +415,7 @@ public class ThemingActivity extends BaseFragment {
editor.putInt("chatsHeaderColor", i);
editor.putInt("chatsCountBGColor", i);
editor.putInt("chatsChecksColor", i);
editor.putInt("chatsParticipantColor", AndroidUtilities.setDarkColor(i, 0x15));
editor.putInt("chatsMemberColor", AndroidUtilities.setDarkColor(i, 0x15));
editor.putInt("chatsFloatingBGColor", i);
editor.putInt("chatHeaderColor", i);
@ -421,6 +425,7 @@ public class ThemingActivity extends BaseFragment {
editor.putInt("chatEmojiViewTabColor", AndroidUtilities.setDarkColor(i, 0x15));
editor.putInt("chatChecksColor", i);
editor.putInt("chatSendIconColor", i);
editor.putInt("chatMemberColor", AndroidUtilities.setDarkColor(i, 0x15));
editor.putInt("contactsHeaderColor", i);
editor.putInt("contactsOnlineColor", AndroidUtilities.setDarkColor(i, 0x15));
@ -478,7 +483,7 @@ public class ThemingActivity extends BaseFragment {
@Override
public boolean isEnabled(int i) {
return i == themeColorRow || i == chatsRow || i == chatRow || i == contactsRow || i == resetThemeRow || i == saveThemeRow || i == applyThemeRow;
return i == themeColorRow || i == chatsRow || i == chatRow || i == contactsRow || i == drawerRow || i == resetThemeRow || i == saveThemeRow || i == applyThemeRow;
}
@Override
@ -533,6 +538,8 @@ public class ThemingActivity extends BaseFragment {
textCell.setText(LocaleController.getString("ChatScreen", R.string.ChatScreen), true);
} else if (i == contactsRow) {
textCell.setText(LocaleController.getString("ContactsScreen", R.string.ContactsScreen), true);
} else if (i == drawerRow) {
textCell.setText(LocaleController.getString("NavigationDrawer", R.string.NavigationDrawer), true);
}
}

View File

@ -33,6 +33,7 @@ import org.telegram.ui.ActionBar.BaseFragment;
import org.telegram.ui.Adapters.BaseFragmentAdapter;
import org.telegram.ui.Cells.HeaderCell;
import org.telegram.ui.Cells.ShadowSectionCell;
import org.telegram.ui.Cells.TextCheckCell;
import org.telegram.ui.Cells.TextColorCell;
import org.telegram.ui.Cells.TextSettingsCell;
import org.telegram.ui.Components.AvatarDrawable;
@ -46,9 +47,8 @@ public class ThemingChatActivity extends BaseFragment {
private ListView listView;
private ListAdapter listAdapter;
private static final String TAG = "ThemingChatsActivity";
private int headerSection2Row;
private int muteColorRow;
private int headerColorRow;
private int rowsSectionRow;
private int rowsSection2Row;
@ -71,9 +71,13 @@ public class ThemingChatActivity extends BaseFragment {
private int editTextColorRow;
private int editTextSizeRow;
private int editTextBGColorRow;
private int editTextIconsColorRow;
private int emojiViewBGColorRow;
private int emojiViewTabColorRow;
private int sendColorRow;
private int memberColorCheckRow;
private int memberColorRow;
private int forwardNameColorRow;
private int rowCount;
@ -86,6 +90,7 @@ public class ThemingChatActivity extends BaseFragment {
rowCount = 0;
headerSection2Row = rowCount++;
headerColorRow = rowCount++;
//muteColorRow = rowCount++;
nameSizeRow = rowCount++;
nameColorRow = rowCount++;
@ -97,7 +102,7 @@ public class ThemingChatActivity extends BaseFragment {
textSizeRow = rowCount++;
rTextColorRow = rowCount++;
//lTextColorRow = rowCount++;
lTextColorRow = rowCount++;
timeSizeRow = rowCount++;
rTimeColorRow = rowCount++;
@ -111,10 +116,15 @@ public class ThemingChatActivity extends BaseFragment {
lBubbleColorRow = rowCount++;
dateBubbleColorRow = rowCount++;
memberColorCheckRow = rowCount++;
memberColorRow = rowCount++;
forwardNameColorRow = rowCount++;
sendColorRow = rowCount++;
editTextSizeRow = rowCount++;
editTextColorRow = rowCount++;
editTextBGColorRow = rowCount++;
editTextIconsColorRow = rowCount++;
emojiViewBGColorRow = rowCount++;
emojiViewTabColorRow = rowCount++;
@ -172,6 +182,7 @@ public class ThemingChatActivity extends BaseFragment {
public void onItemClick(AdapterView<?> adapterView, View view, final int i, long l) {
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
final String key = view.getTag() != null ? view.getTag().toString() : "";
if (i == headerColorRow) {
if (getParentActivity() == null) {
@ -180,7 +191,7 @@ public class ThemingChatActivity extends BaseFragment {
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
@ -190,6 +201,59 @@ public class ThemingChatActivity extends BaseFragment {
},themePrefs.getInt("chatHeaderColor", AndroidUtilities.getIntColor("themeColor")), CENTER, 0, false);
colorDialog.show();
} else if (i == memberColorCheckRow) {
boolean b = themePrefs.getBoolean( key, true);
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 == memberColorRow) {
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("chatMemberColor", color);
}
},themePrefs.getInt("chatMemberColor", AndroidUtilities.getIntDarkerColor("themeColor", 0x15)), CENTER, 0, true);
colorDialog.show();
} else if (i == forwardNameColorRow) {
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(key, color);
}
},themePrefs.getInt(key, 0xff4a923c), CENTER, 0, true);
colorDialog.show();
} else if (i == muteColorRow) {
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( key, color);
}
},themePrefs.getInt( key, 0xffffffff), CENTER, 0, true);
colorDialog.show();
} else if (i == rBubbleColorRow) {
if (getParentActivity() == null) {
@ -198,7 +262,7 @@ public class ThemingChatActivity extends BaseFragment {
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
@ -216,7 +280,7 @@ public class ThemingChatActivity extends BaseFragment {
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
@ -231,11 +295,8 @@ public class ThemingChatActivity extends BaseFragment {
if (getParentActivity() == null) {
return;
}
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
public void colorChanged(int color) {
@ -243,7 +304,6 @@ public class ThemingChatActivity extends BaseFragment {
}
},themePrefs.getInt("chatRTextColor", 0xff000000), CENTER, 0, true);
colorDialog.show();
} else if (i == lTextColorRow) {
if (getParentActivity() == null) {
@ -252,7 +312,7 @@ public class ThemingChatActivity extends BaseFragment {
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
@ -270,7 +330,7 @@ public class ThemingChatActivity extends BaseFragment {
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
@ -288,7 +348,7 @@ public class ThemingChatActivity extends BaseFragment {
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
@ -306,7 +366,7 @@ public class ThemingChatActivity extends BaseFragment {
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
@ -324,7 +384,7 @@ public class ThemingChatActivity extends BaseFragment {
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
@ -342,7 +402,7 @@ public class ThemingChatActivity extends BaseFragment {
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
@ -360,7 +420,7 @@ public class ThemingChatActivity extends BaseFragment {
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
@ -378,7 +438,7 @@ public class ThemingChatActivity extends BaseFragment {
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
@ -388,6 +448,21 @@ public class ThemingChatActivity extends BaseFragment {
},themePrefs.getInt("chatEditTextBGColor", 0xffffffff), CENTER, 0, true);
colorDialog.show();
} else if (i == editTextIconsColorRow) {
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( key, color);
}
},themePrefs.getInt( key, 0xffadadad), CENTER, 0, false);
colorDialog.show();
} else if (i == emojiViewBGColorRow) {
if (getParentActivity() == null) {
@ -609,52 +684,59 @@ public class ThemingChatActivity extends BaseFragment {
if (getParentActivity() == null) {
return false;
}
if(view.getTag() != null)resetPref(view.getTag().toString());
if (i == headerColorRow) {
resetInt("chatHeaderColor", AndroidUtilities.getIntColor("themeColor"));
resetPref("chatHeaderColor");
} else if (i == memberColorRow) {
resetPref("chatMemberColor");
} else if (i == rBubbleColorRow) {
resetInt("chatRBubbleColor", AndroidUtilities.getIntDarkerColor("themeColor",-0x80));
resetPref("chatRBubbleColor");
} else if (i == lBubbleColorRow) {
resetInt("chatLBubbleColor", 0xffffffff);
resetPref("chatLBubbleColor");
} else if (i == rTextColorRow) {
resetInt("chatRTextColor", 0xff000000);
resetPref("chatRTextColor");
} else if (i == lTextColorRow) {
resetInt("chatLTextColor", 0xff000000);
resetPref("chatLTextColor");
} else if (i == nameColorRow) {
resetInt("chatNameColor", 0xffffffff);
resetPref("chatNameColor");
} else if (i == nameSizeRow) {
resetInt("chatNameSize", 17);
resetPref("chatNameSize");
} else if (i == statusColorRow) {
resetInt("chatStatusColor", AndroidUtilities.getIntDarkerColor("themeColor",-0x40));
resetPref("chatStatusColor");
} else if (i == statusSizeRow) {
resetInt("chatStatusSize", 14);
resetPref("chatStatusSize");
} else if (i == rTimeColorRow) {
resetInt("chatRTimeColor", AndroidUtilities.getIntDarkerColor("themeColor",0x15));
resetPref("chatRTimeColor");
} else if (i == lTimeColorRow) {
resetInt("chatLTimeColor", 0xffa1aab3);
resetPref("chatLTimeColor");
} else if (i == dateColorRow) {
resetInt("chatDateColor", 0xffffffff);
resetPref("chatDateColor");
} else if (i == checksColorRow) {
resetInt("chatChecksColor", AndroidUtilities.getIntColor("themeColor"));
resetPref("chatChecksColor");
} else if (i == textSizeRow) {
resetInt("chatTextSize", 16);
} else if (i == timeSizeRow) {
resetInt("chatTimeSize", 12);
resetPref("chatTimeSize");
} else if (i == dateSizeRow) {
resetInt("chatDateSize", 16);
resetPref("chatDateSize");
} else if (i == dateBubbleColorRow) {
resetInt("chatDateBubbleColor", 0x59000000);
resetPref("chatDateBubbleColor");
} else if (i == sendColorRow) {
resetInt("chatSendIconColor", AndroidUtilities.getIntColor("themeColor"));
resetPref("chatSendIconColor");
} else if (i == editTextColorRow) {
resetInt("chatEditTextColor", 0xff000000);
resetPref("chatEditTextColor");
} else if (i == editTextSizeRow) {
resetInt("chatEditTextSize", 18);
resetPref("chatEditTextSize");
} else if (i == editTextBGColorRow) {
resetInt("chatEditTextBGColor", 0xffffffff);
resetPref("chatEditTextBGColor");
} else if (i == emojiViewBGColorRow) {
resetInt("chatEmojiViewBGColor", 0xff222222);
resetPref("chatEmojiViewBGColor");
} else if (i == emojiViewTabColorRow) {
resetInt("chatEmojiViewTabColor", AndroidUtilities.getIntDarkerColor("themeColor",0x15));
resetPref("chatEmojiViewTabColor");
} else{
if(view.getTag() != null){
resetPref(view.getTag().toString());
}
}
return true;
}
@ -670,21 +752,25 @@ public class ThemingChatActivity extends BaseFragment {
return fragmentView;
}
private void resetInt(String key, int value){
private void resetPref(String key){
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
SharedPreferences.Editor editor = preferences.edit();
editor.remove(key);
editor.commit();
if (listView != null) {
listView.invalidateViews();
}
}
private void resetInt(String key, int value){
resetPref(key);
if(key.equals("chatTextSize")){
preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
editor = preferences.edit();
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
SharedPreferences.Editor editor = preferences.edit();
editor.putInt("fons_size", value);
MessagesController.getInstance().fontSize = value;
editor.commit();
}
if (listView != null) {
listView.invalidateViews();
}
}
private void commitInt(String key, int value){
@ -744,9 +830,10 @@ public class ThemingChatActivity extends BaseFragment {
@Override
public boolean isEnabled(int i) {
return i == headerColorRow || i == rBubbleColorRow || i == lBubbleColorRow || i == nameColorRow || i == nameSizeRow || i == statusColorRow || i == statusSizeRow ||
return i == headerColorRow || i == muteColorRow || i == rBubbleColorRow || i == lBubbleColorRow || i == nameColorRow || i == nameSizeRow || i == statusColorRow || i == statusSizeRow ||
i == textSizeRow || i == timeSizeRow || i == dateColorRow || i == dateSizeRow || i == dateBubbleColorRow || i == rTextColorRow || i == lTextColorRow ||
i == rTimeColorRow|| i == lTimeColorRow || i == checksColorRow || i == editTextSizeRow || i == editTextColorRow || i == sendColorRow || i == editTextBGColorRow ||
i == rTimeColorRow|| i == lTimeColorRow || i == checksColorRow || i == memberColorCheckRow || AndroidUtilities.getBoolPref("chatMemberColorCheck") && i == memberColorRow || i == forwardNameColorRow ||
i == editTextSizeRow || i == editTextColorRow || i == editTextIconsColorRow || i == sendColorRow || i == editTextBGColorRow ||
i == emojiViewBGColorRow || i == emojiViewTabColorRow;
}
@ -814,6 +901,15 @@ public class ThemingChatActivity extends BaseFragment {
int size = themePrefs.getInt("chatEditTextSize", AndroidUtilities.isTablet() ? 20 : 18);
textCell.setTextAndValue(LocaleController.getString("EditTextSize", R.string.EditTextSize), String.format("%d", size), true);
}
} else if (type == 4) {
if (view == null) {
view = new TextCheckCell(mContext);
}
TextCheckCell textCell = (TextCheckCell) view;
if (i == memberColorCheckRow) {
textCell.setTag("chatMemberColorCheck");
textCell.setTextAndCheck(LocaleController.getString("SetMemberColor", R.string.SetMemberColor), themePrefs.getBoolean("chatMemberColorCheck", false), false);
}
}
else if (type == 3){
if (view == null) {
@ -824,6 +920,14 @@ public class ThemingChatActivity extends BaseFragment {
if (i == headerColorRow) {
textCell.setTextAndColor(LocaleController.getString("HeaderColor", R.string.HeaderColor), themePrefs.getInt("chatHeaderColor", AndroidUtilities.getIntColor("themeColor")), true);
} else if (i == memberColorRow) {
textCell.setTextAndColor(LocaleController.getString("MemberColor", R.string.MemberColor), AndroidUtilities.getBoolPref("chatMemberColorCheck") ? themePrefs.getInt("chatMemberColor", AndroidUtilities.getIntDarkerColor("themeColor", 0x15)) : 0x00000000, true);
} else if (i == forwardNameColorRow) {
textCell.setTag("chatForwardColor");
textCell.setTextAndColor(LocaleController.getString("ForwardNameColor", R.string.ForwardNameColor), themePrefs.getInt("chatForwardColor", 0xff4a923c), true);
} else if (i == muteColorRow) {
textCell.setTag("chatMuteColor");
textCell.setTextAndColor(LocaleController.getString("MuteColor", R.string.MuteColor), themePrefs.getInt("chatMuteColor", 0xffffffff), true);
} else if (i == rBubbleColorRow) {
textCell.setTextAndColor(LocaleController.getString("RBubbleColor", R.string.RBubbleColor), themePrefs.getInt("chatRBubbleColor", AndroidUtilities.getIntDarkerColor("themeColor",-0x80)), true);
} else if (i == lBubbleColorRow) {
@ -852,6 +956,9 @@ public class ThemingChatActivity extends BaseFragment {
textCell.setTextAndColor(LocaleController.getString("EditTextColor", R.string.EditTextColor), themePrefs.getInt("chatEditTextColor", 0xff000000), true);
} else if (i == editTextBGColorRow) {
textCell.setTextAndColor(LocaleController.getString("EditTextBGColor", R.string.EditTextBGColor), themePrefs.getInt("chatEditTextBGColor", 0xffffffff), true);
} else if (i == editTextIconsColorRow) {
textCell.setTag("chatEditTextIconsColor");
textCell.setTextAndColor(LocaleController.getString("EditTextIconsColor", R.string.EditTextIconsColor), themePrefs.getInt("chatEditTextIconsColor", 0xffadadad), true);
} else if (i == emojiViewBGColorRow) {
textCell.setTextAndColor(LocaleController.getString("EmojiViewBGColor", R.string.EmojiViewBGColor), themePrefs.getInt("chatEmojiViewBGColor", 0xff222222), true);
} else if (i == emojiViewTabColorRow) {
@ -873,10 +980,14 @@ public class ThemingChatActivity extends BaseFragment {
return 2;
}
else if ( i == headerColorRow || i == rBubbleColorRow || i == lBubbleColorRow || i == nameColorRow || i == statusColorRow || i == dateColorRow || i == dateBubbleColorRow ||
i == rTextColorRow || i == lTextColorRow || i == rTimeColorRow || i == lTimeColorRow || i == checksColorRow || i == sendColorRow || i == editTextColorRow || i == editTextBGColorRow ||
else if ( i == headerColorRow || i == muteColorRow ||
i == rBubbleColorRow || i == lBubbleColorRow || i == nameColorRow || i == statusColorRow || i == dateColorRow || i == dateBubbleColorRow ||
i == rTextColorRow || i == lTextColorRow || i == rTimeColorRow || i == lTimeColorRow || i == checksColorRow || i == memberColorRow || i == forwardNameColorRow ||
i == sendColorRow || i == editTextColorRow || i == editTextBGColorRow || i == editTextIconsColorRow ||
i == emojiViewBGColorRow || i == emojiViewTabColorRow) {
return 3;
} else if (i == memberColorCheckRow) {
return 4;
}
else {
return 2;
@ -885,7 +996,7 @@ public class ThemingChatActivity extends BaseFragment {
@Override
public int getViewTypeCount() {
return 4;
return 5;
}
@Override

View File

@ -22,6 +22,7 @@ import android.view.ViewTreeObserver;
import android.widget.AdapterView;
import android.widget.FrameLayout;
import android.widget.ListView;
import android.widget.Toast;
import org.telegram.android.AndroidUtilities;
import org.telegram.android.LocaleController;
@ -32,6 +33,7 @@ import org.telegram.ui.ActionBar.BaseFragment;
import org.telegram.ui.Adapters.BaseFragmentAdapter;
import org.telegram.ui.Cells.HeaderCell;
import org.telegram.ui.Cells.ShadowSectionCell;
import org.telegram.ui.Cells.TextCheckCell;
import org.telegram.ui.Cells.TextColorCell;
import org.telegram.ui.Cells.TextSettingsCell;
import org.telegram.ui.Components.AvatarDrawable;
@ -45,19 +47,23 @@ public class ThemingChatsActivity extends BaseFragment {
private ListView listView;
private ListAdapter listAdapter;
//private static final String TAG = "ThemingChatsActivity";
private int headerSection2Row;
private int headerColorRow;
private int headerTitleColorRow;
private int headerIconsColorRow;
private int rowsSectionRow;
private int rowsSection2Row;
private int rowColorRow;
private int dividerColorRow;
private int usernameTitleRow;
private int nameSizeRow;
private int nameColorRow;
private int checksColorRow;
private int muteColorRow;
private int nameSizeRow;
private int avatarRadiusRow;
private int messageColorRow;
private int participantColorRow;
private int memberColorRow;
private int typingColorRow;
private int messageSizeRow;
private int timeColorRow;
private int timeSizeRow;
@ -78,11 +84,16 @@ public class ThemingChatsActivity extends BaseFragment {
rowCount = 0;
headerSection2Row = rowCount++;
headerColorRow = rowCount++;
headerTitleColorRow = rowCount++;
usernameTitleRow = rowCount++;
headerIconsColorRow = rowCount++;
rowsSectionRow = rowCount++;
rowsSection2Row = rowCount++;
rowColorRow = rowCount++;
dividerColorRow = rowCount++;
//avatarRadiusRow = rowCount++;
nameColorRow = rowCount++;
nameSizeRow = rowCount++;
muteColorRow = rowCount++;
@ -90,7 +101,8 @@ public class ThemingChatsActivity extends BaseFragment {
messageColorRow = rowCount++;
messageSizeRow = rowCount++;
participantColorRow = rowCount++;
memberColorRow = rowCount++;
typingColorRow = rowCount++;
timeColorRow = rowCount++;
timeSizeRow = rowCount++;
countColorRow = rowCount++;
@ -153,43 +165,84 @@ public class ThemingChatsActivity extends BaseFragment {
public void onItemClick(AdapterView<?> adapterView, View view, final int i, long l) {
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
final String key = view.getTag().toString();
if (i == headerColorRow) {
if (getParentActivity() == null) {
return;
}
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
public void colorChanged(int color) {
commitInt("chatsHeaderColor", color);
commitInt( key, color);
}
},themePrefs.getInt("chatsHeaderColor", AndroidUtilities.getIntColor("themeColor")), CENTER, 0, false);
},themePrefs.getInt( key, AndroidUtilities.getIntColor("themeColor")), CENTER, 0, false);
colorDialog.show();
} else if (i == headerTitleColorRow) {
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( key, color);
}
},themePrefs.getInt( key, 0xffffffff), CENTER, 0, false);
colorDialog.show();
} else if (i == headerIconsColorRow) {
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( key, color);
}
},themePrefs.getInt( key, 0xffffffff), CENTER, 0, false);
colorDialog.show();
} else if (i == rowColorRow) {
if (getParentActivity() == null) {
return;
}
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
public void colorChanged(int color) {
commitInt("chatsRowColor", color);
commitInt( key, color);
}
},themePrefs.getInt("chatsRowColor", 0xffffffff), CENTER, 0, false);
},themePrefs.getInt( key, 0xffffffff), CENTER, 0, false);
colorDialog.show();
} else if (i == dividerColorRow) {
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( key, color);
}
},themePrefs.getInt( key, 0xffdcdcdc), CENTER, 0, false);
colorDialog.show();
} else if (i == usernameTitleRow) {
boolean b = themePrefs.getBoolean( key, true);
SharedPreferences.Editor editor = themePrefs.edit();
editor.putBoolean( key, !b);
editor.commit();
if (view instanceof TextCheckCell) {
((TextCheckCell) view).setChecked(!b);
}
} else if (i == nameColorRow) {
if (getParentActivity() == null) {
return;
@ -197,15 +250,15 @@ public class ThemingChatsActivity extends BaseFragment {
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
public void colorChanged(int color) {
commitInt("chatsNameColor", color);
commitInt( key, color);
}
},themePrefs.getInt("chatsNameColor", 0xff000000), CENTER, 0, false);
},themePrefs.getInt( key, 0xff000000), CENTER, 0, false);
colorDialog.show();
} else if (i == muteColorRow) {
@ -213,57 +266,72 @@ public class ThemingChatsActivity extends BaseFragment {
return;
}
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
public void colorChanged(int color) {
commitInt("chatsMuteColor", color);
commitInt( key, color);
}
},themePrefs.getInt("chatsMuteColor", 0xffa8a8a8), CENTER, 0, true);
},themePrefs.getInt( key, 0xffa8a8a8), CENTER, 0, true);
colorDialog.show();
} else if (i == checksColorRow) {
if (getParentActivity() == null) {
return;
}
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
public void colorChanged(int color) {
commitInt("chatsChecksColor", color);
commitInt( key, color);
}
},themePrefs.getInt("chatsChecksColor", AndroidUtilities.getIntColor("themeColor")), CENTER, 0, true);
},themePrefs.getInt( key, AndroidUtilities.getIntColor("themeColor")), CENTER, 0, true);
colorDialog.show();
} else if (i == messageColorRow) {
if (getParentActivity() == null) {
return;
}
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
public void colorChanged(int color) {
commitInt("chatsMessageColor", color);
commitInt( key, color);
}
},themePrefs.getInt("chatsMessageColor", 0xff8f8f8f), CENTER, 0, false);
},themePrefs.getInt( key, 0xff8f8f8f), CENTER, 0, false);
colorDialog.show();
} else if (i == participantColorRow) {
} else if (i == memberColorRow) {
if (getParentActivity() == null) {
return;
}
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
public void colorChanged(int color) {
commitInt("chatsParticipantColor", color);
commitInt( key, color);
}
},themePrefs.getInt("chatsParticipantColor", AndroidUtilities.getIntDarkerColor("themeColor",0x15)), CENTER, 0, false);
},themePrefs.getInt( key, AndroidUtilities.getIntDarkerColor("themeColor",0x15)), 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( key, color);
}
},themePrefs.getInt( key, AndroidUtilities.getIntColor("themeColor")), CENTER, 0, false);
colorDialog.show();
} else if (i == timeColorRow) {
@ -271,43 +339,64 @@ public class ThemingChatsActivity extends BaseFragment {
return;
}
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
public void colorChanged(int color) {
commitInt("chatsTimeColor", color);
commitInt( key, color);
}
},themePrefs.getInt("chatsTimeColor", 0xff999999), CENTER, 0, false);
},themePrefs.getInt( key, 0xff999999), CENTER, 0, false);
colorDialog.show();
} else if (i == countColorRow) {
if (getParentActivity() == null) {
return;
}
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
public void colorChanged(int color) {
commitInt("chatsCountColor", color);
commitInt( key, color);
}
},themePrefs.getInt("chatsCountColor", 0xffffffff), CENTER, 0, false);
},themePrefs.getInt( key, 0xffffffff), CENTER, 0, false);
colorDialog.show();
} else if (i == countBGColorRow) {
if (getParentActivity() == null) {
return;
}
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
public void colorChanged(int color) {
commitInt("chatsCountBGColor", color);
commitInt( key, color);
}
},themePrefs.getInt("chatsCountBGColor", AndroidUtilities.getIntColor("themeColor")), CENTER, 0, true);
},themePrefs.getInt( key, AndroidUtilities.getIntColor("themeColor")), CENTER, 0, true);
colorDialog.show();
} else if (i == avatarRadiusRow) {
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(0);
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());
}
}
});
showAlertDialog(builder);
} else if (i == nameSizeRow) {
if (getParentActivity() == null) {
return;
@ -315,7 +404,7 @@ public class ThemingChatsActivity extends BaseFragment {
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("NameSize", R.string.NameSize));
final NumberPicker numberPicker = new NumberPicker(getParentActivity());
final int currentValue = themePrefs.getInt("chatsNameSize", 17);
final int currentValue = themePrefs.getInt( key, 17);
numberPicker.setMinValue(12);
numberPicker.setMaxValue(30);
numberPicker.setValue(currentValue);
@ -324,7 +413,7 @@ public class ThemingChatsActivity extends BaseFragment {
@Override
public void onClick(DialogInterface dialog, int which) {
if (numberPicker.getValue() != currentValue) {
commitInt("chatsNameSize", numberPicker.getValue());
commitInt( key, numberPicker.getValue());
}
}
});
@ -336,7 +425,7 @@ public class ThemingChatsActivity extends BaseFragment {
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("MessageSize", R.string.MessageSize));
final NumberPicker numberPicker = new NumberPicker(getParentActivity());
final int currentValue = themePrefs.getInt("chatsMessageSize", 16);
final int currentValue = themePrefs.getInt( key, 16);
numberPicker.setMinValue(12);
numberPicker.setMaxValue(30);
numberPicker.setValue(currentValue);
@ -345,7 +434,7 @@ public class ThemingChatsActivity extends BaseFragment {
@Override
public void onClick(DialogInterface dialog, int which) {
if(numberPicker.getValue() != currentValue){
commitInt("chatsMessageSize", numberPicker.getValue());
commitInt( key, numberPicker.getValue());
}
}
});
@ -357,7 +446,7 @@ public class ThemingChatsActivity extends BaseFragment {
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("TimeDateSize", R.string.TimeDateSize));
final NumberPicker numberPicker = new NumberPicker(getParentActivity());
final int currentValue = themePrefs.getInt("chatsTimeSize", 13);
final int currentValue = themePrefs.getInt( key, 13);
numberPicker.setMinValue(5);
numberPicker.setMaxValue(25);
numberPicker.setValue(currentValue);
@ -366,7 +455,7 @@ public class ThemingChatsActivity extends BaseFragment {
@Override
public void onClick(DialogInterface dialog, int which) {
if (numberPicker.getValue() != currentValue) {
commitInt("chatsTimeSize", numberPicker.getValue());
commitInt( key, numberPicker.getValue());
}
}
});
@ -378,7 +467,7 @@ public class ThemingChatsActivity extends BaseFragment {
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("CountSize", R.string.CountSize));
final NumberPicker numberPicker = new NumberPicker(getParentActivity());
final int currentValue = themePrefs.getInt("chatsCountSize", 13);
final int currentValue = themePrefs.getInt( key, 13);
numberPicker.setMinValue(8);
numberPicker.setMaxValue(20);
numberPicker.setValue(currentValue);
@ -387,7 +476,7 @@ public class ThemingChatsActivity extends BaseFragment {
@Override
public void onClick(DialogInterface dialog, int which) {
if (numberPicker.getValue() != currentValue) {
commitInt("chatsCountSize", numberPicker.getValue());
commitInt( key, numberPicker.getValue());
}
}
});
@ -397,28 +486,28 @@ public class ThemingChatsActivity extends BaseFragment {
return;
}
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
public void colorChanged(int color) {
commitInt("chatsFloatingPencilColor", color);
commitInt( key, color);
}
},themePrefs.getInt("chatsFloatingPencilColor", 0xffffffff), CENTER, 0, true);
},themePrefs.getInt( key, 0xffffffff), CENTER, 0, true);
colorDialog.show();
} else if (i == floatingBGColorRow) {
if (getParentActivity() == null) {
return;
}
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.colordialog, null, false);
li.inflate(R.layout.colordialog, null, false);
ColorSelectorDialog colorDialog = new ColorSelectorDialog(getParentActivity(), new OnColorChangedListener() {
@Override
public void colorChanged(int color) {
commitInt("chatsFloatingBGColor", color);
commitInt( key, color);
}
},themePrefs.getInt("chatsFloatingBGColor", AndroidUtilities.getIntColor("themeColor")), CENTER, 0, true);
},themePrefs.getInt( key, AndroidUtilities.getIntColor("themeColor")), CENTER, 0, true);
colorDialog.show();
}
}
@ -430,39 +519,7 @@ public class ThemingChatsActivity extends BaseFragment {
if (getParentActivity() == null) {
return false;
}
if (i == headerColorRow) {
resetInt("chatsHeaderColor", AndroidUtilities.getIntColor("themeColor"));
} else if (i == rowColorRow) {
resetInt("chatsRowColor", 0xffffffff);
} else if (i == nameColorRow) {
resetInt("chatsNameColor", 0xff000000);
} else if (i == muteColorRow) {
resetInt("chatsMuteColor", 0xffa8a8a8);
} else if (i == checksColorRow) {
resetInt("chatsChecksColor", AndroidUtilities.getIntColor("themeColor"));
} else if (i == nameSizeRow) {
resetInt("chatsNameSize", 17);
} else if (i == messageColorRow) {
resetInt("chatsMessageColor", 0xff8f8f8f);
} else if (i == participantColorRow) {
resetInt("chatsParticipantColor", AndroidUtilities.getIntDarkerColor("themeColor",0x15));
} else if (i == messageSizeRow) {
resetInt("chatsMessageSize", 16);
} else if (i == timeColorRow) {
resetInt("chatsTimeColor", 0xff999999);
} else if (i == timeSizeRow) {
resetInt("chatsTimeSize", 13);
} else if (i == countColorRow) {
resetInt("chatsCountColor", 0xffffffff);
} else if (i == countSizeRow) {
resetInt("chatsCountSize", 13);
} else if (i == countBGColorRow) {
resetInt("chatsCountBGColor", AndroidUtilities.getIntColor("themeColor"));
} else if (i == floatingPencilColorRow) {
resetInt("chatsFloatingPencilColor", 0xffffffff);
} else if (i == floatingBGColorRow) {
resetInt("chatsFloatingBGColor", AndroidUtilities.getIntColor("themeColor"));
}
resetPref(view.getTag().toString());
return true;
}
});
@ -477,10 +534,10 @@ public class ThemingChatsActivity extends BaseFragment {
return fragmentView;
}
private void resetInt(String key, int value){
private void resetPref(String key){
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
SharedPreferences.Editor editor = preferences.edit();
editor.remove(key);
if(key != null)editor.remove(key);
editor.commit();
if (listView != null) {
listView.invalidateViews();
@ -544,7 +601,9 @@ public class ThemingChatsActivity extends BaseFragment {
@Override
public boolean isEnabled(int i) {
return i == headerColorRow || i == rowColorRow || i == nameColorRow || i == muteColorRow || i == checksColorRow || i == nameSizeRow || i == messageColorRow || i == participantColorRow || i == messageSizeRow ||
return i == headerColorRow || i == headerTitleColorRow || i == headerIconsColorRow || i == usernameTitleRow ||
i == rowColorRow || i == dividerColorRow || i == avatarRadiusRow ||
i == nameColorRow || i == muteColorRow || i == checksColorRow || i == nameSizeRow || i == messageColorRow || i == memberColorRow || i == typingColorRow || i == messageSizeRow ||
i == timeColorRow || i == timeSizeRow || i == countColorRow || i == countSizeRow || i == countBGColorRow || i == floatingPencilColorRow || i == floatingBGColorRow;
}
@ -576,8 +635,7 @@ public class ThemingChatsActivity extends BaseFragment {
if (view == null) {
view = new ShadowSectionCell(mContext);
}
}
else if (type == 1) {
} else if (type == 1) {
if (view == null) {
view = new HeaderCell(mContext);
view.setBackgroundColor(0xffffffff);
@ -587,28 +645,34 @@ public class ThemingChatsActivity extends BaseFragment {
} else if (i == rowsSection2Row) {
((HeaderCell) view).setText(LocaleController.getString("ChatsList", R.string.ChatsList));
}
}
else if (type == 2) {
} else if (type == 2) {
if (view == null) {
view = new TextSettingsCell(mContext);
}
TextSettingsCell textCell = (TextSettingsCell) view;
if (i == nameSizeRow) {
if (i == avatarRadiusRow) {
textCell.setTag("chatsAvatarRadius");
int size = themePrefs.getInt("chatsAvatarRadius", AndroidUtilities.isTablet() ? 35 : 32);
textCell.setTextAndValue(LocaleController.getString("AvatarRadius", R.string.AvatarRadius), String.format("%d", size), true);
} else if (i == nameSizeRow) {
textCell.setTag("chatsNameSize");
int size = themePrefs.getInt("chatsNameSize", AndroidUtilities.isTablet() ? 19 : 17);
textCell.setTextAndValue(LocaleController.getString("NameSize", R.string.NameSize), String.format("%d", size), true);
} else if (i == messageSizeRow) {
textCell.setTag("chatsMessageSize");
int size = themePrefs.getInt("chatsMessageSize", AndroidUtilities.isTablet() ? 18 : 16);
textCell.setTextAndValue(LocaleController.getString("MessageSize", R.string.MessageSize), String.format("%d", size), true);
} else if (i == timeSizeRow) {
textCell.setTag("chatsTimeSize");
int size = themePrefs.getInt("chatsTimeSize", AndroidUtilities.isTablet() ? 15 : 13);
textCell.setTextAndValue(LocaleController.getString("TimeDateSize", R.string.TimeDateSize), String.format("%d", size), true);
} else if (i == countSizeRow) {
textCell.setTag("chatsCountSize");
int size = themePrefs.getInt("chatsCountSize", AndroidUtilities.isTablet() ? 15 : 13);
textCell.setTextAndValue(LocaleController.getString("CountSize", R.string.CountSize), String.format("%d", size), true);
}
}
else if (type == 3){
} else if (type == 3){
if (view == null) {
view = new TextColorCell(mContext);
}
@ -616,30 +680,64 @@ public class ThemingChatsActivity extends BaseFragment {
TextColorCell textCell = (TextColorCell) view;
if (i == headerColorRow) {
textCell.setTag("chatsHeaderColor");
textCell.setTextAndColor(LocaleController.getString("HeaderColor", R.string.HeaderColor), themePrefs.getInt("chatsHeaderColor", AndroidUtilities.getIntColor("themeColor")), true);
} else if (i == headerTitleColorRow) {
textCell.setTag("chatsHeaderTitleColor");
textCell.setTextAndColor(LocaleController.getString("HeaderTitleColor", R.string.HeaderTitleColor), themePrefs.getInt(textCell.getTag().toString(), 0xffffffff), true);
} else if (i == headerIconsColorRow) {
textCell.setTag("chatsHeaderIconsColor");
textCell.setTextAndColor(LocaleController.getString("HeaderTitleColor", R.string.HeaderIconsColor), themePrefs.getInt(textCell.getTag().toString(), 0xffffffff), true);
} else if (i == rowColorRow) {
textCell.setTag("chatsRowColor");
textCell.setTextAndColor(LocaleController.getString("RowColor", R.string.RowColor), themePrefs.getInt("chatsRowColor", 0xffffffff), true);
} else if (i == dividerColorRow) {
textCell.setTag("chatsDividerColor");
textCell.setTextAndColor(LocaleController.getString("DividerColor", R.string.DividerColor), themePrefs.getInt("chatsDividerColor", 0xffdcdcdc), true);
} else if (i == nameColorRow) {
textCell.setTag("chatsNameColor");
textCell.setTextAndColor(LocaleController.getString("NameColor", R.string.NameColor), themePrefs.getInt("chatsNameColor", 0xff000000), true);
} else if (i == muteColorRow) {
textCell.setTag("chatsMuteColor");
textCell.setTextAndColor(LocaleController.getString("MuteColor", R.string.MuteColor), themePrefs.getInt("chatsMuteColor", 0xffa8a8a8), true);
} else if (i == checksColorRow) {
textCell.setTag("chatsChecksColor");
textCell.setTextAndColor(LocaleController.getString("ChecksColor", R.string.ChecksColor), themePrefs.getInt("chatsChecksColor", AndroidUtilities.getIntColor("themeColor")), true);
} else if (i == messageColorRow) {
textCell.setTag("chatsMessageColor");
textCell.setTextAndColor(LocaleController.getString("MessageColor", R.string.MessageColor), themePrefs.getInt("chatsMessageColor", 0xff8f8f8f), true);
} else if (i == participantColorRow) {
textCell.setTextAndColor(LocaleController.getString("ParticipantColor", R.string.ParticipantColor), themePrefs.getInt("chatsParticipantColor", AndroidUtilities.getIntDarkerColor("themeColor",0x15)), true);
} else if (i == memberColorRow) {
textCell.setTag("chatsMemberColor");
textCell.setTextAndColor(LocaleController.getString("MemberColor", R.string.MemberColor), themePrefs.getInt("chatsMemberColor", AndroidUtilities.getIntDarkerColor("themeColor",0x15)), true);
} else if (i == typingColorRow) {
textCell.setTag("chatsTypingColor");
textCell.setTextAndColor(LocaleController.getString("TypingColor", R.string.TypingColor), themePrefs.getInt(textCell.getTag().toString(), AndroidUtilities.getIntColor("themeColor")), true);
} else if (i == timeColorRow) {
textCell.setTag("chatsTimeColor");
textCell.setTextAndColor(LocaleController.getString("TimeDateColor", R.string.TimeDateColor), themePrefs.getInt("chatsTimeColor", 0xff999999), true);
} else if (i == countColorRow) {
textCell.setTag("chatsCountColor");
textCell.setTextAndColor(LocaleController.getString("CountColor", R.string.CountColor), themePrefs.getInt("chatsCountColor", 0xffffffff), true);
} else if (i == countBGColorRow) {
textCell.setTag("chatsCountBGColor");
textCell.setTextAndColor(LocaleController.getString("CountBGColor", R.string.CountBGColor), themePrefs.getInt("chatsCountBGColor", AndroidUtilities.getIntColor("themeColor")), true);
} else if (i == floatingPencilColorRow) {
textCell.setTag("chatsFloatingPencilColor");
textCell.setTextAndColor(LocaleController.getString("FloatingPencilColor", R.string.FloatingPencilColor), themePrefs.getInt("chatsFloatingPencilColor", 0xffffffff), true);
} else if (i == floatingBGColorRow) {
textCell.setTag("chatsFloatingBGColor");
textCell.setTextAndColor(LocaleController.getString("FloatingBGColor", R.string.FloatingBGColor), themePrefs.getInt("chatsFloatingBGColor", AndroidUtilities.getIntColor("themeColor")), true);
}
} else if (type == 4) {
if (view == null) {
view = new TextCheckCell(mContext);
}
TextCheckCell textCell = (TextCheckCell) view;
if (i == usernameTitleRow) {
textCell.setTag("chatsUsernameTitle");
textCell.setTextAndCheck(LocaleController.getString("UsernameTitle", R.string.UsernameTitle), themePrefs.getBoolean("chatsUsernameTitle", false), false);
}
}
return view;
}
@ -648,26 +746,24 @@ public class ThemingChatsActivity extends BaseFragment {
public int getItemViewType(int i) {
if ( i == rowsSectionRow ) {
return 0;
}
else if ( i == headerSection2Row || i == rowsSection2Row ) {
} else if ( i == headerSection2Row || i == rowsSection2Row ) {
return 1;
}
else if ( i == nameSizeRow || i == messageSizeRow || i == timeSizeRow || i == countSizeRow ) {
} else if ( i == avatarRadiusRow || i == nameSizeRow || i == messageSizeRow || i == timeSizeRow || i == countSizeRow ) {
return 2;
}
else if ( i == headerColorRow || i == rowColorRow || i == nameColorRow || i == muteColorRow || i == checksColorRow || i == messageColorRow || i == participantColorRow || i == timeColorRow || i == countColorRow
|| i == countBGColorRow || i == floatingPencilColorRow || i == floatingBGColorRow) {
} else if ( i == headerColorRow || i == headerTitleColorRow || i == headerIconsColorRow ||
i == rowColorRow || i == dividerColorRow || i == nameColorRow || i == muteColorRow || i == checksColorRow || i == messageColorRow || i == memberColorRow || i == typingColorRow || i == timeColorRow || i == countColorRow ||
i == countBGColorRow || i == floatingPencilColorRow || i == floatingBGColorRow) {
return 3;
}
else {
} else if (i == usernameTitleRow) {
return 4;
} else {
return 2;
}
}
@Override
public int getViewTypeCount() {
return 4;
return 5;
}
@Override

View File

@ -45,20 +45,18 @@ public class ThemingContactsActivity extends BaseFragment {
private ListView listView;
private ListAdapter listAdapter;
//private static final String TAG = "ThemingContactsActivity";
private int headerSection2Row;
private int headerColorRow;
private int rowsSectionRow;
private int rowsSection2Row;
private int rowColorRow;
private int avatarRadiusRow;
private int nameColorRow;
private int nameSizeRow;
private int statusColorRow;
private int statusSizeRow;
private int onlineColorRow;
private int rowCount;
public final static int CENTER = 0;
@ -74,6 +72,7 @@ public class ThemingContactsActivity extends BaseFragment {
rowsSectionRow = rowCount++;
rowsSection2Row = rowCount++;
rowColorRow = rowCount++;
//avatarRadiusRow = rowCount++;
nameColorRow = rowCount++;
nameSizeRow = rowCount++;
statusColorRow = rowCount++;
@ -99,7 +98,7 @@ public class ThemingContactsActivity extends BaseFragment {
if (AndroidUtilities.isTablet()) {
actionBar.setOccupyStatusBar(false);
}
actionBar.setTitle(LocaleController.getString("MainScreen", R.string.MainScreen));
actionBar.setTitle(LocaleController.getString("ContactsScreen", R.string.ContactsScreen));
actionBar.setActionBarMenuOnItemClick(new ActionBar.ActionBarMenuOnItemClick() {
@Override
@ -217,6 +216,27 @@ public class ThemingContactsActivity extends BaseFragment {
},themePrefs.getInt("contactsOnlineColor", AndroidUtilities.getIntDarkerColor("themeColor",0x15)), CENTER, 0, false);
colorDialog.show();
} else if (i == avatarRadiusRow) {
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("contactsAvatarRadius", 32);
numberPicker.setMinValue(0);
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("contactsAvatarRadius", numberPicker.getValue());
}
}
});
showAlertDialog(builder);
} else if (i == nameSizeRow) {
if (getParentActivity() == null) {
return;
@ -270,19 +290,21 @@ public class ThemingContactsActivity extends BaseFragment {
return false;
}
if (i == headerColorRow) {
resetInt("contactsHeaderColor", AndroidUtilities.getIntColor("themeColor"));
resetInt("contactsHeaderColor");
} else if (i == rowColorRow) {
resetInt("contactsRowColor", 0xffffffff);
resetInt("contactsRowColor");
} else if (i == avatarRadiusRow) {
resetInt("contactsAvatarSize");
} else if (i == nameColorRow) {
resetInt("contactsNameColor", 0xff000000);
resetInt("contactsNameColor");
} else if (i == nameSizeRow) {
resetInt("contactsNameSize", 17);
resetInt("contactsNameSize");
} else if (i == statusColorRow) {
resetInt("contactsStatusColor", 0xffa8a8a8);
resetInt("contactsStatusColor");
} else if (i == statusSizeRow) {
resetInt("contactsStatusSize", 14);
resetInt("contactsStatusSize");
} else if (i == onlineColorRow) {
resetInt("contactsOnlineColor", AndroidUtilities.getIntDarkerColor("themeColor",0x15));
resetInt("contactsOnlineColor");
}
return true;
}
@ -298,7 +320,7 @@ public class ThemingContactsActivity extends BaseFragment {
return fragmentView;
}
private void resetInt(String key, int value){
private void resetInt(String key){
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, Activity.MODE_PRIVATE);
SharedPreferences.Editor editor = preferences.edit();
editor.remove(key);
@ -365,7 +387,7 @@ public class ThemingContactsActivity extends BaseFragment {
@Override
public boolean isEnabled(int i) {
return i == headerColorRow || i == rowColorRow || i == nameColorRow || i == nameSizeRow || i == statusColorRow || i == statusSizeRow ||
return i == headerColorRow || i == rowColorRow || i == avatarRadiusRow || i == nameColorRow || i == nameSizeRow || i == statusColorRow || i == statusSizeRow ||
i == onlineColorRow ;
}
@ -414,7 +436,10 @@ public class ThemingContactsActivity extends BaseFragment {
view = new TextSettingsCell(mContext);
}
TextSettingsCell textCell = (TextSettingsCell) view;
if (i == nameSizeRow) {
if (i == avatarRadiusRow) {
int size = themePrefs.getInt("contactsAvatarRadius", AndroidUtilities.isTablet() ? 35 : 32);
textCell.setTextAndValue(LocaleController.getString("AvatarRadius", R.string.AvatarRadius), String.format("%d", size), true);
} else if (i == nameSizeRow) {
int size = themePrefs.getInt("contactsNameSize", AndroidUtilities.isTablet() ? 19 : 17);
textCell.setTextAndValue(LocaleController.getString("NameSize", R.string.NameSize), String.format("%d", size), true);
} else if (i == statusSizeRow) {
@ -453,7 +478,7 @@ public class ThemingContactsActivity extends BaseFragment {
else if ( i == headerSection2Row || i == rowsSection2Row ) {
return 1;
}
else if ( i == nameSizeRow || i == statusSizeRow ) {
else if ( i == avatarRadiusRow || i == nameSizeRow || i == statusSizeRow ) {
return 2;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -627,4 +627,74 @@
<string name="formatterDay24H">HH:mm</string>
<string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s الساعة %2$s</string>
<!--Telegram+ arabic-->
<string name="TelegramForAndroid">تلغرام للاندرويد</string>
<string name="Theming">Theming</string>
<string name="colorHexInvalid">Invalid color hex code!</string>
<string name="themeColor">لون الثيم</string>
<string name="ResetThemeSettings">اعاة الضبط الافتراضي</string>
<string name="ResetThemeSettingsSum">التراجع عن كافة ضبط الثيمات</string>
<string name="ResetThemeToastText">اعادة ضبط الثيمات الي الافتراضي</string>
<string name="General">عام</string>
<string name="Screens">شاشات</string>
<string name="MainScreen">الشاشة الرئيسية</string>
<string name="ChatScreen">شاشة المحادثة</string>
<string name="ContactsScreen">شاشة الاسماء</string>
<string name="Header">الشريط العلوي</string>
<string name="Rows">الصفوف</string>
<string name="ChatList">قائمة المحادثة</string>
<string name="ChatsList">قائمة المحادثات</string>
<string name="ContactsList">قائمة الاسماء</string>
<string name="HeaderColor">لون الشريط العلوي</string>
<string name="NameColor">لون جهات الاتصال</string>
<string name="NameSize">حجم اسماء جهات الاتصال</string>
<string name="MessageColor">لون الرسالة</string>
<string name="MessageSize">حجم الرسالة</string>
<string name="TimeDateColor">لون الزمن/التاريخ</string>
<string name="TimeDateSize">حجم الزمن/التاريخ</string>
<string name="CountColor">لون العداد</string>
<string name="CountSize">حجم العداد</string>
<string name="RowColor">لون الصف</string>
<string name="CountBGColor">لون خلفية العداد</string>
<string name="StatusColor">لون الحالة</string>
<string name="StatusSize">حجم الحالة</string>
<string name="RBubbleColor">لون الفقاعة اليمين</string>
<string name="LBubbleColor">لون الفقاعة اليسار</string>
<string name="DateColor">لون التريخ</string>
<string name="DateSize">حجم التاريخ</string>
<string name="DateBubbleColor">لون فقاعة التاريخ</string>
<string name="RTextColor">لون الخط</string>
<string name="LTextColor">لون الخط اليسار</string>
<string name="RTimeColor">لون الزمن اليمين</string>
<string name="LTimeColor">لون الزمن اليسار</string>
<string name="TimeSize">حجم الزمن</string>
<string name="EditTextColor">لون نص الادخال</string>
<string name="EditTextSize">حجم نص الادخال</string>
<string name="EditTextBGColor">لون خلفية نص الادخال</string>
<string name="EmojiViewBGColor">لون خلفية الفيسات</string>
<string name="EmojiViewTabColor">لون تبويب الفيسات</string>
<string name="OnlineColor">لون حالة الاتصال</string>
<string name="ChatMusic">موسيقى</string>
<string name="SaveTheme">حفظ الثيم</string>
<string name="SaveThemeSum">حفظ الثيمات في مجلد Telegram/Themes</string>
<string name="SaveThemeToastText">تم حفظ الثيم</string>
<string name="SavedTo">%1$s saved to %2$s</string>
<string name="SaveErrorMsg0">Theme not created yet. Apply any Telegram+ MOD first, please</string>
<string name="restoreOkMsg">Preferences restored from sdcard</string>
<string name="restoreErrorMsg">No preferences file found in %s</string>
<string name="NoMediaMessage">لاتوجد بطاقة ذاكرة</string>
<string name="EnterName">ادخل الاسم</string>
<string name="Themes">الثيمات</string>
<string name="ApplyTheme">تطبيق الثيم</string>
<string name="ApplyThemeSum">Apply xml theme from local folder</string>
<string name="MemberColor">Participant Color</string>
<string name="ChecksColor">Ticks Color</string>
<string name="MuteColor">Mute Color</string>
<string name="SendLogs">Send Logs</string>
<string name="SendLogsEmpty">There aren\'t logs</string>
<string name="SendIcon">Send Icon</string>
<string name="HideMobile">Hide Mobile Number</string>
<string name="FloatingPencilColor">Floating Pencil Color</string>
<string name="FloatingBGColor">Floating Background Color</string>
<string name="Community">G+ Community</string>
</resources>

View File

@ -212,7 +212,7 @@
<string name="UsernameInvalidShort">Ein Benutzername benötigt mindestens 5 Zeichen.</string>
<string name="UsernameInvalidLong">Ein Benutzername darf maximal 32 Zeichen haben.</string>
<string name="UsernameInvalidStartNumber">Benutzernamen dürfen leider nicht mit einer Zahl anfangen.</string>
<string name="UsernameHelp">Wähle einen für jeden sichtbaren Benutzernamen, wenn du von anderen bei <![CDATA[<b>]]>Telegram<![CDATA[</b>]]> gefunden werden willst — ohne, dass sie deine Nummer kennen müssen.<![CDATA[<br><br>]]>Erlaubt sind <![CDATA[<b>]]>a-z<![CDATA[<b>]]>, <![CDATA[<b>]]>0-9<![CDATA[<b>]]> und Unterstriche. Die Mindestlänge beträgt <![CDATA[<b>]]>5<![CDATA[<b>]]> Zeichen.</string>
<string name="UsernameHelp">Wähle einen für jeden sichtbaren Benutzernamen, wenn du von anderen bei <![CDATA[<b>]]>Telegram+<![CDATA[</b>]]> gefunden werden willst — ohne, dass sie deine Nummer kennen müssen.<![CDATA[<br><br>]]>Erlaubt sind <![CDATA[<b>]]>a-z<![CDATA[<b>]]>, <![CDATA[<b>]]>0-9<![CDATA[<b>]]> und Unterstriche. Die Mindestlänge beträgt <![CDATA[<b>]]>5<![CDATA[<b>]]> Zeichen.</string>
<string name="UsernameChecking">Prüfe Benutzername...</string>
<string name="UsernameAvailable">%1$s ist verfügbar.</string>
<string name="UsernameEmpty">Keiner</string>
@ -504,7 +504,7 @@
<string name="ForwardMessagesToGroup">Weiterleiten an %1$s?</string>
<string name="FeatureUnavailable">Verzeihung, diese Funktion ist derzeit in deinem Land nicht verfügbar.</string>
<!--Intro view-->
<string name="Page1Title">Telegram</string>
<string name="Page1Title">Telegram+</string>
<string name="Page2Title">Schnell</string>
<string name="Page3Title">Kostenlos</string>
<string name="Page4Title">Sicher</string>
@ -627,4 +627,74 @@
<string name="formatterDay24H">HH:mm</string>
<string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s um %2$s</string>
<!--Telegram+ German-->
<string name="TelegramForAndroid">Telegram+ für Android</string>
<string name="Theming">Design</string>
<string name="colorHexInvalid">Ungültiger Farb Hex-Code!</string>
<string name="themeColor">Design Farbe</string>
<string name="ResetThemeSettings">Design Einstellungen zurücksetzen</string>
<string name="ResetThemeSettingsSum">Alle Design Einstellungen rückgängig machen</string>
<string name="ResetThemeToastText">Design Einstellungen auf Standardwerte zurücksetzen!! </string>
<string name="General">Allgemein</string>
<string name="Screens">Bildschirme</string>
<string name="MainScreen">Hauptübersicht</string>
<string name="ChatScreen">Chatübersicht</string>
<string name="ContactsScreen">Kontaktübersicht</string>
<string name="Header">Kopfzeile</string>
<string name="Rows">Zeilen</string>
<string name="ChatList">Chat Liste</string>
<string name="ChatsList">Chat Verlauf</string>
<string name="ContactsList">Kontakt Liste</string>
<string name="HeaderColor">Kopfzeile Farbe</string>
<string name="NameColor">Farbe des Kontaktnames </string>
<string name="NameSize">Größe des Kontaktnamens</string>
<string name="MessageColor">Nachrichten Farbe</string>
<string name="MessageSize">Nachrichten Größe</string>
<string name="TimeDateColor">Farbe Zeit/Datum</string>
<string name="TimeDateSize">Größe Zeit/Datum</string>
<string name="CountColor">Farbe ungelesene Nachrichten</string>
<string name="CountSize">Größe ungelesene Nachrichten</string>
<string name="RowColor">Zeilen Farbe</string>
<string name="CountBGColor">Hintergrundfarbe ungelesene Nachrichten</string>
<string name="StatusColor">Status Farbe</string>
<string name="StatusSize">Status Größe</string>
<string name="RBubbleColor">Farbe der rechten Sprechblase</string>
<string name="LBubbleColor">Farbe der linken Sprechblase</string>
<string name="DateColor">Datum Farbe</string>
<string name="DateSize">Datum Größe</string>
<string name="DateBubbleColor">Datumsfarbe Sprechblase</string>
<string name="RTextColor">Textfarbe</string>
<string name="LTextColor">Textfarbe linke Sprechblase</string>
<string name="RTimeColor">Uhrzeitfarbe Rechte Sprechblase</string>
<string name="LTimeColor">Uhrzeit Farbe linke Sprechblase</string>
<string name="TimeSize">Zeit Größe</string>
<string name="EditTextColor">Farbe Texteingabefeld</string>
<string name="EditTextSize">Textgröße Texteingabefeld</string>
<string name="EditTextBGColor">Hintergrundfarbe Texteingabefeld</string>
<string name="EmojiViewBGColor">Emoji Hintergrundfarbe</string>
<string name="EmojiViewTabColor">Emoji Tab Farbe</string>
<string name="OnlineColor">Online Farbe</string>
<string name="ChatMusic">Musik</string>
<string name="SaveTheme">Speichere Design</string>
<string name="SaveThemeSum">Speichern Sie Ihr Design im Telegram/Themes Ordner</string>
<string name="SaveThemeToastText">Design Gespeichert!!</string>
<string name="SavedTo">%1$s auf %2$s gespeichert</string>
<string name="SaveErrorMsg0">Design wurde noch nicht erstellt. Bitte wende Dich zuerst an einen Telegram+ Mod </string>
<string name="restoreOkMsg">Einstellungen von SD-Karte wiederhergestellt</string>
<string name="restoreErrorMsg">Keine Voreinstellungsdatei in %s gefunden</string>
<string name="NoMediaMessage">Keine SD-Karte gefunden.</string>
<string name="EnterName">Name eingeben</string>
<string name="Themes">Designs</string>
<string name="ApplyTheme">Thema anwenden</string>
<string name="ApplyThemeSum">xml Thema aus einem lokalen Ordner anwenden</string>
<string name="MemberColor">Farbe Gruppenteilnehmer</string>
<string name="ChecksColor">Haken Farbe</string>
<string name="MuteColor">Farbe Stummschaltungssymbol</string>
<string name="SendLogs">Sende Protokolle</string>
<string name="SendLogsEmpty">\"Es gibt keine Protokolle\"</string>
<string name="SendIcon">Sende Symbol</string>
<string name="HideMobile">Mobil Nummer verbergen</string>
<string name="FloatingPencilColor">Schwebende Stift Farbe</string>
<string name="FloatingBGColor">Schwebende Hintergrund Farbe</string>
<string name="Community">G+ Community</string>
</resources>

View File

@ -627,72 +627,105 @@
<string name="formatterDay24H">HH:mm</string>
<string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s a las %2$s</string>
<!-- NUEVO -->
<!--Telegram+ Spanish-->
<string name="TelegramForAndroid">Telegram+ para Android</string>
<string name="Theming">Tematización</string>
<string name="themeColor">Color de Tema</string>
<string name="colorHexInvalid">¡Color hex inváldo!</string>
<string name="ResetThemeSettings">Resetear Tema</string>
<string name="ResetThemeSettingsSum">Deshace todos los cambios del tema actual</string>
<string name="ResetThemeToastText">¡Tema reseteado a valores por defecto!</string>
<string name="colorHexInvalid">¡Color hexadecimal inválido!</string>
<string name="themeColor">Color de tema</string>
<string name="ResetThemeSettings">Restablecer tema</string>
<string name="ResetThemeSettingsSum">Deshacer todos los cambios del tema actual</string>
<string name="ResetThemeToastText">¡Tema restablecido a valores por defecto!</string>
<string name="General">General</string>
<string name="Screens">Pantallas</string>
<string name="MainScreen">Pantalla Principal</string>
<string name="ChatScreen">Pantalla Chat</string>
<string name="ContactsScreen">Pantalla Contactos</string>
<string name="MainScreen">Pantalla principal</string>
<string name="ChatScreen">Pantalla de chat</string>
<string name="ContactsScreen">Pantalla de contactos</string>
<string name="Header">Cabecera</string>
<string name="Rows">Lista</string>
<string name="ChatList">Lista de Chat</string>
<string name="ChatsList">Lista de Chats</string>
<string name="ContactsList">Lista de Contactos</string>
<string name="HeaderColor">Color de Cabecera</string>
<string name="NameColor">Color de Nombre</string>
<string name="NameSize">Tamaño de Nombre</string>
<string name="MessageColor">Color de Mensaje</string>
<string name="MessageSize">Tamaño de Mensaje</string>
<string name="TimeDateColor">Color de Hora/Fecha</string>
<string name="TimeDateSize">Tamaño de Hora/Fecha</string>
<string name="CountColor">Color de Contador</string>
<string name="CountSize">Tamaño de Contador</string>
<string name="RowColor">Color de Panel</string>
<string name="CountBGColor">Color de Fondo de Contador</string>
<string name="StatusColor">Color de Estado</string>
<string name="StatusSize">Tamaño de Estado</string>
<string name="RBubbleColor">Color de Bocadillo Derecho</string>
<string name="LBubbleColor">Color de Bocadillo Izquierdo</string>
<string name="DateColor">Color de Fecha</string>
<string name="DateSize">Tamaño de Fecha</string>
<string name="DateBubbleColor">Color de Bocadillo de Fecha</string>
<string name="RTextColor">Color de Texto</string>
<string name="LTextColor">Color de Texto Izquierdo</string>
<string name="RTimeColor">Color Hora Derecha</string>
<string name="LTimeColor">Color Hora Izquierda</string>
<string name="TimeSize">Tamaño de Hora</string>
<string name="EditTextColor">Color de Entrada de Texto</string>
<string name="EditTextSize">Tamaño de Entrada de Texto</string>
<string name="EditTextBGColor">Color de Fondo de Entrada de Texto</string>
<string name="EmojiViewBGColor">Color de Fondo de Emoticonos</string>
<string name="EmojiViewTabColor">Color de Pestaña de Emoticonos</string>
<string name="OnlineColor">Color En Línea</string>
<string name="ChatList">Lista de chat</string>
<string name="ChatsList">Lista de chats</string>
<string name="ContactsList">Lista de contactos</string>
<string name="HeaderColor">Color de cabecera</string>
<string name="NameColor">Color de nombre</string>
<string name="NameSize">Tamaño de nombre</string>
<string name="MessageColor">Color de mensaje</string>
<string name="MessageSize">Tamaño de mensaje</string>
<string name="TimeDateColor">Color de hora/fecha</string>
<string name="TimeDateSize">Tamaño de hora/fecha</string>
<string name="CountColor">Color de contador</string>
<string name="CountSize">Tamaño de contador</string>
<string name="RowColor">Color de panel</string>
<string name="CountBGColor">Color de fondo de contador</string>
<string name="StatusColor">Color de estado</string>
<string name="StatusSize">Tamaño de estado</string>
<string name="RBubbleColor">Color de globo de diálogo derecho</string>
<string name="LBubbleColor">Color de globo de diálogo izquierdo</string>
<string name="DateColor">Color de fecha</string>
<string name="DateSize">Tamaño de fecha</string>
<string name="DateBubbleColor">Color de globo de fecha</string>
<string name="RTextColor">Color de texto derecho</string>
<string name="LTextColor">Color de texto izquierdo</string>
<string name="RTimeColor">Color hora derecha</string>
<string name="LTimeColor">Color hora izquierda</string>
<string name="TimeSize">Tamaño de hora</string>
<string name="EditTextColor">Color de entrada de texto</string>
<string name="EditTextSize">Tamaño de entrada de texto</string>
<string name="EditTextBGColor">Color de fondo de entrada de texto</string>
<string name="EmojiViewBGColor">Color de fondo de emoticonos</string>
<string name="EmojiViewTabColor">Color de pestaña de emoticonos</string>
<string name="OnlineColor">Color en línea</string>
<string name="ChatMusic">Música</string>
<string name="HideScreenshot">Oculta Aviso Captura de Pantalla</string>
<string name="SecretChat">Chat Secreto</string>
<string name="SaveTheme">Guardar Tema</string>
<string name="SaveThemeSum">Guarda tu tema en la carpeta Telegram/Themes</string>
<string name="SaveThemeToastText">Tema Guardado!!</string>
<string name="SaveTheme">Guardar tema</string>
<string name="SaveThemeSum">Guardar tu tema en la carpeta Telegram/Themes</string>
<string name="SaveThemeToastText">¡Tema guardado!</string>
<string name="SavedTo">%1$s guardado en %2$s</string>
<string name="SaveErrorMsg0">Tema no creado todavía. Aplica primero algún MOD</string>
<string name="restoreOkMsg">Tema cargado desde la SD</string>
<string name="restoreErrorMsg">No se encontró ningún archivo de preferencias en %s</string>
<string name="NoMediaMessage">No se encontró tarjeta SD</string>
<string name="EnterName">Introduce nombre</string>
<string name="Themes">Temas</string>
<string name="ApplyTheme">Aplicar Tema</string>
<string name="ApplyTheme">Aplicar tema</string>
<string name="ApplyThemeSum">Aplicar tema desde carpeta local</string>
<string name="ParticipantColor">Color de Participante</string>
<string name="ChecksColor">Color de Ticks</string>
<string name="MuteColor">Color de Silencio</string>
<string name="SendLogs">Enviar Logs</string>
<string name="MemberColor">Color de miembro</string>
<string name="ChecksColor">Color de ticks</string>
<string name="MuteColor">Color de silencio</string>
<string name="SendLogs">Enviar logs</string>
<string name="SendLogsEmpty">No hay logs</string>
<string name="SendIcon">Icono Enviar</string>
<string name="HideMobile">Oculta Número de Móvil</string>
<string name="FloatingPencilColor">Lápiz de Botón Flotante</string>
<string name="FloatingBGColor">Fondo de Botón Flotante</string>
<string name="SendIcon">Icono enviar</string>
<string name="HideMobile">Ocultar número de teléfono</string>
<string name="FloatingPencilColor">Color de botón lápiz flotante</string>
<string name="FloatingBGColor">Color de fondo de botón flotante</string>
<string name="Community">Comunidad G+</string>
<string name="UsernameTitle">Mostrar apodo en título de cabecera</string>
<string name="TypingColor">Color \'escribiendo\'</string>
<string name="EditTextIconsColor">Color de iconos de entrada de texto</string>
<string name="NavigationDrawer">Menú de navegación</string>
<string name="OptionsList">Lista de opciones</string>
<string name="ListColor">Color de lista</string>
<string name="OwnNameSize">Tamaño de nombre</string>
<string name="PhoneColor">Color de teléfono</string>
<string name="PhoneSize">Tamaño de teléfono</string>
<string name="AvatarColor">Color de avatar</string>
<string name="IconColor">Color de icono de opción</string>
<string name="OptionColor">Color de opción</string>
<string name="OptionSize">Tamaño de opción</string>
<string name="VersionColor">Color de versión</string>
<string name="VersionSize">Tamaño de versión</string>
<string name="HeaderTitleColor">Color de título de cabecera</string>
<string name="HeaderIconsColor">Color de iconos de cabecera</string>
<string name="DividerColor">Color de divisor</string>
<string name="AvatarRadius">Radio de avatar</string>
<string name="SetMemberColor">Cambiar color de miembro</string>
<string name="ForwardNameColor">Color de nombre de reenvío</string>
<!--Smart Notifications-->
<string name="SmartNotification">Notificación inteligente</string>
<string name="TimeUnitSeconds">segundo(s)</string>
<string name="TimeUnitMinutes">minuto(s)</string>
<string name="TimeUnitHours">hora(s)</string>
<string name="TimeUnitDays">día(s)</string>
<string name="settings_smart_notify_begin">Suena máximo</string>
<string name="settings_smart_notify_mid1">veces</string>
<string name="settings_smart_notify_mid11">vez</string>
<string name="settings_smart_notify_mid2">cada</string>
</resources>

View File

@ -627,4 +627,90 @@
<string name="formatterDay24H">HH:mm</string>
<string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s alle %2$s</string>
<!--Telegra+ Italian-->
<string name="TelegramForAndroid">Telegram+ per Android</string>
<string name="Theming">Theming</string>
<string name="colorHexInvalid">Codice del colore esadecimale non valido!</string>
<string name="themeColor">Colore del tema</string>
<string name="ResetThemeSettings">Resetta le impostazioni del tema</string>
<string name="ResetThemeSettingsSum">Resetta tutte le impostazioni del tema</string>
<string name="ResetThemeToastText">Resetta le impostazioni del tema a quelle predefinite!</string>
<string name="General">Generale</string>
<string name="Screens">Schermate</string>
<string name="MainScreen">Schermata principale</string>
<string name="ChatScreen">Schermata chat</string>
<string name="ContactsScreen">Schermata contatti</string>
<string name="Header">Testata</string>
<string name="Rows">Righe</string>
<string name="ChatList">Chat</string>
<string name="ChatsList">Lista delle chat</string>
<string name="ContactsList">Lista contatti</string>
<string name="HeaderColor">Colore della testata</string>
<string name="NameColor">Colore del nome del contatto</string>
<string name="NameSize">Dimensione del nome del contatto</string>
<string name="MessageColor">Colore del messaggio</string>
<string name="MessageSize">Dimensione del messaggio</string>
<string name="TimeDateColor">Colore Orario/Data</string>
<string name="TimeDateSize">Dimensione Orario/Data</string>
<string name="CountColor">Colore del contatore</string>
<string name="CountSize">Dimensione del contatore</string>
<string name="RowColor">Colore della riga</string>
<string name="CountBGColor">Colore di sfondo del contatore</string>
<string name="StatusColor">Colore dello stato</string>
<string name="StatusSize">Dimensione dello stato</string>
<string name="RBubbleColor">Colore nuvoletta a destra</string>
<string name="LBubbleColor">Colore nuvoletta a sinistra</string>
<string name="DateColor">Colore della data</string>
<string name="DateSize">Dimensione della data</string>
<string name="DateBubbleColor">Colore nuvoletta della data</string>
<string name="RTextColor">Colore del testo a destra</string>
<string name="LTextColor">Colore del testo a sinistra</string>
<string name="RTimeColor">Colore dell\'ora a destra</string>
<string name="LTimeColor">Colore dell\'ora a sinistra</string>
<string name="TimeSize">Dimensione orario</string>
<string name="EditTextColor">Colore del testo immesso</string>
<string name="EditTextSize">Dimensione del testo immesso</string>
<string name="EditTextBGColor">Colore di sfondo del campo di testo</string>
<string name="EmojiViewBGColor">Colore di sfondo degli Emoji</string>
<string name="EmojiViewTabColor">Colore della linguetta degli Emoji</string>
<string name="OnlineColor">Colore dello stato Online</string>
<string name="ChatMusic">Musica</string>
<string name="SaveTheme">Salva il tema</string>
<string name="SaveThemeSum">Salva il tuo tema nella cartella \"Telegram/Themes\".</string>
<string name="SaveThemeToastText">Tema salvato!</string>
<string name="SavedTo">%1$s salvato in %2$s</string>
<string name="SaveErrorMsg0">Tema non ancora creato. Prima applica una MOD di Telegram+, per favore.</string>
<string name="restoreOkMsg">Preferenze ripristinate dalla scheda SD.</string>
<string name="restoreErrorMsg">Nessun file di preferenze trovato in %s.</string>
<string name="NoMediaMessage">Scheda SD non trovata.</string>
<string name="EnterName">Inserisci il nome</string>
<string name="Themes">Temi</string>
<string name="ApplyTheme">Applica tema</string>
<string name="ApplyThemeSum">Applica un tema xml dalla cartella locale.</string>
<string name="MemberColor">Colore del partecipante</string>
<string name="ChecksColor">Colore delle spunte</string>
<string name="MuteColor">Colore dell\'icona \"Muto\"</string>
<string name="SendLogs">Invia log</string>
<string name="SendLogsEmpty">Non ci sono log</string>
<string name="SendIcon">Icona di invio</string>
<string name="HideMobile">Nascondi il numero di telefono</string>
<string name="FloatingPencilColor">Colore della matita flottante</string>
<string name="FloatingBGColor">Colore di sfondo del pulsante flottante</string>
<string name="Community">Community G+</string>
<string name="UsernameTitle">Mostra il nome utente nella barra del titolo</string>
<string name="TypingColor">Colore di digitazione</string>
<string name="OwnNameSize">Dimensione del nome</string>
<string name="PhoneColor">Colore del telefono</string>
<string name="PhoneSize">Dimensione del telefono</string>
<string name="AvatarColor">Colore dell\'avatar</string>
<string name="IconColor">Colore dell\'icona delle opzioni</string>
<string name="OptionColor">Colore opzioni</string>
<string name="OptionSize">Dimensione opzioni</string>
<string name="VersionColor">Colore della versione</string>
<string name="VersionSize">Dimensione della versione</string>
<string name="HeaderTitleColor">Colore dell\'header del titolo</string>
<string name="HeaderIconsColor">Colore delle icone della testata</string>
<string name="DividerColor">Colore del divisore</string>
<string name="AvatarRadius">Raggio dell\'avatar</string>
<!--Smart Notifications-->
</resources>

View File

@ -627,4 +627,74 @@
<string name="formatterDay24H">HH:mm</string>
<string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s om %2$s</string>
<!--Telegram+ Dutch-->
<string name="TelegramForAndroid">Telegram+ voor Android</string>
<string name="Theming">Uiterlijk</string>
<string name="colorHexInvalid">Ongeldige kleurhexcode!</string>
<string name="themeColor">Themakleur</string>
<string name="ResetThemeSettings">Thema-instellingen herstellen</string>
<string name="ResetThemeSettingsSum">Alle thema-instellingen ongedaan make</string>
<string name="ResetThemeToastText">Alle thema-instellingen naar de standaardwaarden herstellen!!</string>
<string name="General">Algemeen</string>
<string name="Screens">Schermen</string>
<string name="MainScreen">Hoofdscherm</string>
<string name="ChatScreen">Chatgesprek-scherm</string>
<string name="ContactsScreen">Contactpersonen-scherm</string>
<string name="Header">Banier</string>
<string name="Rows">Rijen</string>
<string name="ChatList">Chatlijst</string>
<string name="ChatsList">Chatslijst</string>
<string name="ContactsList">Contactpersonenlijst</string>
<string name="HeaderColor">Banierkleur</string>
<string name="NameColor">Kleur van de naam van de contactpersoon</string>
<string name="NameSize">Grootte van de naam van de contactpersoon</string>
<string name="MessageColor">Berichtkleur</string>
<string name="MessageSize">Berichtgrootte</string>
<string name="TimeDateColor">Kleur van datum en tijd</string>
<string name="TimeDateSize">Grootte van datum en tijd</string>
<string name="CountColor">Tellerkleur</string>
<string name="CountSize">Tellergrootte</string>
<string name="RowColor">Rijkleur</string>
<string name="CountBGColor">Achtergrondkleur van teller</string>
<string name="StatusColor">Statuskleur</string>
<string name="StatusSize">Statusgrootte</string>
<string name="RBubbleColor">Kleur van rechterballon</string>
<string name="LBubbleColor">Kleur van linkerballon</string>
<string name="DateColor">Datumkleur</string>
<string name="DateSize">Datumgrootte</string>
<string name="DateBubbleColor">Kleur van datumballon</string>
<string name="RTextColor">Tekstkleur</string>
<string name="LTextColor">Linkertekstkleur</string>
<string name="RTimeColor">Rechtertekstkleur</string>
<string name="LTimeColor">Rechtertijdskleur</string>
<string name="TimeSize">Tijdgrootte</string>
<string name="EditTextColor">Kleur van tekstinvoer</string>
<string name="EditTextSize">Grootte van tekstinvoer</string>
<string name="EditTextBGColor">Achtergrondkleur van tekstinvoer</string>
<string name="EmojiViewBGColor">Achtergrondkleur van emoticon</string>
<string name="EmojiViewTabColor">Tabbladkleur van emoticon</string>
<string name="OnlineColor">Online-kleur</string>
<string name="ChatMusic">Muziek</string>
<string name="SaveTheme">Thema opslaan</string>
<string name="SaveThemeSum">Sla uw thema op in de Telegram/Thema\'s-map</string>
<string name="SaveThemeToastText">Thema is opgeslagen!!</string>
<string name="SavedTo">%1$s is opgeslagen naar %2$s</string>
<string name="SaveErrorMsg0">Het thema is nog niet gecreëerd. Pas eerst de Telegram+ MOD toe.</string>
<string name="restoreOkMsg">De voorkeuren zijn hersteld vanaf de SD-kaart</string>
<string name="restoreErrorMsg">Er is geen voorkeurenbestand aangetroffen in %s</string>
<string name="NoMediaMessage">Er is geen SD-kaart gevonden.</string>
<string name="EnterName">Vul een naam in</string>
<string name="Themes">Thema\'s</string>
<string name="ApplyTheme">Thema toepassen</string>
<string name="ApplyThemeSum">XML-thema uit lokale map toepassen</string>
<string name="MemberColor">Kleur van deelnemer</string>
<string name="ChecksColor">Kleur van tikken</string>
<string name="MuteColor">Kleur van gedempt</string>
<string name="SendLogs">Logbestanden versturen</string>
<string name="SendLogsEmpty">Er zijn geen logbestanden</string>
<string name="SendIcon">Verzendpictogram</string>
<string name="HideMobile">Mobiel nummer verbergen</string>
<string name="FloatingPencilColor">Kleur van zwevend potlood</string>
<string name="FloatingBGColor">Zwevende achtergrondkleur</string>
<string name="Community">Google+-gemeenschap</string>
</resources>

View File

@ -627,4 +627,74 @@
<string name="formatterDay24H">HH:mm</string>
<string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s às %2$s</string>
<!--Telegram+-->
<string name="TelegramForAndroid">Telegram+ para Android</string>
<string name="Theming">Personalização</string>
<string name="colorHexInvalid">Código de cor hexadecimal inválido!</string>
<string name="themeColor">Cor do Tema</string>
<string name="ResetThemeSettings">Redefinir Tema</string>
<string name="ResetThemeSettingsSum">Reverter todas as personalizações</string>
<string name="ResetThemeToastText">Seu tema foi revertido ao tema padrão!</string>
<string name="General">Geral</string>
<string name="Screens">Telas</string>
<string name="MainScreen">Tela Principal</string>
<string name="ChatScreen">Tela de Conversas</string>
<string name="ContactsScreen">Tela de Contatos</string>
<string name="Header">Cabeçalho</string>
<string name="Rows">Linhas</string>
<string name="ChatList">Lista de Conversas</string>
<string name="ChatsList">Lista de Conversas</string>
<string name="ContactsList">Lista de Contatos</string>
<string name="HeaderColor">Cor do Cabeçalho</string>
<string name="NameColor">Cor do Nome do Contato</string>
<string name="NameSize">Tamanho do Nome do Contato</string>
<string name="MessageColor">Cor das Mensagens</string>
<string name="MessageSize">Tamanho das Mensagens</string>
<string name="TimeDateColor">Cor da Data/Hora</string>
<string name="TimeDateSize">Tamanho da Data/Hora</string>
<string name="CountColor">Cor do Contador</string>
<string name="CountSize">Tamanho do Contador</string>
<string name="RowColor">Cor das Colunas</string>
<string name="CountBGColor">Cor de Fundo do Contador</string>
<string name="StatusColor">Cor do Status</string>
<string name="StatusSize">Tamanho do Status</string>
<string name="RBubbleColor">Cor da Bolha Direita</string>
<string name="LBubbleColor">Cor da Bolha Esquerda</string>
<string name="DateColor">Cor da Data</string>
<string name="DateSize">Tamanho da Data</string>
<string name="DateBubbleColor">Cor da Bolha de Data</string>
<string name="RTextColor">Cor do Texto</string>
<string name="LTextColor">Cor do Texto Esquerdo</string>
<string name="RTimeColor">Cor da Hora Direita</string>
<string name="LTimeColor">Cor da Hora Esquerda</string>
<string name="TimeSize">Tamanho da Data</string>
<string name="EditTextColor">Cor do Texto Digitado</string>
<string name="EditTextSize">Tamanho do Texto Digitado</string>
<string name="EditTextBGColor">Cor de Fundo da Caixa de Texto</string>
<string name="EmojiViewBGColor">Cor do Fundo dos Emojis</string>
<string name="EmojiViewTabColor">Cor da Aba de Emojis</string>
<string name="OnlineColor">Cor do Status Online</string>
<string name="ChatMusic">Música</string>
<string name="SaveTheme">Salvar Tema</string>
<string name="SaveThemeSum">Salvar seu tema na pasta Telegram/Themes</string>
<string name="SaveThemeToastText">Tema Salvo!</string>
<string name="SavedTo">%1$s salvo em %2$s</string>
<string name="SaveErrorMsg0">O tema ainda não criado. Por favor, aplique algum MOD primeiro</string>
<string name="restoreOkMsg">Preferências restauradas do cartão SD</string>
<string name="restoreErrorMsg">Nenhum arquivo de preferências encontrado em %s</string>
<string name="NoMediaMessage">Nenhum cartão SD foi encontrado.</string>
<string name="EnterName">Digite o Nome</string>
<string name="Themes">Temas</string>
<string name="ApplyTheme">Aplicar Tema</string>
<string name="ApplyThemeSum">Aplicar tema em xml a partir de uma pasta local</string>
<string name="MemberColor">Cor dos Participantes</string>
<string name="ChecksColor">Cor dos Ticks</string>
<string name="MuteColor">Cor do Ícone de Mudo</string>
<string name="SendLogs">Enviar Logs</string>
<string name="SendLogsEmpty">"Não existem logs ainda"</string>
<string name="SendIcon">Ícone de Enviar</string>
<string name="HideMobile">Ocultar Número do Celular</string>
<string name="FloatingPencilColor">Cor do Lápis Flutuante</string>
<string name="FloatingBGColor">Cor do Fundo do Botão Flutuante</string>
<string name="Community">Comunidade no G+</string>
</resources>

View File

@ -212,7 +212,7 @@
<string name="UsernameInvalidShort">O nome de usuário deve ter pelo menos 5 caracteres.</string>
<string name="UsernameInvalidLong">O nome de usuário não pode exceder 32 caracteres.</string>
<string name="UsernameInvalidStartNumber">Desculpe, o nome de usuário não pode começar com um número.</string>
<string name="UsernameHelp">Você pode escolher um nome de usuário no <![CDATA[<b>]]>Telegram<![CDATA[</b>]]>. Assim, outras pessoas poderão te encontrar pelo nome de usuário e entrar em contato sem precisar saber seu telefone. <![CDATA[<br><br>]]>Você pode usar <![CDATA[<b>]]>az<![CDATA[</b>]]>, <![CDATA[<b>]]>09<![CDATA[</b>]]> e underline. O tamanho mínimo é <![CDATA[<b>]]>5<![CDATA[</b>]]> caracteres.</string>
<string name="UsernameHelp">Você pode escolher um nome de usuário no <![CDATA[<b>]]>Telegram+<![CDATA[</b>]]>. Assim, outras pessoas poderão te encontrar pelo nome de usuário e entrar em contato sem precisar saber seu telefone. <![CDATA[<br><br>]]>Você pode usar <![CDATA[<b>]]>az<![CDATA[</b>]]>, <![CDATA[<b>]]>09<![CDATA[</b>]]> e underline. O tamanho mínimo é <![CDATA[<b>]]>5<![CDATA[</b>]]> caracteres.</string>
<string name="UsernameChecking">Verificando nome de usuário...</string>
<string name="UsernameAvailable">%1$s está disponível.</string>
<string name="UsernameEmpty">Nenhum</string>
@ -627,4 +627,74 @@
<string name="formatterDay24H">HH:mm</string>
<string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s às %2$s</string>
<!--Telegram+ Portuguese(Portugal)-->
<string name="TelegramForAndroid">Telegram+ para Android</string>
<string name="Theming">Personalização</string>
<string name="colorHexInvalid">Código hexadecimal da cor é inválido!</string>
<string name="themeColor">Cor do Tema</string>
<string name="ResetThemeSettings">Redefinir Tema</string>
<string name="ResetThemeSettingsSum">Reverter todas as personalizações</string>
<string name="ResetThemeToastText">O tema foi redefinido para o tema padrão!</string>
<string name="General">Geral</string>
<string name="Screens">Ecrãs</string>
<string name="MainScreen">Ecrã Principal</string>
<string name="ChatScreen">Ecrã de chat</string>
<string name="ContactsScreen">Ecrã de Contactos</string>
<string name="Header">Cabeçalho</string>
<string name="Rows">Linhas</string>
<string name="ChatList">Lista de Conversas</string>
<string name="ChatsList">Lista de Conversas</string>
<string name="ContactsList">Lista de Contactos</string>
<string name="HeaderColor">Cor de Cabeçalho</string>
<string name="NameColor">Cor do Nome do Contato</string>
<string name="NameSize">Tamanho do Nome do Contato</string>
<string name="MessageColor">Cor das Mensagens</string>
<string name="MessageSize">Tamanho das Mensagens</string>
<string name="TimeDateColor">Cor da Data/Hora</string>
<string name="TimeDateSize">Tamanho da Data/Hora</string>
<string name="CountColor">Cor da Contagem</string>
<string name="CountSize">Tamanho da Contagem</string>
<string name="RowColor">Cor da Linha</string>
<string name="CountBGColor">Cor de fundo da Contagem</string>
<string name="StatusColor">Cor do Status</string>
<string name="StatusSize">Tamanho do Status</string>
<string name="RBubbleColor">Cor da Bolha Direita</string>
<string name="LBubbleColor">Cor da Bolha Esquerda</string>
<string name="DateColor">Cor da Data</string>
<string name="DateSize">Tamanho da Data</string>
<string name="DateBubbleColor">Cor da Bolha da Data</string>
<string name="RTextColor">Cor do Texto</string>
<string name="LTextColor">Cor do Texto da Esquerdaa</string>
<string name="RTimeColor">Cor do Texto da Direita</string>
<string name="LTimeColor">Cor da Hora da Esquerda</string>
<string name="TimeSize">Tamanho da Hora</string>
<string name="EditTextColor">Cor do Texto Introduzido</string>
<string name="EditTextSize">Tamanho do Texto Introduzido</string>
<string name="EditTextBGColor">Cor de Fundo do Texto Introduzido</string>
<string name="EmojiViewBGColor">Cor de Fundo dos Emoji</string>
<string name="EmojiViewTabColor">Cor da Tab dos Emoji</string>
<string name="OnlineColor">Cor do Status Online</string>
<string name="ChatMusic">Música</string>
<string name="SaveTheme">Guardar Tema</string>
<string name="SaveThemeSum">Guarda o teu tema na pasta Telegram/Themes</string>
<string name="SaveThemeToastText">Tema Guardado!!</string>
<string name="SavedTo">%1$s guardado em %2$s</string>
<string name="SaveErrorMsg0">Tema ainda não criado. Por favor aplica algum MOD do Telegram+ primeiro.</string>
<string name="restoreOkMsg">Preferências restauradas do cartão SD</string>
<string name="restoreErrorMsg">Nenhum ficheiro de preferências encontrado em %s</string>
<string name="NoMediaMessage">Não foi encontrado nenhum cartão SD.</string>
<string name="EnterName">Introduzo Nome</string>
<string name="Themes">Temas</string>
<string name="ApplyTheme">Aplicar Tema</string>
<string name="ApplyThemeSum">Aplicar tema .xml de um ficheiro local</string>
<string name="MemberColor">Cor de Participantes</string>
<string name="ChecksColor">Cor de Ticks</string>
<string name="MuteColor">Cor de Silênciar</string>
<string name="SendLogs">Enviar Registos</string>
<string name="SendLogsEmpty">Não existem registos</string>
<string name="SendIcon">Enviar Ícon</string>
<string name="HideMobile">Esconder Número de Telemóvel</string>
<string name="FloatingPencilColor">Cor do Lápis Flutuante</string>
<string name="FloatingBGColor">Cor de Fundo do Botão Flutuante</string>
<string name="Community">Comunidade G+</string>
</resources>

View File

@ -627,75 +627,106 @@
<string name="formatterDay24H">HH:mm</string>
<string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s at %2$s</string>
<!-- NEW -->
<!--Telegram+ English-->
<string name="TelegramForAndroid">Telegram+ for Android</string>
<string name="Theming">Theming</string>
<string name="colorHexInvalid">Invalid color hex code!</string>
<string name="themeColor">Theme Color</string>
<string name="ResetThemeSettings">Reset Theme Settings</string>
<string name="themeColor">Theme color</string>
<string name="ResetThemeSettings">Reset theme settings</string>
<string name="ResetThemeSettingsSum">Undo all theme settings</string>
<string name="ResetThemeToastText">Reset theme settings to default!!</string>
<string name="General">General</string>
<string name="Screens">Screens</string>
<string name="MainScreen">Main Screen</string>
<string name="ChatScreen">Chat Screen</string>
<string name="ContactsScreen">Contacts Screen</string>
<string name="MainScreen">Main screen</string>
<string name="ChatScreen">Chat screen</string>
<string name="ContactsScreen">Contacts screen</string>
<string name="Header">Header</string>
<string name="Rows">Rows</string>
<string name="ChatList">Chat List</string>
<string name="ChatsList">Chats List</string>
<string name="ContactsList">Contacts List</string>
<string name="HeaderColor">Header Color</string>
<string name="NameColor">Contact Name Color</string>
<string name="NameSize">Contact Name Size</string>
<string name="MessageColor">Message Color</string>
<string name="MessageSize">Message Size</string>
<string name="TimeDateColor">Time/Date Color</string>
<string name="TimeDateSize">Time/Date Size</string>
<string name="CountColor">Count Color</string>
<string name="CountSize">Count Size</string>
<string name="RowColor">Row Color</string>
<string name="CountBGColor">Count Background Color</string>
<string name="StatusColor">Status Color</string>
<string name="StatusSize">Status Size</string>
<string name="RBubbleColor">Right Bubble Color</string>
<string name="LBubbleColor">Left Bubble Color</string>
<string name="DateColor">Date Color</string>
<string name="DateSize">Date Size</string>
<string name="DateBubbleColor">Date Bubble Color</string>
<string name="RTextColor">Text Color</string>
<string name="LTextColor">Left Text Color</string>
<string name="RTimeColor">Right Time Color</string>
<string name="LTimeColor">Left Time Color</string>
<string name="TimeSize">Time Size</string>
<string name="EditTextColor">Text Input Color</string>
<string name="EditTextSize">Text Input Size</string>
<string name="EditTextBGColor">Text Input Background Color</string>
<string name="EmojiViewBGColor">Emoji Background Color</string>
<string name="EmojiViewTabColor">Emoji Tab Color</string>
<string name="OnlineColor">Online Color</string>
<string name="ChatList">Chat list</string>
<string name="ChatsList">Chats list</string>
<string name="ContactsList">Contacts list</string>
<string name="HeaderColor">Header color</string>
<string name="NameColor">Contact name color</string>
<string name="NameSize">Contact name size</string>
<string name="MessageColor">Message color</string>
<string name="MessageSize">Message size</string>
<string name="TimeDateColor">Time/Date color</string>
<string name="TimeDateSize">Time/Date size</string>
<string name="CountColor">Count color</string>
<string name="CountSize">Count size</string>
<string name="RowColor">Row color</string>
<string name="CountBGColor">Count background color</string>
<string name="StatusColor">Status color</string>
<string name="StatusSize">Status size</string>
<string name="RBubbleColor">Right bubble color</string>
<string name="LBubbleColor">Left bubble color</string>
<string name="DateColor">Date color</string>
<string name="DateSize">Date size</string>
<string name="DateBubbleColor">Date bubble color</string>
<string name="RTextColor">Right text color</string>
<string name="LTextColor">Left text color</string>
<string name="RTimeColor">Right time color</string>
<string name="LTimeColor">Left time color</string>
<string name="TimeSize">Time size</string>
<string name="EditTextColor">Text input color</string>
<string name="EditTextSize">Text input size</string>
<string name="EditTextBGColor">Text input background color</string>
<string name="EmojiViewBGColor">Emoji background color</string>
<string name="EmojiViewTabColor">Emoji tab color</string>
<string name="OnlineColor">Online color</string>
<string name="ChatMusic">Music</string>
<string name="SecretChat">Secret Chat</string>
<string name="SaveTheme">Save Theme</string>
<string name="SaveTheme">Save theme</string>
<string name="SaveThemeSum">Save your theme to Telegram/Themes folder</string>
<string name="SaveThemeToastText">Theme Saved!!</string>
<string name="SaveThemeToastText">Theme saved!</string>
<string name="SavedTo">%1$s saved to %2$s</string>
<string name="SaveErrorMsg0">Theme not created yet. Apply any Telegram+ MOD first, please</string>
<string name="restoreOkMsg">Preferences restored from sdcard</string>
<string name="restoreErrorMsg">No preferences file found in %s</string>
<string name="NoMediaMessage">No SD card found.</string>
<string name="EnterName">Enter Name</string>
<string name="EnterName">Enter name</string>
<string name="Themes">Themes</string>
<string name="ApplyTheme">Apply Theme</string>
<string name="ApplyTheme">Apply theme</string>
<string name="ApplyThemeSum">Apply xml theme from local folder</string>
<string name="ParticipantColor">Participant Color</string>
<string name="ChecksColor">Ticks Color</string>
<string name="MuteColor">Mute Color</string>
<string name="SendLogs">Send Logs</string>
<string name="SendLogsEmpty">"There aren't logs"</string>
<string name="MemberColor">Member color</string>
<string name="ChecksColor">Ticks color</string>
<string name="MuteColor">Mute color</string>
<string name="SendLogs">Send logs</string>
<string name="SendLogsEmpty">There aren\'t logs</string>
<string name="SendIcon">Send Icon</string>
<string name="HideMobile">Hide Mobile Number</string>
<string name="FloatingPencilColor">Floating Pencil Color</string>
<string name="FloatingBGColor">Floating Background Color</string>
<string name="Community">G+ Community</string>
<string name="HideMobile">Hide mobile number</string>
<string name="FloatingPencilColor">Floating pencil color</string>
<string name="FloatingBGColor">Floating background color</string>
<string name="Community">G+ community</string>
<string name="UsernameTitle">Show username on header title</string>
<string name="TypingColor">Typing color</string>
<string name="EditTextIconsColor">Text input icons color</string>
<string name="NavigationDrawer">Navigation drawer</string>
<string name="OptionsList">Options list</string>
<string name="ListColor">List color</string>
<string name="OwnNameSize">Name size</string>
<string name="PhoneColor">Phone color</string>
<string name="PhoneSize">Phone size</string>
<string name="AvatarColor">Avatar color</string>
<string name="IconColor">Option icon color</string>
<string name="OptionColor">Option color</string>
<string name="OptionSize">Option size</string>
<string name="VersionColor">Version color</string>
<string name="VersionSize">Version size</string>
<string name="HeaderTitleColor">Header title color</string>
<string name="HeaderIconsColor">Header icons color</string>
<string name="DividerColor">Divider color</string>
<string name="AvatarRadius">Avatar radius</string>
<string name="SetMemberColor">Set member color</string>
<string name="ForwardNameColor">Forward name color</string>
<!--Smart Notifications-->
<string name="SmartNotification">Smart notification</string>
<string name="TimeUnitSeconds">second(s)</string>
<string name="TimeUnitMinutes">minute(s)</string>
<string name="TimeUnitHours">hour(s)</string>
<string name="TimeUnitDays">day(s)</string>
<string name="settings_smart_notify_begin">Sound at most</string>
<string name="settings_smart_notify_mid1">times</string>
<string name="settings_smart_notify_mid11">time</string>
<string name="settings_smart_notify_mid2">within</string><!--
<string name="settings_smart_notify_end">period.</string>-->
</resources>