- New MOD to show contact avatar in chat screen

- New MOD to show own avatar in chat and group screen
- New MOD to align own avatar to top
- Added new bubbles Ed and Edge (thanks to Edwin Macalopu)
- New MOD to change background and text color in attach view in chat screen
- Added MOD to change color of dialog title and button
- Bug fixes
This commit is contained in:
rafalense 2015-08-04 09:17:15 +02:00
parent 75349fc1a8
commit b265320281
38 changed files with 605 additions and 197 deletions

View File

@ -10,6 +10,7 @@ dependencies {
//compile 'com.google.android.gms:play-services:7.5.0'
compile 'net.hockeyapp.android:HockeySDK:3.5.+'
compile 'com.googlecode.mp4parser:isoparser:1.0.+'
compile 'com.android.support:multidex:1.0.1'
}
android {
@ -81,7 +82,8 @@ android {
applicationId "org.telegram.plus"
minSdkVersion 8
targetSdkVersion 22
versionCode 583
versionName "3.1.1.3"
versionCode 586
versionName "3.1.1.6"
multiDexEnabled true
}
}

View File

@ -23,8 +23,8 @@ import org.telegram.messenger.ApplicationLoader;
import org.telegram.messenger.ConnectionsManager;
import org.telegram.messenger.FileLoader;
import org.telegram.messenger.FileLog;
import org.telegram.messenger.TLRPC;
import org.telegram.messenger.R;
import org.telegram.messenger.TLRPC;
import org.telegram.messenger.UserConfig;
import org.telegram.ui.Components.URLSpanNoUnderline;
import org.telegram.ui.Components.URLSpanNoUnderlineBold;
@ -78,6 +78,11 @@ public class MessageObject {
public ArrayList<TextLayoutBlock> textLayoutBlocks;
protected int leftBound = 52;//52
public boolean showAvatar = false;
public boolean showMyAvatar = false;
public boolean showMyAvatarGroup = true;
public MessageObject(TLRPC.Message message, AbstractMap<Integer, TLRPC.User> users, boolean generateLayout) {
if (textPaint == null) {
textPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
@ -98,6 +103,12 @@ public class MessageObject {
textPaintRight.linkColor = themePrefs.getInt("chatRLinkColor", def);
textPaintRight.setTextSize(AndroidUtilities.dp(MessagesController.getInstance().fontSize));
showMyAvatar = themePrefs.getBoolean("chatShowOwnAvatar", false);
showMyAvatarGroup = themePrefs.getBoolean("chatShowOwnAvatarGroup", false);
showAvatar = themePrefs.getBoolean("chatShowContactAvatar", false);
int aSize = themePrefs.getInt("chatAvatarSize", 42);
leftBound = aSize + AndroidUtilities.dp(3);
messageOwner = message;
if (message.replyMessage != null) {
@ -695,14 +706,18 @@ public class MessageObject {
int maxWidth;
if (AndroidUtilities.isTablet()) {
if (messageOwner.to_id.chat_id != 0 && !isOut()) {
maxWidth = AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(122);
//if (messageOwner.to_id.chat_id != 0 && !isOut()) {
if (( (messageOwner.to_id.chat_id != 0 || showAvatar) && !isOut() ) || ( messageOwner.to_id.chat_id == 0 && showMyAvatar && isOut() ) || ( messageOwner.to_id.chat_id != 0 && showMyAvatarGroup && isOut())) {
//maxWidth = AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(122);
maxWidth = AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(leftBound + 70);
} else {
maxWidth = AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(80);
}
} else {
if (messageOwner.to_id.chat_id != 0 && !isOut()) {
maxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(122);
//if (messageOwner.to_id.chat_id != 0 && !isOut()) {
if (((messageOwner.to_id.chat_id != 0 || showAvatar) && !isOut())|| ( messageOwner.to_id.chat_id == 0 && showMyAvatar && isOut() ) || ( messageOwner.to_id.chat_id != 0 && showMyAvatarGroup && isOut())) {
//maxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(122);
maxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(leftBound + 70);
} else {
maxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(80);
}

View File

@ -24,6 +24,7 @@ import android.os.AsyncTask;
import android.os.Build;
import android.os.Handler;
import android.os.PowerManager;
import android.support.multidex.MultiDex;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesUtil;
@ -97,7 +98,7 @@ public class ApplicationLoader extends Application {
int cacheColorHint = 0;
//
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
if(themePrefs.getBoolean("chatSolidBGColorCheck", false)){
if (themePrefs.getBoolean("chatSolidBGColorCheck", false)) {
cachedWallpaper = null;
selectedColor = themePrefs.getInt("chatSolidBGColor", 0xffffffff);
}
@ -357,6 +358,12 @@ public class ApplicationLoader extends Application {
});
}
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
private void storeRegistrationId(Context context, String regId) {
final SharedPreferences prefs = getGCMPreferences(context);
int appVersion = BuildVars.BUILD_VERSION;

View File

@ -13,6 +13,7 @@ import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
@ -20,6 +21,7 @@ import android.widget.Button;
import android.widget.TextView;
import org.telegram.android.AndroidUtilities;
import org.telegram.messenger.ApplicationLoader;
import org.telegram.messenger.ConnectionsManager;
import org.telegram.messenger.FileLog;
import org.telegram.messenger.R;
@ -274,7 +276,8 @@ public class BaseFragment {
});
visibleDialog.show();
//Always after .show()
int color = AndroidUtilities.getIntColor("themeColor");
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
int color = preferences.getInt("dialogColor", preferences.getInt("themeColor", AndroidUtilities.defColor));
int id = visibleDialog.getContext().getResources().getIdentifier("android:id/alertTitle", null, null);
TextView tv = (TextView) visibleDialog.findViewById(id);
if(tv != null)tv.setTextColor(color);

View File

@ -11,6 +11,8 @@ package org.telegram.ui.Adapters;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
@ -102,28 +104,40 @@ public class DrawerLayoutAdapter extends BaseAdapter {
view = new DrawerActionCell(mContext);
}
DrawerActionCell actionCell = (DrawerActionCell) view;
actionCell.setTextColor(themePrefs.getInt("drawerOptionColor", 0xff444444));
actionCell.setTextSize(themePrefs.getInt("drawerOptionSize", 15));
//actionCell.setTextColor(themePrefs.getInt("drawerOptionColor", 0xff444444));
//actionCell.setTextSize(themePrefs.getInt("drawerOptionSize", 15));
//actionCell.setIconColor(themePrefs.getInt("drawerIconColor", 0xff737373));
int color = themePrefs.getInt("drawerIconColor", 0xff737373);
if (i == 2) {
actionCell.setTextAndIcon(LocaleController.getString("NewGroup", R.string.NewGroup), R.drawable.menu_newgroup, color);
Drawable newGroup = mContext.getResources().getDrawable(R.drawable.menu_newgroup);
newGroup.setColorFilter(color, PorterDuff.Mode.SRC_IN);
actionCell.setTextAndIcon(LocaleController.getString("NewGroup", R.string.NewGroup), newGroup);
//actionCell.setTextAndIcon(LocaleController.getString("NewGroup", R.string.NewGroup), R.drawable.menu_newgroup);
} else if (i == 3) {
actionCell.setTextAndIcon(LocaleController.getString("NewSecretChat", R.string.NewSecretChat), R.drawable.menu_secret, color);
//actionCell.setTextAndIcon(LocaleController.getString("NewSecretChat", R.string.NewSecretChat), R.drawable.menu_secret);
Drawable secret = mContext.getResources().getDrawable(R.drawable.menu_secret);
secret.setColorFilter(color, PorterDuff.Mode.SRC_IN);
actionCell.setTextAndIcon(LocaleController.getString("NewSecretChat", R.string.NewSecretChat), secret);
} else if (i == 4) {
actionCell.setTextAndIcon(LocaleController.getString("NewBroadcastList", R.string.NewBroadcastList), R.drawable.menu_broadcast, color);
//actionCell.setTextAndIcon(LocaleController.getString("NewBroadcastList", R.string.NewBroadcastList), R.drawable.menu_broadcast);
Drawable broadcast = mContext.getResources().getDrawable(R.drawable.menu_broadcast);
broadcast.setColorFilter(color, PorterDuff.Mode.SRC_IN);
actionCell.setTextAndIcon(LocaleController.getString("NewBroadcastList", R.string.NewBroadcastList), broadcast);
} else if (i == contactsRow) {
actionCell.setTextAndIcon(LocaleController.getString("Contacts", R.string.Contacts), R.drawable.menu_contacts, color);
//actionCell.setTextAndIcon(LocaleController.getString("Contacts", R.string.Contacts), R.drawable.menu_contacts);
Drawable contacts = mContext.getResources().getDrawable(R.drawable.menu_contacts);
contacts.setColorFilter(color, PorterDuff.Mode.SRC_IN);
actionCell.setTextAndIcon(LocaleController.getString("Contacts", R.string.Contacts), contacts);
}/* else if (i == 7) {
actionCell.setTextAndIcon(LocaleController.getString("InviteFriends", R.string.InviteFriends), R.drawable.menu_invite);
}*/ else if (i == themesRow) {
actionCell.setTextAndIcon(LocaleController.getString("Themes", R.string.Themes), R.drawable.menu_themes, color);
actionCell.setTextAndIcon(LocaleController.getString("Themes", R.string.Themes), R.drawable.menu_themes);
} else if (i == themingRow) {
actionCell.setTextAndIcon(LocaleController.getString("Theming", R.string.Theming), R.drawable.menu_theming, color);
actionCell.setTextAndIcon(LocaleController.getString("Theming", R.string.Theming), R.drawable.menu_theming);
} else if (i == settingsRow) {
actionCell.setTextAndIcon(LocaleController.getString("Settings", R.string.Settings), R.drawable.menu_settings, color);
actionCell.setTextAndIcon(LocaleController.getString("Settings", R.string.Settings), R.drawable.menu_settings);
} else if (i == communityRow) {
actionCell.setTextAndIcon(LocaleController.getString("Community", R.string.Community), R.drawable.menu_forum, color);
actionCell.setTextAndIcon(LocaleController.getString("Community", R.string.Community), R.drawable.menu_forum);
} /*else if (i == 10) {
actionCell.setTextAndIcon(LocaleController.getString("TelegramFaq", R.string.TelegramFaq), R.drawable.menu_help);
}*/

View File

@ -302,14 +302,20 @@ public class ChatAudioCell extends ChatBaseCell implements SeekBar.SeekBarDelega
super.onLayout(changed, left, top, right, bottom);
if (currentMessageObject.isOut()) {
seekBarX = layoutWidth - backgroundWidth + AndroidUtilities.dp(55);
buttonX = layoutWidth - backgroundWidth + AndroidUtilities.dp(13);
timeX = layoutWidth - backgroundWidth + AndroidUtilities.dp(66);
//seekBarX = layoutWidth - backgroundWidth + AndroidUtilities.dp(55);
//buttonX = layoutWidth - backgroundWidth + AndroidUtilities.dp(13);
//timeX = layoutWidth - backgroundWidth + AndroidUtilities.dp(66);
seekBarX = layoutWidth - backgroundWidth + AndroidUtilities.dp(55) - (((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)) ? AndroidUtilities.dp(leftBound) : 0);
buttonX = layoutWidth - backgroundWidth + AndroidUtilities.dp(13) - (((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)) ? AndroidUtilities.dp(leftBound) : 0);
timeX = layoutWidth - backgroundWidth + AndroidUtilities.dp(66) - (((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)) ? AndroidUtilities.dp(leftBound) : 0);
} else {
if (isChat || showAvatar) {
seekBarX = AndroidUtilities.dp(116);
buttonX = AndroidUtilities.dp(74);
timeX = AndroidUtilities.dp(127);
//seekBarX = AndroidUtilities.dp(116);
//buttonX = AndroidUtilities.dp(74);
//timeX = AndroidUtilities.dp(127);
seekBarX = AndroidUtilities.dp(leftBound + 64);
buttonX = AndroidUtilities.dp(leftBound + 22);
timeX = AndroidUtilities.dp(leftBound + 75);
} else {
seekBarX = AndroidUtilities.dp(64);
buttonX = AndroidUtilities.dp(22);
@ -331,9 +337,11 @@ public class ChatAudioCell extends ChatBaseCell implements SeekBar.SeekBarDelega
boolean dataChanged = currentMessageObject == messageObject && isUserDataChanged();
if (currentMessageObject != messageObject || dataChanged) {
if (AndroidUtilities.isTablet()) {
backgroundWidth = Math.min(AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(isChat || showAvatar ? 102 : 50), AndroidUtilities.dp(300));
//backgroundWidth = Math.min(AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(isChat ? 102 : 50), AndroidUtilities.dp(300));
backgroundWidth = Math.min(AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp((isChat || showAvatar) || (messageObject.isOut() && ((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat))) ? leftBound + 50 : 50), AndroidUtilities.dp(300));
} else {
backgroundWidth = Math.min(AndroidUtilities.displaySize.x - AndroidUtilities.dp(isChat || showAvatar ? 102 : 50), AndroidUtilities.dp(300));
//backgroundWidth = Math.min(AndroidUtilities.displaySize.x - AndroidUtilities.dp(isChat ? 102 : 50), AndroidUtilities.dp(300));
backgroundWidth = Math.min(AndroidUtilities.displaySize.x - AndroidUtilities.dp((isChat || showAvatar) || (messageObject.isOut() && ((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat))) ? leftBound + 50 : 50), AndroidUtilities.dp(300));
}
if (messageObject.isOut()) {

View File

@ -134,12 +134,17 @@ public class ChatBaseCell extends BaseCell {
private int last_send_state = 0;
private int last_delete_date = 0;
private int leftBound = 52;//52
private int avatarSize = AndroidUtilities.dp(42);
protected int leftBound = 52;//52
//private int avatarSize = AndroidUtilities.dp(42);
protected int avatarSize = AndroidUtilities.dp(42);
protected boolean avatarAlignTop = false;
protected boolean ownAvatarAlignTop = false;
private int avatarLeft = AndroidUtilities.dp(6);
boolean showAvatar = false;
boolean showMyAvatar = false;
boolean showMyAvatarGroup = true;
private int checkX = 0;
public ChatBaseCell(Context context) {
super(context);
@ -185,67 +190,78 @@ public class ChatBaseCell extends BaseCell {
int radius = AndroidUtilities.dp(themePrefs.getInt("chatAvatarRadius", 32));
avatarImage.setRoundRadius(radius);
avatarDrawable.setRadius(radius);
avatarSize = AndroidUtilities.dp(themePrefs.getInt("chatAvatarSize", 42));
int aSize = themePrefs.getInt("chatAvatarSize", 42);
avatarSize = AndroidUtilities.dp(aSize);
avatarLeft = AndroidUtilities.dp(themePrefs.getInt("chatAvatarMarginLeft", 6));
avatarAlignTop = themePrefs.getBoolean("chatAvatarAlignTop", false);
ownAvatarAlignTop = themePrefs.getBoolean("chatOwnAvatarAlignTop", false);
//setBubbles(themePrefs.getString("chatBubbleStyle", ImageListActivity.getBubbleName(0)));
showMyAvatar = themePrefs.getBoolean("chatShowOwnAvatar", false);
showMyAvatarGroup = themePrefs.getBoolean("chatShowOwnAvatarGroup", false);
showAvatar = themePrefs.getBoolean("chatShowContactAvatar", false);
leftBound = aSize + AndroidUtilities.dp(3);
//Log.e("ChatBaseCell", "leftBound " + leftBound);
}
private void updateTheme(){
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
int defColor = themePrefs.getInt("themeColor", AndroidUtilities.defColor);
int lColor = AndroidUtilities.getDefBubbleColor();
int dColor = AndroidUtilities.setDarkColor(defColor, 0x15);
int rBubbleColor = themePrefs.getInt("chatRBubbleColor", lColor);
int rBubbleSColor = AndroidUtilities.setDarkColor(rBubbleColor, 0x15);
int lBubbleColor = themePrefs.getInt("chatLBubbleColor", 0xffffffff);
int lBubbleSColor = AndroidUtilities.setDarkColor(lBubbleColor, 0x15);
try{
int lColor = AndroidUtilities.getDefBubbleColor();
int dColor = AndroidUtilities.setDarkColor(defColor, 0x15);
int rBubbleColor = themePrefs.getInt("chatRBubbleColor", lColor);
int rBubbleSColor = AndroidUtilities.setDarkColor(rBubbleColor, 0x15);
int lBubbleColor = themePrefs.getInt("chatLBubbleColor", 0xffffffff);
int lBubbleSColor = AndroidUtilities.setDarkColor(lBubbleColor, 0x15);
timePaintOut.setColor(themePrefs.getInt("chatRTimeColor", dColor));
timePaintOut.setTextSize(AndroidUtilities.dp(themePrefs.getInt("chatTimeSize", 12)));
timePaintIn.setColor(themePrefs.getInt("chatLTimeColor", 0xffa1aab3));
timePaintIn.setTextSize(AndroidUtilities.dp(themePrefs.getInt("chatTimeSize", 12)));
timePaintOut.setColor(themePrefs.getInt("chatRTimeColor", dColor));
timePaintOut.setTextSize(AndroidUtilities.dp(themePrefs.getInt("chatTimeSize", 12)));
timePaintIn.setColor(themePrefs.getInt("chatLTimeColor", 0xffa1aab3));
timePaintIn.setTextSize(AndroidUtilities.dp(themePrefs.getInt("chatTimeSize", 12)));
int linkColor = themePrefs.getInt("chatLLinkColor", defColor);
int bColor = AndroidUtilities.getIntAlphaColor("chatLBubbleColor", 0xffffffff, 0.9f);
if(currentMessageObject.isOut()){
bColor = AndroidUtilities.getIntAlphaColor("chatRBubbleColor", lColor, 0.9f);
linkColor = themePrefs.getInt("chatRLinkColor", defColor);
int linkColor = themePrefs.getInt("chatLLinkColor", defColor);
int bColor = AndroidUtilities.getIntAlphaColor("chatLBubbleColor", 0xffffffff, 0.9f);
if(currentMessageObject.isOut()){
bColor = AndroidUtilities.getIntAlphaColor("chatRBubbleColor", lColor, 0.9f);
linkColor = themePrefs.getInt("chatRLinkColor", defColor);
}
replyTextPaint.linkColor = linkColor;
//ResourceLoader.loadRecources(getContext());
/*if(ResourceLoader.mediaBackgroundDrawable == null){
ResourceLoader.mediaBackgroundDrawable = getResources().getDrawable(R.drawable.phototime);
ResourceLoader.checkDrawable = getResources().getDrawable(R.drawable.msg_check);
ResourceLoader.halfCheckDrawable = getResources().getDrawable(R.drawable.msg_halfcheck);
ResourceLoader.clockDrawable = getResources().getDrawable(R.drawable.msg_clock);
ResourceLoader.checkMediaDrawable = getResources().getDrawable(R.drawable.msg_check_w);
ResourceLoader.halfCheckMediaDrawable = getResources().getDrawable(R.drawable.msg_halfcheck_w);
ResourceLoader.clockMediaDrawable = getResources().getDrawable(R.drawable.msg_clock_photo);
//ResourceLoader.videoIconDrawable = getResources().getDrawable(R.drawable.ic_video);
ResourceLoader.docMenuInDrawable = getResources().getDrawable(R.drawable.doc_actions_b);
ResourceLoader.docMenuOutDrawable = getResources().getDrawable(R.drawable.doc_actions_g);
}*/
ResourceLoader.mediaBackgroundDrawable.setColorFilter(bColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.backgroundDrawableOut.setColorFilter(rBubbleColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.backgroundMediaDrawableOut.setColorFilter(rBubbleColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.backgroundDrawableOutSelected.setColorFilter(rBubbleSColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.backgroundMediaDrawableOutSelected.setColorFilter(rBubbleSColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.backgroundDrawableIn.setColorFilter(lBubbleColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.backgroundMediaDrawableIn.setColorFilter(lBubbleColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.backgroundDrawableInSelected.setColorFilter(lBubbleSColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.backgroundMediaDrawableInSelected.setColorFilter(lBubbleSColor, PorterDuff.Mode.SRC_IN);
int checksColor = themePrefs.getInt("chatChecksColor", defColor);
ResourceLoader.checkDrawable.setColorFilter(checksColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.halfCheckDrawable.setColorFilter(checksColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.clockDrawable.setColorFilter(checksColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.checkMediaDrawable.setColorFilter(checksColor, PorterDuff.Mode.MULTIPLY);
ResourceLoader.halfCheckMediaDrawable.setColorFilter(checksColor, PorterDuff.Mode.MULTIPLY);
ResourceLoader.halfCheckMediaDrawable.setColorFilter(checksColor, PorterDuff.Mode.MULTIPLY);
} catch (NullPointerException e) {
FileLog.e("tmessages", e);
}
replyTextPaint.linkColor = linkColor;
//ResourceLoader.loadRecources(getContext());
/*if(ResourceLoader.mediaBackgroundDrawable == null){
ResourceLoader.mediaBackgroundDrawable = getResources().getDrawable(R.drawable.phototime);
ResourceLoader.checkDrawable = getResources().getDrawable(R.drawable.msg_check);
ResourceLoader.halfCheckDrawable = getResources().getDrawable(R.drawable.msg_halfcheck);
ResourceLoader.clockDrawable = getResources().getDrawable(R.drawable.msg_clock);
ResourceLoader.checkMediaDrawable = getResources().getDrawable(R.drawable.msg_check_w);
ResourceLoader.halfCheckMediaDrawable = getResources().getDrawable(R.drawable.msg_halfcheck_w);
ResourceLoader.clockMediaDrawable = getResources().getDrawable(R.drawable.msg_clock_photo);
//ResourceLoader.videoIconDrawable = getResources().getDrawable(R.drawable.ic_video);
ResourceLoader.docMenuInDrawable = getResources().getDrawable(R.drawable.doc_actions_b);
ResourceLoader.docMenuOutDrawable = getResources().getDrawable(R.drawable.doc_actions_g);
}*/
ResourceLoader.mediaBackgroundDrawable.setColorFilter(bColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.backgroundDrawableOut.setColorFilter(rBubbleColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.backgroundMediaDrawableOut.setColorFilter(rBubbleColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.backgroundDrawableOutSelected.setColorFilter(rBubbleSColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.backgroundMediaDrawableOutSelected.setColorFilter(rBubbleSColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.backgroundDrawableIn.setColorFilter(lBubbleColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.backgroundMediaDrawableIn.setColorFilter(lBubbleColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.backgroundDrawableInSelected.setColorFilter(lBubbleSColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.backgroundMediaDrawableInSelected.setColorFilter(lBubbleSColor, PorterDuff.Mode.SRC_IN);
int checksColor = themePrefs.getInt("chatChecksColor", defColor);
ResourceLoader.checkDrawable.setColorFilter(checksColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.halfCheckDrawable.setColorFilter(checksColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.clockDrawable.setColorFilter(checksColor, PorterDuff.Mode.SRC_IN);
ResourceLoader.checkMediaDrawable.setColorFilter(checksColor, PorterDuff.Mode.MULTIPLY);
ResourceLoader.halfCheckMediaDrawable.setColorFilter(checksColor, PorterDuff.Mode.MULTIPLY);
ResourceLoader.halfCheckMediaDrawable.setColorFilter(checksColor, PorterDuff.Mode.MULTIPLY);
}
@ -383,7 +399,7 @@ public class ChatBaseCell extends BaseCell {
currentUser = MessagesController.getInstance().getUser(messageObject.messageOwner.from_id);
//if (isChat && !messageObject.isOut()) {
if ((isChat || showAvatar) && !messageObject.isOut()) {
if ( ( (isChat || showAvatar) && !messageObject.isOut() ) || ((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)) && messageObject.isOut()) {
isAvatarVisible = true;
if (currentUser != null) {
if (currentUser.photo != null) {
@ -495,9 +511,11 @@ public class ChatBaseCell extends BaseCell {
width = AndroidUtilities.displaySize.x;
}
if (messageObject.isOut()) {
maxWidth = width - backgroundWidth - AndroidUtilities.dp(60);
//maxWidth = width - backgroundWidth - AndroidUtilities.dp(60);
maxWidth = width - backgroundWidth - AndroidUtilities.dp(60 + ((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat) ? (leftBound + 10) : 0));
} else {
maxWidth = width - backgroundWidth - AndroidUtilities.dp(56 + (isChat || showAvatar ? 61 : 0));
//maxWidth = width - backgroundWidth - AndroidUtilities.dp(56 + (isChat ? 61 : 0));
maxWidth = width - backgroundWidth - AndroidUtilities.dp(56 + (isChat || showAvatar ? (leftBound + 10) : 0));
}
} else {
maxWidth = getMaxNameWidth() - AndroidUtilities.dp(22);
@ -664,18 +682,26 @@ public class ChatBaseCell extends BaseCell {
timeX = backgroundWidth - AndroidUtilities.dp(9) - timeWidth + (isChat || showAvatar ? AndroidUtilities.dp(leftBound) : 0);
} else {
timeX = layoutWidth - timeWidth - AndroidUtilities.dp(38.5f);
if((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat))timeX = layoutWidth - timeWidth - AndroidUtilities.dp(38.5f) - AndroidUtilities.dp(leftBound);
checkX = timeX + timeWidth;
}
} else {
if (!currentMessageObject.isOut()) {
timeX = backgroundWidth - AndroidUtilities.dp(4) - timeWidth + (isChat || showAvatar ? AndroidUtilities.dp(leftBound) : 0);
} else {
timeX = layoutWidth - timeWidth - AndroidUtilities.dp(42.0f);
if((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat))timeX = layoutWidth - timeWidth - AndroidUtilities.dp(42.0f) - AndroidUtilities.dp(leftBound);
checkX = timeX + timeWidth;
}
}
if (isAvatarVisible) {
//avatarImage.setImageCoords(AndroidUtilities.dp(6), layoutHeight - AndroidUtilities.dp(45), AndroidUtilities.dp(42), AndroidUtilities.dp(42));
avatarImage.setImageCoords(avatarLeft, avatarAlignTop ? AndroidUtilities.dp(3) : layoutHeight - AndroidUtilities.dp(3) - avatarSize, avatarSize, avatarSize);
if(((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)) && currentMessageObject.isOut()){
avatarImage.setImageCoords(layoutWidth - avatarSize - avatarLeft, ownAvatarAlignTop ? AndroidUtilities.dp(3) : layoutHeight - AndroidUtilities.dp(3) - avatarSize, avatarSize, avatarSize);
}else{
avatarImage.setImageCoords(avatarLeft, avatarAlignTop ? AndroidUtilities.dp(3) : layoutHeight - AndroidUtilities.dp(3) - avatarSize, avatarSize, avatarSize);
}
}
wasLayout = true;
@ -723,7 +749,13 @@ public class ChatBaseCell extends BaseCell {
currentBackgroundDrawable = ResourceLoader.backgroundMediaDrawableOut;
}
}
setDrawableBounds(currentBackgroundDrawable, layoutWidth - backgroundWidth - (!media ? 0 : AndroidUtilities.dp(9)), AndroidUtilities.dp(1), backgroundWidth, layoutHeight - AndroidUtilities.dp(2));
if ((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)) {
setDrawableBounds(currentBackgroundDrawable, layoutWidth - backgroundWidth - (!media ? 0 : AndroidUtilities.dp(9)) - AndroidUtilities.dp(leftBound), AndroidUtilities.dp(1), backgroundWidth, layoutHeight - AndroidUtilities.dp(2));
}else{
setDrawableBounds(currentBackgroundDrawable, layoutWidth - backgroundWidth - (!media ? 0 : AndroidUtilities.dp(9)), AndroidUtilities.dp(1), backgroundWidth, layoutHeight - AndroidUtilities.dp(2));
}
} else {
if (isPressed() && isCheckPressed || !isCheckPressed && isPressed || isHighlighted) {
if (!media) {
@ -769,10 +801,13 @@ public class ChatBaseCell extends BaseCell {
//forwardNamePaint.setColor(0xff4a923c);
forwardNamePaint.setColor(themePrefs.getInt("chatForwardRColor", AndroidUtilities.setDarkColor(defColor, 0x15)));
forwardNameX = currentBackgroundDrawable.getBounds().left + AndroidUtilities.dp(10);
if((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat))forwardNameY = AndroidUtilities.dp((drawName ? 10 : 0));
} else {
//forwardNamePaint.setColor(0xff006fc8);
forwardNamePaint.setColor(themePrefs.getInt("chatForwardLColor", defColor));
forwardNameX = currentBackgroundDrawable.getBounds().left + AndroidUtilities.dp(19);
//Plus
if((!isChat && showAvatar))forwardNameY = AndroidUtilities.dp((drawName ? 10 : 0));
}
canvas.save();
canvas.translate(forwardNameX - forwardNameOffsetX, forwardNameY);
@ -914,20 +949,36 @@ public class ChatBaseCell extends BaseCell {
if (drawClock) {
if (!media) {
setDrawableBounds(ResourceLoader.clockDrawable, layoutWidth - AndroidUtilities.dp(18.5f) - ResourceLoader.clockDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(8.5f) - ResourceLoader.clockDrawable.getIntrinsicHeight());
if((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)){
setDrawableBounds(ResourceLoader.clockDrawable, checkX - AndroidUtilities.dp(3.5f) + ResourceLoader.clockDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(8.5f) - ResourceLoader.clockDrawable.getIntrinsicHeight());
}else{
setDrawableBounds(ResourceLoader.clockDrawable, layoutWidth - AndroidUtilities.dp(18.5f) - ResourceLoader.clockDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(8.5f) - ResourceLoader.clockDrawable.getIntrinsicHeight());
}
ResourceLoader.clockDrawable.draw(canvas);
} else {
setDrawableBounds(ResourceLoader.clockMediaDrawable, layoutWidth - AndroidUtilities.dp(22.0f) - ResourceLoader.clockMediaDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(13.0f) - ResourceLoader.clockMediaDrawable.getIntrinsicHeight());
if((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)){
setDrawableBounds(ResourceLoader.clockMediaDrawable, checkX - AndroidUtilities.dp(7.0f) + ResourceLoader.clockMediaDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(13.0f) - ResourceLoader.clockMediaDrawable.getIntrinsicHeight());
}else{
setDrawableBounds(ResourceLoader.clockMediaDrawable, layoutWidth - AndroidUtilities.dp(22.0f) - ResourceLoader.clockMediaDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(13.0f) - ResourceLoader.clockMediaDrawable.getIntrinsicHeight());
}
ResourceLoader.clockMediaDrawable.draw(canvas);
}
}
if (isBroadcast) {
if (drawCheck1 || drawCheck2) {
if (!media) {
setDrawableBounds(ResourceLoader.broadcastDrawable, layoutWidth - AndroidUtilities.dp(20.5f) - ResourceLoader.broadcastDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(8.0f) - ResourceLoader.broadcastDrawable.getIntrinsicHeight());
if((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)){
setDrawableBounds(ResourceLoader.broadcastDrawable, checkX - AndroidUtilities.dp(5.5f) + ResourceLoader.broadcastDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(8.0f) - ResourceLoader.broadcastDrawable.getIntrinsicHeight());
}else{
setDrawableBounds(ResourceLoader.broadcastDrawable, layoutWidth - AndroidUtilities.dp(20.5f) - ResourceLoader.broadcastDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(8.0f) - ResourceLoader.broadcastDrawable.getIntrinsicHeight());
}
ResourceLoader.broadcastDrawable.draw(canvas);
} else {
setDrawableBounds(ResourceLoader.broadcastMediaDrawable, layoutWidth - AndroidUtilities.dp(24.0f) - ResourceLoader.broadcastMediaDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(13.0f) - ResourceLoader.broadcastMediaDrawable.getIntrinsicHeight());
if((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)){
setDrawableBounds(ResourceLoader.broadcastMediaDrawable, checkX - AndroidUtilities.dp(9.0f) + ResourceLoader.broadcastMediaDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(13.0f) - ResourceLoader.broadcastMediaDrawable.getIntrinsicHeight());
}else{
setDrawableBounds(ResourceLoader.broadcastMediaDrawable, layoutWidth - AndroidUtilities.dp(24.0f) - ResourceLoader.broadcastMediaDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(13.0f) - ResourceLoader.broadcastMediaDrawable.getIntrinsicHeight());
}
ResourceLoader.broadcastMediaDrawable.draw(canvas);
}
}
@ -935,36 +986,68 @@ public class ChatBaseCell extends BaseCell {
if (drawCheck2) {
if (!media) {
if (drawCheck1) {
setDrawableBounds(ResourceLoader.checkDrawable, layoutWidth - AndroidUtilities.dp(22.5f) - ResourceLoader.checkDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(8.0f) - ResourceLoader.checkDrawable.getIntrinsicHeight());
if((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)){
setDrawableBounds(ResourceLoader.checkDrawable, checkX - AndroidUtilities.dp(7.5f) + ResourceLoader.checkDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(8.0f) - ResourceLoader.checkDrawable.getIntrinsicHeight());
}else{
setDrawableBounds(ResourceLoader.checkDrawable, layoutWidth - AndroidUtilities.dp(22.5f) - ResourceLoader.checkDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(8.0f) - ResourceLoader.checkDrawable.getIntrinsicHeight());
}
} else {
setDrawableBounds(ResourceLoader.checkDrawable, layoutWidth - AndroidUtilities.dp(18.5f) - ResourceLoader.checkDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(8.0f) - ResourceLoader.checkDrawable.getIntrinsicHeight());
if((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)){
setDrawableBounds(ResourceLoader.checkDrawable, checkX - AndroidUtilities.dp(3.5f) + ResourceLoader.checkDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(8.0f) - ResourceLoader.checkDrawable.getIntrinsicHeight());
}else{
setDrawableBounds(ResourceLoader.checkDrawable, layoutWidth - AndroidUtilities.dp(18.5f) - ResourceLoader.checkDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(8.0f) - ResourceLoader.checkDrawable.getIntrinsicHeight());
}
}
ResourceLoader.checkDrawable.draw(canvas);
} else {
if (drawCheck1) {
setDrawableBounds(ResourceLoader.checkMediaDrawable, layoutWidth - AndroidUtilities.dp(26.0f) - ResourceLoader.checkMediaDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(13.0f) - ResourceLoader.checkMediaDrawable.getIntrinsicHeight());
if((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)){
setDrawableBounds(ResourceLoader.checkMediaDrawable, checkX - AndroidUtilities.dp(8.0f) + ResourceLoader.checkMediaDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(13.0f) - ResourceLoader.checkMediaDrawable.getIntrinsicHeight());
}else{
setDrawableBounds(ResourceLoader.checkMediaDrawable, layoutWidth - AndroidUtilities.dp(26.0f) - ResourceLoader.checkMediaDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(13.0f) - ResourceLoader.checkMediaDrawable.getIntrinsicHeight());
}
} else {
setDrawableBounds(ResourceLoader.checkMediaDrawable, layoutWidth - AndroidUtilities.dp(22.0f) - ResourceLoader.checkMediaDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(13.0f) - ResourceLoader.checkMediaDrawable.getIntrinsicHeight());
if((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)){
setDrawableBounds(ResourceLoader.checkMediaDrawable, checkX - AndroidUtilities.dp(7.0f) + ResourceLoader.checkMediaDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(13.0f) - ResourceLoader.checkMediaDrawable.getIntrinsicHeight());
}else{
setDrawableBounds(ResourceLoader.checkMediaDrawable, layoutWidth - AndroidUtilities.dp(22.0f) - ResourceLoader.checkMediaDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(13.0f) - ResourceLoader.checkMediaDrawable.getIntrinsicHeight());
}
}
ResourceLoader.checkMediaDrawable.draw(canvas);
}
}
if (drawCheck1) {
if (!media) {
setDrawableBounds(ResourceLoader.halfCheckDrawable, layoutWidth - AndroidUtilities.dp(18) - ResourceLoader.halfCheckDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(8.0f) - ResourceLoader.halfCheckDrawable.getIntrinsicHeight());
if((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)){
setDrawableBounds(ResourceLoader.halfCheckDrawable, checkX - AndroidUtilities.dp(3) + ResourceLoader.halfCheckDrawable.getIntrinsicWidth() , layoutHeight - AndroidUtilities.dp(8.0f) - ResourceLoader.halfCheckDrawable.getIntrinsicHeight());
}else{
setDrawableBounds(ResourceLoader.halfCheckDrawable, layoutWidth - AndroidUtilities.dp(18) - ResourceLoader.halfCheckDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(8.0f) - ResourceLoader.halfCheckDrawable.getIntrinsicHeight());
}
ResourceLoader.halfCheckDrawable.draw(canvas);
} else {
setDrawableBounds(ResourceLoader.halfCheckMediaDrawable, layoutWidth - AndroidUtilities.dp(20.5f) - ResourceLoader.halfCheckMediaDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(13.0f) - ResourceLoader.halfCheckMediaDrawable.getIntrinsicHeight());
if((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)){
setDrawableBounds(ResourceLoader.halfCheckMediaDrawable, checkX - AndroidUtilities.dp(3.0f) + ResourceLoader.halfCheckMediaDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(13.0f) - ResourceLoader.halfCheckMediaDrawable.getIntrinsicHeight());
}else{
setDrawableBounds(ResourceLoader.halfCheckMediaDrawable, layoutWidth - AndroidUtilities.dp(20.5f) - ResourceLoader.halfCheckMediaDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(13.0f) - ResourceLoader.halfCheckMediaDrawable.getIntrinsicHeight());
}
ResourceLoader.halfCheckMediaDrawable.draw(canvas);
}
}
}
if (drawError) {
if (!media) {
setDrawableBounds(ResourceLoader.errorDrawable, layoutWidth - AndroidUtilities.dp(18) - ResourceLoader.errorDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(6.5f) - ResourceLoader.errorDrawable.getIntrinsicHeight());
if((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)){
setDrawableBounds(ResourceLoader.errorDrawable, checkX - AndroidUtilities.dp(3) + ResourceLoader.errorDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(6.5f) - ResourceLoader.errorDrawable.getIntrinsicHeight());
}else{
setDrawableBounds(ResourceLoader.errorDrawable, layoutWidth - AndroidUtilities.dp(18) - ResourceLoader.errorDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(6.5f) - ResourceLoader.errorDrawable.getIntrinsicHeight());
}
ResourceLoader.errorDrawable.draw(canvas);
} else {
setDrawableBounds(ResourceLoader.errorDrawable, layoutWidth - AndroidUtilities.dp(20.5f) - ResourceLoader.errorDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(12.5f) - ResourceLoader.errorDrawable.getIntrinsicHeight());
if((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)){
setDrawableBounds(ResourceLoader.errorDrawable, checkX - AndroidUtilities.dp(5.5f) + ResourceLoader.errorDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(12.5f) - ResourceLoader.errorDrawable.getIntrinsicHeight());
}else{
setDrawableBounds(ResourceLoader.errorDrawable, layoutWidth - AndroidUtilities.dp(20.5f) - ResourceLoader.errorDrawable.getIntrinsicWidth(), layoutHeight - AndroidUtilities.dp(12.5f) - ResourceLoader.errorDrawable.getIntrinsicHeight());
}
ResourceLoader.errorDrawable.draw(canvas);
}
}

View File

@ -260,10 +260,12 @@ public class ChatContactCell extends ChatBaseCell {
int x;
if (currentMessageObject.isOut()) {
x = layoutWidth - backgroundWidth + AndroidUtilities.dp(8);
//x = layoutWidth - backgroundWidth + AndroidUtilities.dp(8);
x = layoutWidth - backgroundWidth + AndroidUtilities.dp(8) - (((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)) ? AndroidUtilities.dp(leftBound) : 0);
} else {
if (isChat || showAvatar) {
x = AndroidUtilities.dp(69);
//x = AndroidUtilities.dp(69);
x = AndroidUtilities.dp(leftBound + 17);
} else {
x = AndroidUtilities.dp(16);
}

View File

@ -667,7 +667,8 @@ public class ChatMediaCell extends ChatBaseCell implements MediaController.FileD
double lon = messageObject.messageOwner.media.geo._long;
if (messageObject.messageOwner.media.title != null && messageObject.messageOwner.media.title.length() > 0) {
int maxWidth = (AndroidUtilities.isTablet() ? AndroidUtilities.getMinTabletSide() : Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y)) - AndroidUtilities.dp(((isChat || showAvatar) && !messageObject.isOut() ? 102 : 40) + 86 + 24);
//int maxWidth = (AndroidUtilities.isTablet() ? AndroidUtilities.getMinTabletSide() : Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y)) - AndroidUtilities.dp((isChat && !messageObject.isOut() ? 102 : 40) + 86 + 24);
int maxWidth = (AndroidUtilities.isTablet() ? AndroidUtilities.getMinTabletSide() : Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y)) - AndroidUtilities.dp(((isChat || showAvatar) && !messageObject.isOut() ? leftBound + 50 : 40) + 86 + 24);
nameLayout = StaticLayoutEx.createStaticLayout(messageObject.messageOwner.media.title, locationTitlePaint, maxWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false, TextUtils.TruncateAt.END, maxWidth - AndroidUtilities.dp(4), 3);
int lineCount = nameLayout.getLineCount();
if (messageObject.messageOwner.media.address != null && messageObject.messageOwner.media.address.length() > 0) {
@ -1017,13 +1018,16 @@ public class ChatMediaCell extends ChatBaseCell implements MediaController.FileD
int x;
if (currentMessageObject.isOut()) {
if (media) {
x = layoutWidth - backgroundWidth - AndroidUtilities.dp(3);
//x = layoutWidth - backgroundWidth - AndroidUtilities.dp(3);
x = layoutWidth - backgroundWidth - AndroidUtilities.dp(3) - (((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)) ? AndroidUtilities.dp(leftBound) : 0);
} else {
x = layoutWidth - backgroundWidth + AndroidUtilities.dp(6);
//x = layoutWidth - backgroundWidth + AndroidUtilities.dp(6);
x = layoutWidth - backgroundWidth + AndroidUtilities.dp(6) - (((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)) ? AndroidUtilities.dp(leftBound) : 0);
}
} else {
if (isChat || showAvatar) {
x = AndroidUtilities.dp(67);
//x = AndroidUtilities.dp(67);
x = AndroidUtilities.dp(leftBound + 15);
} else {
x = AndroidUtilities.dp(15);
}

View File

@ -29,10 +29,10 @@ import android.view.MotionEvent;
import org.telegram.android.AndroidUtilities;
import org.telegram.android.ImageReceiver;
import org.telegram.android.MediaController;
import org.telegram.messenger.FileLoader;
import org.telegram.messenger.FileLog;
import org.telegram.android.MessageObject;
import org.telegram.messenger.ApplicationLoader;
import org.telegram.messenger.FileLoader;
import org.telegram.messenger.FileLog;
import org.telegram.messenger.R;
import org.telegram.messenger.TLRPC;
import org.telegram.ui.Components.ResourceLoader;
@ -331,16 +331,18 @@ public class ChatMessageCell extends ChatBaseCell {
int maxWidth;
if (AndroidUtilities.isTablet()) {
if ((isChat || showAvatar) && !messageObject.isOut()) {
maxWidth = AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(122);
if (( (isChat || showAvatar) && !messageObject.isOut() ) || (((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)) && messageObject.isOut())) {
//maxWidth = AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(122);
maxWidth = AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(leftBound + 70);
drawName = true;
} else {
maxWidth = AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(80);
drawName = false;
}
} else {
if ((isChat || showAvatar) && !messageObject.isOut()) {
maxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(122);
if (( (isChat || showAvatar) && !messageObject.isOut() ) || (((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)) && messageObject.isOut())) {
//maxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(122);
maxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(leftBound + 70);
drawName = true;
} else {
maxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(80);
@ -350,10 +352,13 @@ public class ChatMessageCell extends ChatBaseCell {
backgroundWidth = maxWidth;
//Log.e("setMessageObject 1", "backgroundWidth " + backgroundWidth+" layoutWidth " + layoutWidth);
super.setMessageObject(messageObject);
backgroundWidth = messageObject.textWidth;
totalHeight = messageObject.textHeight + AndroidUtilities.dp(19.5f) + namesOffset;
//Log.e("setMessageObject 2", "backgroundWidth " + backgroundWidth+" namesOffset " + namesOffset);
int maxChildWidth = Math.max(backgroundWidth, nameWidth);
maxChildWidth = Math.max(maxChildWidth, forwardedNameWidth);
@ -369,14 +374,18 @@ public class ChatMessageCell extends ChatBaseCell {
if (messageObject.messageOwner.media instanceof TLRPC.TL_messageMediaWebPage && messageObject.messageOwner.media.webpage instanceof TLRPC.TL_webPage) {
int linkPreviewMaxWidth;
if (AndroidUtilities.isTablet()) {
if (currentMessageObject.messageOwner.to_id.chat_id != 0 && !currentMessageObject.isOut()) {
linkPreviewMaxWidth = AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(122);
//if (currentMessageObject.messageOwner.to_id.chat_id != 0 && !currentMessageObject.isOut()) {
if (( (currentMessageObject.messageOwner.to_id.chat_id != 0 || showAvatar) && !currentMessageObject.isOut() ) || (currentMessageObject.messageOwner.to_id.chat_id == 0 && showMyAvatar && currentMessageObject.isOut()) || (currentMessageObject.messageOwner.to_id.chat_id != 0 && showMyAvatarGroup && currentMessageObject.isOut()) ) {
//linkPreviewMaxWidth = AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(122);
linkPreviewMaxWidth = AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(leftBound + 70);
} else {
linkPreviewMaxWidth = AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(80);
}
} else {
if (currentMessageObject.messageOwner.to_id.chat_id != 0 && !currentMessageObject.isOut()) {
linkPreviewMaxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(122);
//if (currentMessageObject.messageOwner.to_id.chat_id != 0 && !currentMessageObject.isOut()) {
if (( (currentMessageObject.messageOwner.to_id.chat_id != 0 || showAvatar) && !currentMessageObject.isOut() ) || (currentMessageObject.messageOwner.to_id.chat_id == 0 && showMyAvatar && currentMessageObject.isOut()) || (currentMessageObject.messageOwner.to_id.chat_id != 0 && showMyAvatarGroup && currentMessageObject.isOut())) {
//linkPreviewMaxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(122);
linkPreviewMaxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(leftBound + 70);
} else {
linkPreviewMaxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(80);
}
@ -649,6 +658,18 @@ public class ChatMessageCell extends ChatBaseCell {
backgroundWidth = Math.max(maxChildWidth, messageObject.lastLineWidth + timeMore) + AndroidUtilities.dp(29);
}
}
//Plus
//Log.e("setMessageObject3", "totalHeight " + totalHeight + " namesOffset " + namesOffset + " messageObject.textHeight: " + messageObject.textHeight);
if( ( showAvatar && !isChat && !messageObject.isOut() ) || ((( (showMyAvatar && !isChat) || (showMyAvatarGroup && isChat)) && messageObject.isOut()))){
if ((totalHeight < avatarSize)) {
totalHeight = avatarSize + AndroidUtilities.dp(10);
//Log.e("setMessageObject2","totalHeight "+totalHeight);
}
//totalHeight = messageObject.textHeight + AndroidUtilities.dp(19.5f) + namesOffset;
}
//Log.e("setMessageObject 3", "backgroundWidth " + backgroundWidth+" maxChildWidth " + maxChildWidth);
}
}
@ -662,10 +683,12 @@ public class ChatMessageCell extends ChatBaseCell {
super.onLayout(changed, left, top, right, bottom);
if (currentMessageObject.isOut()) {
textX = layoutWidth - backgroundWidth + AndroidUtilities.dp(10);
//textX = layoutWidth - backgroundWidth + AndroidUtilities.dp(10);
textX = layoutWidth - backgroundWidth + AndroidUtilities.dp(10) - ((showMyAvatar && !isChat) || (showMyAvatarGroup && isChat) ? AndroidUtilities.dp(leftBound) : 0);
textY = AndroidUtilities.dp(10) + namesOffset;
} else {
textX = AndroidUtilities.dp(19) + (isChat || showAvatar ? AndroidUtilities.dp(52) : 0);
//textX = AndroidUtilities.dp(19) + (isChat ? AndroidUtilities.dp(52) : 0);
textX = AndroidUtilities.dp(19) + (isChat || showAvatar ? AndroidUtilities.dp(leftBound) : 0);
textY = AndroidUtilities.dp(10) + namesOffset;
}
}
@ -678,10 +701,12 @@ public class ChatMessageCell extends ChatBaseCell {
}
if (currentMessageObject.isOut()) {
textX = layoutWidth - backgroundWidth + AndroidUtilities.dp(10);
//textX = layoutWidth - backgroundWidth + AndroidUtilities.dp(10);
textX = layoutWidth - backgroundWidth + AndroidUtilities.dp(10) - ( (showMyAvatar && !isChat) || (showMyAvatarGroup && isChat) ? AndroidUtilities.dp(leftBound) : 0);
textY = AndroidUtilities.dp(10) + namesOffset;
} else {
textX = AndroidUtilities.dp(19) + (isChat || showAvatar ? AndroidUtilities.dp(52) : 0);
//textX = AndroidUtilities.dp(19) + (isChat ? AndroidUtilities.dp(52) : 0);
textX = AndroidUtilities.dp(19) + (isChat || showAvatar ? AndroidUtilities.dp(leftBound) : 0);
textY = AndroidUtilities.dp(10) + namesOffset;
}

View File

@ -36,35 +36,37 @@ public class DrawerActionCell extends FrameLayout {
textView.setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL);
textView.setCompoundDrawablePadding(AndroidUtilities.dp(34));
addView(textView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.LEFT | Gravity.TOP, 14, 0, 16, 0));
//updateTheme();
}
@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);
int color = AndroidUtilities.getIntDef("drawerIconColor", 0xff737373);
getResources().getDrawable(resId).setColorFilter(color, PorterDuff.Mode.SRC_IN);
textView.setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(resId), null, null, null);
}
public void setTextAndIcon(String text, int resId, int color) {
public void setTextAndIcon(String text, Drawable drawable) {
textView.setText(text);
Drawable d = getResources().getDrawable(resId);
d.setColorFilter(color, PorterDuff.Mode.SRC_IN);
textView.setCompoundDrawablesWithIntrinsicBounds(d, null, null, null);
textView.setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null);
}
public void setTextColor(int color) {
textView.setTextColor(color);
private void updateTheme(){
//Log.e("DrawerActionCell","updateTheme");
textView.setTextColor(AndroidUtilities.getIntDef("drawerOptionColor", 0xff444444));
textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, AndroidUtilities.getIntDef("drawerOptionSize", 15));
//Drawable[] drawables = textView.getCompoundDrawables();
//if(drawables[0].getConstantState().equals(getResources().getDrawable(R.drawable.menu_themes).getConstantState())){
// return;
//}
//int color = AndroidUtilities.getIntDef("drawerIconColor", 0xff737373);
//if(drawables[0] != null)drawables[0].setColorFilter(color, PorterDuff.Mode.SRC_IN);
}
public void setTextSize(int size) {
textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, size);
}
/*
public void setIconColor(int color) {
Drawable[] drawables = textView.getCompoundDrawables();
if(drawables[0] != null)drawables[0].setColorFilter(color, PorterDuff.Mode.SRC_IN);
}*/
}

View File

@ -167,6 +167,24 @@ public class ResourceLoader {
backgroundMediaDrawableInSelected = context.getResources().getDrawable(R.drawable.msg_in_4_photo_selected);
backgroundMediaDrawableOut = context.getResources().getDrawable(R.drawable.msg_out_4_photo);
backgroundMediaDrawableOutSelected = context.getResources().getDrawable(R.drawable.msg_out_4_photo_selected);
} else if(bubble.equals(ImageListActivity.getBubbleName(4))){
backgroundDrawableIn = context.getResources().getDrawable(R.drawable.msg_in_5);
backgroundDrawableInSelected = context.getResources().getDrawable(R.drawable.msg_in_5_selected);
backgroundDrawableOut = context.getResources().getDrawable(R.drawable.msg_out_5);
backgroundDrawableOutSelected = context.getResources().getDrawable(R.drawable.msg_out_5_selected);
backgroundMediaDrawableIn = context.getResources().getDrawable(R.drawable.msg_in_5_photo);
backgroundMediaDrawableInSelected = context.getResources().getDrawable(R.drawable.msg_in_5_photo_selected);
backgroundMediaDrawableOut = context.getResources().getDrawable(R.drawable.msg_out_5_photo);
backgroundMediaDrawableOutSelected = context.getResources().getDrawable(R.drawable.msg_out_5_photo_selected);
} else if(bubble.equals(ImageListActivity.getBubbleName(5))){
backgroundDrawableIn = context.getResources().getDrawable(R.drawable.msg_in_6);
backgroundDrawableInSelected = context.getResources().getDrawable(R.drawable.msg_in_6_selected);
backgroundDrawableOut = context.getResources().getDrawable(R.drawable.msg_out_6);
backgroundDrawableOutSelected = context.getResources().getDrawable(R.drawable.msg_out_6_selected);
backgroundMediaDrawableIn = context.getResources().getDrawable(R.drawable.msg_in_6_photo);
backgroundMediaDrawableInSelected = context.getResources().getDrawable(R.drawable.msg_in_6_photo_selected);
backgroundMediaDrawableOut = context.getResources().getDrawable(R.drawable.msg_out_6_photo);
backgroundMediaDrawableOutSelected = context.getResources().getDrawable(R.drawable.msg_out_6_photo_selected);
}
}
}

View File

@ -120,6 +120,9 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
@Override
public void onFragmentDestroy() {
super.onFragmentDestroy();
//Plus to paint drawerAction icons (refresh drawerLayoutAdapter)
NotificationCenter.getInstance().postNotificationName(NotificationCenter.mainUserInfoChanged);
//
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.contactsDidLoaded);
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.updateInterfaces);
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.encryptedChatCreated);
@ -171,7 +174,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
}
@Override
public void onSearchCollapse() {
public void onSearchCollapse() {
searchListViewAdapter.searchDialogs(null);
searching = false;
searchWas = false;
@ -196,7 +199,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
if (listView != null) {
listView.setAdapter(searchListViewAdapter);
searchListViewAdapter.notifyDataSetChanged();
if (android.os.Build.VERSION.SDK_INT >= 11) {
if (android.os.Build.VERSION.SDK_INT >= 11) {
listView.setFastScrollAlwaysVisible(false);
}
listView.setFastScrollEnabled(false);
@ -309,7 +312,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
if (row < 0 || section < 0) {
return;
}
if ((!onlyUsers || chat_id != 0) && section == 0) {
if ((!onlyUsers || chat_id != 0) && section == 0) {
if (needPhonebook) {
if (row == 0) {
try {
@ -321,10 +324,10 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
FileLog.e("tmessages", e);
}
}
} else if (chat_id != 0) {
if (row == 0) {
presentFragment(new GroupInviteActivity(chat_id));
}
} else if (chat_id != 0) {
if (row == 0) {
presentFragment(new GroupInviteActivity(chat_id));
}
} else {
if (row == 0) {
if (!MessagesController.isFeatureEnabled("chat_create", ContactsActivity.this)) {
@ -392,7 +395,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
}
});
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
showDialog(builder.create());
showDialog(builder.create());
}
}
}
@ -414,7 +417,6 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
}
}
});
return fragmentView;
}

View File

@ -27,7 +27,9 @@ public class ImageListActivity extends BaseFragment {
"Telegram",
"Lex",
"Hangouts",
"Notepad"
"Notepad",
"Ed",
"Edge"
};
Integer[] imgid ={
@ -35,10 +37,14 @@ public class ImageListActivity extends BaseFragment {
R.drawable.msg_in_2,
R.drawable.msg_in_3,
R.drawable.msg_in_4,
R.drawable.msg_in_5,
R.drawable.msg_in_6,
R.drawable.msg_out,
R.drawable.msg_out_2,
R.drawable.msg_out_3,
R.drawable.msg_out_4
R.drawable.msg_out_4,
R.drawable.msg_out_5,
R.drawable.msg_out_6
};
public static String getBubbleName(int i){

View File

@ -1471,7 +1471,7 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
@Override
@SuppressWarnings("unchecked")
public void didReceivedNotification(int id, Object... args) {
//Log.e("didReceivedNotification",id+"");
//Log.e("didReceivedNotification", id + "");
if (id == NotificationCenter.appDidLogout) {
if (drawerLayoutAdapter != null) {
drawerLayoutAdapter.notifyDataSetChanged();

View File

@ -77,6 +77,8 @@ public class ThemingActivity extends BaseFragment {
private int saveThemeRow;
private int applyThemeRow;
private int dialogColorRow;
private int rowCount;
public final static int CENTER = 0;
@ -88,6 +90,7 @@ public class ThemingActivity extends BaseFragment {
rowCount = 0;
generalSection2Row = rowCount++;
themeColorRow = rowCount++;
dialogColorRow = rowCount++;
screensSectionRow = rowCount++;
screensSection2Row = rowCount++;
@ -161,11 +164,14 @@ public class ThemingActivity extends BaseFragment {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, final int i, long l) {
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
int defColor = preferences.getInt("themeColor", AndroidUtilities.defColor);
if (i == themeColorRow) {
if (getParentActivity() == null) {
return;
}
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
//SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
LayoutInflater li = (LayoutInflater)getParentActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
li.inflate(R.layout.colordialog, null, false);
@ -176,8 +182,22 @@ public class ThemingActivity extends BaseFragment {
commitInt(color);
}
},preferences.getInt("themeColor", AndroidUtilities.defColor), CENTER, 0, false);
}, defColor, CENTER, 0, false);
colorDialog.show();
} else if (i == dialogColorRow) {
if (getParentActivity() == null) {
return;
}
//SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
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("dialogColor", color);
}
},preferences.getInt("dialogColor", defColor), CENTER, 0, false);
colorDialog.show();
} else if(i == saveThemeRow){
LayoutInflater li = LayoutInflater.from(getParentActivity());
@ -187,7 +207,7 @@ public class ThemingActivity extends BaseFragment {
final EditText userInput = (EditText) promptsView.findViewById(R.id.editTextDialogUserInput);
userInput.setHint(LocaleController.getString("EnterName", R.string.EnterName));
userInput.setHintTextColor(0xff979797);
userInput.getBackground().setColorFilter(AndroidUtilities.getIntColor("themeColor"), PorterDuff.Mode.SRC_IN);
userInput.getBackground().setColorFilter(preferences.getInt("dialogColor", defColor), PorterDuff.Mode.SRC_IN);
AndroidUtilities.clearCursorDrawable(userInput);
//builder.setMessage(LocaleController.getString("EnterName", R.string.EnterName));
builder.setTitle(LocaleController.getString("SaveTheme", R.string.SaveTheme));
@ -204,7 +224,7 @@ public class ThemingActivity extends BaseFragment {
saving = false;
if (getParentActivity() != null) {
String pName = userInput.getText().toString();
AndroidUtilities.setStringPref(getParentActivity(),"themeName", pName);
AndroidUtilities.setStringPref(getParentActivity(), "themeName", pName);
try{
PackageInfo pInfo = ApplicationLoader.applicationContext.getPackageManager().getPackageInfo(ApplicationLoader.applicationContext.getPackageName(), 0);
AndroidUtilities.setStringPref(getParentActivity(),"version", pInfo.versionName);
@ -349,6 +369,8 @@ public class ThemingActivity extends BaseFragment {
}
if (i == themeColorRow) {
commitInt(AndroidUtilities.defColor);
} else if(i == dialogColorRow){
resetPref("dialogColor");
}
return true;
}
@ -365,6 +387,26 @@ public class ThemingActivity extends BaseFragment {
return fragmentView;
}
private void resetPref(String key){
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
SharedPreferences.Editor editor = preferences.edit();
editor.remove(key);
editor.commit();
if (listView != null) {
listView.invalidateViews();
}
}
private void commitInt(String key, int value){
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
SharedPreferences.Editor editor = preferences.edit();
editor.putInt(key, value);
editor.commit();
if (listView != null) {
listView.invalidateViews();
}
}
private void commitInt(int i){
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
SharedPreferences.Editor editor = preferences.edit();
@ -395,6 +437,8 @@ public class ThemingActivity extends BaseFragment {
editor.putInt("prefHeaderColor", i);
editor.putInt("dialogColor", i);
editor.commit();
fixLayout();
AndroidUtilities.themeColor = i;
@ -460,7 +504,7 @@ public class ThemingActivity extends BaseFragment {
@Override
public boolean isEnabled(int i) {
return i == themeColorRow || i == chatsRow || i == chatRow || i == contactsRow || i == drawerRow || i == profileRow || i == settingsRow || i == resetThemeRow || i == saveThemeRow || i == applyThemeRow;
return i == themeColorRow || i == dialogColorRow || i == chatsRow || i == chatRow || i == contactsRow || i == drawerRow || i == profileRow || i == settingsRow || i == resetThemeRow || i == saveThemeRow || i == applyThemeRow;
}
@Override
@ -545,8 +589,14 @@ public class ThemingActivity extends BaseFragment {
view = new TextColorCell(mContext);
}
TextColorCell textCell = (TextColorCell) view;
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
int defColor = preferences.getInt("themeColor", AndroidUtilities.defColor);
if (i == themeColorRow) {
textCell.setTextAndColor(LocaleController.getString("themeColor", R.string.themeColor), AndroidUtilities.getIntColor("themeColor"), false);
textCell.setTextAndColor(LocaleController.getString("themeColor", R.string.themeColor), defColor, true);
} else if (i == dialogColorRow) {
textCell.setTextAndColor(LocaleController.getString("DialogColor", R.string.DialogColor), preferences.getInt("dialogColor", defColor), false);
}
}
@ -567,7 +617,7 @@ public class ThemingActivity extends BaseFragment {
else if ( i == resetThemeRow || i == saveThemeRow || i == applyThemeRow) {
return 3;
}
else if ( i == themeColorRow) {
else if ( i == themeColorRow || i == dialogColorRow) {
return 4;
}
else {

View File

@ -91,8 +91,14 @@ public class ThemingChatActivity extends BaseFragment {
private int bubblesRow;
private int avatarSizeRow;
private int avatarAlignTopRow;
private int ownAvatarAlignTopRow;
private int avatarMarginLeftRow;
private int contactNameColorRow;
private int attachBGColorRow;
private int attachTextColorRow;
private int showContactAvatar;
private int showOwnAvatar;
private int showOwnAvatarGroup;
private int rowCount;
@ -118,10 +124,17 @@ public class ThemingChatActivity extends BaseFragment {
solidBGColorCheckRow = rowCount++;
solidBGColorRow = rowCount++;
showContactAvatar = rowCount++;
avatarAlignTopRow = rowCount++;
showOwnAvatar = rowCount++;
showOwnAvatarGroup = rowCount++;
ownAvatarAlignTopRow = rowCount++;
avatarRadiusRow = rowCount++;
avatarSizeRow = rowCount++;
avatarMarginLeftRow = rowCount++;
avatarAlignTopRow = rowCount++;
textSizeRow = rowCount++;
rTextColorRow = rowCount++;
rLinkColorRow = rowCount++;
@ -153,6 +166,9 @@ public class ThemingChatActivity extends BaseFragment {
editTextBGColorRow = rowCount++;
editTextIconsColorRow = rowCount++;
attachBGColorRow = rowCount++;
attachTextColorRow = rowCount++;
emojiViewBGColorRow = rowCount++;
emojiViewTabColorRow = rowCount++;
@ -267,6 +283,50 @@ public class ThemingChatActivity extends BaseFragment {
if (listView != null) {
listView.invalidateViews();
}
} else if (i == ownAvatarAlignTopRow) {
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 == showContactAvatar) {
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 == showOwnAvatar) {
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 == showOwnAvatarGroup) {
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 == solidBGColorRow) {
if (getParentActivity() == null) {
return;
@ -584,6 +644,34 @@ public class ThemingChatActivity extends BaseFragment {
},themePrefs.getInt("chatEditTextBGColor", 0xffffffff), CENTER, 0, true);
colorDialog.show();
} else if (i == attachBGColorRow) {
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("chatAttachBGColor", color);
}
},themePrefs.getInt("chatAttachBGColor", 0xffffffff), CENTER, 0, true);
colorDialog.show();
} else if (i == attachTextColorRow) {
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("chatAttachTextColor", color);
}
},themePrefs.getInt("chatAttachTextColor", 0xff757575), CENTER, 0, true);
colorDialog.show();
} else if (i == editTextIconsColorRow) {
if (getParentActivity() == null) {
@ -931,6 +1019,10 @@ public class ThemingChatActivity extends BaseFragment {
resetPref("chatEditTextSize");
} else if (i == editTextBGColorRow) {
resetPref("chatEditTextBGColor");
} else if (i == attachBGColorRow) {
resetPref("chatAttachBGColor");
} else if (i == attachTextColorRow) {
resetPref("chatAttachTextColor");
} else if (i == emojiViewBGColorRow) {
resetPref("chatEmojiViewBGColor");
} else if (i == emojiViewTabColorRow) {
@ -1045,10 +1137,10 @@ public class ThemingChatActivity extends BaseFragment {
@Override
public boolean isEnabled(int i) {
return i == headerColorRow || i == muteColorRow || i == headerIconsColorRow || i == rBubbleColorRow || i == lBubbleColorRow || i == bubblesRow ||
i == solidBGColorCheckRow || AndroidUtilities.getBoolPref("chatSolidBGColorCheck") && i == solidBGColorRow || i == avatarRadiusRow || i == avatarSizeRow || i == avatarMarginLeftRow || i == avatarAlignTopRow || i == nameColorRow || i == nameSizeRow || i == statusColorRow || i == statusSizeRow ||
i == solidBGColorCheckRow || AndroidUtilities.getBoolPref("chatSolidBGColorCheck") && i == solidBGColorRow || i == avatarRadiusRow || i == avatarSizeRow || i == avatarMarginLeftRow || i == avatarAlignTopRow || i == ownAvatarAlignTopRow || i == showContactAvatar || i == showOwnAvatar || i == showOwnAvatarGroup || i == nameColorRow || i == nameSizeRow || i == statusColorRow || i == statusSizeRow ||
i == textSizeRow || i == timeSizeRow || i == dateColorRow || i == dateSizeRow || i == dateBubbleColorRow || i == rTextColorRow || i == rLinkColorRow || i == lTextColorRow || i == lLinkColorRow ||
i == rTimeColorRow|| i == lTimeColorRow || i == checksColorRow || i == memberColorCheckRow || AndroidUtilities.getBoolPref("chatMemberColorCheck") && i == memberColorRow || i == contactNameColorRow || i == forwardRightNameColorRow || i == forwardLeftNameColorRow ||
i == editTextSizeRow || i == editTextColorRow || i == editTextIconsColorRow || i == sendColorRow || i == editTextBGColorRow ||
i == editTextSizeRow || i == editTextColorRow || i == editTextIconsColorRow || i == sendColorRow || i == editTextBGColorRow || i == attachBGColorRow || i == attachTextColorRow ||
i == emojiViewBGColorRow || i == emojiViewTabColorRow;
}
@ -1145,6 +1237,18 @@ public class ThemingChatActivity extends BaseFragment {
} else if (i == avatarAlignTopRow) {
textCell.setTag("chatAvatarAlignTop");
textCell.setTextAndCheck(LocaleController.getString("AvatarAlignTop", R.string.AvatarAlignTop), themePrefs.getBoolean("chatAvatarAlignTop", false), true);
} else if (i == ownAvatarAlignTopRow) {
textCell.setTag("chatOwnAvatarAlignTop");
textCell.setTextAndCheck(LocaleController.getString("OwnAvatarAlignTop", R.string.OwnAvatarAlignTop), themePrefs.getBoolean("chatOwnAvatarAlignTop", false), true);
} else if (i == showContactAvatar) {
textCell.setTag("chatShowContactAvatar");
textCell.setTextAndCheck(LocaleController.getString("ShowContactAvatar", R.string.ShowContactAvatar), themePrefs.getBoolean("chatShowContactAvatar", false), true);
} else if (i == showOwnAvatar) {
textCell.setTag("chatShowOwnAvatar");
textCell.setTextAndCheck(LocaleController.getString("ShowOwnAvatar", R.string.ShowOwnAvatar), themePrefs.getBoolean("chatShowOwnAvatar", false), true);
} else if (i == showOwnAvatarGroup) {
textCell.setTag("chatShowOwnAvatarGroup");
textCell.setTextAndCheck(LocaleController.getString("ShowOwnAvatarGroup", R.string.ShowOwnAvatarGroup), themePrefs.getBoolean("chatShowOwnAvatarGroup", false), true);
}
}
else if (type == 3){
@ -1212,6 +1316,10 @@ 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 == attachBGColorRow) {
textCell.setTextAndColor(LocaleController.getString("AttachBGColor", R.string.AttachBGColor), themePrefs.getInt("chatAttachBGColor", 0xffffffff), true);
} else if (i == attachTextColorRow) {
textCell.setTextAndColor(LocaleController.getString("AttachTextColor", R.string.AttachTextColor), themePrefs.getInt("chatAttachTextColor", 0xff757575), true);
} else if (i == editTextIconsColorRow) {
textCell.setTag("chatEditTextIconsColor");
textCell.setTextAndColor(LocaleController.getString("EditTextIconsColor", R.string.EditTextIconsColor), themePrefs.getInt("chatEditTextIconsColor", 0xffadadad), true);
@ -1239,10 +1347,10 @@ public class ThemingChatActivity extends BaseFragment {
else if ( i == headerColorRow || i == muteColorRow || i == headerIconsColorRow ||
i == solidBGColorRow || i == rBubbleColorRow || i == lBubbleColorRow || i == nameColorRow || i == statusColorRow || i == dateColorRow || i == dateBubbleColorRow ||
i == rTextColorRow || i == rLinkColorRow || i == lTextColorRow || i == lLinkColorRow || i == rLinkColorRow || i == rTimeColorRow || i == lTimeColorRow || i == checksColorRow || i == memberColorRow || i == contactNameColorRow || i == forwardRightNameColorRow || i == forwardLeftNameColorRow ||
i == sendColorRow || i == editTextColorRow || i == editTextBGColorRow || i == editTextIconsColorRow ||
i == sendColorRow || i == editTextColorRow || i == editTextBGColorRow || i == editTextIconsColorRow || i == attachBGColorRow || i == attachTextColorRow ||
i == emojiViewBGColorRow || i == emojiViewTabColorRow) {
return 3;
} else if (i == solidBGColorCheckRow || i == memberColorCheckRow || i == avatarAlignTopRow) {
} else if (i == solidBGColorCheckRow || i == memberColorCheckRow || i == avatarAlignTopRow || i == ownAvatarAlignTopRow || i == showContactAvatar || i == showOwnAvatar || i == showOwnAvatarGroup) {
return 4;
}
else {

View File

@ -835,7 +835,7 @@
<string name="formatDateAtTime">%1$s الساعة %2$s</string>
<!--update text-->
<string name="updateText">تم تحديث تيليجرام نسخة الأندرويد. الجديد في النسخة رقم 3.1:\n\n- بحث عن الرسائل داخل محادثات محددة. \n- إعادة تصميم كاملة لشاشة ارفاق الملفات. إرسال جهات اتصال وملفات صوتية مباشرة من خيار المرفقات. \n- تطوير لتشغيل الوسائط داخل التطبيق (يوتيوب, ڤيميو, ساوندكلاود وغيرها.),.\n\nللاستزادة، اطلع هنا:\nhttps://telegram.org/blog/search-and-media</string>
<string name="updateBuild">583</string>
<string name="updateBuild">586</string>
<!--Telegram+-->
<string name="updatePlusText"></string>
<string name="TelegramForAndroid">بلاس مسنجر للأندرويد</string>

View File

@ -953,4 +953,8 @@
<string name="SummaryColor">Color del resum/subtítol</string>
<string name="MediaColor">Color del text «Foto/Adhesiu»</string>
<string name="ThemesAppMsg">Voleu veure alguns temes creats per altes usuaris de Plus Messenger?</string>
<string name="UseDeviceFont">Usa la font del dispositiu</string>
<string name="AppWillRestart">Plus Messenger es reiniciarà</string>
<string name="GroupIconColor">Color de la icona de grup</string>
<string name="SharedContactNameColor">Color del nom de contacte compartit</string>
</resources>

View File

@ -835,10 +835,10 @@
<string name="formatDateAtTime">%1$s um %2$s</string>
<!--update text-->
<string name="updateText">Plus Messenger für Android wurde aktualisiert. Neu in Version 3.1:\n\n- Direkte Suche in Chats.\n- In Chats versteckt sich ein komplett neues Menü hinter der Büroklammer. Nun kann man dort auch Musik und Kontakte versenden.\n- In-App Medienwiedergabe für YouTube, Vimeo, SoundCloud, etc. optimiert und neuer Player für Audiodateien.\n\nMehr dazu unter:\nhttps://telegram.org/blog/search-and-media</string>
<string name="updateBuild">583</string>
<!--Telegram+--><!--
<string name="updateBuild">586</string>
<!--Telegram+-->
<string name="updatePlusText">
\n\nNew in 3.0.1.3:\n\n- Option in den Einstellungen Systemschrift verwenden\n- Option Suchen im Chat/Gruppe\n- Hinzugefügt: MOD Farbe Kopfzeile , Titelfarbe Kopfzeile und Symbolefarbe in Farbeinstellungen ändern / Themen bearbeiten\n- MOD Gruppen Symbol Farbe in der Chatübersicht ändern\n- MOD Symbolgröße in Navigationsmenü ändern \n- Fehlerbehebung</string>-->
\n\nNeu in 3.1.1.6:\n\n- Neuer MOD Zeige eigenes Profilbild im Gruppenchat \n- Neuer MOD eigenes Profilbild nach oben ausrichten\n- Hinzugefügt MOD Farbe der Dialogtitel/Taste ändern\n- Fehlerbehebung</string>
<string name="TelegramForAndroid">Plus Messenger für Android</string>
<string name="Theming">Themen bearbeiten</string>
<string name="colorHexInvalid">Ungültiger Hex-Code!</string>
@ -867,8 +867,8 @@
<string name="CountSize">Benachrichtigungszähler</string>
<string name="RowColor">Hintergrund</string>
<string name="CountBGColor">Hintergrund Benachrichtigungszähler</string>
<string name="StatusColor">Onlinestatus</string>
<string name="StatusSize">Onlinestatus</string>
<string name="StatusColor">Online Status</string>
<string name="StatusSize">Online Status</string>
<string name="RBubbleColor">rechte Sprechblasen</string>
<string name="LBubbleColor">linke Sprechblasen</string>
<string name="DateColor">Datum</string>
@ -884,7 +884,7 @@
<string name="EditTextBGColor">Hintergrund Texteingabefeld</string>
<string name="EmojiViewBGColor">Hintergrund Emojis</string>
<string name="EmojiViewTabColor">Tab Emojis</string>
<string name="OnlineColor">Onlinestatus</string>
<string name="OnlineColor">Online</string>
<string name="ChatMusic">Musik</string>
<string name="SaveTheme">Thema speichern</string>
<string name="SaveThemeSum">Thema im Ordner Telegram/Themen speichern</string>
@ -941,9 +941,9 @@
<string name="BubbleStyle">Sprechblasen Form</string>
<string name="KeepOriginalFilename">original Dateinamen speichern</string>
<string name="KeepOriginalFilenameHelp">Statt Zahlen wird Dateiname_Datum gespeichert</string>
<string name="AvatarSize">Profilbild Gruppenchat</string>
<string name="AvatarAlignTop">Profilbild Gruppenchat nach oben</string>
<string name="AvatarMarginLeft">Profilbild Randabstand Gruppenchat </string>
<string name="AvatarSize">Profilbild Rand</string>
<string name="AvatarAlignTop">Kontakt Profibild nach oben</string>
<string name="AvatarMarginLeft">Profilbild Rand</string>
<string name="GroupNameColor">Gruppenname</string>
<string name="GroupNameSize">Gruppenname</string>
<string name="UnknownNameColor">Name (unbekannte Nummer)</string>
@ -965,4 +965,12 @@
<string name="UseDeviceFont">Systemschrift verwenden</string>
<string name="AppWillRestart">Der Plus Messenger wird neu gestartet</string>
<string name="GroupIconColor">Gruppensymbole</string>
<string name="SharedContactNameColor">gemeinsame Kontaktnamen</string>
<string name="AttachBGColor">Hintergrundfarbe Anhang</string>
<string name="AttachTextColor">Textfarbe Anhang</string>
<string name="ShowContactAvatar">Zeigt Kontakt Profilbild im Chat</string>
<string name="ShowOwnAvatar">Zeige eigenes Profilbild im Chat</string>
<string name="ShowOwnAvatarGroup">Zeige eigenes Profilbild im Gruppenchat</string>
<string name="OwnAvatarAlignTop">Eigenes Profilbild nach oben</string>
<string name="DialogColor">Dialog Titel/Schaltfläche</string>
</resources>

View File

@ -835,9 +835,9 @@
<string name="formatDateAtTime">%1$s a las %2$s</string>
<!--update text-->
<string name="updateText">Plus Messenger para Android fue actualizada. Novedades en la versión 3.1:\n\n- Busca mensajes dentro de un chat en específico.\n- Menú para adjuntar completamente rediseñado. Envía contactos y archivos de audio directamente desde el menú para adjuntar.\n- Reproducción de multimedia dentro de la aplicación mejorada (YouTube, Vimeo, SoundCloud etc.), nuevo reproductor para archivos de audio largos.\n\nMás sobre esta actualización:\nhttps://telegram.org/blog/search-and-media</string>
<string name="updateBuild">583</string>
<string name="updateBuild">586</string>
<!--Telegram+ Spanish-->
<string name="updatePlusText">\n\nNovedades en 3.1.1.3:\n\n- Nuevo MOD para ajustar color de estado en pantalla Ajustes\n- Solución de errores</string>
<string name="updatePlusText">\n\nNovedades en 3.1.1.6:\n\n- Nuevo MOD para mostrar foto de contacto en pantalla chat\n- Nuevo MOD para mostrar foto propia en pantalla de chat y grupo\n- Nuevo MOD para alinear foto propia arriba de bocadillo en chat\n- Añadidos nuevos bocadillos Ed y Edge (gracias a Edwin Macalopu)\n- Nuevo MOD para ajustar color de fondo y de texto en vista adjuntar en pantalla chat\n- Nuevo MOD para ajustar color de título y botón de diálogo\n- Solución de errores</string>
<string name="TelegramForAndroid">Plus Messenger para Android</string>
<string name="Theming">Tematización</string>
<string name="colorHexInvalid">¡Color hexadecimal inválido!</string>
@ -941,8 +941,8 @@
<string name="KeepOriginalFilename">Mantener nombre de archivo original</string>
<string name="KeepOriginalFilenameHelp">En lugar de solo números los archivos se guardarán usando el formato nombre_fecha</string>
<string name="AvatarSize">Tamaño de avatar</string>
<string name="AvatarAlignTop">Alinear avatar arriba</string>
<string name="AvatarMarginLeft">Margen izquierdo de avatar</string>
<string name="AvatarAlignTop">Alinear foto de contacto arriba</string>
<string name="AvatarMarginLeft">Margen lateral de avatar</string>
<string name="GroupNameColor">Color de nombre de grupo</string>
<string name="GroupNameSize">Tamaño de nombre de grupo</string>
<string name="UnknownNameColor">Color de nombre (nº desconocido)</string>
@ -965,4 +965,11 @@
<string name="AppWillRestart">Plus Messenger se reiniciará</string>
<string name="GroupIconColor">Color de icono de grupo</string>
<string name="SharedContactNameColor">Color de nombre de contacto compartido</string>
<string name="AttachBGColor">Color de fondo de adjuntar</string>
<string name="AttachTextColor">Color de texto de adjuntar</string>
<string name="ShowContactAvatar">Muestra foto de contacto en chat</string>
<string name="ShowOwnAvatar">Muestra foto propia en chat</string>
<string name="ShowOwnAvatarGroup">Muestra foto propia en grupo</string>
<string name="OwnAvatarAlignTop">Alinear foto propia arriba</string>
<string name="DialogColor">Color de título/botón de diálogo</string>
</resources>

View File

@ -832,7 +832,7 @@
<string name="formatDateAtTime">%1$s à %2$s</string>
<!--update text--><!--
<string name="updateText">Plus Messenger pour Android vient d\'être mis à jour. Nouveautés de la version 2.9: \n\n- Installez et partagez des paquets de stickers personnalisés comme celui-ci: this one: https://play.google.com/store/apps/details?id=es.rafalense.themes\n- Si vous êtes un artiste, créez vos paquets de stickers, en utilisant notre robot @stickers. \n\n- Utilisez Telegram avec Android Auto.</string>-->
<string name="updateBuild">583</string>
<string name="updateBuild">586</string>
<!--Telegram+ French-->
<string name="TelegramForAndroid">Plus Messenger pour Android</string>
<string name="Theming">Thème</string>

View File

@ -515,7 +515,7 @@
<string name="formatDateAtTime">%1$s पर %2$s</string>
<!--update text-->
<string name="updateText">Plus Messenger for Android has been updated. New in Version 3.0:\n\n\n\n- Dedicated tabs for each one of your custom sticker sets in the sticker panel. Add custom stickers like https://telegram.me/addstickers/Animals\n- New bot API, free for everyone. If you\'re an engineer, create your own bots for games, services or integrations. Learn more at https://telegram.org/blog/bot-revolution\n https://play.google.com/store/apps/details?id=es.rafalense.themes</string>
<string name="updateBuild">583</string>
<string name="updateBuild">586</string>
<!--Telegram+-->
<string name="updatePlusText"></string>
<string name="TelegramForAndroid">Android के लिए प्लस मैसेंजर</string>
@ -535,7 +535,7 @@
<string name="ChatList">वार्तालाप की सूची </string>
<string name="ChatsList">वार्तालापों की सूची</string>
<string name="ContactsList">संपर्क लिस्ट</string>
<string name="HeaderColor">हैडर रंग</string>
<string name="HeaderColor">हैडर का रंग</string>
<string name="NameColor">नाम का रंग</string>
<string name="NameSize">नाम का माप</string>
<string name="MessageColor">संदेश का रंग</string>
@ -641,4 +641,7 @@
<string name="SummaryColor">सारांश/उपशीर्षक का रंग</string>
<string name="MediaColor">फोटो/स्टीकर के शब्दों का रंग</string>
<string name="ThemesAppMsg"> क्या आप प्लस मैसेंजर के दूसरे उपभोग्ताओं द्वारा बनायीं गयी थीम देखना पसंद करेंगे?</string>
<string name="UseDeviceFont">फ़ोन की लिपि दिखाए</string>
<string name="AppWillRestart">प्लस मैसेंजर पुनप्रारंभ होरहा है </string>
<string name="GroupIconColor">समूह चिह्नों का रंग</string>
</resources>

View File

@ -835,9 +835,10 @@
<string name="formatDateAtTime">%1$s alle %2$s</string>
<!--update text-->
<string name="updateText">Plus Messenger per Android si è aggiornato. Nuovo nella versione 3.1:\n\n- Cerca messaggi all\'interno di una specifica chat.\n- Menu degli allegati completamente ridisegnato. Invia contatti e audio direttamente dal menu degli allegati.\n- Riproduzione in-app migliorata (YouTube, Vimeo, SoundCloud etc.), nuovo player per i file audio.\n\nMaggiori informazioni su questo aggiornamento:\nhttps://telegram.org/blog/search-and-media</string>
<string name="updateBuild">583</string>
<!--Telegram+--><!--
<string name="updatePlusText">\n\nNovità nella v3.0.1.5:\n\n- Opzione nelle Impostazioni per utilizzare il font di sistema\n- Opzione per la ricerca all\'interno di chat/gruppi\n- Aggiunta MOD per cambiare il colore dell\'intestazione, del titolo dell\'intestazione ed il colore delle icone dell\'intestazione (Impostazioni/Schermata dei temi)\n- MOD per cambiare il colore dell\'icona di gruppo nella schermata principale\n- MOD per cambiare la dimensione dell\'avatar nel menù di navigazione\n- Bug fixes</string>-->
<string name="updateBuild">586</string>
<!--Telegram+-->
<string name="updatePlusText">
\n\nNovità 3.1.1.6:\n\n- Nuova MOD per visualizzare il proprio avatar nella schermata del gruppo\n- Nuova MOD per allineare il proprio avatar all\'intestazione\n- Aggiunta MOD per cambiare il colore di titolo e pulsante dei dialog\n- Correzioni bug</string>
<string name="TelegramForAndroid">Plus Messenger per Android</string>
<string name="Theming">Personalizzazione</string>
<string name="colorHexInvalid">Codice del colore esadecimale non valido!</string>
@ -941,8 +942,8 @@
<string name="KeepOriginalFilename">Mantieni il nome originale del file</string>
<string name="KeepOriginalFilenameHelp">I file verranno salvati usando il formato nome_data anziché solo il numero</string>
<string name="AvatarSize">Dimensione avatar</string>
<string name="AvatarAlignTop">Allinea l\'avatar in cima</string>
<string name="AvatarMarginLeft">Margine a sinistra dell\'avatar</string>
<string name="AvatarAlignTop">Allinea l\'avatar del contatto all\'intestazione</string>
<string name="AvatarMarginLeft">Margine avatar</string>
<string name="GroupNameColor">Colore del nome del gruppo</string>
<string name="GroupNameSize">Dimensione del nome del gruppo</string>
<string name="UnknownNameColor">Colore del nome (numero sconosciuto)</string>
@ -964,4 +965,12 @@
<string name="UseDeviceFont">Usa il font di sistema</string>
<string name="AppWillRestart">Plus Messenger si riavvierà</string>
<string name="GroupIconColor">Colore dell\'icona del gruppo</string>
<string name="SharedContactNameColor">Colore del nome del contatto condiviso</string>
<string name="AttachBGColor">Colore di sfondo del pannello degli allegati</string>
<string name="AttachTextColor">Colore del testo del pannello degli allegati</string>
<string name="ShowContactAvatar">Mostra l\'avatar del contatto nella schermata delle chat</string>
<string name="ShowOwnAvatar">Mostra il proprio avatar nella schermata della chat</string>
<string name="ShowOwnAvatarGroup">Visualizza il proprio avatar nella schermata del gruppo</string>
<string name="OwnAvatarAlignTop">Allinea il proprio avatar all\'intestazione</string>
<string name="DialogColor">Colore titolo/pulsante dei dialog</string>
</resources>

View File

@ -835,5 +835,5 @@
<string name="formatDateAtTime">%1$s %2$s</string>
<!--update text-->
<string name="updateText">텔레그램 안드로이드 버전이 업데이트 되었습니다. 새로운 버전은 3.1 입니다:\n\n- 특정 대화창에서 검색. \n- 첨부 메뉴 개선. 해당 메뉴에서 바로 연락처, 오디오를 전송 가능. \n- 인앱 미디어 재생 기능 향상 (YouTube, Vimeo, SoundCloud etc). 대용량 오디오 파일 별도 플레이어 기능. \n\nhttps://telegram.org/blog/search-and-media에서 자세한 사항을 알아보세요.</string>
<string name="updateBuild">583</string>
<string name="updateBuild">586</string>
</resources>

View File

@ -835,7 +835,7 @@
<string name="formatDateAtTime">%1$s om %2$s</string>
<!--update text-->
<string name="updateText">Plus Messenger voor Android is bijgewerkt. Nieuw in versie 3.1:\n\n- Zoek naar berichten in een specifieke chat.\n- Volledig opnieuw ontworpen bijlagemenu. Verstuur contacten en audiobestanden rechtstreeks vanuit het bijlagemenu.\n- Afspelen van media in de app verbeterd (YouTube, Vimeo, SoundCloud, etc.), nieuwe speler voor grote audiobestanden.\n\nMeer weten? Kijk op:\nhttps://telegram.org/blog/search-and-media</string>
<string name="updateBuild">583</string>
<string name="updateBuild">586</string>
<!--Telegram+-->
<string name="updatePlusText"></string>
<string name="TelegramForAndroid">Plus Messenger voor Android</string>

View File

@ -835,9 +835,9 @@
<string name="formatDateAtTime">%1$s às %2$s</string>
<!--update text-->
<string name="updateText">Plus Messenger para Android foi atualizado. Novo na versão 3.1:\n\n- Busca por mensagens dentro de um chat específico.\n-Menu de anexo totalmente redesenhado. Envie contatos e arquivos de áudio diretamente do menu de anexo.\n- Reprodução melhorada de mídia dentro do aplicativo (YouTube, Vimeo, SoundCloud, etc.), novo player para grandes arquivos de áudio.\n\nMais sobre a atualização:\nhttps://telegram.org/blog/search-and-media</string>
<string name="updateBuild">583</string>
<string name="updateBuild">586</string>
<!--Telegram+-->
<string name="updatePlusText">\n\nNovidades na versão 3.1.1.3:\n\n- Novo MOD para mudar a cor, tamanho e arredondamento do avatar nas configurações\n- Novo MOD para mudar a cor do nome de contatos compartilhados na tela de conversas\n- Correção de bugs</string>
<string name="updatePlusText">\n\nNovo em 3.1.1.6:\n\n- Novo MOD para mostrar o próprio avatar na tela de grupos\n- Novo MOD para alinhar o próprio avatar no topo\n- Adicionado o MOD para mudar a cor do titulo do dialogo e botão\n- Concertos de Bugs</string>
<string name="TelegramForAndroid">Plus Messenger para Android</string>
<string name="Theming">Personalização</string>
<string name="colorHexInvalid">Código de cor hexadecimal inválido!</string>
@ -941,8 +941,8 @@
<string name="KeepOriginalFilename">Manter Nome de Arquivo Original</string>
<string name="KeepOriginalFilenameHelp">Ao invés de apenas números, os arquivos serão salvos no formato nome_data</string>
<string name="AvatarSize">Tamanho do Avatar</string>
<string name="AvatarAlignTop">Alinhar Avatar ao Topo</string>
<string name="AvatarMarginLeft">Margem Esquerda do Avatar</string>
<string name="AvatarAlignTop">Alinhar avatar do contato no topo</string>
<string name="AvatarMarginLeft">Margem do Avatar</string>
<string name="GroupNameColor">Cor do Nome do Grupo</string>
<string name="GroupNameSize">Tamanho do Nome do Grupo</string>
<string name="UnknownNameColor">Cor do Nome (Número Desconhecido)</string>
@ -965,4 +965,11 @@
<string name="AppWillRestart">O Plus Messenger irá reiniciar</string>
<string name="GroupIconColor">Cor do Ícone de Grupo</string>
<string name="SharedContactNameColor">Cor do Nome do Contato Compartilhado</string>
<string name="AttachBGColor">Atribuir a cor do fundo</string>
<string name="AttachTextColor">Atribuir à cor do texto</string>
<string name="ShowContactAvatar">Mostrar avatar do contato na tela de conversa</string>
<string name="ShowOwnAvatar">Mostrar o próprio avatar na tela de conversa</string>
<string name="ShowOwnAvatarGroup">Mostrar o próprio avatar na tela de grupo</string>
<string name="OwnAvatarAlignTop">Alinhar o próprio avatar no topo</string>
<string name="DialogColor">Cor do titulo/botão de dialogo </string>
</resources>

View File

@ -835,7 +835,7 @@
<string name="formatDateAtTime">%1$s às %2$s</string>
<!--update text-->
<string name="updateText">Plus Messenger para Android foi atualizado. Novo na versão 3.1:\n\n- Busca por mensagens dentro de um chat específico.\n-Menu de anexo totalmente redesenhado. Envie contatos e arquivos de áudio diretamente do menu de anexo.\n- Reprodução melhorada de mídia dentro do aplicativo (YouTube, Vimeo, SoundCloud, etc.), novo player para grandes arquivos de áudio.\n\nMais sobre a atualização:\nhttps://telegram.org/blog/search-and-media</string>
<string name="updateBuild">583</string>
<string name="updateBuild">586</string>
<!--Telegram+ Portuguese(Portugal)-->
<string name="TelegramForAndroid">Plus Messenger para Android</string>
<string name="Theming">Temas</string>

View File

@ -832,7 +832,7 @@
<string name="formatDateAtTime">%1$s в %2$s</string>
<!--update text-->
<string name="updateText">Plus Messenger для Android обновлён. Новое в версии 3.1:\n\n- Поиск сообщений внутри конкретного чата.\n- Полностью переработано меню вложений. Отправка контактов и аудиофайлов прямо из меню вложений.\n- Улучшено воспроизведение медиа в приложении (YouTube, Vimeo, SoundCloud и др.), новый плеер для больших аудиофайлов.\n\nБольше об этом обновлении:\nhttps://telegram.org/blog/search-and-media</string>
<string name="updateBuild">583</string>
<string name="updateBuild">586</string>
<!--Telegram+ Russian-->
<string name="TelegramForAndroid">Plus Messenger для Android</string>
<string name="Theming">Кастомизация</string>

View File

@ -395,10 +395,10 @@
<string name="formatterDay24H">SS:dd</string>
<!--update text-->
<string name="updateText">Plus Messenger için temalar indirin ve uygulayın. Hergün yeni temalar ekleniyor:\n https://play.google.com/store/apps/details?id=es.rafalense.themes</string>
<string name="updateBuild">583</string>
<string name="updateBuild">586</string>
<!--Telegram+--><!--
<string name="updatePlusText">
\n\n3.0.1.3\'daki yenilikler:\n\n- Ayarlara telefon yazı tipini kullanma opsiyonu eklendi\n- Sohbet/Grup içinde arama opsiyonu eklendi\n- Ayarlar/Tema ekranında başlık rengi, başlık yazı rengi ve başlık ikonları değiştirme modu eklendi\n- Ana ekranda grup ikon rengini değiştirme modu eklendi\n- Sol menüdeki avatar büyüklüğünü değiştirme modu eklendi\n- Hata düzeltmeleri</string>-->
\n\nNew in 3.1.1.6:\n\n- Yeni MOD sohbet ekranında konuşmacıların profil fotoğrafları artık görünür olarak ayarlanıyor\n- Yeni balon eklendi (Teşekkürler bay Edwin Macalopu)\n- Yeni MOD sohbet ekranına duvar kağıdı ve yazı rengi eklenebiliniyor.\n- Küçük hata düzeltmeleri yapıldı ama Türkler sizin için saatin düzeldiği sözünü henüz veremem k bakmayın, ihsan.</string>-->
<string name="TelegramForAndroid">Android için Plus Messenger</string>
<string name="Theming">Tema</string>
<string name="colorHexInvalid">Geçersiz renk hex kodu!</string>
@ -502,7 +502,7 @@
<string name="KeepOriginalFilename">Orijinal dosya ismini tut</string>
<string name="KeepOriginalFilenameHelp">Dosyalar sadece sayısal değer yerine isim_tarih şeklinde isimlendirilerek kaydedilecek</string>
<string name="AvatarSize">Avatar Boyutu</string>
<string name="AvatarAlignTop">Avatarı Üste Hizala</string>
<string name="AvatarAlignTop">Fotoğrafı başa hizala</string>
<string name="AvatarMarginLeft">Avatar Sol Kenar Boşluğu</string>
<string name="GroupNameColor">Grup isim rengi</string>
<string name="GroupNameSize">Grup isim boyutu</string>
@ -525,4 +525,12 @@
<string name="UseDeviceFont">Aygıt yazı tipini kullan</string>
<string name="AppWillRestart">Plus Messenger yeniden başlayacak</string>
<string name="GroupIconColor">Grup ikon rengi</string>
<string name="SharedContactNameColor">Paylaşılan kişi ismi rengi</string>
<string name="AttachBGColor">Arka plan rengi ekle</string>
<string name="AttachTextColor">Metin rengi ekle</string>
<string name="ShowContactAvatar">Kişi fotoğrafını sohbet ekranda göster</string>
<string name="ShowOwnAvatar">Sohbette kendi fotoğrafını göster</string>
<string name="ShowOwnAvatarGroup">Grupta kendi fotoğrafını göster</string>
<string name="OwnAvatarAlignTop">Fotoğrafını başa hizala</string>
<string name="DialogColor">Başlık/buton rengi</string>
</resources>

View File

@ -804,7 +804,7 @@
<string name="formatDateAtTime">%1$s 的 %2$s</string>
<!--update text-->
<string name="updateText">Android 版的 Plus Messenger 已更新。最新版本 3.1 的新增功能有:\n\n- 在特定聊天中搜索消息内容。\n- 全新设计的附件选择菜单。从附件选择菜单中直接发送联系人资料或语音文件。\n- 改进的程序内媒体播放功能 YouTube, Vimoe, Soundcloud 等), 新播放器适用于大型语音文件。\n\n更多更新请查看\nhttps://telegram.org/blog/search-and-media</string>
<string name="updateBuild">583</string>
<string name="updateBuild">586</string>
<!--Telegram+--><!--
<string name="updatePlusText">\n\n在 3.0.1.3 版的新功能:\n\n- 添加设置使用手机字体选项\n- 添加聊天/群组聊天内搜索聊天记录选项\n- 在设置/主题调整界面里添加标头颜色、标题颜色和标头图标颜色的设置\n- 添加主界面群组图标颜色的设置\n- 添加导航栏中头像大小的设置\n- 错误修复</string>-->
<string name="TelegramForAndroid">Plus Messenger for Android</string>

View File

@ -808,10 +808,10 @@
<string name="formatDateAtTime">%1$s 於時間 %2$s</string>
<!--update text-->
<string name="updateText">Android 版的 Plus Messenger 已經更新。在版本 3.1 的新功能:\n\n- 在特定的聊天室裡搜尋訊息。\n- 完全重新設計的附件選單。從附件選單直接傳送「聯絡人」資訊和「音訊檔」。\n- 改進的程式內媒體播放( YouTube、Vimoe、SoundCloud 等 ),新的播放器適用於大型音訊檔。\n\n更多關於這次的更新\nhttps://telegram.org/blog/search-and-media</string>
<string name="updateBuild">583</string>
<!--Telegram+--><!--
<string name="updateBuild">586</string>
<!--Telegram+-->
<string name="updatePlusText">
\n\n在 3.0.1.3 版的新功能:\n\n- 在「設定」中使用手機字型的選項\n- 在聊天室/群組聊天室內部搜尋的選項\n- 加入模組以變更在「設定」與「自製佈景主題」中的標頭顏色、標頭標題顏色和標頭圖示顏色\n- 模組用於變更在主畫面中群組圖示的顏色\n- 模組用於在導航選單變更大頭照大小\n- 錯誤修正</string>-->
\n\n在 3.1.1.6 版的新功能:\n\n- 新的模組在聊天畫面顯示擁有的大頭照\n- 加入新的泡泡邊緣 (感謝 Edwin Macalopu)\n- 錯誤修復</string>
<string name="TelegramForAndroid">適用於 Android 的 Plus Messenger</string>
<string name="Theming">自製佈景主題</string>
<string name="colorHexInvalid">無效的十六進位顏色代碼!</string>
@ -938,4 +938,10 @@
<string name="UseDeviceFont">使用裝置字型</string>
<string name="AppWillRestart">Plus Messenger 將重新啟動</string>
<string name="GroupIconColor">群組圖示顏色</string>
<string name="SharedContactNameColor">共享聯絡人名稱的顏色</string>
<string name="AttachBGColor">附加背景顏色</string>
<string name="AttachTextColor">附加文字顏色</string>
<string name="ShowContactAvatar">在聊天畫面中顯示聯絡人大頭照</string>
<string name="ShowOwnAvatar">在聊天畫面中顯示擁有的大頭照</string>
<string name="OwnAvatarAlignTop">對齊擁有的大頭照到頂端</string>
</resources>

View File

@ -836,9 +836,9 @@
<string name="formatDateAtTime">%1$s at %2$s</string>
<!--update text-->
<string name="updateText">Plus Messenger for Android has been updated. New in version 3.1:\n\n- Search for messages inside a specific chat.\n- Fully redesigned attachment menu. Send contacts and audio files straight from the attachment menu.\n- Improved in-app media playback (YouTube, Vimeo, SoundCloud etc.), new player for large audio files.\n\nMore about this update:\nhttps://telegram.org/blog/search-and-media</string>
<string name="updateBuild">583</string>
<string name="updateBuild">586</string>
<!--Telegram+-->
<string name="updatePlusText">\n\nNew in 3.1.1.3:\n\n- New MOD to change status color in Settings screen\n- Bug fixes</string>
<string name="updatePlusText">\n\nNew in 3.1.1.6:\n\n- New MOD to show contact avatar in chat screen\n- New MOD to show own avatar in chat and group screen\n- New MOD to align own avatar to top\n- Added new bubbles Ed and Edge (thanks to Edwin Macalopu)\n- New MOD to change background and text color in attach view in chat screen\n- Added MOD to change color of dialog title and button\n- Bug fixes</string>
<string name="TelegramForAndroid">Plus Messenger for Android</string>
<string name="Theming">Theming</string>
<string name="colorHexInvalid">Invalid color hex code!</string>
@ -942,8 +942,8 @@
<string name="KeepOriginalFilename">Keep original filename</string>
<string name="KeepOriginalFilenameHelp">Instead of just numbers files will be saved using name_date format</string>
<string name="AvatarSize">Avatar size</string>
<string name="AvatarAlignTop">Align avatar to top</string>
<string name="AvatarMarginLeft">Avatar left margin</string>
<string name="AvatarAlignTop">Align contact avatar to top</string>
<string name="AvatarMarginLeft">Avatar margin</string>
<string name="GroupNameColor">Group name color</string>
<string name="GroupNameSize">Group name size</string>
<string name="UnknownNameColor">Name color (unknown number)</string>
@ -966,4 +966,11 @@
<string name="AppWillRestart">Plus Messenger will restart</string>
<string name="GroupIconColor">Group icon color</string>
<string name="SharedContactNameColor">Shared contact name color</string>
<string name="AttachBGColor">Attach background color</string>
<string name="AttachTextColor">Attach text color</string>
<string name="ShowContactAvatar">Show contact avatar in chat screen</string>
<string name="ShowOwnAvatar">Show own avatar in chat screen</string>
<string name="ShowOwnAvatarGroup">Show own avatar in group screen</string>
<string name="OwnAvatarAlignTop">Align own avatar to top</string>
<string name="DialogColor">Dialog title/button color</string>
</resources>