Different improvements

This commit is contained in:
DrKLO 2014-10-22 00:35:16 +04:00
parent 08a49ea2ea
commit e8cc3bdd3c
74 changed files with 1322 additions and 1090 deletions

View File

@ -80,7 +80,7 @@ android {
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
versionCode 361
versionCode 362
versionName "1.9.5"
}
}

View File

@ -23,6 +23,8 @@ import android.view.Surface;
import android.view.View;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.TextView;
import org.telegram.messenger.FileLog;
import org.telegram.messenger.R;
@ -32,6 +34,7 @@ import org.telegram.ui.ApplicationLoader;
import org.telegram.ui.Views.NumberPicker;
import java.io.File;
import java.lang.reflect.Field;
import java.util.Hashtable;
import java.util.Locale;
@ -416,7 +419,7 @@ public class AndroidUtilities {
}
}
public static AlertDialog.Builder buildTTLAlert(Context context, final TLRPC.EncryptedChat encryptedChat) {
public static AlertDialog.Builder buildTTLAlert(final Context context, final TLRPC.EncryptedChat encryptedChat) {
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setTitle(LocaleController.getString("MessageLifetime", R.string.MessageLifetime));
final NumberPicker numberPicker = new NumberPicker(context);
@ -483,4 +486,17 @@ public class AndroidUtilities {
});
return builder;
}
public static void clearCursorDrawable(EditText editText) {
if (editText == null || Build.VERSION.SDK_INT < 12) {
return;
}
try {
Field mCursorDrawableRes = TextView.class.getDeclaredField("mCursorDrawableRes");
mCursorDrawableRes.setAccessible(true);
mCursorDrawableRes.setInt(editText, 0);
} catch (Exception e) {
FileLog.e("tmessages", e);
}
}
}

View File

@ -9,8 +9,13 @@
package org.telegram.android;
import android.graphics.Bitmap;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Shader;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.view.View;
@ -36,6 +41,12 @@ public class ImageReceiver {
private boolean isAspectFit = false;
private boolean lastCacheOnly = false;
private boolean forcePreview = false;
private int roundRadius = 0;
private BitmapShader bitmapShader = null;
private Paint roundPaint = null;
private RectF roundRect = null;
private RectF bitmapRect = null;
private Matrix shaderMatrix = null;
public ImageReceiver() {
@ -66,6 +77,7 @@ public class ImageReceiver {
last_httpUrl = null;
last_filter = null;
lastCacheOnly = false;
bitmapShader = null;
last_placeholder = placeholder;
last_size = 0;
currentImage = null;
@ -105,6 +117,7 @@ public class ImageReceiver {
last_placeholder = placeholder;
last_size = size;
lastCacheOnly = cacheOnly;
bitmapShader = null;
if (img == null) {
isPlaceholder = true;
ImageLoader.getInstance().loadImage(fileLocation, httpUrl, this, size, cacheOnly);
@ -123,6 +136,11 @@ public class ImageReceiver {
isPlaceholder = false;
ImageLoader.getInstance().incrementUseCount(currentPath);
currentImage = bitmap;
if (roundRadius != 0) {
bitmapShader = new BitmapShader(bitmap.getBitmap(), Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
roundPaint.setShader(bitmapShader);
bitmapRect.set(0, 0, bitmap.getIntrinsicWidth(), bitmap.getIntrinsicHeight());
}
if (parentView != null) {
parentView.invalidate();
}
@ -142,6 +160,7 @@ public class ImageReceiver {
last_httpUrl = null;
last_filter = null;
currentImage = null;
bitmapShader = null;
last_size = 0;
lastCacheOnly = false;
if (parentView != null) {
@ -159,6 +178,7 @@ public class ImageReceiver {
last_path = null;
last_httpUrl = null;
last_filter = null;
bitmapShader = null;
last_size = 0;
lastCacheOnly = false;
if (parentView != null) {
@ -196,83 +216,92 @@ public class ImageReceiver {
}
}
public boolean draw(Canvas canvas, int x, int y, int w, int h) {
public boolean draw(Canvas canvas) {
try {
Drawable bitmapDrawable = currentImage;
if (forcePreview || bitmapDrawable == null && last_placeholder != null && last_placeholder instanceof BitmapDrawable) {
bitmapDrawable = last_placeholder;
}
if (bitmapDrawable != null) {
int bitmapW = bitmapDrawable.getIntrinsicWidth();
int bitmapH = bitmapDrawable.getIntrinsicHeight();
float scaleW = bitmapW / (float)w;
float scaleH = bitmapH / (float)h;
if (isAspectFit) {
float scale = Math.max(scaleW, scaleH);
canvas.save();
bitmapW /= scale;
bitmapH /= scale;
drawRegion.set(x + (w - bitmapW) / 2, y + (h - bitmapH) / 2, x + (w + bitmapW) / 2, y + (h + bitmapH) / 2);
bitmapDrawable.setBounds(drawRegion);
try {
bitmapDrawable.draw(canvas);
} catch (Exception e) {
if (currentPath != null) {
ImageLoader.getInstance().removeImage(currentPath);
currentPath = null;
}
setImage(last_path, last_httpUrl, last_filter, last_placeholder, last_size, lastCacheOnly);
FileLog.e("tmessages", e);
}
canvas.restore();
if (bitmapShader != null) {
drawRegion.set(imageX, imageY, imageX + imageW, imageY + imageH);
roundRect.set(imageX, imageY, imageX + imageW, imageY + imageH);
shaderMatrix.reset();
shaderMatrix.setScale(1.5f, 1.5f);
bitmapShader.setLocalMatrix(shaderMatrix);
canvas.drawRoundRect(roundRect, roundRadius, roundRadius, roundPaint);
} else {
if (Math.abs(scaleW - scaleH) > 0.00001f) {
int bitmapW = bitmapDrawable.getIntrinsicWidth();
int bitmapH = bitmapDrawable.getIntrinsicHeight();
float scaleW = bitmapW / (float) imageW;
float scaleH = bitmapH / (float) imageH;
if (isAspectFit) {
float scale = Math.max(scaleW, scaleH);
canvas.save();
canvas.clipRect(x, y, x + w, y + h);
if (bitmapW / scaleH > w) {
bitmapW /= scaleH;
drawRegion.set(x - (bitmapW - w) / 2, y, x + (bitmapW + w) / 2, y + h);
} else {
bitmapH /= scaleW;
drawRegion.set(x, y - (bitmapH - h) / 2, x + w, y + (bitmapH + h) / 2);
}
bitmapW /= scale;
bitmapH /= scale;
drawRegion.set(imageX + (imageW - bitmapW) / 2, imageY + (imageH - bitmapH) / 2, imageX + (imageW + bitmapW) / 2, imageY + (imageH + bitmapH) / 2);
bitmapDrawable.setBounds(drawRegion);
if (isVisible) {
try {
bitmapDrawable.draw(canvas);
} catch (Exception e) {
if (currentPath != null) {
ImageLoader.getInstance().removeImage(currentPath);
currentPath = null;
}
setImage(last_path, last_httpUrl, last_filter, last_placeholder, last_size, lastCacheOnly);
FileLog.e("tmessages", e);
try {
bitmapDrawable.draw(canvas);
} catch (Exception e) {
if (currentPath != null) {
ImageLoader.getInstance().removeImage(currentPath);
currentPath = null;
}
setImage(last_path, last_httpUrl, last_filter, last_placeholder, last_size, lastCacheOnly);
FileLog.e("tmessages", e);
}
canvas.restore();
} else {
drawRegion.set(x, y, x + w, y + h);
bitmapDrawable.setBounds(drawRegion);
if (isVisible) {
try {
bitmapDrawable.draw(canvas);
} catch (Exception e) {
if (currentPath != null) {
ImageLoader.getInstance().removeImage(currentPath);
currentPath = null;
if (Math.abs(scaleW - scaleH) > 0.00001f) {
canvas.save();
canvas.clipRect(imageX, imageY, imageX + imageW, imageY + imageH);
if (bitmapW / scaleH > imageW) {
bitmapW /= scaleH;
drawRegion.set(imageX - (bitmapW - imageW) / 2, imageY, imageX + (bitmapW + imageW) / 2, imageY + imageH);
} else {
bitmapH /= scaleW;
drawRegion.set(imageX, imageY - (bitmapH - imageH) / 2, imageX + imageW, imageY + (bitmapH + imageH) / 2);
}
bitmapDrawable.setBounds(drawRegion);
if (isVisible) {
try {
bitmapDrawable.draw(canvas);
} catch (Exception e) {
if (currentPath != null) {
ImageLoader.getInstance().removeImage(currentPath);
currentPath = null;
}
setImage(last_path, last_httpUrl, last_filter, last_placeholder, last_size, lastCacheOnly);
FileLog.e("tmessages", e);
}
}
canvas.restore();
} else {
drawRegion.set(imageX, imageY, imageX + imageW, imageY + imageH);
bitmapDrawable.setBounds(drawRegion);
if (isVisible) {
try {
bitmapDrawable.draw(canvas);
} catch (Exception e) {
if (currentPath != null) {
ImageLoader.getInstance().removeImage(currentPath);
currentPath = null;
}
setImage(last_path, last_httpUrl, last_filter, last_placeholder, last_size, lastCacheOnly);
FileLog.e("tmessages", e);
}
setImage(last_path, last_httpUrl, last_filter, last_placeholder, last_size, lastCacheOnly);
FileLog.e("tmessages", e);
}
}
}
}
return true;
} else if (last_placeholder != null) {
drawRegion.set(x, y, x + w, y + h);
drawRegion.set(imageX, imageY, imageX + imageW, imageY + imageH);
last_placeholder.setBounds(drawRegion);
if (isVisible) {
try {
@ -379,4 +408,19 @@ public class ImageReceiver {
public void setForcePreview(boolean value) {
forcePreview = value;
}
public void setRoundRadius(int value) {
roundRadius = value;
if (roundRadius != 0) {
roundPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
roundRect = new RectF();
shaderMatrix = new Matrix();
bitmapRect = new RectF();
} else {
roundPaint = null;
roundRect = null;
shaderMatrix = null;
bitmapRect = null;
}
}
}

View File

@ -38,7 +38,6 @@ import android.os.Environment;
import android.os.ParcelFileDescriptor;
import android.os.Vibrator;
import android.provider.MediaStore;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.View;
import android.view.WindowManager;
@ -400,6 +399,8 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
NotificationCenter.getInstance().addObserver(this, NotificationCenter.FileDidLoaded);
NotificationCenter.getInstance().addObserver(this, NotificationCenter.FileLoadProgressChanged);
NotificationCenter.getInstance().addObserver(this, NotificationCenter.FileUploadProgressChanged);
NotificationCenter.getInstance().addObserver(this, NotificationCenter.messagesDeleted);
NotificationCenter.getInstance().addObserver(this, NotificationCenter.removeAllMessagesFromDialog);
BroadcastReceiver networkStateReceiver = new BroadcastReceiver() {
@Override
@ -900,6 +901,7 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
deleteLaterArray.clear();
}
@SuppressWarnings("unchecked")
@Override
public void didReceivedNotification(int id, Object... args) {
if (id == NotificationCenter.FileDidFailedLoad) {
@ -963,6 +965,18 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
}
listenerInProgress = false;
processLaterArrays();
} else if (id == NotificationCenter.messagesDeleted) {
if (playingMessageObject != null) {
ArrayList<Integer> markAsDeletedMessages = (ArrayList<Integer>)args[0];
if (markAsDeletedMessages.contains(playingMessageObject.messageOwner.id)) {
clenupPlayer(false);
}
}
} else if (id == NotificationCenter.removeAllMessagesFromDialog) {
long did = (Long)args[0];
if (playingMessageObject != null && playingMessageObject.getDialogId() == did) {
clenupPlayer(false);
}
}
}
@ -1182,6 +1196,7 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
}
return true;
}
NotificationCenter.getInstance().postNotificationName(NotificationCenter.audioDidStarted, messageObject);
clenupPlayer(true);
final File cacheFile = FileLoader.getPathToMessage(messageObject.messageOwner);

View File

@ -607,10 +607,17 @@ public class MessageObject {
messageOwner.flags &=~ TLRPC.MESSAGE_FLAG_UNREAD;
}
public boolean isSecretMedia() {
public boolean isSecretPhoto() {
return messageOwner instanceof TLRPC.TL_message_secret && messageOwner.media instanceof TLRPC.TL_messageMediaPhoto && messageOwner.ttl != 0 && messageOwner.ttl <= 60;
}
public boolean isSecretMedia() {
return messageOwner instanceof TLRPC.TL_message_secret &&
(messageOwner.media instanceof TLRPC.TL_messageMediaPhoto && messageOwner.ttl != 0 && messageOwner.ttl <= 60 ||
messageOwner.media instanceof TLRPC.TL_messageMediaAudio ||
messageOwner.media instanceof TLRPC.TL_messageMediaVideo);
}
public static void setIsUnread(TLRPC.Message message, boolean unread) {
if (unread) {
message.flags |= TLRPC.MESSAGE_FLAG_UNREAD;

View File

@ -3687,6 +3687,9 @@ public class MessagesController implements NotificationCenter.NotificationCenter
newMessage.media.video.key = decryptedMessage.media.key;
newMessage.media.video.iv = decryptedMessage.media.iv;
newMessage.media.video.mime_type = decryptedMessage.media.mime_type;
if (newMessage.ttl != 0) {
newMessage.ttl = Math.max(newMessage.media.video.duration + 1, newMessage.ttl);
}
if (newMessage.media.video.mime_type == null) {
newMessage.media.video.mime_type = "video/mp4";
}
@ -3733,6 +3736,9 @@ public class MessagesController implements NotificationCenter.NotificationCenter
newMessage.media.audio.dc_id = message.file.dc_id;
newMessage.media.audio.duration = decryptedMessage.media.duration;
newMessage.media.audio.mime_type = decryptedMessage.media.mime_type;
if (newMessage.ttl != 0) {
newMessage.ttl = Math.max(newMessage.media.audio.duration + 1, newMessage.ttl);
}
if (newMessage.media.audio.mime_type == null) {
newMessage.media.audio.mime_type = "audio/ogg";
}
@ -3801,7 +3807,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
return null;
} else if (serviceMessage.action instanceof TLRPC.TL_decryptedMessageActionReadMessages) {
if (!serviceMessage.action.random_ids.isEmpty()) {
MessagesStorage.getInstance().createTaskForSecretChat(chat.id, ConnectionsManager.getInstance().getCurrentTime(), message.date, 1, serviceMessage.action.random_ids);
MessagesStorage.getInstance().createTaskForSecretChat(chat.id, ConnectionsManager.getInstance().getCurrentTime(), ConnectionsManager.getInstance().getCurrentTime(), 1, serviceMessage.action.random_ids);
}
} else if (serviceMessage.action instanceof TLRPC.TL_decryptedMessageActionNotifyLayer) {
AndroidUtilities.RunOnUIThread(new Runnable() {

View File

@ -2511,8 +2511,20 @@ public class MessagesStorage {
});
}
private int getMessageMediaType(TLRPC.Message message) {
private boolean canAddMessageToMedia(TLRPC.Message message) {
if (message instanceof TLRPC.TL_message_secret && message.media instanceof TLRPC.TL_messageMediaPhoto && message.ttl != 0 && message.ttl <= 60) {
return false;
} else if (message.media instanceof TLRPC.TL_messageMediaPhoto || message.media instanceof TLRPC.TL_messageMediaVideo) {
return true;
}
return false;
}
private int getMessageMediaType(TLRPC.Message message) {
if (message instanceof TLRPC.TL_message_secret && (
message.media instanceof TLRPC.TL_messageMediaPhoto && message.ttl != 0 && message.ttl <= 60 ||
message.media instanceof TLRPC.TL_messageMediaAudio ||
message.media instanceof TLRPC.TL_messageMediaVideo)) {
return 1;
} else if (message.media instanceof TLRPC.TL_messageMediaPhoto || message.media instanceof TLRPC.TL_messageMediaVideo) {
return 0;
@ -2555,7 +2567,7 @@ public class MessagesStorage {
messagesIdsMap.put(message.id, dialog_id);
}
if (getMessageMediaType(message) == 0) {
if (canAddMessageToMedia(message)) {
if (messageMediaIds.length() > 0) {
messageMediaIds.append(",");
}
@ -2639,7 +2651,7 @@ public class MessagesStorage {
state3.step();
}
if (getMessageMediaType(message) == 0) {
if (canAddMessageToMedia(message)) {
state2.requery();
state2.bindInteger(1, messageId);
state2.bindLong(2, dialog_id);

View File

@ -68,6 +68,7 @@ public class NotificationCenter {
public final static int screenshotTook = 50007;
public final static int albumsDidLoaded = 50008;
public final static int audioDidSent = 50009;
public final static int audioDidStarted = 50010;
final private HashMap<Integer, ArrayList<Object>> observers = new HashMap<Integer, ArrayList<Object>>();

View File

@ -597,6 +597,11 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
newMsg.to_id.user_id = encryptedChat.participant_id;
}
newMsg.ttl = encryptedChat.ttl;
if (newMsg.media instanceof TLRPC.TL_messageMediaAudio) {
newMsg.ttl = Math.max(encryptedChat.ttl, newMsg.media.audio.duration + 1);
} else if (newMsg.media instanceof TLRPC.TL_messageMediaVideo) {
newMsg.ttl = Math.max(encryptedChat.ttl, newMsg.media.video.duration + 1);
}
}
MessageObject newMsgObj = new MessageObject(newMsg, null, 2);
@ -630,7 +635,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
TLRPC.TL_decryptedMessage reqSend;
if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 17) {
reqSend = new TLRPC.TL_decryptedMessage();
reqSend.ttl = encryptedChat.ttl;
reqSend.ttl = newMsg.ttl;
} else {
reqSend = new TLRPC.TL_decryptedMessage_old();
reqSend.random_bytes = new byte[Math.max(1, (int) Math.ceil(Utilities.random.nextDouble() * 16))];
@ -788,7 +793,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
TLRPC.TL_decryptedMessage reqSend;
if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 17) {
reqSend = new TLRPC.TL_decryptedMessage();
reqSend.ttl = encryptedChat.ttl;
reqSend.ttl = newMsg.ttl;
} else {
reqSend = new TLRPC.TL_decryptedMessage_old();
reqSend.random_bytes = new byte[Math.max(1, (int) Math.ceil(Utilities.random.nextDouble() * 16))];

View File

@ -0,0 +1,61 @@
/*
* This is the source code of Telegram for Android v. 1.7.x.
* It is licensed under GNU GPL v. 2 or later.
* You should have received a copy of the license in this archive (see LICENSE).
*
* Copyright Nikolai Kudashov, 2013-2014.
*/
package org.telegram.ui.Adapters;
import org.telegram.android.AndroidUtilities;
import org.telegram.messenger.ConnectionsManager;
import org.telegram.messenger.RPCRequest;
import org.telegram.messenger.TLObject;
import org.telegram.messenger.TLRPC;
import java.util.ArrayList;
public class BaseContactsSearchAdapter extends BaseFragmentAdapter {
protected ArrayList<TLRPC.User> globalSearch;
private long reqId = 0;
private int lastReqId;
protected String lastFoundUsername = null;
public void queryServerSearch(final String query) {
if (query == null || query.length() < 5) {
if (reqId != 0) {
ConnectionsManager.getInstance().cancelRpc(reqId, true);
reqId = 0;
}
globalSearch = null;
lastReqId = 0;
notifyDataSetChanged();
return;
}
TLRPC.TL_contacts_search req = new TLRPC.TL_contacts_search();
req.q = query;
req.limit = 50;
final int currentReqId = ++lastReqId;
reqId = ConnectionsManager.getInstance().performRpc(req, new RPCRequest.RPCRequestDelegate() {
@Override
public void run(final TLObject response, final TLRPC.TL_error error) {
AndroidUtilities.RunOnUIThread(new Runnable() {
@Override
public void run() {
if (currentReqId == lastReqId) {
if (error == null) {
TLRPC.TL_contacts_found res = (TLRPC.TL_contacts_found) response;
globalSearch = res.users;
lastFoundUsername = query;
notifyDataSetChanged();
}
}
reqId = 0;
}
});
}
}, true, RPCRequest.RPCRequestClassGeneric | RPCRequest.RPCRequestClassFailOnServerErrors);
}
}

View File

@ -14,6 +14,7 @@ import android.view.ViewGroup;
import android.widget.BaseAdapter;
public class BaseFragmentAdapter extends BaseAdapter {
public void onFragmentCreate() {
}

View File

@ -21,6 +21,7 @@ import org.telegram.android.MessagesController;
import org.telegram.messenger.R;
import org.telegram.ui.Cells.ChatOrUserCell;
import org.telegram.ui.Views.SectionedBaseAdapter;
import org.telegram.ui.Views.SettingsSectionLayout;
import java.util.ArrayList;
import java.util.HashMap;
@ -202,12 +203,10 @@ public class ContactsActivityAdapter extends SectionedBaseAdapter {
if (usersAsSections) {
if (section < ContactsController.getInstance().sortedUsersSectionsArray.size()) {
if (convertView == null) {
LayoutInflater li = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = li.inflate(R.layout.settings_section_layout, parent, false);
convertView = new SettingsSectionLayout(mContext);
convertView.setBackgroundColor(0xffffffff);
}
TextView textView = (TextView)convertView.findViewById(R.id.settings_section_text);
textView.setText(ContactsController.getInstance().sortedUsersSectionsArray.get(section));
((SettingsSectionLayout) convertView).setText(ContactsController.getInstance().sortedUsersSectionsArray.get(section));
return convertView;
}
} else {
@ -221,12 +220,10 @@ public class ContactsActivityAdapter extends SectionedBaseAdapter {
}
if (convertView == null) {
LayoutInflater li = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = li.inflate(R.layout.settings_section_layout, parent, false);
convertView = new SettingsSectionLayout(mContext);
convertView.setBackgroundColor(0xffffffff);
}
TextView textView = (TextView)convertView.findViewById(R.id.settings_section_text);
textView.setText(ContactsController.getInstance().sortedContactsSectionsArray.get(section - 1));
((SettingsSectionLayout) convertView).setText(ContactsController.getInstance().sortedContactsSectionsArray.get(section - 1));
return convertView;
}
}

View File

@ -9,17 +9,13 @@
package org.telegram.ui.Adapters;
import android.content.Context;
import android.view.LayoutInflater;
import android.text.Html;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import org.telegram.android.AndroidUtilities;
import org.telegram.android.LocaleController;
import org.telegram.messenger.ConnectionsManager;
import org.telegram.messenger.R;
import org.telegram.messenger.RPCRequest;
import org.telegram.messenger.TLObject;
import org.telegram.messenger.TLRPC;
import org.telegram.android.ContactsController;
import org.telegram.messenger.FileLog;
@ -27,21 +23,19 @@ import org.telegram.android.MessagesController;
import org.telegram.messenger.UserConfig;
import org.telegram.messenger.Utilities;
import org.telegram.ui.Cells.ChatOrUserCell;
import org.telegram.ui.Views.SettingsSectionLayout;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Timer;
import java.util.TimerTask;
public class ContactsActivitySearchAdapter extends BaseFragmentAdapter {
public class ContactsActivitySearchAdapter extends BaseContactsSearchAdapter {
private Context mContext;
private HashMap<Integer, TLRPC.User> ignoreUsers;
private ArrayList<TLRPC.User> searchResult;
private ArrayList<CharSequence> searchResultNames;
private Timer searchTimer;
private ArrayList<TLRPC.User> globalSearch;
private long reqId = 0;
private int lastReqId;
public ContactsActivitySearchAdapter(Context context, HashMap<Integer, TLRPC.User> arg1) {
mContext = context;
@ -52,7 +46,6 @@ public class ContactsActivitySearchAdapter extends BaseFragmentAdapter {
if (query == null) {
searchResult = null;
searchResultNames = null;
globalSearch = null;
queryServerSearch(null);
notifyDataSetChanged();
} else {
@ -79,41 +72,6 @@ public class ContactsActivitySearchAdapter extends BaseFragmentAdapter {
}
}
private void queryServerSearch(String query) {
if (query == null || query.length() < 5) {
if (reqId != 0) {
ConnectionsManager.getInstance().cancelRpc(reqId, true);
reqId = 0;
}
globalSearch = null;
lastReqId = 0;
notifyDataSetChanged();
return;
}
TLRPC.TL_contacts_search req = new TLRPC.TL_contacts_search();
req.q = query;
req.limit = 50;
final int currentReqId = ++lastReqId;
reqId = ConnectionsManager.getInstance().performRpc(req, new RPCRequest.RPCRequestDelegate() {
@Override
public void run(final TLObject response, final TLRPC.TL_error error) {
AndroidUtilities.RunOnUIThread(new Runnable() {
@Override
public void run() {
if (currentReqId == lastReqId) {
if (error == null) {
TLRPC.TL_contacts_found res = (TLRPC.TL_contacts_found) response;
globalSearch = res.users;
notifyDataSetChanged();
}
}
reqId = 0;
}
});
}
}, true, RPCRequest.RPCRequestClassGeneric | RPCRequest.RPCRequestClassFailOnServerErrors);
}
private void processSearch(final String query) {
AndroidUtilities.RunOnUIThread(new Runnable() {
@Override
@ -220,10 +178,8 @@ public class ContactsActivitySearchAdapter extends BaseFragmentAdapter {
public View getView(int i, View view, ViewGroup viewGroup) {
if (i == (searchResult == null ? 0 : searchResult.size())) {
if (view == null) {
LayoutInflater li = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.settings_section_layout, viewGroup, false);
TextView textView = (TextView)view.findViewById(R.id.settings_section_text);
textView.setText(LocaleController.getString("GlobalSearch", R.string.GlobalSearch));
view = new SettingsSectionLayout(mContext);
((SettingsSectionLayout) view).setText(LocaleController.getString("GlobalSearch", R.string.GlobalSearch));
}
} else {
if (view == null) {
@ -234,7 +190,12 @@ public class ContactsActivitySearchAdapter extends BaseFragmentAdapter {
((ChatOrUserCell) view).useSeparator = (i != getCount() - 1 && i != searchResult.size() - 1);
TLRPC.User user = getItem(i);
if (user != null) {
((ChatOrUserCell) view).setData(user, null, null, i < searchResult.size() ? searchResultNames.get(i) : null, i > searchResult.size() ? "@" + user.username : null);
CharSequence username = null;
if (i > searchResult.size() && user.username != null) {
username = Html.fromHtml(String.format("<font color=\"#357aa8\">@%s</font>%s", user.username.substring(0, lastFoundUsername.length()), user.username.substring(lastFoundUsername.length())));
}
((ChatOrUserCell) view).setData(user, null, null, i < searchResult.size() ? searchResultNames.get(i) : null, username);
if (ignoreUsers != null) {
if (ignoreUsers.containsKey(user.id)) {

View File

@ -275,7 +275,7 @@ public class ChatActionCell extends BaseCell {
backgroundDrawable.draw(canvas);
if (currentMessageObject.type == 11) {
imageReceiver.draw(canvas, imageReceiver.getImageX(), imageReceiver.getImageY(), imageReceiver.getImageWidth(), imageReceiver.getImageHeight());
imageReceiver.draw(canvas);
}
if (textLayout != null) {

View File

@ -393,7 +393,7 @@ public class ChatAudioCell extends ChatBaseCell implements SeekBar.SeekBarDelega
}
if (needAvatarImage) {
avatarImage.draw(canvas, avatarImage.getImageX(), avatarImage.getImageY(), avatarImage.getImageHeight(), avatarImage.getImageHeight());
avatarImage.draw(canvas);
}
canvas.save();

View File

@ -430,7 +430,7 @@ public class ChatBaseCell extends BaseCell {
}
if (isAvatarVisible) {
avatarImage.draw(canvas, AndroidUtilities.dp(6), layoutHeight - AndroidUtilities.dp(45), AndroidUtilities.dp(42), AndroidUtilities.dp(42));
avatarImage.draw(canvas);
}
Drawable currentBackgroundDrawable = null;

View File

@ -207,7 +207,7 @@ public class ChatContactCell extends ChatBaseCell {
}
phone = PhoneFormat.getInstance().format(phone);
} else {
phone = LocaleController.getString("Unknown", R.string.Unknown);
phone = LocaleController.getString("NumberUnknown", R.string.NumberUnknown);
}
int phoneWidth = Math.min((int) Math.ceil(phonePaint.measureText(phone)), maxWidth);
stringFinal = TextUtils.ellipsize(phone.replace("\n", " "), phonePaint, phoneWidth, TextUtils.TruncateAt.END);
@ -260,7 +260,7 @@ public class ChatContactCell extends ChatBaseCell {
return;
}
avatarImage.draw(canvas, avatarImage.getImageX(), avatarImage.getImageY(), avatarImage.getImageWidth(), avatarImage.getImageWidth());
avatarImage.draw(canvas);
if (nameLayout != null) {
canvas.save();

View File

@ -213,7 +213,7 @@ public class ChatMediaCell extends ChatBaseCell implements MediaController.FileD
}
}
}
if (imagePressed && currentMessageObject.isSecretMedia()) {
if (imagePressed && currentMessageObject.isSecretPhoto()) {
imagePressed = false;
} else if (result) {
startCheckLongPress();
@ -568,7 +568,7 @@ public class ChatMediaCell extends ChatBaseCell implements MediaController.FileD
w = timeWidthTotal;
}
if (currentMessageObject.isSecretMedia()) {
if (currentMessageObject.isSecretPhoto()) {
if (AndroidUtilities.isTablet()) {
w = h = (int) (AndroidUtilities.getMinTabletSide() * 0.5f);
} else {
@ -616,7 +616,7 @@ public class ChatMediaCell extends ChatBaseCell implements MediaController.FileD
photoImage.setImageBitmap(messageObject.isOut() ? placeholderOutDrawable : placeholderInDrawable);
}
}
photoImage.setForcePreview(messageObject.isSecretMedia());
photoImage.setForcePreview(messageObject.isSecretPhoto());
invalidate();
}
@ -813,7 +813,7 @@ public class ChatMediaCell extends ChatBaseCell implements MediaController.FileD
canvas.restore();
} else {
photoImage.setVisible(!PhotoViewer.getInstance().isShowingImage(currentMessageObject), false);
imageDrawn = photoImage.draw(canvas, photoImage.getImageX(), photoImage.getImageY(), photoWidth, photoHeight);
imageDrawn = photoImage.draw(canvas);
drawTime = photoImage.getVisible();
}
@ -873,7 +873,7 @@ public class ChatMediaCell extends ChatBaseCell implements MediaController.FileD
currentButtonDrawable.draw(canvas);
}
if (buttonState == -1 && currentMessageObject.isSecretMedia()) {
if (buttonState == -1 && currentMessageObject.isSecretPhoto()) {
int drawable = 5;
if (currentMessageObject.messageOwner.destroyTime != 0) {
if (currentMessageObject.isOut()) {
@ -912,7 +912,7 @@ public class ChatMediaCell extends ChatBaseCell implements MediaController.FileD
infoLayout.draw(canvas);
canvas.restore();
}
} else if (infoLayout != null && (buttonState == 1 || buttonState == 0 || buttonState == 3 || currentMessageObject.isSecretMedia())) {
} else if (infoLayout != null && (buttonState == 1 || buttonState == 0 || buttonState == 3 || currentMessageObject.isSecretPhoto())) {
infoPaint.setColor(0xffffffff);
setDrawableBounds(mediaBackgroundDrawable, photoImage.getImageX() + AndroidUtilities.dp(4), photoImage.getImageY() + AndroidUtilities.dp(4), infoWidth + AndroidUtilities.dp(8) + infoOffset, AndroidUtilities.dpf(16.5f));
mediaBackgroundDrawable.draw(canvas);

View File

@ -41,7 +41,7 @@ public class ChatOrUserCell extends BaseCell {
private CharSequence currentName;
private ImageReceiver avatarImage;
private String subLabel;
private CharSequence subLabel;
private ChatOrUserCellLayout cellLayout;
private TLRPC.User user = null;
@ -112,7 +112,7 @@ public class ChatOrUserCell extends BaseCell {
}
}
public void setData(TLRPC.User u, TLRPC.Chat c, TLRPC.EncryptedChat ec, CharSequence n, String s) {
public void setData(TLRPC.User u, TLRPC.Chat c, TLRPC.EncryptedChat ec, CharSequence n, CharSequence s) {
currentName = n;
user = u;
chat = c;
@ -236,6 +236,15 @@ public class ChatOrUserCell extends BaseCell {
return;
}
if (useSeparator) {
int h = getMeasuredHeight();
if (!usePadding) {
canvas.drawLine(0, h - 1, getMeasuredWidth(), h - 1, linePaint);
} else {
canvas.drawLine(AndroidUtilities.dp(11), h - 1, getMeasuredWidth() - AndroidUtilities.dp(11), h - 1, linePaint);
}
}
if (drawAlpha != 1) {
canvas.saveLayerAlpha(0, 0, canvas.getWidth(), canvas.getHeight(), (int)(255 * drawAlpha), Canvas.HAS_ALPHA_LAYER_SAVE_FLAG);
}
@ -263,16 +272,7 @@ public class ChatOrUserCell extends BaseCell {
canvas.restore();
}
avatarImage.draw(canvas, cellLayout.avatarLeft, cellLayout.avatarTop, AndroidUtilities.dp(50), AndroidUtilities.dp(50));
if (useSeparator) {
int h = getMeasuredHeight();
if (!usePadding) {
canvas.drawLine(0, h - 1, getMeasuredWidth(), h, linePaint);
} else {
canvas.drawLine(AndroidUtilities.dp(11), h - 1, getMeasuredWidth() - AndroidUtilities.dp(11), h, linePaint);
}
}
avatarImage.draw(canvas);
}
private class ChatOrUserCellLayout {
@ -381,7 +381,7 @@ public class ChatOrUserCell extends BaseCell {
onlineLeft = usePadding ? AndroidUtilities.dp(11) : 0;
}
String onlineString = "";
CharSequence onlineString = "";
TextPaint currentOnlinePaint = offlinePaint;
if (subLabel != null) {

View File

@ -10,6 +10,7 @@ package org.telegram.ui.Cells;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.text.Html;
import android.text.Layout;
@ -48,6 +49,8 @@ public class DialogCell extends BaseCell {
private static Drawable groupDrawable;
private static Drawable broadcastDrawable;
private static Paint linePaint;
private TLRPC.TL_dialog currentDialog;
private ImageReceiver avatarImage;
@ -57,6 +60,8 @@ public class DialogCell extends BaseCell {
private TLRPC.EncryptedChat encryptedChat = null;
private CharSequence lastPrintString = null;
public boolean useSeparator = false;
private void init() {
if (namePaint == null) {
namePaint = new TextPaint(TextPaint.ANTI_ALIAS_FLAG);
@ -85,6 +90,11 @@ public class DialogCell extends BaseCell {
messagePaint.setColor(0xff808080);
}
if (linePaint == null) {
linePaint = new Paint();
linePaint.setColor(0xffdcdcdc);
}
if (messagePrintingPaint == null) {
messagePrintingPaint = new TextPaint(TextPaint.ANTI_ALIAS_FLAG);
messagePrintingPaint.setTextSize(AndroidUtilities.dp(16));
@ -340,7 +350,16 @@ public class DialogCell extends BaseCell {
canvas.restore();
}
avatarImage.draw(canvas, cellLayout.avatarLeft, cellLayout.avatarTop, AndroidUtilities.dp(54), AndroidUtilities.dp(54));
avatarImage.draw(canvas);
if (useSeparator) {
int h = getMeasuredHeight();
if (AndroidUtilities.isTablet()) {
canvas.drawLine(0, h - 1, getMeasuredWidth(), h - 1, linePaint);
} else {
canvas.drawLine(AndroidUtilities.dp(11), h - 1, getMeasuredWidth() - AndroidUtilities.dp(11), h - 1, linePaint);
}
}
}
private class DialogCellLayout {

View File

@ -367,6 +367,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
NotificationCenter.getInstance().addObserver(this, NotificationCenter.blockedUsersDidLoaded);
NotificationCenter.getInstance().addObserver(this, NotificationCenter.FileNewChunkAvailable);
NotificationCenter.getInstance().addObserver(this, NotificationCenter.didCreatedNewDeleteTask);
NotificationCenter.getInstance().addObserver(this, NotificationCenter.audioDidStarted);
super.onFragmentCreate();
@ -419,6 +420,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.blockedUsersDidLoaded);
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.FileNewChunkAvailable);
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.didCreatedNewDeleteTask);
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.audioDidStarted);
if (AndroidUtilities.isTablet()) {
NotificationCenter.getInstance().postNotificationName(NotificationCenter.openedChatChanged, dialog_id, true);
}
@ -838,7 +840,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
}
final ChatMediaCell cell = (ChatMediaCell)view;
final MessageObject messageObject = cell.getMessageObject();
if (messageObject == null || !messageObject.isSecretMedia() || !cell.getPhotoImage().isInsideImage(x, y - top)) {
if (messageObject == null || !messageObject.isSecretPhoto() || !cell.getPhotoImage().isInsideImage(x, y - top)) {
break;
}
File file = FileLoader.getPathToMessage(messageObject.messageOwner);
@ -858,9 +860,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
chatListView.setOnItemClickListener(null);
chatListView.setLongClickable(false);
openSecretPhotoRunnable = null;
if (!messageObject.isOut() && messageObject.messageOwner.destroyTime == 0) {
MessagesController.getInstance().markMessageAsRead(dialog_id, messageObject.messageOwner.random_id);
messageObject.messageOwner.destroyTime = messageObject.messageOwner.ttl + ConnectionsManager.getInstance().getCurrentTime();
if (sendSecretMessageRead(messageObject)) {
cell.invalidate();
}
SecretPhotoViewer.getInstance().setParentActivity(getParentActivity());
@ -1026,6 +1026,15 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
return fragmentView;
}
private boolean sendSecretMessageRead(MessageObject messageObject) {
if (messageObject == null || messageObject.isOut() || !messageObject.isSecretMedia() || messageObject.messageOwner.destroyTime != 0) {
return false;
}
MessagesController.getInstance().markMessageAsRead(dialog_id, messageObject.messageOwner.random_id);
messageObject.messageOwner.destroyTime = messageObject.messageOwner.ttl + ConnectionsManager.getInstance().getCurrentTime();
return true;
}
private void scrollToLastMessage() {
if (unread_end_reached || first_unread_id == 0) {
chatListView.setSelectionFromTop(messages.size() - 1, -100000 - chatListView.getPaddingTop());
@ -1853,6 +1862,18 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
boolean hasFromMe = false;
ArrayList<MessageObject> arr = (ArrayList<MessageObject>)args[1];
if (currentEncryptedChat != null && arr.size() == 1) {
MessageObject messageObject = arr.get(0);
if (messageObject.isOut() && messageObject.messageOwner.action instanceof TLRPC.TL_messageActionTTLChange && getParentActivity() != null && AndroidUtilities.getPeerLayerVersion(currentEncryptedChat.layer) < 17 && currentEncryptedChat.ttl > 0 && currentEncryptedChat.ttl <= 60) {
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("AppName", R.string.AppName));
builder.setPositiveButton(R.string.OK, null);
builder.setMessage(LocaleController.formatString("CompatibilityChat", R.string.CompatibilityChat, currentUser.first_name, currentUser.first_name));
showAlertDialog(builder);
}
}
if (!unread_end_reached) {
int currentMaxDate = Integer.MIN_VALUE;
int currentMinMsgId = Integer.MIN_VALUE;
@ -2166,24 +2187,27 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
}
}
} else if (id == NotificationCenter.removeAllMessagesFromDialog) {
messages.clear();
messagesByDays.clear();
messagesDict.clear();
progressView.setVisibility(View.GONE);
chatListView.setEmptyView(emptyViewContainer);
if (currentEncryptedChat == null) {
maxMessageId = Integer.MAX_VALUE;
minMessageId = Integer.MIN_VALUE;
} else {
maxMessageId = Integer.MIN_VALUE;
minMessageId = Integer.MAX_VALUE;
long did = (Long)args[0];
if (dialog_id == did) {
messages.clear();
messagesByDays.clear();
messagesDict.clear();
progressView.setVisibility(View.GONE);
chatListView.setEmptyView(emptyViewContainer);
if (currentEncryptedChat == null) {
maxMessageId = Integer.MAX_VALUE;
minMessageId = Integer.MIN_VALUE;
} else {
maxMessageId = Integer.MIN_VALUE;
minMessageId = Integer.MAX_VALUE;
}
maxDate = Integer.MIN_VALUE;
minDate = 0;
selectedMessagesIds.clear();
selectedMessagesCanCopyIds.clear();
actionBarLayer.hideActionMode();
chatAdapter.notifyDataSetChanged();
}
maxDate = Integer.MIN_VALUE;
minDate = 0;
selectedMessagesIds.clear();
selectedMessagesCanCopyIds.clear();
actionBarLayer.hideActionMode();
chatAdapter.notifyDataSetChanged();
} else if (id == NotificationCenter.screenshotTook) {
updateInformationForScreenshotDetector();
} else if (id == NotificationCenter.blockedUsersDidLoaded) {
@ -2221,6 +2245,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
if (changed) {
updateVisibleRows();
}
} else if (id == NotificationCenter.audioDidStarted) {
MessageObject messageObject = (MessageObject)args[0];
sendSecretMessageRead(messageObject);
}
}
@ -2431,6 +2458,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
}
private void updateInformationForScreenshotDetector() {
if (currentEncryptedChat == null) {
return;
}
ArrayList<Long> visibleMessages = new ArrayList<Long>();
if (chatListView != null) {
int count = chatListView.getChildCount();
@ -2893,9 +2923,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
}
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("AppName", R.string.AppName));
builder.setPositiveButton(R.string.OK, null);
builder.setPositiveButton(LocaleController.getString("OK", R.string.OK), null);
if (message.type == 3) {
builder.setMessage(R.string.NoPlayerInstalled);
builder.setMessage(LocaleController.getString("NoPlayerInstalled", R.string.NoPlayerInstalled));
} else {
builder.setMessage(LocaleController.formatString("NoHandleAppInstalled", R.string.NoHandleAppInstalled, message.messageOwner.media.document.mime_type));
}
@ -3104,6 +3134,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
PhotoViewer.getInstance().setParentActivity(getParentActivity());
PhotoViewer.getInstance().openPhoto(message, ChatActivity.this);
} else if (message.type == 3) {
sendSecretMessageRead(message);
try {
File f = null;
if (message.messageOwner.attachPath != null && message.messageOwner.attachPath.length() != 0) {
@ -3201,7 +3232,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
return;
}
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setItems(new CharSequence[] {LocaleController.getString("Copy", R.string.Copy), LocaleController.getString("Call", R.string.Call)}, new DialogInterface.OnClickListener() {
builder.setItems(new CharSequence[]{LocaleController.getString("Copy", R.string.Copy), LocaleController.getString("Call", R.string.Call)}, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
if (i == 1) {

View File

@ -42,6 +42,7 @@ import org.telegram.ui.Views.ActionBar.ActionBarMenu;
import org.telegram.ui.Views.AvatarUpdater;
import org.telegram.ui.Views.BackupImageView;
import org.telegram.ui.Views.ActionBar.BaseFragment;
import org.telegram.ui.Views.SettingsSectionLayout;
import java.util.ArrayList;
import java.util.Collections;
@ -646,21 +647,19 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
return view;
} else if (type == 1) {
if (view == null) {
LayoutInflater li = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.settings_section_layout, viewGroup, false);
view = new SettingsSectionLayout(mContext);
}
TextView textView = (TextView)view.findViewById(R.id.settings_section_text);
if (i == settingsSectionRow) {
textView.setText(LocaleController.getString("SETTINGS", R.string.SETTINGS));
((SettingsSectionLayout) view).setText(LocaleController.getString("SETTINGS", R.string.SETTINGS));
} else if (i == sharedMediaSectionRow) {
textView.setText(LocaleController.getString("SHAREDMEDIA", R.string.SHAREDMEDIA));
((SettingsSectionLayout) view).setText(LocaleController.getString("SHAREDMEDIA", R.string.SHAREDMEDIA));
} else if (i == membersSectionRow) {
TLRPC.Chat chat = MessagesController.getInstance().getChat(chat_id);
int count = chat.participants_count;
if (info != null) {
count = info.participants.size();
}
textView.setText(LocaleController.formatPluralString("Members", count).toUpperCase());
((SettingsSectionLayout) view).setText(LocaleController.formatPluralString("Members", count).toUpperCase());
}
} else if (type == 2) {
if (view == null) {

View File

@ -11,6 +11,9 @@ package org.telegram.ui;
import android.app.Activity;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.text.InputType;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
@ -18,6 +21,7 @@ import android.view.ViewGroup;
import android.view.inputmethod.EditorInfo;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import org.telegram.android.AndroidUtilities;
@ -26,6 +30,7 @@ import org.telegram.messenger.TLRPC;
import org.telegram.android.MessagesController;
import org.telegram.messenger.R;
import org.telegram.ui.Views.ActionBar.BaseFragment;
import org.telegram.ui.Views.SettingsSectionLayout;
public class ChatProfileChangeNameActivity extends BaseFragment {
private EditText firstNameField;
@ -71,16 +76,27 @@ public class ChatProfileChangeNameActivity extends BaseFragment {
TextView textView = (TextView)doneButton.findViewById(R.id.done_button_text);
textView.setText(LocaleController.getString("Done", R.string.Done).toUpperCase());
fragmentView = inflater.inflate(R.layout.chat_profile_change_name_layout, container, false);
TLRPC.Chat currentChat = MessagesController.getInstance().getChat(chat_id);
firstNameField = (EditText)fragmentView.findViewById(R.id.first_name_field);
if (chat_id > 0) {
firstNameField.setHint(LocaleController.getString("GroupName", R.string.GroupName));
} else {
firstNameField.setHint(LocaleController.getString("EnterListName", R.string.EnterListName));
}
fragmentView = new LinearLayout(inflater.getContext());
fragmentView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
fragmentView.setPadding(AndroidUtilities.dp(16), AndroidUtilities.dp(8), AndroidUtilities.dp(16), 0);
((LinearLayout) fragmentView).setOrientation(LinearLayout.VERTICAL);
SettingsSectionLayout settingsSectionLayout = new SettingsSectionLayout(inflater.getContext());
((LinearLayout) fragmentView).addView(settingsSectionLayout);
firstNameField = new EditText(inflater.getContext());
firstNameField.setText(currentChat.title);
firstNameField.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 19);
firstNameField.setHintTextColor(0xffa3a3a3);
firstNameField.setTextColor(0xff000000);
firstNameField.setPadding(AndroidUtilities.dp(15), 0, AndroidUtilities.dp(15), AndroidUtilities.dp(15));
firstNameField.setMaxLines(3);
firstNameField.setGravity(LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT);
firstNameField.setInputType(InputType.TYPE_TEXT_FLAG_CAP_SENTENCES | InputType.TYPE_TEXT_FLAG_MULTI_LINE | InputType.TYPE_TEXT_FLAG_AUTO_CORRECT);
firstNameField.setImeOptions(EditorInfo.IME_ACTION_DONE);
AndroidUtilities.clearCursorDrawable(firstNameField);
firstNameField.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {
@ -91,15 +107,25 @@ public class ChatProfileChangeNameActivity extends BaseFragment {
return false;
}
});
firstNameField.setText(currentChat.title);
firstNameField.setSelection(firstNameField.length());
TextView headerLabel = (TextView)fragmentView.findViewById(R.id.settings_section_text);
if (chat_id > 0) {
headerLabel.setText(LocaleController.getString("EnterGroupNameTitle", R.string.EnterGroupNameTitle));
} else {
headerLabel.setText(LocaleController.getString("EnterListName", R.string.EnterListName).toUpperCase());
if (LocaleController.isRTL) {
firstNameField.setGravity(Gravity.RIGHT);
}
((LinearLayout) fragmentView).addView(firstNameField);
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams)firstNameField.getLayoutParams();
layoutParams.topMargin = AndroidUtilities.dp(15);
layoutParams.width = LinearLayout.LayoutParams.MATCH_PARENT;
layoutParams.height = LinearLayout.LayoutParams.WRAP_CONTENT;
firstNameField.setLayoutParams(layoutParams);
if (chat_id > 0) {
settingsSectionLayout.setText(LocaleController.getString("EnterGroupNameTitle", R.string.EnterGroupNameTitle));
firstNameField.setHint(LocaleController.getString("GroupName", R.string.GroupName));
} else {
settingsSectionLayout.setText(LocaleController.getString("EnterListName", R.string.EnterListName).toUpperCase());
firstNameField.setHint(LocaleController.getString("EnterListName", R.string.EnterListName));
}
firstNameField.setSelection(firstNameField.length());
} else {
ViewGroup parent = (ViewGroup)fragmentView.getParent();
if (parent != null) {

View File

@ -31,6 +31,7 @@ import org.telegram.ui.Views.ActionBar.ActionBarMenuItem;
import org.telegram.ui.Views.ActionBar.BaseFragment;
import org.telegram.ui.Views.PinnedHeaderListView;
import org.telegram.ui.Views.SectionedBaseAdapter;
import org.telegram.ui.Views.SettingsSectionLayout;
import java.io.BufferedReader;
import java.io.InputStream;
@ -484,12 +485,10 @@ public class CountrySelectActivity extends BaseFragment {
@Override
public View getSectionHeaderView(int section, View convertView, ViewGroup parent) {
if (convertView == null) {
LayoutInflater li = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = li.inflate(R.layout.settings_section_layout, parent, false);
convertView = new SettingsSectionLayout(mContext);
convertView.setBackgroundColor(0xfffafafa);
}
TextView textView = (TextView)convertView.findViewById(R.id.settings_section_text);
textView.setText(sortedCountries.get(section).toUpperCase());
((SettingsSectionLayout) convertView).setText(sortedCountries.get(section).toUpperCase());
return convertView;
}
}

View File

@ -51,6 +51,7 @@ import org.telegram.ui.Views.BackupImageView;
import org.telegram.ui.Views.ActionBar.BaseFragment;
import org.telegram.ui.Views.PinnedHeaderListView;
import org.telegram.ui.Views.SectionedBaseAdapter;
import org.telegram.ui.Views.SettingsSectionLayout;
import java.util.ArrayList;
import java.util.HashMap;
@ -597,15 +598,13 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
@Override
public View getSectionHeaderView(int section, View convertView, ViewGroup parent) {
if (convertView == null) {
LayoutInflater li = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = li.inflate(R.layout.settings_section_layout, parent, false);
convertView = new SettingsSectionLayout(mContext);
convertView.setBackgroundColor(0xffffffff);
}
TextView textView = (TextView)convertView.findViewById(R.id.settings_section_text);
if (searching && searchWas) {
textView.setText(LocaleController.getString("AllContacts", R.string.AllContacts));
((SettingsSectionLayout) convertView).setText(LocaleController.getString("AllContacts", R.string.AllContacts));
} else {
textView.setText(ContactsController.getInstance().sortedUsersSectionsArray.get(section));
((SettingsSectionLayout) convertView).setText(ContactsController.getInstance().sortedUsersSectionsArray.get(section));
}
return convertView;
}

View File

@ -38,6 +38,7 @@ import org.telegram.ui.Views.BackupImageView;
import org.telegram.ui.Views.ActionBar.BaseFragment;
import org.telegram.ui.Views.PinnedHeaderListView;
import org.telegram.ui.Views.SectionedBaseAdapter;
import org.telegram.ui.Views.SettingsSectionLayout;
import java.util.ArrayList;
import java.util.concurrent.Semaphore;
@ -420,12 +421,10 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
@Override
public View getSectionHeaderView(int section, View convertView, ViewGroup parent) {
if (convertView == null) {
LayoutInflater li = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = li.inflate(R.layout.settings_section_layout, parent, false);
convertView = new SettingsSectionLayout(mContext);
convertView.setBackgroundColor(0xffffffff);
}
TextView textView = (TextView)convertView.findViewById(R.id.settings_section_text);
textView.setText(LocaleController.formatPluralString("Members", selectedContacts.size()).toUpperCase());
((SettingsSectionLayout) convertView).setText(LocaleController.formatPluralString("Members", selectedContacts.size()).toUpperCase());
return convertView;
}
}

View File

@ -12,6 +12,7 @@ import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
@ -35,13 +36,14 @@ import org.telegram.android.NotificationCenter;
import org.telegram.messenger.R;
import org.telegram.messenger.UserConfig;
import org.telegram.messenger.Utilities;
import org.telegram.ui.Adapters.BaseFragmentAdapter;
import org.telegram.ui.Adapters.BaseContactsSearchAdapter;
import org.telegram.ui.Cells.ChatOrUserCell;
import org.telegram.ui.Cells.DialogCell;
import org.telegram.ui.Views.ActionBar.ActionBarLayer;
import org.telegram.ui.Views.ActionBar.ActionBarMenu;
import org.telegram.ui.Views.ActionBar.ActionBarMenuItem;
import org.telegram.ui.Views.ActionBar.BaseFragment;
import org.telegram.ui.Views.SettingsSectionLayout;
import java.util.ArrayList;
import java.util.Timer;
@ -64,10 +66,6 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
private int activityToken = (int)(Utilities.random.nextDouble() * Integer.MAX_VALUE);
private long selectedDialog;
private Timer searchTimer;
public ArrayList<TLObject> searchResult;
public ArrayList<CharSequence> searchResultNames;
private MessagesActivityDelegate delegate;
private long openedDialogId = 0;
@ -144,7 +142,6 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
@Override
public void onSearchCollapse() {
searchDialogs(null);
searching = false;
searchWas = false;
if (messagesListView != null) {
@ -152,14 +149,16 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
searchEmptyView.setVisibility(View.GONE);
}
if (messagesListViewAdapter != null) {
messagesListViewAdapter.notifyDataSetChanged();
messagesListViewAdapter.searchDialogs(null);
}
}
@Override
public void onTextChanged(EditText editText) {
String text = editText.getText().toString();
searchDialogs(text);
if (messagesListViewAdapter != null) {
messagesListViewAdapter.searchDialogs(text);
}
if (text.length() != 0) {
searchWas = true;
if (messagesListViewAdapter != null) {
@ -231,10 +230,6 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
messagesListView = (ListView)fragmentView.findViewById(R.id.messages_list_view);
messagesListView.setAdapter(messagesListViewAdapter);
if (delegate == null && AndroidUtilities.isTablet()) {
messagesListView.setDivider(inflater.getContext().getResources().getDrawable(R.drawable.messages_list_divider2));
messagesListView.setDividerHeight(1);
}
progressView = fragmentView.findViewById(R.id.progressLayout);
messagesListViewAdapter.notifyDataSetChanged();
@ -277,38 +272,34 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
messagesListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
long dialog_id = 0;
if (searching && searchWas) {
if (i >= searchResult.size()) {
return;
}
TLObject obj = searchResult.get(i);
if (obj instanceof TLRPC.User) {
dialog_id = ((TLRPC.User) obj).id;
} else if (obj instanceof TLRPC.Chat) {
if (((TLRPC.Chat) obj).id > 0) {
dialog_id = -((TLRPC.Chat) obj).id;
} else {
dialog_id = AndroidUtilities.makeBroadcastId(((TLRPC.Chat) obj).id);
}
} else if (obj instanceof TLRPC.EncryptedChat) {
dialog_id = ((long)((TLRPC.EncryptedChat) obj).id) << 32;
}
} else {
if (serverOnly) {
if (i >= MessagesController.getInstance().dialogsServerOnly.size()) {
return;
}
TLRPC.TL_dialog dialog = MessagesController.getInstance().dialogsServerOnly.get(i);
dialog_id = dialog.id;
} else {
if (i >= MessagesController.getInstance().dialogs.size()) {
return;
}
TLRPC.TL_dialog dialog = MessagesController.getInstance().dialogs.get(i);
dialog_id = dialog.id;
}
if (messagesListViewAdapter == null) {
return;
}
TLObject obj = messagesListViewAdapter.getItem(i);
if (obj == null) {
return;
}
long dialog_id = 0;
if (obj instanceof TLRPC.User) {
dialog_id = ((TLRPC.User) obj).id;
if (messagesListViewAdapter.isGlobalSearch(i)) {
ArrayList<TLRPC.User> users = new ArrayList<TLRPC.User>();
users.add((TLRPC.User)obj);
MessagesController.getInstance().putUsers(users, false);
MessagesStorage.getInstance().putUsersAndChats(users, null, false, true);
}
} else if (obj instanceof TLRPC.Chat) {
if (((TLRPC.Chat) obj).id > 0) {
dialog_id = -((TLRPC.Chat) obj).id;
} else {
dialog_id = AndroidUtilities.makeBroadcastId(((TLRPC.Chat) obj).id);
}
} else if (obj instanceof TLRPC.EncryptedChat) {
dialog_id = ((long)((TLRPC.EncryptedChat) obj).id) << 32;
} else if (obj instanceof TLRPC.TL_dialog) {
dialog_id = ((TLRPC.TL_dialog) obj).id;
}
if (onlySelect) {
didSelectResult(dialog_id, true, false);
} else {
@ -497,7 +488,7 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
} else if (id == NotificationCenter.reloadSearchResults) {
int token = (Integer)args[0];
if (token == activityToken) {
updateSearchResults((ArrayList<TLObject>)args[1], (ArrayList<CharSequence>)args[2], (ArrayList<TLRPC.User>)args[3]);
messagesListViewAdapter.updateSearchResults((ArrayList<TLObject>) args[1], (ArrayList<CharSequence>) args[2], (ArrayList<TLRPC.User>) args[3]);
}
} else if (id == NotificationCenter.appDidLogout) {
dialogsLoaded = false;
@ -624,86 +615,113 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
}
}
public void updateSearchResults(final ArrayList<TLObject> result, final ArrayList<CharSequence> names, final ArrayList<TLRPC.User> encUsers) {
AndroidUtilities.RunOnUIThread(new Runnable() {
@Override
public void run() {
for (TLObject obj : result) {
if (obj instanceof TLRPC.User) {
TLRPC.User user = (TLRPC.User) obj;
MessagesController.getInstance().putUser(user, true);
} else if (obj instanceof TLRPC.Chat) {
TLRPC.Chat chat = (TLRPC.Chat) obj;
MessagesController.getInstance().putChat(chat, true);
} else if (obj instanceof TLRPC.EncryptedChat) {
TLRPC.EncryptedChat chat = (TLRPC.EncryptedChat) obj;
MessagesController.getInstance().putEncryptedChat(chat, true);
}
}
for (TLRPC.User user : encUsers) {
MessagesController.getInstance().putUser(user, true);
}
searchResult = result;
searchResultNames = names;
if (searching) {
messagesListViewAdapter.notifyDataSetChanged();
}
}
});
}
private class MessagesAdapter extends BaseContactsSearchAdapter {
public void searchDialogs(final String query) {
if (query == null) {
searchResult = null;
searchResultNames = null;
} else {
try {
if (searchTimer != null) {
searchTimer.cancel();
}
} catch (Exception e) {
FileLog.e("tmessages", e);
}
searchTimer = new Timer();
searchTimer.schedule(new TimerTask() {
@Override
public void run() {
try {
searchTimer.cancel();
searchTimer = null;
} catch (Exception e) {
FileLog.e("tmessages", e);
}
MessagesStorage.getInstance().searchDialogs(activityToken, query, !serverOnly);
}
}, 100, 300);
}
}
private class MessagesAdapter extends BaseFragmentAdapter {
private Context mContext;
private Timer searchTimer;
private ArrayList<TLObject> searchResult;
private ArrayList<CharSequence> searchResultNames;
public MessagesAdapter(Context context) {
mContext = context;
}
public void updateSearchResults(final ArrayList<TLObject> result, final ArrayList<CharSequence> names, final ArrayList<TLRPC.User> encUsers) {
AndroidUtilities.RunOnUIThread(new Runnable() {
@Override
public void run() {
for (TLObject obj : result) {
if (obj instanceof TLRPC.User) {
TLRPC.User user = (TLRPC.User) obj;
MessagesController.getInstance().putUser(user, true);
} else if (obj instanceof TLRPC.Chat) {
TLRPC.Chat chat = (TLRPC.Chat) obj;
MessagesController.getInstance().putChat(chat, true);
} else if (obj instanceof TLRPC.EncryptedChat) {
TLRPC.EncryptedChat chat = (TLRPC.EncryptedChat) obj;
MessagesController.getInstance().putEncryptedChat(chat, true);
}
}
for (TLRPC.User user : encUsers) {
MessagesController.getInstance().putUser(user, true);
}
searchResult = result;
searchResultNames = names;
if (searching) {
messagesListViewAdapter.notifyDataSetChanged();
}
}
});
}
public boolean isGlobalSearch(int i) {
if (searching && searchWas) {
int localCount = searchResult == null ? 0 : searchResult.size();
int globalCount = globalSearch == null ? 0 : globalSearch.size();
if (i >= 0 && i < localCount) {
return false;
} else if (i > localCount && i <= globalCount + localCount) {
return true;
}
}
return false;
}
public void searchDialogs(final String query) {
if (query == null) {
searchResult = null;
searchResultNames = null;
queryServerSearch(null);
notifyDataSetChanged();
} else {
try {
if (searchTimer != null) {
searchTimer.cancel();
}
} catch (Exception e) {
FileLog.e("tmessages", e);
}
searchTimer = new Timer();
searchTimer.schedule(new TimerTask() {
@Override
public void run() {
try {
searchTimer.cancel();
searchTimer = null;
} catch (Exception e) {
FileLog.e("tmessages", e);
}
MessagesStorage.getInstance().searchDialogs(activityToken, query, !serverOnly);
AndroidUtilities.RunOnUIThread(new Runnable() {
@Override
public void run() {
queryServerSearch(query);
}
});
}
}, 200, 300);
}
}
@Override
public boolean areAllItemsEnabled() {
return true;
return false;
}
@Override
public boolean isEnabled(int i) {
return true;
return !(searching && searchWas) || i != (searchResult == null ? 0 : searchResult.size());
}
@Override
public int getCount() {
if (searching && searchWas) {
if (searchResult == null) {
return 0;
int count = searchResult == null ? 0 : searchResult.size();
int globalCount = globalSearch == null ? 0 : globalSearch.size();
if (globalCount != 0) {
count += globalCount + 1;
}
return searchResult.size();
return count;
}
int count;
if (serverOnly) {
@ -721,8 +739,28 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
}
@Override
public Object getItem(int i) {
return null;
public TLObject getItem(int i) {
if (searching && searchWas) {
int localCount = searchResult == null ? 0 : searchResult.size();
int globalCount = globalSearch == null ? 0 : globalSearch.size();
if (i >= 0 && i < localCount) {
return searchResult.get(i);
} else if (i > localCount && i <= globalCount + localCount) {
return globalSearch.get(i - localCount - 1);
}
return null;
}
if (serverOnly) {
if (i < 0 || i >= MessagesController.getInstance().dialogsServerOnly.size()) {
return null;
}
return MessagesController.getInstance().dialogsServerOnly.get(i);
} else {
if (i < 0 || i >= MessagesController.getInstance().dialogs.size()) {
return null;
}
return MessagesController.getInstance().dialogs.get(i);
}
}
@Override
@ -732,30 +770,47 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
@Override
public boolean hasStableIds() {
return false;
return true;
}
@Override
public View getView(int i, View view, ViewGroup viewGroup) {
if (searching && searchWas) {
if (view == null) {
view = new ChatOrUserCell(mContext);
}
TLRPC.User user = null;
TLRPC.Chat chat = null;
TLRPC.EncryptedChat encryptedChat = null;
if (i == (searchResult == null ? 0 : searchResult.size())) {
if (view == null) {
view = new SettingsSectionLayout(mContext);
((SettingsSectionLayout) view).setText(LocaleController.getString("GlobalSearch", R.string.GlobalSearch));
view.setPadding(AndroidUtilities.dp(11), 0, AndroidUtilities.dp(11), 0);
}
} else {
if (view == null) {
view = new ChatOrUserCell(mContext);
}
TLRPC.User user = null;
TLRPC.Chat chat = null;
TLRPC.EncryptedChat encryptedChat = null;
TLObject obj = searchResult.get(i);
if (obj instanceof TLRPC.User) {
user = MessagesController.getInstance().getUser(((TLRPC.User)obj).id);
} else if (obj instanceof TLRPC.Chat) {
chat = MessagesController.getInstance().getChat(((TLRPC.Chat) obj).id);
} else if (obj instanceof TLRPC.EncryptedChat) {
encryptedChat = MessagesController.getInstance().getEncryptedChat(((TLRPC.EncryptedChat) obj).id);
user = MessagesController.getInstance().getUser(encryptedChat.user_id);
}
((ChatOrUserCell) view).useSeparator = (i != getCount() - 1 && i != searchResult.size() - 1);
TLObject obj = getItem(i);
if (obj instanceof TLRPC.User) {
user = MessagesController.getInstance().getUser(((TLRPC.User) obj).id);
if (user == null) {
user = (TLRPC.User)obj;
}
} else if (obj instanceof TLRPC.Chat) {
chat = MessagesController.getInstance().getChat(((TLRPC.Chat) obj).id);
} else if (obj instanceof TLRPC.EncryptedChat) {
encryptedChat = MessagesController.getInstance().getEncryptedChat(((TLRPC.EncryptedChat) obj).id);
user = MessagesController.getInstance().getUser(encryptedChat.user_id);
}
((ChatOrUserCell)view).setData(user, chat, encryptedChat, searchResultNames.get(i), null);
CharSequence username = null;
if (i > searchResult.size() && user.username != null) {
username = Html.fromHtml(String.format("<font color=\"#357aa8\">@%s</font>%s", user.username.substring(0, lastFoundUsername.length()), user.username.substring(lastFoundUsername.length())));
}
((ChatOrUserCell) view).setData(user, chat, encryptedChat, i < searchResult.size() ? searchResultNames.get(i) : null, username);
}
return view;
}
@ -771,6 +826,7 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
if (view == null) {
view = new DialogCell(mContext);
}
((DialogCell) view).useSeparator = (i != getCount() - 1);
if (serverOnly) {
((DialogCell)view).setDialog(MessagesController.getInstance().dialogsServerOnly.get(i));
} else {
@ -791,12 +847,10 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
@Override
public int getItemViewType(int i) {
if (searching && searchWas) {
TLObject obj = searchResult.get(i);
if (obj instanceof TLRPC.User || obj instanceof TLRPC.EncryptedChat) {
return 2;
} else {
if (i == (searchResult == null ? 0 : searchResult.size())) {
return 3;
}
return 2;
}
if (serverOnly && i == MessagesController.getInstance().dialogsServerOnly.size() || !serverOnly && i == MessagesController.getInstance().dialogs.size()) {
return 1;
@ -812,7 +866,7 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
@Override
public boolean isEmpty() {
if (searching && searchWas) {
return searchResult == null || searchResult.size() == 0;
return (searchResult == null || searchResult.size() == 0) && (globalSearch == null || globalSearch.isEmpty());
}
if (MessagesController.getInstance().loadingDialogs && MessagesController.getInstance().dialogs.isEmpty()) {
return false;

View File

@ -2140,7 +2140,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
float ai = -1;
if (System.currentTimeMillis() - animationStartTime < animationDuration) {
ai = interpolator.getInterpolation((float)(System.currentTimeMillis() - animationStartTime) / animationDuration);
if (ai >= 0.999f) {
if (ai >= 0.95f) {
ai = -1;
}
}
@ -2221,7 +2221,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
int height = (int) (bitmapHeight * scale);
centerImage.setImageCoords(-width / 2, -height / 2, width, height);
centerImage.draw(canvas, -width / 2, -height / 2, width, height);
centerImage.draw(canvas);
}
if (scale >= 1.0f) {
@ -2252,7 +2252,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
int height = (int) (bitmapHeight * scale);
sideImage.setImageCoords(-width / 2, -height / 2, width, height);
sideImage.draw(canvas, -width / 2, -height / 2, width, height);
sideImage.draw(canvas);
}
} else {
changingPage = false;

View File

@ -365,7 +365,7 @@ public class SecretPhotoViewer implements NotificationCenter.NotificationCenterD
int height = (int) (bitmapHeight * scale);
centerImage.setImageCoords(-width / 2, -height / 2, width, height);
centerImage.draw(canvas, -width / 2, -height / 2, width, height);
centerImage.draw(canvas);
}
canvas.restore();
}

View File

@ -60,6 +60,7 @@ import org.telegram.ui.Views.AvatarUpdater;
import org.telegram.ui.Views.BackupImageView;
import org.telegram.ui.Views.ActionBar.BaseFragment;
import org.telegram.ui.Views.NumberPicker;
import org.telegram.ui.Views.SettingsSectionLayout;
import java.io.File;
import java.util.ArrayList;
@ -831,22 +832,20 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
return view;
} else if (type == 1) {
if (view == null) {
LayoutInflater li = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.settings_section_layout, viewGroup, false);
view = new SettingsSectionLayout(mContext);
}
TextView textView = (TextView)view.findViewById(R.id.settings_section_text);
if (i == numberSectionRow) {
textView.setText(LocaleController.getString("Info", R.string.Info));
((SettingsSectionLayout) view).setText(LocaleController.getString("Info", R.string.Info));
} else if (i == settingsSectionRow) {
textView.setText(LocaleController.getString("SETTINGS", R.string.SETTINGS));
((SettingsSectionLayout) view).setText(LocaleController.getString("SETTINGS", R.string.SETTINGS));
} else if (i == supportSectionRow) {
textView.setText(LocaleController.getString("Support", R.string.Support));
((SettingsSectionLayout) view).setText(LocaleController.getString("Support", R.string.Support));
} else if (i == messagesSectionRow) {
textView.setText(LocaleController.getString("MessagesSettings", R.string.MessagesSettings));
((SettingsSectionLayout) view).setText(LocaleController.getString("MessagesSettings", R.string.MessagesSettings));
} else if (i == mediaDownloadSection) {
textView.setText(LocaleController.getString("AutomaticMediaDownload", R.string.AutomaticMediaDownload));
((SettingsSectionLayout) view).setText(LocaleController.getString("AutomaticMediaDownload", R.string.AutomaticMediaDownload));
} else if (i == contactsSectionRow) {
textView.setText(LocaleController.getString("Contacts", R.string.Contacts).toUpperCase());
((SettingsSectionLayout) view).setText(LocaleController.getString("Contacts", R.string.Contacts).toUpperCase());
}
} else if (type == 2) {
if (view == null) {
@ -971,7 +970,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
if (user != null && user.phone != null && user.phone.length() != 0) {
detailTextView.setText(PhoneFormat.getInstance().format("+" + user.phone));
} else {
detailTextView.setText(LocaleController.getString("Unknown", R.string.Unknown));
detailTextView.setText(LocaleController.getString("NumberUnknown", R.string.NumberUnknown));
}
divider.setVisibility(View.VISIBLE);
} else if (i == textSizeRow) {

View File

@ -249,7 +249,7 @@ public class SettingsBlockedUsersActivity extends BaseFragment implements Notifi
((ChatOrUserCell)view).useSeparator = true;
}
TLRPC.User user = MessagesController.getInstance().getUser(MessagesController.getInstance().blockedUsers.get(i));
((ChatOrUserCell)view).setData(user, null, null, null, user.phone != null && user.phone.length() != 0 ? PhoneFormat.getInstance().format("+" + user.phone) : LocaleController.getString("Unknown", R.string.Unknown));
((ChatOrUserCell)view).setData(user, null, null, null, user.phone != null && user.phone.length() != 0 ? PhoneFormat.getInstance().format("+" + user.phone) : LocaleController.getString("NumberUnknown", R.string.NumberUnknown));
} else if (type == 1) {
if (view == null) {
LayoutInflater li = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

View File

@ -10,6 +10,9 @@ package org.telegram.ui;
import android.app.Activity;
import android.content.SharedPreferences;
import android.text.InputType;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
@ -17,6 +20,7 @@ import android.view.ViewGroup;
import android.view.inputmethod.EditorInfo;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import org.telegram.android.AndroidUtilities;
@ -30,6 +34,7 @@ import org.telegram.messenger.R;
import org.telegram.messenger.RPCRequest;
import org.telegram.messenger.UserConfig;
import org.telegram.ui.Views.ActionBar.BaseFragment;
import org.telegram.ui.Views.SettingsSectionLayout;
public class SettingsChangeNameActivity extends BaseFragment {
private EditText firstNameField;
@ -63,14 +68,31 @@ public class SettingsChangeNameActivity extends BaseFragment {
TextView textView = (TextView)doneButton.findViewById(R.id.done_button_text);
textView.setText(LocaleController.getString("Done", R.string.Done).toUpperCase());
fragmentView = inflater.inflate(R.layout.settings_change_name_layout, container, false);
TLRPC.User user = MessagesController.getInstance().getUser(UserConfig.getClientUserId());
if (user == null) {
user = UserConfig.getCurrentUser();
}
firstNameField = (EditText)fragmentView.findViewById(R.id.first_name_field);
fragmentView = new LinearLayout(inflater.getContext());
fragmentView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
fragmentView.setPadding(AndroidUtilities.dp(16), AndroidUtilities.dp(8), AndroidUtilities.dp(16), 0);
((LinearLayout) fragmentView).setOrientation(LinearLayout.VERTICAL);
SettingsSectionLayout settingsSectionLayout = new SettingsSectionLayout(inflater.getContext());
((LinearLayout) fragmentView).addView(settingsSectionLayout);
settingsSectionLayout.setText(LocaleController.getString("YourFirstNameAndLastName", R.string.YourFirstNameAndLastName).toUpperCase());
firstNameField = new EditText(inflater.getContext());
firstNameField.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 19);
firstNameField.setHintTextColor(0xffa3a3a3);
firstNameField.setTextColor(0xff000000);
firstNameField.setPadding(AndroidUtilities.dp(15), 0, AndroidUtilities.dp(15), AndroidUtilities.dp(15));
firstNameField.setMaxLines(1);
firstNameField.setLines(1);
firstNameField.setSingleLine(true);
firstNameField.setGravity(LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT);
firstNameField.setInputType(InputType.TYPE_TEXT_FLAG_CAP_SENTENCES | InputType.TYPE_TEXT_FLAG_MULTI_LINE | InputType.TYPE_TEXT_FLAG_AUTO_CORRECT);
firstNameField.setImeOptions(EditorInfo.IME_ACTION_NEXT);
firstNameField.setHint(LocaleController.getString("FirstName", R.string.FirstName));
firstNameField.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
@ -83,7 +105,25 @@ public class SettingsChangeNameActivity extends BaseFragment {
return false;
}
});
lastNameField = (EditText)fragmentView.findViewById(R.id.last_name_field);
AndroidUtilities.clearCursorDrawable(firstNameField);
((LinearLayout) fragmentView).addView(firstNameField);
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams)firstNameField.getLayoutParams();
layoutParams.topMargin = AndroidUtilities.dp(15);
layoutParams.width = LinearLayout.LayoutParams.MATCH_PARENT;
layoutParams.height = LinearLayout.LayoutParams.WRAP_CONTENT;
firstNameField.setLayoutParams(layoutParams);
lastNameField = new EditText(inflater.getContext());
lastNameField.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 19);
lastNameField.setHintTextColor(0xffa3a3a3);
lastNameField.setTextColor(0xff000000);
lastNameField.setPadding(AndroidUtilities.dp(15), 0, AndroidUtilities.dp(15), AndroidUtilities.dp(15));
lastNameField.setMaxLines(1);
lastNameField.setLines(1);
lastNameField.setSingleLine(true);
lastNameField.setGravity(LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT);
lastNameField.setInputType(InputType.TYPE_TEXT_FLAG_CAP_SENTENCES | InputType.TYPE_TEXT_FLAG_MULTI_LINE | InputType.TYPE_TEXT_FLAG_AUTO_CORRECT);
lastNameField.setImeOptions(EditorInfo.IME_ACTION_DONE);
lastNameField.setHint(LocaleController.getString("LastName", R.string.LastName));
lastNameField.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
@ -95,15 +135,19 @@ public class SettingsChangeNameActivity extends BaseFragment {
return false;
}
});
AndroidUtilities.clearCursorDrawable(lastNameField);
((LinearLayout) fragmentView).addView(lastNameField);
layoutParams = (LinearLayout.LayoutParams)lastNameField.getLayoutParams();
layoutParams.topMargin = AndroidUtilities.dp(10);
layoutParams.width = LinearLayout.LayoutParams.MATCH_PARENT;
layoutParams.height = LinearLayout.LayoutParams.WRAP_CONTENT;
lastNameField.setLayoutParams(layoutParams);
if (user != null) {
firstNameField.setText(user.first_name);
firstNameField.setSelection(firstNameField.length());
lastNameField.setText(user.last_name);
}
TextView headerLabel = (TextView)fragmentView.findViewById(R.id.settings_section_text);
headerLabel.setText(LocaleController.getString("YourFirstNameAndLastName", R.string.YourFirstNameAndLastName));
} else {
ViewGroup parent = (ViewGroup)fragmentView.getParent();
if (parent != null) {
@ -129,9 +173,14 @@ public class SettingsChangeNameActivity extends BaseFragment {
if (currentUser == null || lastNameField.getText() == null || firstNameField.getText() == null) {
return;
}
String newFirst = firstNameField.getText().toString();
String newLast = lastNameField.getText().toString();
if (currentUser.first_name != null && currentUser.first_name.equals(newFirst) && currentUser.last_name != null && currentUser.last_name.equals(newLast)) {
return;
}
TLRPC.TL_account_updateProfile req = new TLRPC.TL_account_updateProfile();
currentUser.first_name = req.first_name = firstNameField.getText().toString();
currentUser.last_name = req.last_name = lastNameField.getText().toString();
currentUser.first_name = req.first_name = newFirst;
currentUser.last_name = req.last_name = newLast;
TLRPC.User user = MessagesController.getInstance().getUser(UserConfig.getClientUserId());
if (user != null) {
user.first_name = req.first_name;

View File

@ -13,6 +13,12 @@ import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.text.Editable;
import android.text.Html;
import android.text.InputType;
import android.text.TextWatcher;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
@ -20,6 +26,7 @@ import android.view.ViewGroup;
import android.view.inputmethod.EditorInfo;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import org.telegram.android.AndroidUtilities;
@ -35,13 +42,19 @@ import org.telegram.messenger.TLObject;
import org.telegram.messenger.TLRPC;
import org.telegram.messenger.UserConfig;
import org.telegram.ui.Views.ActionBar.BaseFragment;
import org.telegram.ui.Views.SettingsSectionLayout;
import java.util.ArrayList;
public class SettingsChangeUsernameActivity extends BaseFragment {
private EditText firstNameField;
private View headerLabelView;
private View doneButton;
private TextView checkTextView;
private long checkReqId = 0;
private String lastCheckName = null;
private Runnable checkRunnable = null;
private boolean lastNameAvailable = false;
@Override
public View createView(LayoutInflater inflater, ViewGroup container) {
@ -68,18 +81,37 @@ public class SettingsChangeUsernameActivity extends BaseFragment {
TextView textView = (TextView)doneButton.findViewById(R.id.done_button_text);
textView.setText(LocaleController.getString("Done", R.string.Done).toUpperCase());
fragmentView = inflater.inflate(R.layout.chat_profile_change_name_layout, container, false);
TLRPC.User user = MessagesController.getInstance().getUser(UserConfig.getClientUserId());
if (user == null) {
user = UserConfig.getCurrentUser();
}
firstNameField = (EditText)fragmentView.findViewById(R.id.first_name_field);
fragmentView = new LinearLayout(inflater.getContext());
fragmentView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
fragmentView.setPadding(AndroidUtilities.dp(16), AndroidUtilities.dp(8), AndroidUtilities.dp(16), 0);
((LinearLayout) fragmentView).setOrientation(LinearLayout.VERTICAL);
SettingsSectionLayout settingsSectionLayout = new SettingsSectionLayout(inflater.getContext());
((LinearLayout) fragmentView).addView(settingsSectionLayout);
settingsSectionLayout.setText(LocaleController.getString("Username", R.string.Username).toUpperCase());
firstNameField = new EditText(inflater.getContext());
firstNameField.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 19);
firstNameField.setHintTextColor(0xffa3a3a3);
firstNameField.setTextColor(0xff000000);
firstNameField.setPadding(AndroidUtilities.dp(15), 0, AndroidUtilities.dp(15), AndroidUtilities.dp(15));
firstNameField.setMaxLines(1);
firstNameField.setLines(1);
firstNameField.setSingleLine(true);
firstNameField.setGravity(LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT);
firstNameField.setInputType(InputType.TYPE_TEXT_FLAG_CAP_SENTENCES | InputType.TYPE_TEXT_FLAG_MULTI_LINE | InputType.TYPE_TEXT_FLAG_AUTO_CORRECT);
firstNameField.setImeOptions(EditorInfo.IME_ACTION_DONE);
firstNameField.setHint(LocaleController.getString("UsernamePlaceholder", R.string.UsernamePlaceholder));
AndroidUtilities.clearCursorDrawable(firstNameField);
firstNameField.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {
if (i == EditorInfo.IME_ACTION_DONE) {
if (i == EditorInfo.IME_ACTION_DONE && doneButton != null) {
doneButton.performClick();
return true;
}
@ -87,13 +119,62 @@ public class SettingsChangeUsernameActivity extends BaseFragment {
}
});
((LinearLayout) fragmentView).addView(firstNameField);
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams)firstNameField.getLayoutParams();
layoutParams.topMargin = AndroidUtilities.dp(15);
layoutParams.width = LinearLayout.LayoutParams.MATCH_PARENT;
layoutParams.height = LinearLayout.LayoutParams.WRAP_CONTENT;
firstNameField.setLayoutParams(layoutParams);
if (user != null && user.username != null && user.username.length() > 0) {
firstNameField.setText(user.username);
firstNameField.setSelection(firstNameField.length());
}
TextView headerLabel = (TextView)fragmentView.findViewById(R.id.settings_section_text);
headerLabel.setText(LocaleController.getString("Username", R.string.Username).toUpperCase());
checkTextView = new TextView(inflater.getContext());
checkTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 15);
checkTextView.setPadding(AndroidUtilities.dp(8), 0, AndroidUtilities.dp(8), 0);
checkTextView.setGravity(LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT);
((LinearLayout) fragmentView).addView(checkTextView);
layoutParams = (LinearLayout.LayoutParams)checkTextView.getLayoutParams();
layoutParams.topMargin = AndroidUtilities.dp(12);
layoutParams.width = LinearLayout.LayoutParams.WRAP_CONTENT;
layoutParams.height = LinearLayout.LayoutParams.WRAP_CONTENT;
layoutParams.gravity = LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT;
checkTextView.setLayoutParams(layoutParams);
TextView helpTextView = new TextView(inflater.getContext());
helpTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 15);
helpTextView.setTextColor(0xff6d6d72);
helpTextView.setPadding(AndroidUtilities.dp(8), 0, AndroidUtilities.dp(8), 0);
helpTextView.setGravity(LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT);
helpTextView.setText(Html.fromHtml(LocaleController.getString("UsernameHelp", R.string.UsernameHelp)));
((LinearLayout) fragmentView).addView(helpTextView);
layoutParams = (LinearLayout.LayoutParams)helpTextView.getLayoutParams();
layoutParams.topMargin = AndroidUtilities.dp(10);
layoutParams.width = LinearLayout.LayoutParams.WRAP_CONTENT;
layoutParams.height = LinearLayout.LayoutParams.WRAP_CONTENT;
layoutParams.gravity = LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT;
helpTextView.setLayoutParams(layoutParams);
firstNameField.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
checkUserName(firstNameField.getText().toString(), false);
}
@Override
public void afterTextChanged(Editable editable) {
}
});
checkTextView.setVisibility(View.GONE);
} else {
ViewGroup parent = (ViewGroup)fragmentView.getParent();
if (parent != null) {
@ -128,7 +209,118 @@ public class SettingsChangeUsernameActivity extends BaseFragment {
showAlertDialog(builder);
}
private boolean checkUserName(final String name, boolean alert) {
if (name != null && name.length() > 0) {
checkTextView.setVisibility(View.VISIBLE);
} else {
checkTextView.setVisibility(View.GONE);
}
if (alert && name.length() == 0) {
return true;
}
if (checkRunnable != null) {
AndroidUtilities.CancelRunOnUIThread(checkRunnable);
checkRunnable = null;
lastCheckName = null;
if (checkReqId != 0) {
ConnectionsManager.getInstance().cancelRpc(checkReqId, true);
}
}
lastNameAvailable = false;
if (name != null) {
for (int a = 0; a < name.length(); a++) {
char ch = name.charAt(a);
if (a == 0 && ch >= '0' && ch <= '9') {
if (alert) {
showErrorAlert(LocaleController.getString("UsernameInvalidStartNumber", R.string.UsernameInvalidStartNumber));
} else {
checkTextView.setText(LocaleController.getString("UsernameInvalidStartNumber", R.string.UsernameInvalidStartNumber));
checkTextView.setTextColor(0xffcf3030);
}
return false;
}
if (!(ch >= '0' && ch <= '9' || ch >= 'a' && ch <= 'z' || ch >= 'A' && ch <= 'Z' || a == '_')) {
if (alert) {
showErrorAlert(LocaleController.getString("UsernameInvalid", R.string.UsernameInvalid));
} else {
checkTextView.setText(LocaleController.getString("UsernameInvalid", R.string.UsernameInvalid));
checkTextView.setTextColor(0xffcf3030);
}
return false;
}
}
}
if (name == null || name.length() < 5) {
if (alert) {
showErrorAlert(LocaleController.getString("UsernameInvalidShort", R.string.UsernameInvalidShort));
} else {
checkTextView.setText(LocaleController.getString("UsernameInvalidShort", R.string.UsernameInvalidShort));
checkTextView.setTextColor(0xffcf3030);
}
return false;
}
if (name.length() > 32) {
if (alert) {
showErrorAlert(LocaleController.getString("UsernameInvalidLong", R.string.UsernameInvalidLong));
} else {
checkTextView.setText(LocaleController.getString("UsernameInvalidLong", R.string.UsernameInvalidLong));
checkTextView.setTextColor(0xffcf3030);
}
return false;
}
if (!alert) {
String currentName = UserConfig.getCurrentUser().username;
if (currentName == null) {
currentName = "";
}
if (name.equals(currentName)) {
checkTextView.setText(LocaleController.formatString("UsernameAvailable", R.string.UsernameAvailable, name));
checkTextView.setTextColor(0xff26972c);
return true;
}
checkTextView.setText(LocaleController.getString("UsernameChecking", R.string.UsernameChecking));
checkTextView.setTextColor(0xff6d6d72);
lastCheckName = name;
checkRunnable = new Runnable() {
@Override
public void run() {
TLRPC.TL_account_checkUsername req = new TLRPC.TL_account_checkUsername();
req.username = name;
checkReqId = ConnectionsManager.getInstance().performRpc(req, new RPCRequest.RPCRequestDelegate() {
@Override
public void run(final TLObject response, final TLRPC.TL_error error) {
AndroidUtilities.RunOnUIThread(new Runnable() {
@Override
public void run() {
checkReqId = 0;
if (lastCheckName != null && lastCheckName.equals(name)) {
if (error == null && response instanceof TLRPC.TL_boolTrue) {
checkTextView.setText(LocaleController.formatString("UsernameAvailable", R.string.UsernameAvailable, name));
checkTextView.setTextColor(0xff26972c);
lastNameAvailable = true;
} else {
checkTextView.setText(LocaleController.getString("UsernameInUse", R.string.UsernameInUse));
checkTextView.setTextColor(0xffcf3030);
lastNameAvailable = false;
}
}
}
});
}
}, true, RPCRequest.RPCRequestClassGeneric | RPCRequest.RPCRequestClassFailOnServerErrors);
}
};
AndroidUtilities.RunOnUIThread(checkRunnable, 300);
}
return true;
}
private void saveName() {
if (!checkUserName(firstNameField.getText().toString(), true)) {
return;
}
TLRPC.User user = UserConfig.getCurrentUser();
if (getParentActivity() == null || user == null) {
return;
@ -142,10 +334,6 @@ public class SettingsChangeUsernameActivity extends BaseFragment {
finishFragment();
return;
}
if (newName.length() > 32 || newName.length() > 0 && newName.length() < 5) {
showErrorAlert("USERNAME_INVALID");
return;
}
final ProgressDialog progressDialog = new ProgressDialog(getParentActivity());
progressDialog.setMessage(LocaleController.getString("Loading", R.string.Loading));

View File

@ -42,6 +42,7 @@ import org.telegram.ui.Adapters.BaseFragmentAdapter;
import org.telegram.ui.Views.ActionBar.ActionBarLayer;
import org.telegram.ui.Views.ActionBar.BaseFragment;
import org.telegram.ui.Views.ColorPickerView;
import org.telegram.ui.Views.SettingsSectionLayout;
public class SettingsNotificationsActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate {
private ListView listView;
@ -541,22 +542,20 @@ public class SettingsNotificationsActivity extends BaseFragment implements Notif
int type = getItemViewType(i);
if (type == 0) {
if (view == null) {
LayoutInflater li = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.settings_section_layout, viewGroup, false);
view = new SettingsSectionLayout(mContext);
}
TextView textView = (TextView)view.findViewById(R.id.settings_section_text);
if (i == messageSectionRow) {
textView.setText(LocaleController.getString("MessageNotifications", R.string.MessageNotifications));
((SettingsSectionLayout) view).setText(LocaleController.getString("MessageNotifications", R.string.MessageNotifications));
} else if (i == groupSectionRow) {
textView.setText(LocaleController.getString("GroupNotifications", R.string.GroupNotifications));
((SettingsSectionLayout) view).setText(LocaleController.getString("GroupNotifications", R.string.GroupNotifications));
} else if (i == inappSectionRow) {
textView.setText(LocaleController.getString("InAppNotifications", R.string.InAppNotifications));
((SettingsSectionLayout) view).setText(LocaleController.getString("InAppNotifications", R.string.InAppNotifications));
} else if (i == eventsSectionRow) {
textView.setText(LocaleController.getString("Events", R.string.Events));
((SettingsSectionLayout) view).setText(LocaleController.getString("Events", R.string.Events));
} else if (i == otherSectionRow) {
textView.setText(LocaleController.getString("PhoneOther", R.string.PhoneOther));
((SettingsSectionLayout) view).setText(LocaleController.getString("PhoneOther", R.string.PhoneOther));
} else if (i == resetSectionRow) {
textView.setText(LocaleController.getString("Reset", R.string.Reset));
((SettingsSectionLayout) view).setText(LocaleController.getString("Reset", R.string.Reset));
}
} if (type == 1) {
if (view == null) {

View File

@ -41,6 +41,7 @@ import org.telegram.ui.Views.ActionBar.ActionBarMenuItem;
import org.telegram.ui.Views.BackupImageView;
import org.telegram.ui.Views.ActionBar.BaseFragment;
import org.telegram.ui.Views.IdenticonView;
import org.telegram.ui.Views.SettingsSectionLayout;
import java.util.ArrayList;
@ -539,16 +540,14 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
return view;
} else if (type == 1) {
if (view == null) {
LayoutInflater li = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.settings_section_layout, viewGroup, false);
view = new SettingsSectionLayout(mContext);
}
TextView textView = (TextView)view.findViewById(R.id.settings_section_text);
if (i == phoneSectionRow) {
textView.setText(LocaleController.getString("Info", R.string.Info));
((SettingsSectionLayout) view).setText(LocaleController.getString("Info", R.string.Info));
} else if (i == settingsSectionRow) {
textView.setText(LocaleController.getString("SETTINGS", R.string.SETTINGS));
((SettingsSectionLayout) view).setText(LocaleController.getString("SETTINGS", R.string.SETTINGS));
} else if (i == sharedMediaSectionRow) {
textView.setText(LocaleController.getString("SHAREDMEDIA", R.string.SHAREDMEDIA));
((SettingsSectionLayout) view).setText(LocaleController.getString("SHAREDMEDIA", R.string.SHAREDMEDIA));
}
} else if (type == 2) {
final TLRPC.User user = MessagesController.getInstance().getUser(user_id);
@ -621,7 +620,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
if (user.phone != null && user.phone.length() != 0) {
textView.setText(PhoneFormat.getInstance().format("+" + user.phone));
} else {
textView.setText(LocaleController.getString("Unknown", R.string.Unknown));
textView.setText(LocaleController.getString("NumberUnknown", R.string.NumberUnknown));
}
divider.setVisibility(usernameRow != -1 ? View.VISIBLE : View.INVISIBLE);
detailTextView.setText(LocaleController.getString("PhoneMobile", R.string.PhoneMobile));

View File

@ -91,6 +91,6 @@ public class BackupImageView extends View {
@Override
protected void onDraw(Canvas canvas) {
imageReceiver.setImageCoords(0, 0, getWidth(), getHeight());
imageReceiver.draw(canvas, 0, 0, getWidth(), getHeight());
imageReceiver.draw(canvas);
}
}

View File

@ -0,0 +1,82 @@
/*
* This is the source code of Telegram for Android v. 1.7.x.
* It is licensed under GNU GPL v. 2 or later.
* You should have received a copy of the license in this archive (see LICENSE).
*
* Copyright Nikolai Kudashov, 2013-2014.
*/
package org.telegram.ui.Views;
import android.content.Context;
import android.graphics.Typeface;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import org.telegram.android.AndroidUtilities;
import org.telegram.android.LocaleController;
public class SettingsSectionLayout extends LinearLayout {
private TextView textView;
private void init() {
setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
setOrientation(LinearLayout.VERTICAL);
textView = new TextView(getContext());
textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14);
textView.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
textView.setTextColor(0xff3b84c0);
addView(textView);
LayoutParams layoutParams = (LayoutParams)textView.getLayoutParams();
layoutParams.width = LayoutParams.WRAP_CONTENT;
layoutParams.height = LayoutParams.WRAP_CONTENT;
layoutParams.leftMargin = AndroidUtilities.dp(8);
layoutParams.rightMargin = AndroidUtilities.dp(8);
layoutParams.topMargin = AndroidUtilities.dp(6);
layoutParams.bottomMargin = AndroidUtilities.dp(4);
if (LocaleController.isRTL) {
textView.setGravity(Gravity.RIGHT);
layoutParams.gravity = Gravity.RIGHT;
}
textView.setLayoutParams(layoutParams);
View view = new View(getContext());
view.setBackgroundColor(0xff6caae4);
addView(view);
layoutParams = (LayoutParams)view.getLayoutParams();
layoutParams.weight = LayoutParams.MATCH_PARENT;
layoutParams.height = AndroidUtilities.dp(1);
view.setLayoutParams(layoutParams);
}
public SettingsSectionLayout(Context context) {
super(context);
init();
}
public SettingsSectionLayout(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}
public SettingsSectionLayout(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init();
}
public SettingsSectionLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
init();
}
public void setText(String text) {
textView.setText(text);
}
}

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/holo_textfield_default_holo_light" />
<item android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/holo_textfield_disabled_holo_light" />
<item android:state_enabled="true" android:state_focused="true" android:drawable="@drawable/holo_textfield_activated_holo_light" />
<item android:state_enabled="true" android:state_activated="true" android:drawable="@drawable/holo_textfield_focused_holo_light" />
<item android:state_enabled="true" android:drawable="@drawable/holo_textfield_default_holo_light" />
<item android:state_focused="true" android:drawable="@drawable/holo_textfield_disabled_focused_holo_light" />
<item android:drawable="@drawable/holo_textfield_disabled_holo_light" />
<item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/textfield_default" />
<item android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/textfield_disabled2" />
<item android:state_enabled="true" android:state_focused="true" android:drawable="@drawable/textfield_activated" />
<item android:state_enabled="true" android:state_activated="true" android:drawable="@drawable/textfield_focused" />
<item android:state_enabled="true" android:drawable="@drawable/textfield_default" />
<item android:state_focused="true" android:drawable="@drawable/textfield_disabled" />
<item android:drawable="@drawable/textfield_disabled2" />
</selector>

View File

@ -1,37 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="8dp">
<include layout="@layout/settings_section_layout"/>
<EditText
android:textSize="19dp"
android:textColorHint="#a3a3a3"
android:layout_gravity="center_vertical"
android:id="@+id/first_name_field"
android:paddingBottom="15dp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:maxLines="3"
android:inputType="textCapSentences|textAutoCorrect|textMultiLine"
android:imeOptions="actionDone"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:gravity="right"
android:textCursorDrawable="@null"
android:textColor="#000000"/>
</LinearLayout>
</RelativeLayout>

View File

@ -11,8 +11,8 @@
android:layout_alignParentBottom="true"
android:clipToPadding="false"
android:fadingEdge="none"
android:divider="@drawable/messages_list_divider"
android:dividerHeight="1px"
android:divider="@null"
android:dividerHeight="0px"
android:fadingEdgeLength="0dp"
android:verticalScrollbarPosition="left"/>

View File

@ -1,65 +0,0 @@
<org.telegram.ui.Views.NotificationView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/container_view"
android:orientation="vertical">
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#ffffff">
<org.telegram.ui.Views.BackupImageView
android:layout_height="48dp"
android:layout_width="48dp"
android:id="@+id/avatar_image"
android:layout_gravity="right|top"/>
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginLeft="40dp"
android:orientation="vertical"
android:layout_marginRight="56dp"
android:layout_gravity="top|right"
android:id="@+id/text_layout">
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:gravity="right|center"
android:textSize="15dp"
android:textColor="#000000"
android:id="@+id/name_text_view"
android:paddingTop="4dp"
android:ellipsize="end"
android:layout_gravity="top|right"
android:singleLine="true"/>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:gravity="right|center"
android:textColor="#000000"
android:textSize="15dp"
android:id="@+id/message_text_view"
android:paddingTop="24dp"
android:ellipsize="end"
android:layout_gravity="top|right"
android:singleLine="true"/>
</FrameLayout>
<ImageView
android:layout_height="40dp"
android:layout_width="40dp"
android:layout_gravity="left|center"
android:src="@drawable/ic_profile_cross"
android:scaleType="center"
android:id="@+id/close_button"/>
</FrameLayout>
</org.telegram.ui.Views.NotificationView>

View File

@ -1,59 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="8dp">
<include layout="@layout/settings_section_layout"/>
<EditText
android:textSize="19dp"
android:textColorHint="#a3a3a3"
android:layout_gravity="center_vertical"
android:id="@+id/first_name_field"
android:paddingBottom="15dp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:lines="1"
android:singleLine="true"
android:inputType="textCapSentences|textAutoCorrect"
android:imeOptions="actionNext"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:gravity="right"
android:textCursorDrawable="@null"
android:textColor="#000000"/>
<EditText
android:textSize="19dp"
android:textColorHint="#a3a3a3"
android:layout_gravity="center_vertical"
android:id="@+id/last_name_field"
android:paddingBottom="15dp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:lines="1"
android:singleLine="true"
android:inputType="textCapSentences|textAutoCorrect"
android:imeOptions="actionDone"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:gravity="right"
android:textCursorDrawable="@null"
android:textColor="#000000"/>
</LinearLayout>
</RelativeLayout>

View File

@ -1,25 +0,0 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/settings_section_view"
android:layout_gravity="top">
<TextView android:textSize="14dp"
android:textStyle="bold"
android:textColor="#3b84c0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginTop="6dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="4dp"
android:id="@+id/settings_section_text"
android:layout_gravity="top|right"
android:gravity="right"/>
<View android:background="#6caae4"
android:layout_width="fill_parent"
android:layout_height="1dip" />
</LinearLayout>

View File

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="8dp">
<include
layout="@layout/settings_section_layout"/>
<EditText
android:textSize="19dp"
android:textColorHint="#a3a3a3"
android:layout_gravity="center_vertical"
android:id="@+id/first_name_field"
android:paddingBottom="15dp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:maxLines="3"
android:inputType="textCapSentences|textAutoCorrect|textMultiLine"
android:imeOptions="actionDone"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:textCursorDrawable="@null"
android:textColor="#000000"/>
</LinearLayout>
</FrameLayout>

View File

@ -9,11 +9,10 @@
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:clipToPadding="false"
android:fadingEdge="none"
android:fadingEdgeLength="0dp"
android:divider="@drawable/messages_list_divider"
android:dividerHeight="1px"
android:divider="@null"
android:dividerHeight="0px"
android:animationCache="false"/>
<TextView android:layout_width="match_parent"

View File

@ -1,62 +0,0 @@
<org.telegram.ui.Views.NotificationView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/container_view"
android:orientation="vertical">
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#ffffff">
<org.telegram.ui.Views.BackupImageView
android:layout_height="48dp"
android:layout_width="48dp"
android:id="@+id/avatar_image"/>
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginLeft="56dp"
android:orientation="vertical"
android:layout_marginRight="40dp"
android:layout_gravity="top|left"
android:id="@+id/text_layout">
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:gravity="left|center"
android:textSize="15dp"
android:textColor="#000000"
android:id="@+id/name_text_view"
android:paddingTop="4dp"
android:ellipsize="end"
android:singleLine="true"/>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:gravity="left|center"
android:textColor="#000000"
android:textSize="15dp"
android:id="@+id/message_text_view"
android:paddingTop="24dp"
android:ellipsize="end"
android:singleLine="true"/>
</FrameLayout>
<ImageView
android:layout_height="40dp"
android:layout_width="40dp"
android:layout_gravity="right|center"
android:src="@drawable/ic_profile_cross"
android:scaleType="center"
android:id="@+id/close_button"/>
</FrameLayout>
</org.telegram.ui.Views.NotificationView>

View File

@ -1,57 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="8dp">
<include layout="@layout/settings_section_layout"/>
<EditText
android:textSize="19dp"
android:textColorHint="#a3a3a3"
android:layout_gravity="center_vertical"
android:id="@+id/first_name_field"
android:paddingBottom="15dp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:lines="1"
android:singleLine="true"
android:inputType="textCapSentences|textAutoCorrect"
android:imeOptions="actionNext"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:textCursorDrawable="@null"
android:textColor="#000000"/>
<EditText
android:textSize="19dp"
android:textColorHint="#a3a3a3"
android:layout_gravity="center_vertical"
android:id="@+id/last_name_field"
android:paddingBottom="15dp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:lines="1"
android:singleLine="true"
android:inputType="textCapSentences|textAutoCorrect"
android:imeOptions="actionDone"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:textCursorDrawable="@null"
android:textColor="#000000"/>
</LinearLayout>
</FrameLayout>

View File

@ -1,27 +0,0 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/settings_section_view"
android:layout_gravity="top">
<TextView
android:textSize="14dp"
android:textStyle="bold"
android:textColor="#3b84c0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginTop="6dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="4dp"
android:id="@+id/settings_section_text"
android:layout_gravity="top"/>
<View
android:background="#6caae4"
android:layout_width="fill_parent"
android:layout_height="1dp" />
</LinearLayout>

View File

@ -51,9 +51,10 @@
<string name="DeleteChat">حذف وخروج</string>
<string name="HiddenName">الاسم مخفي</string>
<string name="SelectChat">اختر محادثة</string>
<string name="CompatibilityChat">%1$s يستخدم إصدار قديم من تيليجرام، لذلك، الصور السرية ستظهر في وضع الموافقة.\n\nعندما يقوم %2$s بتحديث تيليجرام، الصور التي بها عداد دقيقة أو أقل ستعمل بطريقة \"الاستمرار بالضغط للإستعراض\"، وسيتم إخبارك عندما يلتقط المستقبل صورة من شاشته.</string>
<!--broadcasts-->
<string name="BroadcastList">قائمة الرسالة الجماعية</string>
<string name="NewBroadcastList">قائمة رسالة جماعية جديدة</string>
<string name="NewBroadcastList">رسالة جماعية جديدة</string>
<string name="EnterListName">أدخل اسم القائمة</string>
<string name="YouCreatedBroadcastList">أنت قمت بإنشاء قائمة رسالة جماعية</string>
<string name="AddRecipient">إضافة مستلم</string>
@ -146,8 +147,8 @@
<string name="NotificationUnrecognizedDevice">%1$s,\nتم تسجيل الدخول لحسابك من جهاز جديد يوم %2$s\n\nالجهاز: %3$s\nالموقع: %4$s\n\nإذا لم يكن أنت من سجل الدخول، يمكنك الذهاب للإعدادات ثم تسجيل الخروج من كافة الأجهزة الأخرى.\n\nشكرًا,\nفريق عمل تيليجرام</string>
<string name="NotificationContactNewPhoto">%1$s قام بتغيير صورته الشخصية</string>
<string name="Reply">الرد</string>
<string name="ReplyToGroup">Reply to %1$s</string>
<string name="ReplyToUser">Reply to %1$s</string>
<string name="ReplyToGroup">الرد على %1$s</string>
<string name="ReplyToUser">الرد على %1$s</string>
<string name="NotificationMessagesPeopleDisplayOrder">%1$s %2$s</string>
<!--contacts view-->
<string name="SelectContact">اختر جهة اتصال</string>
@ -160,7 +161,7 @@
<string name="LastSeen">آخر ظهور</string>
<string name="LastSeenDate">آخر ظهور</string>
<string name="InviteFriends">قم بدعوة صديق</string>
<string name="GlobalSearch">GLOBAL SEARCH</string>
<string name="GlobalSearch">بحث شامل</string>
<!--group create view-->
<string name="SendMessageTo">إرسال الرسالة إلى...</string>
<string name="EnterGroupNamePlaceholder">أدخل اسم للمجموعة</string>
@ -198,16 +199,19 @@
<string name="MessageLifetime">عداد التدمير الذاتي</string>
<string name="ShortMessageLifetimeForever">إيقاف</string>
<string name="EncryptionKeyDescription">هذه الصورة هي تصور لمفتاح التشفير لهذه المحادثة السرية مع <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>.<![CDATA[<br><br>]]>إذا كانت مطابقة للصورة التي في جهاز <![CDATA[<b>]]>%2$s<![CDATA[</b>]]>, فمحادثتكم آمنة ٢٠٠٪.<![CDATA[<br><br>]]>للمزيد نرجو الذهاب إلى telegram.org</string>
<string name="Unknown">Unknown</string>
<string name="Info">INFO</string>
<string name="Phone">الهاتف</string>
<string name="Username">Username</string>
<string name="UsernamePlaceholder">Your Username</string>
<string name="UsernameInUse">Sorry, this username is already taken.</string>
<string name="UsernameInvalid">Sorry, this username is invalid.</string>
<string name="UsernameInvalidShort">A username must have at least 5 characters.</string>
<string name="UsernameInvalidStartNumber">Sorry, a username can't start with a number.</string>
<string name="Usernamehelp">You can choose a username on <![CDATA[<b>]]>Telegram<![CDATA[</b>]]>. If you do, other people will be able to find you by this username and contact you without knowing your phone number.\n\nYou can use <![CDATA[<b>]]>az<![CDATA[</b>]]>, <![CDATA[<b>]]>09<![CDATA[</b>]]> and underscores. Minimum length is <![CDATA[<b>]]>5<![CDATA[</b>]]> characters.</string>
<string name="NumberUnknown">غير معروف</string>
<string name="Info">معلومات</string>
<string name="Phone">هاتف</string>
<string name="Username">اسم مستخدم</string>
<string name="UsernamePlaceholder">معرّفك</string>
<string name="UsernameInUse">المعذرة، اسم المستخدم تم اختياره مسبقًا.</string>
<string name="UsernameInvalid">المعذرة، اسم المستخدم غير مقبول.</string>
<string name="UsernameInvalidShort">سم المستخدم يجب أن يتكوّن من ٥ حروف على الأقل.</string>
<string name="UsernameInvalidLong">اسم المستخدم يجب ألا يتخطى ٣٢ حرف كحد أقصى.</string>
<string name="UsernameInvalidStartNumber">المعذرة، اسم المستخدم لا يمكن أن يبدأ برقم.</string>
<string name="UsernameHelp">يمكنك اختيار اسم مستخدم في <![CDATA[<b>]]>تيليجرام<![CDATA[</b>]]>. إذا قمت بذلك، سيستطيع الناس إيجادك باستخدام الاسم المستخدم والتواصل معك من دون معرفة رقمك.<![CDATA[<br><br>]]>يمكنك استخدام <![CDATA[<b>]]>حروف اللغة الإنجليزية<![CDATA[</b>]]>, <![CDATA[<b>]]>وأرقامها<![CDATA[</b>]]> و كذلك الخط. لا بد من استخدام <![CDATA[<b>]]>٥<![CDATA[</b>]]> حروف على الأقل.</string>
<string name="UsernameChecking">جاري مراجعة اسم المستخدم...</string>
<string name="UsernameAvailable">%1$s متاح.</string>
<!--settings view-->
<string name="ResetNotificationsText">تم تعيين كافة الإشعارات افتراضيا</string>
<string name="TextSize">حجم نص الرسائل</string>
@ -387,7 +391,7 @@
<string name="Page5Title">قوي</string>
<string name="Page6Title">مرتبط بالسحاب</string>
<string name="Page7Title">خصوصي</string>
<string name="Page1Message">أسرع تطبيق مراسلة في العالم.<![CDATA[<br/>]]>كما أنه مجاني و آمن.</string>
<string name="Page1Message">أسرع تطبيق مراسلة في العالم. <![CDATA[<br/>]]>كما أنه مجاني و آمن.</string>
<string name="Page2Message"><![CDATA[<b>تيليجرام</b>]]> يوصل الرسائل أسرع من أي تطبيق آخر.</string>
<string name="Page3Message"><![CDATA[<b>تيليجرام</b>]]> مجاني للأبد. بدون أية إعلانات. وبدون رسوم إشتراك.</string>
<string name="Page4Message"><![CDATA[<b>تيليجرام</b>]]> يحمي الرسائل الخاصة بك من هجمات المخترقين.</string>
@ -395,7 +399,7 @@
<string name="Page6Message"><![CDATA[<b>تيليجرام</b>]]> يمكنك الوصول إلى الرسائل الخاصة بك من أجهزة متعددة.</string>
<string name="Page7Message"><![CDATA[<b>تيليجرام</b>]]> الرسائل مشفرة بشكل قوي وتستطيع تدمير ذاتها</string>
<string name="StartMessaging">إبدأ المراسلة</string>
<!--plurals-->
<!--plural-->
<string name="Online_zero">%1$d متصل</string>
<string name="Online_one">%1$d متصل</string>
<string name="Online_two">%1$d متصل</string>
@ -432,42 +436,42 @@
<string name="FromContacts_few">من %1$d جهات اتصال</string>
<string name="FromContacts_many">من %1$d جهة اتصال</string>
<string name="FromContacts_other">من %1$d جهة اتصال</string>
<string name="Seconds_zero">%1$d seconds</string>
<string name="Seconds_one">%1$d second</string>
<string name="Seconds_two">%1$d seconds</string>
<string name="Seconds_few">%1$d seconds</string>
<string name="Seconds_many">%1$d seconds</string>
<string name="Seconds_other">%1$d seconds</string>
<string name="Minutes_zero">%1$d minutes</string>
<string name="Minutes_one">%1$d minute</string>
<string name="Minutes_two">%1$d minutes</string>
<string name="Minutes_few">%1$d minutes</string>
<string name="Minutes_many">%1$d minutes</string>
<string name="Minutes_other">%1$d minutes</string>
<string name="Hours_zero">%1$d hours</string>
<string name="Hours_one">%1$d hour</string>
<string name="Hours_two">%1$d hours</string>
<string name="Hours_few">%1$d hours</string>
<string name="Hours_many">%1$d hours</string>
<string name="Hours_other">%1$d hours</string>
<string name="Days_zero">%1$d days</string>
<string name="Days_one">%1$d day</string>
<string name="Days_two">%1$d days</string>
<string name="Days_few">%1$d days</string>
<string name="Days_many">%1$d days</string>
<string name="Days_other">%1$d days</string>
<string name="Weeks_zero">%1$d weeks</string>
<string name="Weeks_one">%1$d week</string>
<string name="Weeks_two">%1$d weeks</string>
<string name="Weeks_few">%1$d weeks</string>
<string name="Weeks_many">%1$d weeks</string>
<string name="Weeks_other">%1$d weeks</string>
<string name="Seconds_zero">%1$d ثانية</string>
<string name="Seconds_one">%1$d ثانية</string>
<string name="Seconds_two">%1$d ثانيتان</string>
<string name="Seconds_few">%1$d ثوانٍ</string>
<string name="Seconds_many">%1$d ثانية</string>
<string name="Seconds_other">%1$d ثانية</string>
<string name="Minutes_zero">%1$d دقيقة</string>
<string name="Minutes_one">%1$d دقيقة</string>
<string name="Minutes_two">%1$d دقيقتان</string>
<string name="Minutes_few">%1$d دقائق</string>
<string name="Minutes_many">%1$d دقيقة</string>
<string name="Minutes_other">%1$d دقيقة</string>
<string name="Hours_zero">%1$d ساعة</string>
<string name="Hours_one">%1$d ساعة</string>
<string name="Hours_two">%1$d ساعتان</string>
<string name="Hours_few">%1$d ساعات</string>
<string name="Hours_many">%1$d ساعة</string>
<string name="Hours_other">%1$d ساعة</string>
<string name="Days_zero">%1$d يوم</string>
<string name="Days_one">%1$d يوم</string>
<string name="Days_two">%1$d يومان</string>
<string name="Days_few">%1$d أيام</string>
<string name="Days_many">%1$d يوم</string>
<string name="Days_other">%1$d يوم</string>
<string name="Weeks_zero">%1$d أسبوع</string>
<string name="Weeks_one">%1$d أسبوع</string>
<string name="Weeks_two">%1$d أسبوعان</string>
<string name="Weeks_few">%1$d أسابيع</string>
<string name="Weeks_many">%1$d أسبوع</string>
<string name="Weeks_other">%1$d أسبوع</string>
<!--date formatters-->
<string name="formatterMonth">dd MMM</string>
<string name="formatterMonth">MMM dd</string>
<string name="formatterYear">dd.MM.yy</string>
<string name="formatterYearMax">dd.MM.yyyy</string>
<string name="chatDate">d MMMM</string>
<string name="chatFullDate">d MMMM yyyy</string>
<string name="chatDate">MMMM d</string>
<string name="chatFullDate">MMMM d, yyyy</string>
<string name="formatterWeek">EEE</string>
<string name="formatterDay24H">HH:mm</string>
<string name="formatterDay12H">h:mm a</string>

View File

@ -51,6 +51,7 @@
<string name="DeleteChat">Löschen und beenden</string>
<string name="HiddenName">Versteckter Name</string>
<string name="SelectChat">Chat auswählen</string>
<string name="CompatibilityChat">%1$s benutzt eine ältere Version von Telegram, sodass Fotos in Geheimen Chats im Kompatibilitätsmodus angezeigt werden.\n\nSobald %2$s Telegram aktualisiert, werden Fotos mit Timern von 1 Minute und kürzer per \"Tippen und Halten\" angezeigt. Du wirst benachrichtigt, sobald dein Chatpartner ein Bildschirmfoto macht.</string>
<!--broadcasts-->
<string name="BroadcastList">Broadcast Liste</string>
<string name="NewBroadcastList">Neue Broadcast Liste</string>
@ -160,7 +161,7 @@
<string name="LastSeen">zul. online</string>
<string name="LastSeenDate">zul. online</string>
<string name="InviteFriends">Freunde einladen</string>
<string name="GlobalSearch">GLOBAL SEARCH</string>
<string name="GlobalSearch">GLOBALE SUCHE</string>
<!--group create view-->
<string name="SendMessageTo">Sende Nachricht an…</string>
<string name="EnterGroupNamePlaceholder">Gruppenname</string>
@ -198,16 +199,19 @@
<string name="MessageLifetime">Selbstzerstörungs-Timer</string>
<string name="ShortMessageLifetimeForever">Aus</string>
<string name="EncryptionKeyDescription">Das ist eine Darstellung des Schlüssels für den Geheimen Chat mit <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>.<![CDATA[<br><br>]]>Wenn dieses Bild auf <![CDATA[<b>]]>%2$s\s<![CDATA[</b>]]>s Telefon genau so aussieht, ist euer Chat zu 200%% sicher.<![CDATA[<br><br>]]>Erfahre mehr auf telegram.org</string>
<string name="Unknown">Unknown</string>
<string name="NumberUnknown">Unbekannt</string>
<string name="Info">INFO</string>
<string name="Phone">Telefon</string>
<string name="Username">Username</string>
<string name="UsernamePlaceholder">Your Username</string>
<string name="UsernameInUse">Sorry, this username is already taken.</string>
<string name="UsernameInvalid">Sorry, this username is invalid.</string>
<string name="UsernameInvalidShort">A username must have at least 5 characters.</string>
<string name="UsernameInvalidStartNumber">Sorry, a username can't start with a number.</string>
<string name="Usernamehelp">You can choose a username on <![CDATA[<b>]]>Telegram<![CDATA[</b>]]>. If you do, other people will be able to find you by this username and contact you without knowing your phone number.\n\nYou can use <![CDATA[<b>]]>az<![CDATA[</b>]]>, <![CDATA[<b>]]>09<![CDATA[</b>]]> and underscores. Minimum length is <![CDATA[<b>]]>5<![CDATA[</b>]]> characters.</string>
<string name="Username">Benutzername</string>
<string name="UsernamePlaceholder">Dein Benutzername</string>
<string name="UsernameInUse">Leider ist dieser Benutzername vergeben.</string>
<string name="UsernameInvalid">Benutzername leider nicht erlaubt.</string>
<string name="UsernameInvalidShort">Ein Benutzername benötigt mindestens 5 Zeichen.</string>
<string name="UsernameInvalidLong">Ein Benutzername darf maximal 32 Zeichen haben.</string>
<string name="UsernameInvalidStartNumber">Benutzernamen dürfen leider nicht mit einer Zahl anfangen.</string>
<string name="UsernameHelp">Wähle einen Benutzernamen, wenn du von anderen bei<![CDATA[<b>]]>Telegram<![CDATA[</b>]]>gefunden werden willst ohne, dass sie deine Nummer kennen müssen.<![CDATA[<br><br>]]>Erlaubt sind <![CDATA[<b>]]>az<![CDATA[<b>]]>, <![CDATA[<b>]]>09<![CDATA[<b>]]> und Unterstriche. Die Mindestlänge beträgt <![CDATA[<b>]]>5<![CDATA[<b>]]> Zeichen.</string>
<string name="UsernameChecking">Prüfe Benutzername...</string>
<string name="UsernameAvailable">%1$s ist verfügbar.</string>
<!--settings view-->
<string name="ResetNotificationsText">Alle Einstellungen für Mitteilungen zurücksetzen</string>
<string name="TextSize">Textgröße für Nachrichten</string>
@ -247,8 +251,8 @@
<string name="Language">Sprache</string>
<string name="AskAQuestionInfo">Bedenke bitte, dass der Telegram Support von einem ehrenamtlichen Team betreut wird. Wir versuchen so schnell wie möglich zu antworten, dies kann jedoch manchmal ein bisschen dauern.<![CDATA[<br><br>]]>Bitte schau auch in den <![CDATA[<a href=\"http://telegram.org/faq/de\">Fragen und Antworten </a>]]> nach. Dort findest du Antworten auf die meisten Fragen und wichtige Tipps zur <![CDATA[<a href=\"https://telegram.org/faq/de#problembehandlung\">Problembehandlung</a>]]>.</string>
<string name="AskButton">Frage einen Freiwilligen</string>
<string name="TelegramFaq">Fragen und Antworten zu Telegram</string>
<string name="TelegramFaqUrl">https://telegram.org/faq</string>
<string name="TelegramFaq">Fragen und Antworten</string>
<string name="TelegramFaqUrl">https://telegram.org/faq/ko</string>
<string name="DeleteLocalization">Lokalisierung löschen?</string>
<string name="IncorrectLocalization">Falsche Sprachdatei</string>
<string name="Enabled">Aktiviert</string>
@ -432,36 +436,36 @@
<string name="FromContacts_few">von %1$d Kontakten</string>
<string name="FromContacts_many">von %1$d Kontakten</string>
<string name="FromContacts_other">von %1$d Kontakten</string>
<string name="Seconds_zero">%1$d seconds</string>
<string name="Seconds_one">%1$d second</string>
<string name="Seconds_two">%1$d seconds</string>
<string name="Seconds_few">%1$d seconds</string>
<string name="Seconds_many">%1$d seconds</string>
<string name="Seconds_other">%1$d seconds</string>
<string name="Minutes_zero">%1$d minutes</string>
<string name="Minutes_one">%1$d minute</string>
<string name="Minutes_two">%1$d minutes</string>
<string name="Minutes_few">%1$d minutes</string>
<string name="Minutes_many">%1$d minutes</string>
<string name="Minutes_other">%1$d minutes</string>
<string name="Hours_zero">%1$d hours</string>
<string name="Hours_one">%1$d hour</string>
<string name="Hours_two">%1$d hours</string>
<string name="Hours_few">%1$d hours</string>
<string name="Hours_many">%1$d hours</string>
<string name="Hours_other">%1$d hours</string>
<string name="Days_zero">%1$d days</string>
<string name="Days_one">%1$d day</string>
<string name="Days_two">%1$d days</string>
<string name="Days_few">%1$d days</string>
<string name="Days_many">%1$d days</string>
<string name="Days_other">%1$d days</string>
<string name="Weeks_zero">%1$d weeks</string>
<string name="Weeks_one">%1$d week</string>
<string name="Weeks_two">%1$d weeks</string>
<string name="Weeks_few">%1$d weeks</string>
<string name="Weeks_many">%1$d weeks</string>
<string name="Weeks_other">%1$d weeks</string>
<string name="Seconds_zero">%1$d Sekunden</string>
<string name="Seconds_one">%1$d Sekunde</string>
<string name="Seconds_two">%1$d Sekunden</string>
<string name="Seconds_few">%1$d Sekunden</string>
<string name="Seconds_many">%1$d Sekunden</string>
<string name="Seconds_other">%1$d Sekunden</string>
<string name="Minutes_zero">%1$d Minuten</string>
<string name="Minutes_one">%1$d Minute</string>
<string name="Minutes_two">%1$d Minuten</string>
<string name="Minutes_few">%1$d Minuten</string>
<string name="Minutes_many">%1$d Minuten</string>
<string name="Minutes_other">%1$d Minuten</string>
<string name="Hours_zero">%1$d Stunden</string>
<string name="Hours_one">%1$d Stunde</string>
<string name="Hours_two">%1$d Stunden</string>
<string name="Hours_few">%1$d Stunden</string>
<string name="Hours_many">%1$d Stunden</string>
<string name="Hours_other">%1$d Stunden</string>
<string name="Days_zero">%1$d Tage</string>
<string name="Days_one">%1$d Tag</string>
<string name="Days_two">%1$d Tage</string>
<string name="Days_few">%1$d Tage</string>
<string name="Days_many">%1$d Tage</string>
<string name="Days_other">%1$d Tage</string>
<string name="Weeks_zero">%1$d Wochen</string>
<string name="Weeks_one">%1$d Woche</string>
<string name="Weeks_two">%1$d Wochen</string>
<string name="Weeks_few">%1$d Wochen</string>
<string name="Weeks_many">%1$d Wochen</string>
<string name="Weeks_other">%1$d Wochen</string>
<!--date formatters-->
<string name="formatterMonth">dd MMM</string>
<string name="formatterYear">dd.MM.yy</string>

View File

@ -51,6 +51,7 @@
<string name="DeleteChat">Eliminar y salir</string>
<string name="HiddenName">Nombre oculto</string>
<string name="SelectChat">Elige el chat</string>
<string name="CompatibilityChat">%1$s usa una versión antigua de Telegram, así que las fotos secretas serán mostradas en un modo de compatibilidad.\n\nCuando %2$s actualice Telegram, las fotos con autodestrucción de 1 minuto o menos funcionarán con el modo \'Mantén pulsado para ver\', y te notificaremos siempre que la otra parte haga una captura de pantalla.</string>
<!--broadcasts-->
<string name="BroadcastList">Lista de difusión</string>
<string name="NewBroadcastList">Nueva difusión</string>
@ -73,10 +74,10 @@
<string name="SdCard">Tarjeta SD</string>
<!--chat view-->
<string name="Invisible">invisible</string>
<string name="Typing">escribe...</string>
<string name="Typing">escribiendo...</string>
<string name="Attach">Adjuntar</string>
<string name="IsTyping">escribe...</string>
<string name="AreTyping">escriben...</string>
<string name="IsTyping">está escribiendo...</string>
<string name="AreTyping">están escribiendo...</string>
<string name="GotAQuestion">¿Tienes preguntas\nsobre Telegram?</string>
<string name="ChatTakePhoto">Hacer foto</string>
<string name="ChatGallery">Galería</string>
@ -160,7 +161,7 @@
<string name="LastSeen">últ. vez</string>
<string name="LastSeenDate">últ. vez el</string>
<string name="InviteFriends">Invitar a amigos</string>
<string name="GlobalSearch">GLOBAL SEARCH</string>
<string name="GlobalSearch">BÚSQUEDA GLOBAL</string>
<!--group create view-->
<string name="SendMessageTo">Enviar mensaje a...</string>
<string name="EnterGroupNamePlaceholder">Nombre del grupo</string>
@ -170,7 +171,7 @@
<!--group info view-->
<string name="EnterGroupNameTitle">PON EL NOMBRE DEL GRUPO</string>
<string name="SharedMedia">Fotos y vídeos</string>
<string name="GroupInfo">Información</string>
<string name="GroupInfo">Información </string>
<string name="SHAREDMEDIA">FOTOS Y VÍDEOS</string>
<string name="SETTINGS">AJUSTES</string>
<string name="AddMember">Añadir miembro</string>
@ -198,16 +199,19 @@
<string name="MessageLifetime">Autodestrucción</string>
<string name="ShortMessageLifetimeForever">Apagada</string>
<string name="EncryptionKeyDescription">Esta imagen es una visualización de la clave de cifrado para el chat secreto con <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>.<![CDATA[<br><br>]]>Si esta imagen se ve igual en el teléfono de <![CDATA[<b>]]>%2$s<![CDATA[</b>]]>, tu chat es seguro en un 200%%.<![CDATA[<br><br>]]>Aprende más en telegram.org</string>
<string name="Unknown">Unknown</string>
<string name="Info">INFO</string>
<string name="NumberUnknown">Desconocido</string>
<string name="Info">INFORMACIÓN</string>
<string name="Phone">Teléfono</string>
<string name="Username">Username</string>
<string name="UsernamePlaceholder">Your Username</string>
<string name="UsernameInUse">Sorry, this username is already taken.</string>
<string name="UsernameInvalid">Sorry, this username is invalid.</string>
<string name="UsernameInvalidShort">A username must have at least 5 characters.</string>
<string name="UsernameInvalidStartNumber">Sorry, a username can't start with a number.</string>
<string name="Usernamehelp">You can choose a username on <![CDATA[<b>]]>Telegram<![CDATA[</b>]]>. If you do, other people will be able to find you by this username and contact you without knowing your phone number.\n\nYou can use <![CDATA[<b>]]>az<![CDATA[</b>]]>, <![CDATA[<b>]]>09<![CDATA[</b>]]> and underscores. Minimum length is <![CDATA[<b>]]>5<![CDATA[</b>]]> characters.</string>
<string name="Username">Apodo</string>
<string name="UsernamePlaceholder">Tu apodo</string>
<string name="UsernameInUse">Lo siento, este apodo ya está ocupado.</string>
<string name="UsernameInvalid">Lo siento, este apodo es inválido.</string>
<string name="UsernameInvalidShort">Un apodo debe tener al menos 5 caracteres.</string>
<string name="UsernameInvalidLong">El apodo no debe exceder los 32 caracteres.</string>
<string name="UsernameInvalidStartNumber">Lo siento, un apodo no puede comenzar con un número.</string>
<string name="UsernameHelp">Puedes elegir un apodo en <![CDATA[<b>]]>Telegram<![CDATA[</b>]]>. Si lo haces, otras personas te podrán encontrar por ese apodo y contactarte sin saber tu número de teléfono.<![CDATA[<br><br>]]>Puedes usar <![CDATA[<b>]]>az<![CDATA[</b>]]>, <![CDATA[<b>]]>09<![CDATA[</b>]]> y guiones bajos. La longitud mínima es de <![CDATA[<b>]]>5<![CDATA[</b>]]> caracteres.</string>
<string name="UsernameChecking">Verificando apodo...</string>
<string name="UsernameAvailable">%1$s está disponible.</string>
<!--settings view-->
<string name="ResetNotificationsText">Restablecer las notificaciones</string>
<string name="TextSize">Tamaño del texto</string>
@ -265,7 +269,7 @@
<string name="NoPopup">Desactivadas</string>
<string name="OnlyWhenScreenOn">Con pantalla encendida</string>
<string name="OnlyWhenScreenOff">Con pantalla apagada</string>
<string name="AlwaysShowPopup">Mostrar siempre</string>
<string name="AlwaysShowPopup">Mostrar siempre </string>
<string name="BadgeNumber">Globo en el ícono</string>
<string name="Short">Corto</string>
<string name="Long">Largo</string>
@ -290,7 +294,7 @@
<string name="SendLocation">Enviar ubicación</string>
<string name="ShareLocation">Compartir ubicación</string>
<!--photo gallery view-->
<string name="ShowAllMedia">Mostrar todas las fotos y vídeos</string>
<string name="ShowAllMedia">Ir a Fotos y vídeos</string>
<string name="SaveToGallery">Guardar en galería</string>
<string name="Of">%1$d de %2$d</string>
<string name="Gallery">Galería</string>
@ -408,12 +412,12 @@
<string name="Members_few">%1$d miembros</string>
<string name="Members_many">%1$d miembros</string>
<string name="Members_other">%1$d miembros</string>
<string name="AndMoreTyping_zero">y %1$d personas más escriben</string>
<string name="AndMoreTyping_one">y %1$d personas más escriben</string>
<string name="AndMoreTyping_two">y %1$d personas más escriben</string>
<string name="AndMoreTyping_few">y %1$d personas más escriben</string>
<string name="AndMoreTyping_many">y %1$d personas más escriben</string>
<string name="AndMoreTyping_other">y %1$d personas más escriben</string>
<string name="AndMoreTyping_zero">y %1$d personas más están escribiendo</string>
<string name="AndMoreTyping_one">y %1$d persona más están escribiendo</string>
<string name="AndMoreTyping_two">y %1$d personas más están escribiendo</string>
<string name="AndMoreTyping_few">y %1$d personas más están escribiendo</string>
<string name="AndMoreTyping_many">y %1$d personas más están escribiendo</string>
<string name="AndMoreTyping_other">y %1$d personas más están escribiendo</string>
<string name="NewMessages_zero">Sin mensajes nuevos</string>
<string name="NewMessages_one">%1$d nuevo mensaje</string>
<string name="NewMessages_two">%1$d nuevos mensajes</string>
@ -432,36 +436,36 @@
<string name="FromContacts_few">de %1$d contactos</string>
<string name="FromContacts_many">de %1$d contactos</string>
<string name="FromContacts_other">de %1$d contactos</string>
<string name="Seconds_zero">%1$d seconds</string>
<string name="Seconds_one">%1$d second</string>
<string name="Seconds_two">%1$d seconds</string>
<string name="Seconds_few">%1$d seconds</string>
<string name="Seconds_many">%1$d seconds</string>
<string name="Seconds_other">%1$d seconds</string>
<string name="Minutes_zero">%1$d minutes</string>
<string name="Minutes_one">%1$d minute</string>
<string name="Minutes_two">%1$d minutes</string>
<string name="Minutes_few">%1$d minutes</string>
<string name="Minutes_many">%1$d minutes</string>
<string name="Minutes_other">%1$d minutes</string>
<string name="Hours_zero">%1$d hours</string>
<string name="Hours_one">%1$d hour</string>
<string name="Hours_two">%1$d hours</string>
<string name="Hours_few">%1$d hours</string>
<string name="Hours_many">%1$d hours</string>
<string name="Hours_other">%1$d hours</string>
<string name="Days_zero">%1$d days</string>
<string name="Days_one">%1$d day</string>
<string name="Days_two">%1$d days</string>
<string name="Days_few">%1$d days</string>
<string name="Days_many">%1$d days</string>
<string name="Days_other">%1$d days</string>
<string name="Weeks_zero">%1$d weeks</string>
<string name="Weeks_one">%1$d week</string>
<string name="Weeks_two">%1$d weeks</string>
<string name="Weeks_few">%1$d weeks</string>
<string name="Weeks_many">%1$d weeks</string>
<string name="Weeks_other">%1$d weeks</string>
<string name="Seconds_zero">%1$d segundos</string>
<string name="Seconds_one">%1$d segundo</string>
<string name="Seconds_two">%1$d segundos</string>
<string name="Seconds_few">%1$d segundos</string>
<string name="Seconds_many">%1$d segundos</string>
<string name="Seconds_other">%1$d segundos</string>
<string name="Minutes_zero">%1$d minutos</string>
<string name="Minutes_one">%1$d minuto</string>
<string name="Minutes_two">%1$d minutos</string>
<string name="Minutes_few">%1$d minutos</string>
<string name="Minutes_many">%1$d minutos</string>
<string name="Minutes_other">%1$d minutos</string>
<string name="Hours_zero">%1$d horas</string>
<string name="Hours_one">%1$d hora</string>
<string name="Hours_two">%1$d horas</string>
<string name="Hours_few">%1$d horas</string>
<string name="Hours_many">%1$d horas</string>
<string name="Hours_other">%1$d horas</string>
<string name="Days_zero">%1$d días</string>
<string name="Days_one">%1$d día</string>
<string name="Days_two">%1$d días</string>
<string name="Days_few">%1$d días</string>
<string name="Days_many">%1$d días</string>
<string name="Days_other">%1$d días</string>
<string name="Weeks_zero">%1$d semanas</string>
<string name="Weeks_one">%1$d semana</string>
<string name="Weeks_two">%1$d semanas</string>
<string name="Weeks_few">%1$d semanas</string>
<string name="Weeks_many">%1$d semanas</string>
<string name="Weeks_other">%1$d semanas</string>
<!--date formatters-->
<string name="formatterMonth">dd \'de\' MMM</string>
<string name="formatterYear">dd.MM.yy</string>

View File

@ -51,6 +51,7 @@
<string name="DeleteChat">Elimina ed esci</string>
<string name="HiddenName">Nome nascosto</string>
<string name="SelectChat">Seleziona chat</string>
<string name="CompatibilityChat">%1$s sta usando una versione vecchia di Telegram, quindi le foto segrete verranno visualizzate in modalità di compatibilità.\n\nUna volta che %2$s avrà aggiornato Telegram, le foto con il timer minore di 1 minuto funzioneranno in modalità \'Tieni premuto per vedere\' , e verrai notificato ogni volta che l\'altro esegue uno screenshot.</string>
<!--broadcasts-->
<string name="BroadcastList">Lista broadcast</string>
<string name="NewBroadcastList">Nuova lista broadcast</string>
@ -152,7 +153,7 @@
<!--contacts view-->
<string name="SelectContact">Seleziona contatto</string>
<string name="NoContacts">Ancora nessun contatto</string>
<string name="InviteText">Ciao, passa a Telegram: http://telegram.org/dl2</string>
<string name="InviteText">Ehi, è il momento di passare a Telegram: http://telegram.org/dl2</string>
<string name="TodayAt">oggi alle</string>
<string name="YesterdayAt">ieri alle</string>
<string name="Online">in linea</string>
@ -160,7 +161,7 @@
<string name="LastSeen">ultimo accesso</string>
<string name="LastSeenDate">ultimo accesso</string>
<string name="InviteFriends">Invita amici</string>
<string name="GlobalSearch">GLOBAL SEARCH</string>
<string name="GlobalSearch">RICERCA GLOBALE</string>
<!--group create view-->
<string name="SendMessageTo">Invia messaggio a...</string>
<string name="EnterGroupNamePlaceholder">Immetti il nome del gruppo</string>
@ -198,16 +199,19 @@
<string name="MessageLifetime">Timer di autodistruzione</string>
<string name="ShortMessageLifetimeForever">Spento</string>
<string name="EncryptionKeyDescription">Questa immagine è una visualizzazione della chiave di cifratura per questa chat segreta con <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>.<![CDATA[<br><br>]]>Se questa immagine è uguale sul telefono di <![CDATA[<b>]]>%2$s<![CDATA[</b>]]>, la chat è sicura al 200%%.<![CDATA[<br><br>]]>Per saperne di più, visita Telegram.org</string>
<string name="Unknown">Unknown</string>
<string name="NumberUnknown">Sconosciuto</string>
<string name="Info">INFO</string>
<string name="Phone">Telefono</string>
<string name="Username">Username</string>
<string name="UsernamePlaceholder">Your Username</string>
<string name="UsernameInUse">Sorry, this username is already taken.</string>
<string name="UsernameInvalid">Sorry, this username is invalid.</string>
<string name="UsernameInvalidShort">A username must have at least 5 characters.</string>
<string name="UsernameInvalidStartNumber">Sorry, a username can't start with a number.</string>
<string name="Usernamehelp">You can choose a username on <![CDATA[<b>]]>Telegram<![CDATA[</b>]]>. If you do, other people will be able to find you by this username and contact you without knowing your phone number.\n\nYou can use <![CDATA[<b>]]>az<![CDATA[</b>]]>, <![CDATA[<b>]]>09<![CDATA[</b>]]> and underscores. Minimum length is <![CDATA[<b>]]>5<![CDATA[</b>]]> characters.</string>
<string name="Username">Nome utente</string>
<string name="UsernamePlaceholder">Il tuo Nome Utente</string>
<string name="UsernameInUse">Nome utente già preso.</string>
<string name="UsernameInvalid">Nome utente non valido.</string>
<string name="UsernameInvalidShort">Il minimo per un nome utente è 5 caratteri.</string>
<string name="UsernameInvalidLong">Il massimo per un nome utente è 32 caratteri.</string>
<string name="UsernameInvalidStartNumber">Un nome utente non può iniziare con numeri.</string>
<string name="UsernameHelp">Puoi scegliere un nome utente su <![CDATA[<b>]]>Telegram<![CDATA[</b>]]>. Se lo fai, le altre persone potranno trovarti tramite questo nome utente e contattarti senza conoscere il tuo numero di telefono.<![CDATA[<br><br>]]>Puoi usare <![CDATA[<b>]]>az<![CDATA[</b>]]>, <![CDATA[<b>]]>09<![CDATA[</b>]]> e underscore. La lunghezza minima è di <![CDATA[<b>]]>5<![CDATA[</b>]]> caratteri.</string>
<string name="UsernameChecking">Controllando il nome utente...</string>
<string name="UsernameAvailable">%1$s è disponibile.</string>
<!--settings view-->
<string name="ResetNotificationsText">Ripristina tutte le impostazioni di notifica predefinite</string>
<string name="TextSize">Dimensione testo messaggi</string>
@ -387,7 +391,7 @@
<string name="Page5Title">Potente</string>
<string name="Page6Title">Basato sul cloud</string>
<string name="Page7Title">Privato</string>
<string name="Page1Message">L\'app di messaggi <![CDATA[<b>più veloce</b>]]>al mondo.<![CDATA[<br/>]]>È <![CDATA[<b>gratuita</b>]]> e <![CDATA[<b>sicura</b>]]>.</string>
<string name="Page1Message">L\'app di messaggi <![CDATA[<b>più veloce</b>]]> al mondo.<![CDATA[<br/>]]>È <![CDATA[<b>gratuita</b>]]> e <![CDATA[<b>sicura</b>]]>.</string>
<string name="Page2Message"><![CDATA[<b>Telegram</b>]]> consegna i messaggi più<![CDATA[<br/>]]>velocemente di qualsiasi altra app.</string>
<string name="Page3Message"><![CDATA[<b>Telegram</b>]]> sarà sempre gratuito.<![CDATA[<br/>]]>Nessuna pubblicità. Nessun abbonamento.</string>
<string name="Page4Message"><![CDATA[<b>Telegram</b>]]> protegge i tuoi messaggi<![CDATA[<br/>]]>dagli attacchi degli hacker.</string>
@ -432,36 +436,36 @@
<string name="FromContacts_few">da %1$d contatti</string>
<string name="FromContacts_many">da %1$d contatti</string>
<string name="FromContacts_other">da %1$d contatti</string>
<string name="Seconds_zero">%1$d seconds</string>
<string name="Seconds_one">%1$d second</string>
<string name="Seconds_two">%1$d seconds</string>
<string name="Seconds_few">%1$d seconds</string>
<string name="Seconds_many">%1$d seconds</string>
<string name="Seconds_other">%1$d seconds</string>
<string name="Minutes_zero">%1$d minutes</string>
<string name="Minutes_one">%1$d minute</string>
<string name="Minutes_two">%1$d minutes</string>
<string name="Minutes_few">%1$d minutes</string>
<string name="Minutes_many">%1$d minutes</string>
<string name="Minutes_other">%1$d minutes</string>
<string name="Hours_zero">%1$d hours</string>
<string name="Hours_one">%1$d hour</string>
<string name="Hours_two">%1$d hours</string>
<string name="Hours_few">%1$d hours</string>
<string name="Hours_many">%1$d hours</string>
<string name="Hours_other">%1$d hours</string>
<string name="Days_zero">%1$d days</string>
<string name="Days_one">%1$d day</string>
<string name="Days_two">%1$d days</string>
<string name="Days_few">%1$d days</string>
<string name="Days_many">%1$d days</string>
<string name="Days_other">%1$d days</string>
<string name="Weeks_zero">%1$d weeks</string>
<string name="Weeks_one">%1$d week</string>
<string name="Weeks_two">%1$d weeks</string>
<string name="Weeks_few">%1$d weeks</string>
<string name="Weeks_many">%1$d weeks</string>
<string name="Weeks_other">%1$d weeks</string>
<string name="Seconds_zero">%1$d secondi</string>
<string name="Seconds_one">%1$d secondo</string>
<string name="Seconds_two">%1$d secondi</string>
<string name="Seconds_few">%1$d secondi</string>
<string name="Seconds_many">%1$d secondi</string>
<string name="Seconds_other">%1$d secondi</string>
<string name="Minutes_zero">%1$d minuti</string>
<string name="Minutes_one">%1$d minuto</string>
<string name="Minutes_two">%1$d minuti</string>
<string name="Minutes_few">%1$d minuti</string>
<string name="Minutes_many">%1$d minuti</string>
<string name="Minutes_other">%1$d minuti</string>
<string name="Hours_zero">%1$d ore</string>
<string name="Hours_one">%1$d ora</string>
<string name="Hours_two">%1$d ore</string>
<string name="Hours_few">%1$d ore</string>
<string name="Hours_many">%1$d ore</string>
<string name="Hours_other">%1$d ore</string>
<string name="Days_zero">%1$d giorni</string>
<string name="Days_one">%1$d giorno</string>
<string name="Days_two">%1$d giorni</string>
<string name="Days_few">%1$d giorni</string>
<string name="Days_many">%1$d giorni</string>
<string name="Days_other">%1$d giorni</string>
<string name="Weeks_zero">%1$d settimane</string>
<string name="Weeks_one">%1$d settimana</string>
<string name="Weeks_two">%1$d settimane</string>
<string name="Weeks_few">%1$d settimane</string>
<string name="Weeks_many">%1$d settimane</string>
<string name="Weeks_other">%1$d settimane</string>
<!--date formatters-->
<string name="formatterMonth">dd MMM</string>
<string name="formatterYear">dd.MM.yy</string>

View File

@ -198,7 +198,7 @@
<string name="MessageLifetime">자동삭제 타이머</string>
<string name="ShortMessageLifetimeForever">해제</string>
<string name="EncryptionKeyDescription">이 이미지는 <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>님과의 비밀대화에 사용 중인 암호화 키의 모습입니다.<![CDATA[<br><br>]]>이 이미지가 <![CDATA[<b>]]>%2$s<![CDATA[</b>]]>님의 암호화 키와 똑같다면 대화는 200%% 안전합니다.<![CDATA[<br><br>]]>더 자세한 사항은 telegram.org 를 참고해 주세요.</string>
<string name="Unknown">Unknown</string>
<string name="NumberUnknown">Unknown</string>
<string name="Info">INFO</string>
<string name="Phone">전화번호</string>
<string name="Username">Username</string>
@ -206,8 +206,11 @@
<string name="UsernameInUse">Sorry, this username is already taken.</string>
<string name="UsernameInvalid">Sorry, this username is invalid.</string>
<string name="UsernameInvalidShort">A username must have at least 5 characters.</string>
<string name="UsernameInvalidStartNumber">Sorry, a username can't start with a number.</string>
<string name="Usernamehelp">You can choose a username on <![CDATA[<b>]]>Telegram<![CDATA[</b>]]>. If you do, other people will be able to find you by this username and contact you without knowing your phone number.\n\nYou can use <![CDATA[<b>]]>az<![CDATA[</b>]]>, <![CDATA[<b>]]>09<![CDATA[</b>]]> and underscores. Minimum length is <![CDATA[<b>]]>5<![CDATA[</b>]]> characters.</string>
<string name="UsernameInvalidLong">A username must have maximum 32 characters.</string>
<string name="UsernameInvalidStartNumber">Sorry, a username can\'t start with a number.</string>
<string name="UsernameHelp">You can choose a username on <![CDATA[<b>]]>Telegram<![CDATA[</b>]]>. If you do, other people will be able to find you by this username and contact you without knowing your phone number.<![CDATA[<br><br>]]>You can use <![CDATA[<b>]]>az<![CDATA[</b>]]>, <![CDATA[<b>]]>09<![CDATA[</b>]]> and underscores. Minimum length is <![CDATA[<b>]]>5<![CDATA[</b>]]> characters.</string>
<string name="UsernameChecking">Checking username...</string>
<string name="UsernameAvailable">%1$s is available.</string>
<!--settings view-->
<string name="ResetNotificationsText">모든 알림 설정이 초기화되었습니다</string>
<string name="TextSize">채팅 글자 크기</string>

View File

@ -51,6 +51,7 @@
<string name="DeleteChat">Verwijderen en verlaten</string>
<string name="HiddenName">Verborgen naam</string>
<string name="SelectChat">Kies een gesprek</string>
<string name="CompatibilityChat">%1$s gebruikt een oudere versie van Telegram, dus worden geheime foto\'s weergegeven in de compatibiliteitsmodus.\n\nZodra %2$s Telegram update werken foto\'s met timers voor 1 minuut of minder in de \'Houd ingedrukt om te bekijken\'-modus en krijg je een bericht wanneer de andere partij een schermafbeelding maakt.</string>
<!--broadcasts-->
<string name="BroadcastList">Verzendlijst</string>
<string name="NewBroadcastList">Nieuwe verzendlijst</string>
@ -160,7 +161,7 @@
<string name="LastSeen">gezien</string>
<string name="LastSeenDate">gezien</string>
<string name="InviteFriends">Vrienden uitnodigen</string>
<string name="GlobalSearch">GLOBAL SEARCH</string>
<string name="GlobalSearch">WERELDWIJD ZOEKEN</string>
<!--group create view-->
<string name="SendMessageTo">Bericht verzenden naar…</string>
<string name="EnterGroupNamePlaceholder">Groepsnaam...</string>
@ -198,16 +199,19 @@
<string name="MessageLifetime">Zelfvernietigingstimer</string>
<string name="ShortMessageLifetimeForever">Uit</string>
<string name="EncryptionKeyDescription">Dit is een weergave van de encryptiesleutel voor deze geheime chat met <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>.<![CDATA[<br><br>]]>Als deze afbeelding er bij <![CDATA[<b>]]>%2$s<![CDATA[</b>]]> hetzelfde uitziet, is jullie gesprek 200%% beveiligd.<![CDATA[<br><br>]]>Lees meer op telegram.org.</string>
<string name="Unknown">Unknown</string>
<string name="Info">INFO</string>
<string name="NumberUnknown">Onbekend</string>
<string name="Info">INFORMATIE</string>
<string name="Phone">Telefoon</string>
<string name="Username">Username</string>
<string name="UsernamePlaceholder">Your Username</string>
<string name="UsernameInUse">Sorry, this username is already taken.</string>
<string name="UsernameInvalid">Sorry, this username is invalid.</string>
<string name="UsernameInvalidShort">A username must have at least 5 characters.</string>
<string name="UsernameInvalidStartNumber">Sorry, a username can't start with a number.</string>
<string name="Usernamehelp">You can choose a username on <![CDATA[<b>]]>Telegram<![CDATA[</b>]]>. If you do, other people will be able to find you by this username and contact you without knowing your phone number.\n\nYou can use <![CDATA[<b>]]>az<![CDATA[</b>]]>, <![CDATA[<b>]]>09<![CDATA[</b>]]> and underscores. Minimum length is <![CDATA[<b>]]>5<![CDATA[</b>]]> characters.</string>
<string name="Username">Gebruikersnaam</string>
<string name="UsernamePlaceholder">Kies een naam</string>
<string name="UsernameInUse">Sorry, deze gebruikersnaam is al bezet.</string>
<string name="UsernameInvalid">Sorry, deze gebruikersnaam is ongeldig.</string>
<string name="UsernameInvalidShort">Je naam moet minimaal 5 tekens hebben.</string>
<string name="UsernameInvalidLong">Je naam mag niet langer zijn dan 32 tekens.</string>
<string name="UsernameInvalidStartNumber">Sorry, begincijfers zijn niet toegestaan.</string>
<string name="UsernameHelp">Je kan een gebruikersnaam kiezen voor <![CDATA[<b>]]>Telegram<![CDATA[</b>]]>. Hiermee kunnen anderen je vinden en contact met je opnemen zonder je telefoonnummer te weten.<![CDATA[<br><br>]]>Je mag <![CDATA[<b>]]>az<![CDATA[</b>]]>, <![CDATA[<b>]]>09<![CDATA[</b>]]> en liggend streepje gebruiken. De minimale lengte is <![CDATA[<b>]]>5<![CDATA[</b>]]> tekens.</string>
<string name="UsernameChecking">Gebruikersnaam controleren.</string>
<string name="UsernameAvailable">%1$s is beschikbaar.</string>
<!--settings view-->
<string name="ResetNotificationsText">Alle meldingsinstellingen herstellen</string>
<string name="TextSize">Tekstgrootte berichten</string>
@ -432,36 +436,36 @@
<string name="FromContacts_few">van %1$d contactpersonen</string>
<string name="FromContacts_many">van %1$d contactpersonen</string>
<string name="FromContacts_other">van %1$d contactpersonen</string>
<string name="Seconds_zero">%1$d seconds</string>
<string name="Seconds_one">%1$d second</string>
<string name="Seconds_two">%1$d seconds</string>
<string name="Seconds_few">%1$d seconds</string>
<string name="Seconds_many">%1$d seconds</string>
<string name="Seconds_other">%1$d seconds</string>
<string name="Minutes_zero">%1$d minutes</string>
<string name="Minutes_one">%1$d minute</string>
<string name="Minutes_two">%1$d minutes</string>
<string name="Minutes_few">%1$d minutes</string>
<string name="Minutes_many">%1$d minutes</string>
<string name="Minutes_other">%1$d minutes</string>
<string name="Hours_zero">%1$d hours</string>
<string name="Hours_one">%1$d hour</string>
<string name="Hours_two">%1$d hours</string>
<string name="Hours_few">%1$d hours</string>
<string name="Hours_many">%1$d hours</string>
<string name="Hours_other">%1$d hours</string>
<string name="Days_zero">%1$d days</string>
<string name="Days_one">%1$d day</string>
<string name="Days_two">%1$d days</string>
<string name="Days_few">%1$d days</string>
<string name="Days_many">%1$d days</string>
<string name="Days_other">%1$d days</string>
<string name="Weeks_zero">%1$d weeks</string>
<string name="Seconds_zero">%1$d seconden</string>
<string name="Seconds_one">%1$d seconde</string>
<string name="Seconds_two">%1$d seconden</string>
<string name="Seconds_few">%1$d seconden</string>
<string name="Seconds_many">%1$d seconden</string>
<string name="Seconds_other">%1$d seconden</string>
<string name="Minutes_zero">%1$d minuten</string>
<string name="Minutes_one">%1$d minuut</string>
<string name="Minutes_two">%1$d minuten</string>
<string name="Minutes_few">%1$d minuten</string>
<string name="Minutes_many">%1$d minuten</string>
<string name="Minutes_other">%1$d minuten</string>
<string name="Hours_zero">%1$d uren</string>
<string name="Hours_one">%1$d uur</string>
<string name="Hours_two">%1$d uren</string>
<string name="Hours_few">%1$d uren</string>
<string name="Hours_many">%1$d uren</string>
<string name="Hours_other">%1$d uren</string>
<string name="Days_zero">%1$d dagen</string>
<string name="Days_one">%1$d dag</string>
<string name="Days_two">%1$d dagen</string>
<string name="Days_few">%1$d dagen</string>
<string name="Days_many">%1$d dagen</string>
<string name="Days_other">%1$d dagen</string>
<string name="Weeks_zero">%1$d weken</string>
<string name="Weeks_one">%1$d week</string>
<string name="Weeks_two">%1$d weeks</string>
<string name="Weeks_few">%1$d weeks</string>
<string name="Weeks_many">%1$d weeks</string>
<string name="Weeks_other">%1$d weeks</string>
<string name="Weeks_two">%1$d weken</string>
<string name="Weeks_few">%1$d weken</string>
<string name="Weeks_many">%1$d weken</string>
<string name="Weeks_other">%1$d weken</string>
<!--date formatters-->
<string name="formatterMonth">dd MMM</string>
<string name="formatterYear">dd-MM-yy</string>

View File

@ -51,6 +51,7 @@
<string name="DeleteChat">Apagar e sair</string>
<string name="HiddenName">Nome oculto</string>
<string name="SelectChat">Selecione uma Conversa</string>
<string name="CompatibilityChat">%1$s está usando uma versão mais antiga do Telegram, por isso fotos secretas serão mostradas em modo de compatibilidade.\n\nAssim que %2$s atualize o Telegram, fotos com timers de 1 minuto ou menos passarão a funcionar no modo Toque e segure para ver, e você será notificado caso a outra pessoa salve a tela.</string>
<!--broadcasts-->
<string name="BroadcastList">Lista de Broadcast</string>
<string name="NewBroadcastList">Nova Lista de Broadcast</string>
@ -114,7 +115,7 @@
<!--notification-->
<string name="EncryptedChatRequested">Conversa secreta solicitada</string>
<string name="EncryptedChatAccepted">Conversa secreta iniciada</string>
<string name="MessageLifetimeChanged">%1$s estabeleceu o tempo de autodestruição para %2$s</string>
<string name="MessageLifetimeChanged">%1$s estabeleceu o tempo de autodestruição para %2$s </string>
<string name="MessageLifetimeChangedOutgoing">Você estabeleceu o tempo de autodestruição para %1$s</string>
<string name="MessageLifetimeRemoved">%1$s desativou o temporizador de autodestruição</string>
<string name="MessageLifetimeYouRemoved">Você desativou o temporizador de autodestruição</string>
@ -146,8 +147,8 @@
<string name="NotificationUnrecognizedDevice">%1$s,\nNós detectamos um login na sua conta de um novo dispositivo %2$s\n\nDispositivo: %3$s\nLocalização: %4$s\nSe não foi você, você pode ir em Configurações - Terminar todas as sessões.\n\nAtenciosamente,\nTime do Telegram</string>
<string name="NotificationContactNewPhoto">%1$s atualizou a foto do perfil</string>
<string name="Reply">Responder</string>
<string name="ReplyToGroup">Reply to %1$s</string>
<string name="ReplyToUser">Reply to %1$s</string>
<string name="ReplyToGroup">Responder para %1$s</string>
<string name="ReplyToUser">Responder para %1$s</string>
<string name="NotificationMessagesPeopleDisplayOrder">%1$s %2$s</string>
<!--contacts view-->
<string name="SelectContact">Selecionar Contato</string>
@ -160,7 +161,7 @@
<string name="LastSeen">visto</string>
<string name="LastSeenDate">visto</string>
<string name="InviteFriends">Convidar Amigos</string>
<string name="GlobalSearch">GLOBAL SEARCH</string>
<string name="GlobalSearch">BUSCA GLOBAL</string>
<!--group create view-->
<string name="SendMessageTo">Enviar mensagem para...</string>
<string name="EnterGroupNamePlaceholder">Digite o nome do grupo</string>
@ -198,16 +199,19 @@
<string name="MessageLifetime">Tempo de autodestruição</string>
<string name="ShortMessageLifetimeForever">Desativado</string>
<string name="EncryptionKeyDescription">Esta imagem é uma visualização da chave criptográfica para esta conversa secreta com <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>.<![CDATA[<br><br>]]>Se esta imagem aparecer da mesma forma no telefone de <![CDATA[<b>]]>%2$s\'s<![CDATA[</b>]]>, sua conversa é 200%% segura.<![CDATA[<br><br>]]>Saiba mais em telegram.org</string>
<string name="Unknown">Unknown</string>
<string name="NumberUnknown">Desconhecido</string>
<string name="Info">INFO</string>
<string name="Phone">Telefone</string>
<string name="Username">Username</string>
<string name="UsernamePlaceholder">Your Username</string>
<string name="UsernameInUse">Sorry, this username is already taken.</string>
<string name="UsernameInvalid">Sorry, this username is invalid.</string>
<string name="UsernameInvalidShort">A username must have at least 5 characters.</string>
<string name="UsernameInvalidStartNumber">Sorry, a username can't start with a number.</string>
<string name="Usernamehelp">You can choose a username on <![CDATA[<b>]]>Telegram<![CDATA[</b>]]>. If you do, other people will be able to find you by this username and contact you without knowing your phone number.\n\nYou can use <![CDATA[<b>]]>az<![CDATA[</b>]]>, <![CDATA[<b>]]>09<![CDATA[</b>]]> and underscores. Minimum length is <![CDATA[<b>]]>5<![CDATA[</b>]]> characters.</string>
<string name="Username">Nome de Usuário</string>
<string name="UsernamePlaceholder">Seu nome de usuário</string>
<string name="UsernameInUse">Desculpe, este usuário já existe.</string>
<string name="UsernameInvalid">Desculpe, este usuário é inválido.</string>
<string name="UsernameInvalidShort">O nome de usuário deve ter pelo menos 5 caracteres.</string>
<string name="UsernameInvalidLong">O nome de usuário não pode exceder 32 caracteres.</string>
<string name="UsernameInvalidStartNumber">Desculpe, o nome de usuário não pode começar com um número.</string>
<string name="UsernameHelp">Você pode escolher um nome de usuário no <![CDATA[<b>]]>Telegram<![CDATA[</b>]]>. Assim, outras pessoas poderão te encontrar pelo nome de usuário e entrar em contato sem precisar saber seu telefone. <![CDATA[<br><br>]]>Você pode usar <![CDATA[<b>]]>az<![CDATA[</b>]]>, <![CDATA[<b>]]>09<![CDATA[</b>]]> e underline. O tamanho mínimo é <![CDATA[<b>]]>5<![CDATA[</b>]]> caracteres.</string>
<string name="UsernameChecking">Verificando nome de usuário...</string>
<string name="UsernameAvailable">%1$s está disponível.</string>
<!--settings view-->
<string name="ResetNotificationsText">Restaurar todas as configurações de notificação</string>
<string name="TextSize">Tamanho do texto nas mensagens</string>
@ -395,7 +399,7 @@
<string name="Page6Message"><![CDATA[<b>Telegram</b>]]> permite você acessar suas<![CDATA[<br/>]]> mensagens de múltiplos dispositivos.</string>
<string name="Page7Message"><![CDATA[<b>Telegram</b>]]> possui mensagens fortemente<![CDATA[<br/>]]>encriptadas e podem se auto-destruir.</string>
<string name="StartMessaging">Comece a conversar</string>
<!--plurals-->
<!--plural-->
<string name="Online_zero">%1$d online</string>
<string name="Online_one">%1$d online</string>
<string name="Online_two">%1$d online</string>
@ -432,42 +436,42 @@
<string name="FromContacts_few">de %1$d contatos</string>
<string name="FromContacts_many">de %1$d contatos</string>
<string name="FromContacts_other">de %1$d contatos</string>
<string name="Seconds_zero">%1$d seconds</string>
<string name="Seconds_one">%1$d second</string>
<string name="Seconds_two">%1$d seconds</string>
<string name="Seconds_few">%1$d seconds</string>
<string name="Seconds_many">%1$d seconds</string>
<string name="Seconds_other">%1$d seconds</string>
<string name="Minutes_zero">%1$d minutes</string>
<string name="Minutes_one">%1$d minute</string>
<string name="Minutes_two">%1$d minutes</string>
<string name="Minutes_few">%1$d minutes</string>
<string name="Minutes_many">%1$d minutes</string>
<string name="Minutes_other">%1$d minutes</string>
<string name="Hours_zero">%1$d hours</string>
<string name="Hours_one">%1$d hour</string>
<string name="Hours_two">%1$d hours</string>
<string name="Hours_few">%1$d hours</string>
<string name="Hours_many">%1$d hours</string>
<string name="Hours_other">%1$d hours</string>
<string name="Days_zero">%1$d days</string>
<string name="Days_one">%1$d day</string>
<string name="Days_two">%1$d days</string>
<string name="Days_few">%1$d days</string>
<string name="Days_many">%1$d days</string>
<string name="Days_other">%1$d days</string>
<string name="Weeks_zero">%1$d weeks</string>
<string name="Weeks_one">%1$d week</string>
<string name="Weeks_two">%1$d weeks</string>
<string name="Weeks_few">%1$d weeks</string>
<string name="Weeks_many">%1$d weeks</string>
<string name="Weeks_other">%1$d weeks</string>
<string name="Seconds_zero">%1$d segundos</string>
<string name="Seconds_one">%1$d segundo</string>
<string name="Seconds_two">%1$d segundos</string>
<string name="Seconds_few">%1$d segundos</string>
<string name="Seconds_many">%1$d segundos</string>
<string name="Seconds_other">%1$d segundos</string>
<string name="Minutes_zero">%1$d minutos</string>
<string name="Minutes_one">%1$d minuto</string>
<string name="Minutes_two">%1$d minutos</string>
<string name="Minutes_few">%1$d minutos</string>
<string name="Minutes_many">%1$d minutos</string>
<string name="Minutes_other">%1$d minutos</string>
<string name="Hours_zero">%1$d horas</string>
<string name="Hours_one">%1$d hora</string>
<string name="Hours_two">%1$d horas</string>
<string name="Hours_few">%1$d horas</string>
<string name="Hours_many">%1$d horas</string>
<string name="Hours_other">%1$d horas</string>
<string name="Days_zero">%1$d dias</string>
<string name="Days_one">%1$d dia</string>
<string name="Days_two">%1$d dias</string>
<string name="Days_few">%1$d dias</string>
<string name="Days_many">%1$d dias</string>
<string name="Days_other">%1$d dias</string>
<string name="Weeks_zero">%1$d semanas</string>
<string name="Weeks_one">%1$d semana</string>
<string name="Weeks_two">%1$d semanas</string>
<string name="Weeks_few">%1$d semanas</string>
<string name="Weeks_many">%1$d semanas</string>
<string name="Weeks_other">%1$d semanas</string>
<!--date formatters-->
<string name="formatterMonth">dd MMM</string>
<string name="formatterYear">dd.MM.yy</string>
<string name="formatterYearMax">dd.MM.yyyy</string>
<string name="chatDate">d MMMM</string>
<string name="chatFullDate">d MMMM yyyy</string>
<string name="chatFullDate">MMMM d, yyyy</string>
<string name="formatterWeek">EEE</string>
<string name="formatterDay24H">HH:mm</string>
<string name="formatterDay12H">h:mm a</string>

View File

@ -51,6 +51,7 @@
<string name="DeleteChat">Apagar e sair</string>
<string name="HiddenName">Nome oculto</string>
<string name="SelectChat">Selecione uma Conversa</string>
<string name="CompatibilityChat">%1$s está usando uma versão mais antiga do Telegram, por isso fotos secretas serão mostradas em modo de compatibilidade.\n\nAssim que %2$s atualize o Telegram, fotos com timers de 1 minuto ou menos passarão a funcionar no modo Toque e segure para ver, e você será notificado caso a outra pessoa salve a tela.</string>
<!--broadcasts-->
<string name="BroadcastList">Lista de Broadcast</string>
<string name="NewBroadcastList">Nova Lista de Broadcast</string>
@ -114,7 +115,7 @@
<!--notification-->
<string name="EncryptedChatRequested">Conversa secreta solicitada</string>
<string name="EncryptedChatAccepted">Conversa secreta iniciada</string>
<string name="MessageLifetimeChanged">%1$s estabeleceu o tempo de autodestruição para %2$s</string>
<string name="MessageLifetimeChanged">%1$s estabeleceu o tempo de autodestruição para %2$s </string>
<string name="MessageLifetimeChangedOutgoing">Você estabeleceu o tempo de autodestruição para %1$s</string>
<string name="MessageLifetimeRemoved">%1$s desativou o temporizador de autodestruição</string>
<string name="MessageLifetimeYouRemoved">Você desativou o temporizador de autodestruição</string>
@ -146,8 +147,8 @@
<string name="NotificationUnrecognizedDevice">%1$s,\nNós detectamos um login na sua conta de um novo dispositivo %2$s\n\nDispositivo: %3$s\nLocalização: %4$s\nSe não foi você, você pode ir em Configurações - Terminar todas as sessões.\n\nAtenciosamente,\nTime do Telegram</string>
<string name="NotificationContactNewPhoto">%1$s atualizou a foto do perfil</string>
<string name="Reply">Responder</string>
<string name="ReplyToGroup">Reply to %1$s</string>
<string name="ReplyToUser">Reply to %1$s</string>
<string name="ReplyToGroup">Responder para %1$s</string>
<string name="ReplyToUser">Responder para %1$s</string>
<string name="NotificationMessagesPeopleDisplayOrder">%1$s %2$s</string>
<!--contacts view-->
<string name="SelectContact">Selecionar Contato</string>
@ -160,7 +161,7 @@
<string name="LastSeen">visto</string>
<string name="LastSeenDate">visto</string>
<string name="InviteFriends">Convidar Amigos</string>
<string name="GlobalSearch">GLOBAL SEARCH</string>
<string name="GlobalSearch">BUSCA GLOBAL</string>
<!--group create view-->
<string name="SendMessageTo">Enviar mensagem para...</string>
<string name="EnterGroupNamePlaceholder">Digite o nome do grupo</string>
@ -198,16 +199,19 @@
<string name="MessageLifetime">Tempo de autodestruição</string>
<string name="ShortMessageLifetimeForever">Desativado</string>
<string name="EncryptionKeyDescription">Esta imagem é uma visualização da chave criptográfica para esta conversa secreta com <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>.<![CDATA[<br><br>]]>Se esta imagem aparecer da mesma forma no telefone de <![CDATA[<b>]]>%2$s\'s<![CDATA[</b>]]>, sua conversa é 200%% segura.<![CDATA[<br><br>]]>Saiba mais em telegram.org</string>
<string name="Unknown">Unknown</string>
<string name="NumberUnknown">Desconhecido</string>
<string name="Info">INFO</string>
<string name="Phone">Telefone</string>
<string name="Username">Username</string>
<string name="UsernamePlaceholder">Your Username</string>
<string name="UsernameInUse">Sorry, this username is already taken.</string>
<string name="UsernameInvalid">Sorry, this username is invalid.</string>
<string name="UsernameInvalidShort">A username must have at least 5 characters.</string>
<string name="UsernameInvalidStartNumber">Sorry, a username can't start with a number.</string>
<string name="Usernamehelp">You can choose a username on <![CDATA[<b>]]>Telegram<![CDATA[</b>]]>. If you do, other people will be able to find you by this username and contact you without knowing your phone number.\n\nYou can use <![CDATA[<b>]]>az<![CDATA[</b>]]>, <![CDATA[<b>]]>09<![CDATA[</b>]]> and underscores. Minimum length is <![CDATA[<b>]]>5<![CDATA[</b>]]> characters.</string>
<string name="Username">Nome de Usuário</string>
<string name="UsernamePlaceholder">Seu nome de usuário</string>
<string name="UsernameInUse">Desculpe, este usuário já existe.</string>
<string name="UsernameInvalid">Desculpe, este usuário é inválido.</string>
<string name="UsernameInvalidShort">O nome de usuário deve ter pelo menos 5 caracteres.</string>
<string name="UsernameInvalidLong">O nome de usuário não pode exceder 32 caracteres.</string>
<string name="UsernameInvalidStartNumber">Desculpe, o nome de usuário não pode começar com um número.</string>
<string name="UsernameHelp">Você pode escolher um nome de usuário no <![CDATA[<b>]]>Telegram<![CDATA[</b>]]>. Assim, outras pessoas poderão te encontrar pelo nome de usuário e entrar em contato sem precisar saber seu telefone. <![CDATA[<br><br>]]>Você pode usar <![CDATA[<b>]]>az<![CDATA[</b>]]>, <![CDATA[<b>]]>09<![CDATA[</b>]]> e underline. O tamanho mínimo é <![CDATA[<b>]]>5<![CDATA[</b>]]> caracteres.</string>
<string name="UsernameChecking">Verificando nome de usuário...</string>
<string name="UsernameAvailable">%1$s está disponível.</string>
<!--settings view-->
<string name="ResetNotificationsText">Restaurar todas as configurações de notificação</string>
<string name="TextSize">Tamanho do texto nas mensagens</string>
@ -395,7 +399,7 @@
<string name="Page6Message"><![CDATA[<b>Telegram</b>]]> permite você acessar suas<![CDATA[<br/>]]> mensagens de múltiplos dispositivos.</string>
<string name="Page7Message"><![CDATA[<b>Telegram</b>]]> possui mensagens fortemente<![CDATA[<br/>]]>encriptadas e podem se auto-destruir.</string>
<string name="StartMessaging">Comece a conversar</string>
<!--plurals-->
<!--plural-->
<string name="Online_zero">%1$d online</string>
<string name="Online_one">%1$d online</string>
<string name="Online_two">%1$d online</string>
@ -432,42 +436,42 @@
<string name="FromContacts_few">de %1$d contatos</string>
<string name="FromContacts_many">de %1$d contatos</string>
<string name="FromContacts_other">de %1$d contatos</string>
<string name="Seconds_zero">%1$d seconds</string>
<string name="Seconds_one">%1$d second</string>
<string name="Seconds_two">%1$d seconds</string>
<string name="Seconds_few">%1$d seconds</string>
<string name="Seconds_many">%1$d seconds</string>
<string name="Seconds_other">%1$d seconds</string>
<string name="Minutes_zero">%1$d minutes</string>
<string name="Minutes_one">%1$d minute</string>
<string name="Minutes_two">%1$d minutes</string>
<string name="Minutes_few">%1$d minutes</string>
<string name="Minutes_many">%1$d minutes</string>
<string name="Minutes_other">%1$d minutes</string>
<string name="Hours_zero">%1$d hours</string>
<string name="Hours_one">%1$d hour</string>
<string name="Hours_two">%1$d hours</string>
<string name="Hours_few">%1$d hours</string>
<string name="Hours_many">%1$d hours</string>
<string name="Hours_other">%1$d hours</string>
<string name="Days_zero">%1$d days</string>
<string name="Days_one">%1$d day</string>
<string name="Days_two">%1$d days</string>
<string name="Days_few">%1$d days</string>
<string name="Days_many">%1$d days</string>
<string name="Days_other">%1$d days</string>
<string name="Weeks_zero">%1$d weeks</string>
<string name="Weeks_one">%1$d week</string>
<string name="Weeks_two">%1$d weeks</string>
<string name="Weeks_few">%1$d weeks</string>
<string name="Weeks_many">%1$d weeks</string>
<string name="Weeks_other">%1$d weeks</string>
<string name="Seconds_zero">%1$d segundos</string>
<string name="Seconds_one">%1$d segundo</string>
<string name="Seconds_two">%1$d segundos</string>
<string name="Seconds_few">%1$d segundos</string>
<string name="Seconds_many">%1$d segundos</string>
<string name="Seconds_other">%1$d segundos</string>
<string name="Minutes_zero">%1$d minutos</string>
<string name="Minutes_one">%1$d minuto</string>
<string name="Minutes_two">%1$d minutos</string>
<string name="Minutes_few">%1$d minutos</string>
<string name="Minutes_many">%1$d minutos</string>
<string name="Minutes_other">%1$d minutos</string>
<string name="Hours_zero">%1$d horas</string>
<string name="Hours_one">%1$d hora</string>
<string name="Hours_two">%1$d horas</string>
<string name="Hours_few">%1$d horas</string>
<string name="Hours_many">%1$d horas</string>
<string name="Hours_other">%1$d horas</string>
<string name="Days_zero">%1$d dias</string>
<string name="Days_one">%1$d dia</string>
<string name="Days_two">%1$d dias</string>
<string name="Days_few">%1$d dias</string>
<string name="Days_many">%1$d dias</string>
<string name="Days_other">%1$d dias</string>
<string name="Weeks_zero">%1$d semanas</string>
<string name="Weeks_one">%1$d semana</string>
<string name="Weeks_two">%1$d semanas</string>
<string name="Weeks_few">%1$d semanas</string>
<string name="Weeks_many">%1$d semanas</string>
<string name="Weeks_other">%1$d semanas</string>
<!--date formatters-->
<string name="formatterMonth">dd MMM</string>
<string name="formatterYear">dd.MM.yy</string>
<string name="formatterYearMax">dd.MM.yyyy</string>
<string name="chatDate">d MMMM</string>
<string name="chatFullDate">d MMMM yyyy</string>
<string name="chatFullDate">MMMM d, yyyy</string>
<string name="formatterWeek">EEE</string>
<string name="formatterDay24H">HH:mm</string>
<string name="formatterDay12H">h:mm a</string>

View File

@ -67,7 +67,7 @@
<!--EDIT TEXT-->
<style name="Theme.TMessages.EditText" parent="android:Widget.Material.Light.EditText">
<item name="android:background">@drawable/holo_edit_text_light</item>
<item name="android:background">@drawable/edit_text</item>
<item name="android:textColor">#000000</item>
</style>

View File

@ -51,6 +51,7 @@
<string name="DeleteChat">Delete and exit</string>
<string name="HiddenName">Hidden Name</string>
<string name="SelectChat">Select Chat</string>
<string name="CompatibilityChat">%1$s is using an older version of Telegram, so secret photos will be shown in compatibility mode.\n\nOnce %2$s updates Telegram, photos with timers for 1 minute or less will start working in \'Tap and hold to view\' mode, and you will be notified whenever the other party takes a screenshot.</string>
<!--broadcasts-->
<string name="BroadcastList">Broadcast List</string>
<string name="NewBroadcastList">New Broadcast List</string>
@ -198,7 +199,7 @@
<string name="MessageLifetime">Self-Destruct Timer</string>
<string name="ShortMessageLifetimeForever">Off</string>
<string name="EncryptionKeyDescription">This image is a visualization of the encryption key for this secret chat with <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>.<![CDATA[<br><br>]]>If this image looks the same on <![CDATA[<b>]]>%2$s\'s<![CDATA[</b>]]> phone, your chat is 200%% secure.<![CDATA[<br><br>]]>Learn more at telegram.org</string>
<string name="Unknown">Unknown</string>
<string name="NumberUnknown">Unknown</string>
<string name="Info">INFO</string>
<string name="Phone">Phone</string>
<string name="Username">Username</string>
@ -206,8 +207,11 @@
<string name="UsernameInUse">Sorry, this username is already taken.</string>
<string name="UsernameInvalid">Sorry, this username is invalid.</string>
<string name="UsernameInvalidShort">A username must have at least 5 characters.</string>
<string name="UsernameInvalidStartNumber">Sorry, a username can't start with a number.</string>
<string name="Usernamehelp">You can choose a username on <![CDATA[<b>]]>Telegram<![CDATA[</b>]]>. If you do, other people will be able to find you by this username and contact you without knowing your phone number.\n\nYou can use <![CDATA[<b>]]>az<![CDATA[</b>]]>, <![CDATA[<b>]]>09<![CDATA[</b>]]> and underscores. Minimum length is <![CDATA[<b>]]>5<![CDATA[</b>]]> characters.</string>
<string name="UsernameInvalidLong">The username must not exceed 32 characters.</string>
<string name="UsernameInvalidStartNumber">Sorry, a username can\'t start with a number.</string>
<string name="UsernameHelp">You can choose a username on <![CDATA[<b>]]>Telegram<![CDATA[</b>]]>. If you do, other people will be able to find you by this username and contact you without knowing your phone number.<![CDATA[<br><br>]]>You can use <![CDATA[<b>]]>az<![CDATA[</b>]]>, <![CDATA[<b>]]>09<![CDATA[</b>]]> and underscores. Minimum length is <![CDATA[<b>]]>5<![CDATA[</b>]]> characters.</string>
<string name="UsernameChecking">Checking username...</string>
<string name="UsernameAvailable">%1$s is available.</string>
<!--settings view-->
<string name="ResetNotificationsText">Reset all notification settings to default</string>
<string name="TextSize">Messages Text Size</string>

View File

@ -59,7 +59,7 @@
<!--EDIT TEXT-->
<style name="Theme.TMessages.EditText" parent="android:Widget.EditText">
<item name="android:background">@drawable/holo_edit_text_light</item>
<item name="android:background">@drawable/edit_text</item>
<item name="android:textColor">#000000</item>
</style>