Merge branch 'dev'

This commit is contained in:
DrKLO 2014-03-25 14:59:40 +04:00
commit d485410192
69 changed files with 1353 additions and 660 deletions

View file

@ -82,7 +82,7 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 8 minSdkVersion 8
targetSdkVersion 19 targetSdkVersion 19
versionCode 208 versionCode 211
versionName "1.4.7" versionName "1.4.8"
} }
} }

View file

@ -479,7 +479,6 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.
processedMessageIdsSet.remove(sessionId); processedMessageIdsSet.remove(sessionId);
nextSeqNoInSession.remove(sessionId); nextSeqNoInSession.remove(sessionId);
processedSessionChanges.remove(sessionId); processedSessionChanges.remove(sessionId);
pingIdToDate.remove(sessionId);
if (sessionId == datacenter.authSessionId) { if (sessionId == datacenter.authSessionId) {
clearRequestsForRequestClass(RPCRequest.RPCRequestClassGeneric, datacenter); clearRequestsForRequestClass(RPCRequest.RPCRequestClassGeneric, datacenter);
@ -858,7 +857,7 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.
} }
} catch(Exception e) { } catch(Exception e) {
FileLog.e("tmessages", e); FileLog.e("tmessages", e);
return false; return true;
} }
return status; return status;
} }

View file

@ -592,9 +592,9 @@ public class ContactsController {
if (!toImport.isEmpty()) { if (!toImport.isEmpty()) {
if (BuildVars.DEBUG_VERSION) { if (BuildVars.DEBUG_VERSION) {
FileLog.e("tmessages", "start import contacts"); FileLog.e("tmessages", "start import contacts");
for (TLRPC.TL_inputPhoneContact contact : toImport) { // for (TLRPC.TL_inputPhoneContact contact : toImport) {
FileLog.e("tmessages", "add contact " + contact.first_name + " " + contact.last_name + " " + contact.phone); // FileLog.e("tmessages", "add contact " + contact.first_name + " " + contact.last_name + " " + contact.phone);
} // }
} }
final int count = (int)Math.ceil(toImport.size() / 500.0f); final int count = (int)Math.ceil(toImport.size() / 500.0f);
for (int a = 0; a < count; a++) { for (int a = 0; a < count; a++) {
@ -614,9 +614,9 @@ public class ContactsController {
} }
TLRPC.TL_contacts_importedContacts res = (TLRPC.TL_contacts_importedContacts)response; TLRPC.TL_contacts_importedContacts res = (TLRPC.TL_contacts_importedContacts)response;
if (BuildVars.DEBUG_VERSION) { if (BuildVars.DEBUG_VERSION) {
for (TLRPC.User user : res.users) { // for (TLRPC.User user : res.users) {
FileLog.e("tmessages", "received user " + user.first_name + " " + user.last_name + " " + user.phone); // FileLog.e("tmessages", "received user " + user.first_name + " " + user.last_name + " " + user.phone);
} // }
} }
MessagesStorage.getInstance().putUsersAndChats(res.users, null, true, true); MessagesStorage.getInstance().putUsersAndChats(res.users, null, true, true);
ArrayList<TLRPC.TL_contact> cArr = new ArrayList<TLRPC.TL_contact>(); ArrayList<TLRPC.TL_contact> cArr = new ArrayList<TLRPC.TL_contact>();
@ -776,9 +776,9 @@ public class ContactsController {
if (user != null) { if (user != null) {
usersDict.put(user.id, user); usersDict.put(user.id, user);
if (BuildVars.DEBUG_VERSION) { // if (BuildVars.DEBUG_VERSION) {
FileLog.e("tmessages", "loaded user contact " + user.first_name + " " + user.last_name + " " + user.phone); // FileLog.e("tmessages", "loaded user contact " + user.first_name + " " + user.last_name + " " + user.phone);
} // }
} }
} }
@ -1398,9 +1398,9 @@ public class ContactsController {
contactsParams.add(c); contactsParams.add(c);
req.contacts = contactsParams; req.contacts = contactsParams;
req.replace = false; req.replace = false;
if (BuildVars.DEBUG_VERSION) { // if (BuildVars.DEBUG_VERSION) {
FileLog.e("tmessages", "add contact " + user.first_name + " " + user.last_name + " " + user.phone); // FileLog.e("tmessages", "add contact " + user.first_name + " " + user.last_name + " " + user.phone);
} // }
ConnectionsManager.getInstance().performRpc(req, new RPCRequest.RPCRequestDelegate() { ConnectionsManager.getInstance().performRpc(req, new RPCRequest.RPCRequestDelegate() {
@Override @Override
public void run(TLObject response, TLRPC.TL_error error) { public void run(TLObject response, TLRPC.TL_error error) {
@ -1410,11 +1410,11 @@ public class ContactsController {
final TLRPC.TL_contacts_importedContacts res = (TLRPC.TL_contacts_importedContacts)response; final TLRPC.TL_contacts_importedContacts res = (TLRPC.TL_contacts_importedContacts)response;
MessagesStorage.getInstance().putUsersAndChats(res.users, null, true, true); MessagesStorage.getInstance().putUsersAndChats(res.users, null, true, true);
if (BuildVars.DEBUG_VERSION) { // if (BuildVars.DEBUG_VERSION) {
for (TLRPC.User user : res.users) { // for (TLRPC.User user : res.users) {
FileLog.e("tmessages", "received user " + user.first_name + " " + user.last_name + " " + user.phone); // FileLog.e("tmessages", "received user " + user.first_name + " " + user.last_name + " " + user.phone);
} // }
} // }
for (final TLRPC.User u : res.users) { for (final TLRPC.User u : res.users) {
Utilities.globalQueue.postRunnable(new Runnable() { Utilities.globalQueue.postRunnable(new Runnable() {

View file

@ -8,16 +8,47 @@
package org.telegram.messenger; package org.telegram.messenger;
import android.app.Activity;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.text.format.DateFormat;
import org.telegram.ui.ApplicationLoader; import org.telegram.ui.ApplicationLoader;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Locale; import java.util.Locale;
public class LocaleController { public class LocaleController {
private String currentLanguage; public static boolean isRTL = false;
public static FastDateFormat formatterDay;
public static FastDateFormat formatterWeek;
public static FastDateFormat formatterMonth;
public static FastDateFormat formatterYear;
public static FastDateFormat formatterYearMax;
public static FastDateFormat chatDate;
public static FastDateFormat chatFullDate;
private Locale currentLocale; private Locale currentLocale;
private Locale systemDefaultLocale;
private LocaleInfo currentLocaleInfo;
private HashMap<String, String> localeValues = new HashMap<String, String>(); private HashMap<String, String> localeValues = new HashMap<String, String>();
private String languageOverride;
private boolean changingConfiguration = false;
public static class LocaleInfo {
public String name;
public String nameEnglish;
public String shortName;
}
public ArrayList<LocaleInfo> sortedLanguages = new ArrayList<LocaleController.LocaleInfo>();
public HashMap<String, LocaleInfo> languagesDict = new HashMap<String, LocaleInfo>();
private static volatile LocaleController Instance = null; private static volatile LocaleController Instance = null;
public static LocaleController getInstance() { public static LocaleController getInstance() {
@ -34,24 +65,138 @@ public class LocaleController {
} }
public LocaleController() { public LocaleController() {
currentLocale = Locale.getDefault(); LocaleController.LocaleInfo localeInfo = new LocaleController.LocaleInfo();
currentLanguage = currentLocale.getLanguage(); localeInfo.name = "English";
localeInfo.nameEnglish = "English";
localeInfo.shortName = "en";
sortedLanguages.add(localeInfo);
languagesDict.put(localeInfo.shortName, localeInfo);
localeInfo = new LocaleController.LocaleInfo();
localeInfo.name = "Italiano";
localeInfo.nameEnglish = "Italian";
localeInfo.shortName = "it";
sortedLanguages.add(localeInfo);
languagesDict.put(localeInfo.shortName, localeInfo);
localeInfo = new LocaleController.LocaleInfo();
localeInfo.name = "Español";
localeInfo.nameEnglish = "Spanish";
localeInfo.shortName = "es";
sortedLanguages.add(localeInfo);
languagesDict.put(localeInfo.shortName, localeInfo);
localeInfo = new LocaleController.LocaleInfo();
localeInfo.name = "Deutsch";
localeInfo.nameEnglish = "German";
localeInfo.shortName = "de";
sortedLanguages.add(localeInfo);
languagesDict.put(localeInfo.shortName, localeInfo);
localeInfo = new LocaleController.LocaleInfo();
localeInfo.name = "Nederlands";
localeInfo.nameEnglish = "Dutch";
localeInfo.shortName = "nl";
sortedLanguages.add(localeInfo);
languagesDict.put(localeInfo.shortName, localeInfo);
localeInfo = new LocaleController.LocaleInfo();
localeInfo.name = "العربية";
localeInfo.nameEnglish = "Arabic";
localeInfo.shortName = "ar";
sortedLanguages.add(localeInfo);
languagesDict.put(localeInfo.shortName, localeInfo);
Collections.sort(sortedLanguages, new Comparator<LocaleInfo>() {
@Override
public int compare(LocaleController.LocaleInfo o, LocaleController.LocaleInfo o2) {
return o.name.compareTo(o2.name);
}
});
localeInfo = new LocaleController.LocaleInfo();
localeInfo.name = "System default";
localeInfo.nameEnglish = "System default";
localeInfo.shortName = null;
sortedLanguages.add(0, localeInfo);
systemDefaultLocale = Locale.getDefault();
LocaleInfo currentInfo = null;
boolean override = false;
try {
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
String lang = preferences.getString("language", null);
if (lang != null) {
currentInfo = languagesDict.get(lang);
if (currentInfo != null) {
override = true;
}
} }
public void applyLanguage(String language) { if (currentInfo == null && systemDefaultLocale.getLanguage() != null) {
if (language != null) { currentInfo = languagesDict.get(systemDefaultLocale.getLanguage());
currentLanguage = language;
currentLocale = new Locale(currentLanguage);
} else {
currentLocale = Locale.getDefault();
currentLanguage = currentLocale.getLanguage();
} }
if (currentInfo == null) {
currentInfo = languagesDict.get("en");
}
applyLanguage(currentInfo, override);
} catch (Exception e) {
FileLog.e("tmessages", e);
}
}
public void applyLanguage(LocaleInfo localeInfo, boolean override) {
if (localeInfo == null) {
return;
}
try {
Locale newLocale = null;
if (localeInfo.shortName != null) {
newLocale = new Locale(localeInfo.shortName);
if (newLocale != null) {
if (override) {
languageOverride = localeInfo.shortName;
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
SharedPreferences.Editor editor = preferences.edit();
editor.putString("language", localeInfo.shortName);
editor.commit();
}
}
} else {
newLocale = systemDefaultLocale;
languageOverride = null;
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
SharedPreferences.Editor editor = preferences.edit();
editor.remove("language");
editor.commit();
}
if (newLocale != null) {
currentLocale = newLocale;
currentLocaleInfo = localeInfo;
changingConfiguration = true;
Locale.setDefault(currentLocale);
android.content.res.Configuration config = new android.content.res.Configuration();
config.locale = currentLocale;
ApplicationLoader.applicationContext.getResources().updateConfiguration(config, ApplicationLoader.applicationContext.getResources().getDisplayMetrics());
changingConfiguration = false;
}
} catch (Exception e) {
FileLog.e("tmessages", e);
changingConfiguration = false;
}
recreateFormatters();
} }
private void loadCurrentLocale() { private void loadCurrentLocale() {
localeValues.clear(); localeValues.clear();
} }
public static String getCurrentLanguageName() {
return getString("LanguangeName", R.string.LanguangeName);
}
public static String getString(String key, int res) { public static String getString(String key, int res) {
String value = getInstance().localeValues.get(key); String value = getInstance().localeValues.get(key);
if (value == null) { if (value == null) {
@ -76,4 +221,142 @@ public class LocaleController {
return "LOC_ERR: " + key; return "LOC_ERR: " + key;
} }
} }
public void onDeviceConfigurationChange(Configuration newConfig) {
if (changingConfiguration) {
return;
}
systemDefaultLocale = newConfig.locale;
if (languageOverride != null) {
LocaleInfo toSet = currentLocaleInfo;
currentLocaleInfo = null;
applyLanguage(toSet, false);
} else {
Locale newLocale = newConfig.locale;
if (newLocale != null) {
String d1 = newLocale.getDisplayName();
String d2 = currentLocale.getDisplayName();
if (d1 != null && d2 != null && !d1.equals(d2)) {
recreateFormatters();
}
currentLocale = newLocale;
}
}
}
public static String formatDateChat(long date) {
Calendar rightNow = Calendar.getInstance();
int year = rightNow.get(Calendar.YEAR);
rightNow.setTimeInMillis(date * 1000);
int dateYear = rightNow.get(Calendar.YEAR);
if (year == dateYear) {
return chatDate.format(date * 1000);
}
return chatFullDate.format(date * 1000);
}
public static String formatDate(long date) {
Calendar rightNow = Calendar.getInstance();
int day = rightNow.get(Calendar.DAY_OF_YEAR);
int year = rightNow.get(Calendar.YEAR);
rightNow.setTimeInMillis(date * 1000);
int dateDay = rightNow.get(Calendar.DAY_OF_YEAR);
int dateYear = rightNow.get(Calendar.YEAR);
if (dateDay == day && year == dateYear) {
return formatterDay.format(new Date(date * 1000));
} else if (dateDay + 1 == day && year == dateYear) {
return ApplicationLoader.applicationContext.getResources().getString(R.string.Yesterday);
} else if (year == dateYear) {
return formatterMonth.format(new Date(date * 1000));
} else {
return formatterYear.format(new Date(date * 1000));
}
}
public static String formatDateOnline(long date) {
Calendar rightNow = Calendar.getInstance();
int day = rightNow.get(Calendar.DAY_OF_YEAR);
int year = rightNow.get(Calendar.YEAR);
rightNow.setTimeInMillis(date * 1000);
int dateDay = rightNow.get(Calendar.DAY_OF_YEAR);
int dateYear = rightNow.get(Calendar.YEAR);
if (dateDay == day && year == dateYear) {
return String.format("%s %s %s", LocaleController.getString("LastSeen", R.string.LastSeen), LocaleController.getString("TodayAt", R.string.TodayAt), formatterDay.format(new Date(date * 1000)));
} else if (dateDay + 1 == day && year == dateYear) {
return String.format("%s %s %s", LocaleController.getString("LastSeen", R.string.LastSeen), LocaleController.getString("YesterdayAt", R.string.YesterdayAt), formatterDay.format(new Date(date * 1000)));
} else if (year == dateYear) {
return String.format("%s %s %s %s", LocaleController.getString("LastSeenDate", R.string.LastSeenDate), formatterMonth.format(new Date(date * 1000)), LocaleController.getString("OtherAt", R.string.OtherAt), formatterDay.format(new Date(date * 1000)));
} else {
return String.format("%s %s %s %s", LocaleController.getString("LastSeenDate", R.string.LastSeenDate), formatterYear.format(new Date(date * 1000)), LocaleController.getString("OtherAt", R.string.OtherAt), formatterDay.format(new Date(date * 1000)));
}
}
public static void recreateFormatters() {
Locale locale = Locale.getDefault();
String lang = locale.getLanguage();
if (lang == null) {
lang = "en";
}
isRTL = lang.toLowerCase().equals("ar");
if (lang.equals("en")) {
formatterMonth = FastDateFormat.getInstance("MMM dd", locale);
formatterYear = FastDateFormat.getInstance("dd.MM.yy", locale);
formatterYearMax = FastDateFormat.getInstance("dd.MM.yyyy", locale);
chatDate = FastDateFormat.getInstance("MMMM d", locale);
chatFullDate = FastDateFormat.getInstance("MMMM d, yyyy", locale);
} else if (lang.startsWith("es")) {
formatterMonth = FastDateFormat.getInstance("dd 'de' MMM", locale);
formatterYear = FastDateFormat.getInstance("dd.MM.yy", locale);
formatterYearMax = FastDateFormat.getInstance("dd.MM.yyyy", locale);
chatDate = FastDateFormat.getInstance("d 'de' MMMM", locale);
chatFullDate = FastDateFormat.getInstance("d 'de' MMMM 'de' yyyy", locale);
} else {
formatterMonth = FastDateFormat.getInstance("dd MMM", locale);
formatterYear = FastDateFormat.getInstance("dd.MM.yy", locale);
formatterYearMax = FastDateFormat.getInstance("dd.MM.yyyy", locale);
chatDate = FastDateFormat.getInstance("d MMMM", locale);
chatFullDate = FastDateFormat.getInstance("d MMMM yyyy", locale);
}
formatterWeek = FastDateFormat.getInstance("EEE", locale);
if (lang != null) {
if (DateFormat.is24HourFormat(ApplicationLoader.applicationContext)) {
formatterDay = FastDateFormat.getInstance("HH:mm", locale);
} else {
if (lang.toLowerCase().equals("ar")) {
formatterDay = FastDateFormat.getInstance("h:mm a", locale);
} else {
formatterDay = FastDateFormat.getInstance("h:mm a", Locale.US);
}
}
} else {
formatterDay = FastDateFormat.getInstance("h:mm a", Locale.US);
}
}
public static String stringForMessageListDate(long date) {
Calendar rightNow = Calendar.getInstance();
int day = rightNow.get(Calendar.DAY_OF_YEAR);
int year = rightNow.get(Calendar.YEAR);
rightNow.setTimeInMillis(date * 1000);
int dateDay = rightNow.get(Calendar.DAY_OF_YEAR);
int dateYear = rightNow.get(Calendar.YEAR);
if (year != dateYear) {
return formatterYear.format(new Date(date * 1000));
} else {
int dayDiff = dateDay - day;
if(dayDiff == 0 || dayDiff == -1 && (int)(System.currentTimeMillis() / 1000) - date < 60 * 60 * 8) {
return formatterDay.format(new Date(date * 1000));
} else if(dayDiff > -7 && dayDiff <= -1) {
return formatterWeek.format(new Date(date * 1000));
} else {
return formatterMonth.format(new Date(date * 1000));
}
}
}
} }

View file

@ -4344,7 +4344,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
} else if (messageObject.messageOwner.action instanceof TLRPC.TL_messageActionUserUpdatedPhoto) { } else if (messageObject.messageOwner.action instanceof TLRPC.TL_messageActionUserUpdatedPhoto) {
msg = LocaleController.formatString("NotificationContactNewPhoto", R.string.NotificationContactNewPhoto, Utilities.formatName(u.first_name, u.last_name)); msg = LocaleController.formatString("NotificationContactNewPhoto", R.string.NotificationContactNewPhoto, Utilities.formatName(u.first_name, u.last_name));
} else if (messageObject.messageOwner.action instanceof TLRPC.TL_messageActionLoginUnknownLocation) { } else if (messageObject.messageOwner.action instanceof TLRPC.TL_messageActionLoginUnknownLocation) {
String date = String.format("%s %s %s", Utilities.formatterYear.format(((long)messageObject.messageOwner.date) * 1000), LocaleController.getString("OtherAt", R.string.OtherAt), Utilities.formatterDay.format(((long)messageObject.messageOwner.date) * 1000)); String date = String.format("%s %s %s", LocaleController.formatterYear.format(((long)messageObject.messageOwner.date) * 1000), LocaleController.getString("OtherAt", R.string.OtherAt), LocaleController.formatterDay.format(((long)messageObject.messageOwner.date) * 1000));
msg = LocaleController.formatString("NotificationUnrecognizedDevice", R.string.NotificationUnrecognizedDevice, UserConfig.currentUser.first_name, date, messageObject.messageOwner.action.title, messageObject.messageOwner.action.address); msg = LocaleController.formatString("NotificationUnrecognizedDevice", R.string.NotificationUnrecognizedDevice, UserConfig.currentUser.first_name, date, messageObject.messageOwner.action.title, messageObject.messageOwner.action.address);
} }
} else { } else {

View file

@ -62,6 +62,8 @@ public class MessagesStorage {
} }
public void openDatabase() { public void openDatabase() {
NativeLoader.initNativeLibs(ApplicationLoader.applicationContext);
cacheFile = new File(ApplicationLoader.applicationContext.getFilesDir(), "cache4.db"); cacheFile = new File(ApplicationLoader.applicationContext.getFilesDir(), "cache4.db");
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("dbconfig", Context.MODE_PRIVATE); SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("dbconfig", Context.MODE_PRIVATE);

View file

@ -28,7 +28,13 @@ public class NativeLoader {
0, //mips 0, //mips
}; };
public static void initNativeLibs(Context context) { private static volatile boolean nativeLoaded = false;
public static synchronized void initNativeLibs(Context context) {
if (nativeLoaded) {
return;
}
if (Build.VERSION.SDK_INT >= 9) { if (Build.VERSION.SDK_INT >= 9) {
try { try {
String folder = null; String folder = null;
@ -50,6 +56,7 @@ public class NativeLoader {
libSize = sizes[3]; libSize = sizes[3];
} else { } else {
System.loadLibrary("tmessages"); System.loadLibrary("tmessages");
nativeLoaded = true;
Log.e("tmessages", "Unsupported arch: " + Build.CPU_ABI); Log.e("tmessages", "Unsupported arch: " + Build.CPU_ABI);
return; return;
} }
@ -59,6 +66,7 @@ public class NativeLoader {
Log.d("tmessages", "Load normal lib"); Log.d("tmessages", "Load normal lib");
try { try {
System.loadLibrary("tmessages"); System.loadLibrary("tmessages");
nativeLoaded = true;
return; return;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
@ -68,9 +76,14 @@ public class NativeLoader {
File destLocalFile = new File(context.getFilesDir().getAbsolutePath() + "/libtmessages.so"); File destLocalFile = new File(context.getFilesDir().getAbsolutePath() + "/libtmessages.so");
if (destLocalFile.exists()) { if (destLocalFile.exists()) {
if (destLocalFile.length() == libSize) { if (destLocalFile.length() == libSize) {
try {
Log.d("tmessages", "Load local lib"); Log.d("tmessages", "Load local lib");
System.load(destLocalFile.getAbsolutePath()); System.load(destLocalFile.getAbsolutePath());
nativeLoaded = true;
return; return;
} catch (Exception e) {
e.printStackTrace();
}
} else { } else {
destLocalFile.delete(); destLocalFile.delete();
} }
@ -98,6 +111,7 @@ public class NativeLoader {
out.close(); out.close();
System.load(destLocalFile.getAbsolutePath()); System.load(destLocalFile.getAbsolutePath());
nativeLoaded = true;
return; return;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
@ -123,5 +137,6 @@ public class NativeLoader {
} }
System.loadLibrary("tmessages"); System.loadLibrary("tmessages");
nativeLoaded = true;
} }
} }

View file

@ -60,6 +60,7 @@ public class TcpConnection extends PyroClientAdapter {
private boolean firstPacket; private boolean firstPacket;
private Timer reconnectTimer; private Timer reconnectTimer;
private boolean tryWithNoNetworkAnyway = false;
public TcpConnection(int did) { public TcpConnection(int did) {
if (selector == null) { if (selector == null) {
@ -90,10 +91,14 @@ public class TcpConnection extends PyroClientAdapter {
connectionState = TcpConnectionState.TcpConnectionStageConnecting; connectionState = TcpConnectionState.TcpConnectionStageConnecting;
try { try {
if (!ConnectionsManager.isNetworkOnline()) { if(android.os.Build.VERSION.SDK_INT < 11) {
if (!ConnectionsManager.isNetworkOnline() && !tryWithNoNetworkAnyway) {
handleConnectionError(null); handleConnectionError(null);
tryWithNoNetworkAnyway = true;
return; return;
} }
tryWithNoNetworkAnyway = false;
}
try { try {
synchronized (timerSync) { synchronized (timerSync) {
if (reconnectTimer != null) { if (reconnectTimer != null) {

View file

@ -24,7 +24,6 @@ import android.provider.DocumentsContract;
import android.provider.MediaStore; import android.provider.MediaStore;
import android.text.Html; import android.text.Html;
import android.text.SpannableStringBuilder; import android.text.SpannableStringBuilder;
import android.text.format.DateFormat;
import android.util.Base64; import android.util.Base64;
import android.view.Display; import android.view.Display;
import android.view.View; import android.view.View;
@ -49,7 +48,6 @@ import java.security.PublicKey;
import java.security.spec.RSAPublicKeySpec; import java.security.spec.RSAPublicKeySpec;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.Hashtable; import java.util.Hashtable;
import java.util.Locale; import java.util.Locale;
@ -64,7 +62,6 @@ public class Utilities {
public static int statusBarHeight = 0; public static int statusBarHeight = 0;
public static float density = 1; public static float density = 1;
public static Point displaySize = new Point(); public static Point displaySize = new Point();
public static boolean isRTL = false;
public static Pattern pattern = Pattern.compile("[0-9]+"); public static Pattern pattern = Pattern.compile("[0-9]+");
private final static Integer lock = 1; private final static Integer lock = 1;
@ -83,14 +80,6 @@ public class Utilities {
public static volatile DispatchQueue imageLoadQueue = new DispatchQueue("imageLoadQueue"); public static volatile DispatchQueue imageLoadQueue = new DispatchQueue("imageLoadQueue");
public static volatile DispatchQueue fileUploadQueue = new DispatchQueue("fileUploadQueue"); public static volatile DispatchQueue fileUploadQueue = new DispatchQueue("fileUploadQueue");
public static FastDateFormat formatterDay;
public static FastDateFormat formatterWeek;
public static FastDateFormat formatterMonth;
public static FastDateFormat formatterYear;
public static FastDateFormat formatterYearMax;
public static FastDateFormat chatDate;
public static FastDateFormat chatFullDate;
public static int[] arrColors = {0xffee4928, 0xff41a903, 0xffe09602, 0xff0f94ed, 0xff8f3bf7, 0xfffc4380, 0xff00a1c4, 0xffeb7002}; public static int[] arrColors = {0xffee4928, 0xff41a903, 0xffe09602, 0xff0f94ed, 0xff8f3bf7, 0xfffc4380, 0xff00a1c4, 0xffeb7002};
public static int[] arrUsersAvatars = { public static int[] arrUsersAvatars = {
R.drawable.user_red, R.drawable.user_red,
@ -139,7 +128,6 @@ public class Utilities {
} }
} }
recreateFormatters();
checkDisplaySize(); checkDisplaySize();
} }
@ -537,49 +525,6 @@ public class Utilities {
}); });
} }
public static void recreateFormatters() {
Locale locale = Locale.getDefault();
String lang = locale.getLanguage();
if (lang == null) {
lang = "en";
}
isRTL = lang.toLowerCase().equals("ar");
if (lang.equals("en")) {
formatterMonth = FastDateFormat.getInstance("MMM dd", locale);
formatterYear = FastDateFormat.getInstance("dd.MM.yy", locale);
formatterYearMax = FastDateFormat.getInstance("dd.MM.yyyy", locale);
chatDate = FastDateFormat.getInstance("MMMM d", locale);
chatFullDate = FastDateFormat.getInstance("MMMM d, yyyy", locale);
} else if (lang.startsWith("es")) {
formatterMonth = FastDateFormat.getInstance("dd 'de' MMM", locale);
formatterYear = FastDateFormat.getInstance("dd.MM.yy", locale);
formatterYearMax = FastDateFormat.getInstance("dd.MM.yyyy", locale);
chatDate = FastDateFormat.getInstance("d 'de' MMMM", locale);
chatFullDate = FastDateFormat.getInstance("d 'de' MMMM 'de' yyyy", locale);
} else {
formatterMonth = FastDateFormat.getInstance("dd MMM", locale);
formatterYear = FastDateFormat.getInstance("dd.MM.yy", locale);
formatterYearMax = FastDateFormat.getInstance("dd.MM.yyyy", locale);
chatDate = FastDateFormat.getInstance("d MMMM", locale);
chatFullDate = FastDateFormat.getInstance("d MMMM yyyy", locale);
}
formatterWeek = FastDateFormat.getInstance("EEE", locale);
if (lang != null) {
if (DateFormat.is24HourFormat(ApplicationLoader.applicationContext)) {
formatterDay = FastDateFormat.getInstance("HH:mm", locale);
} else {
if (lang.toLowerCase().equals("ar")) {
formatterDay = FastDateFormat.getInstance("h:mm a", locale);
} else {
formatterDay = FastDateFormat.getInstance("h:mm a", Locale.US);
}
}
} else {
formatterDay = FastDateFormat.getInstance("h:mm a", Locale.US);
}
}
public static void checkDisplaySize() { public static void checkDisplaySize() {
try { try {
WindowManager manager = (WindowManager)ApplicationLoader.applicationContext.getSystemService(Context.WINDOW_SERVICE); WindowManager manager = (WindowManager)ApplicationLoader.applicationContext.getSystemService(Context.WINDOW_SERVICE);
@ -599,57 +544,6 @@ public class Utilities {
} }
} }
public static String formatDateChat(long date) {
Calendar rightNow = Calendar.getInstance();
int year = rightNow.get(Calendar.YEAR);
rightNow.setTimeInMillis(date * 1000);
int dateYear = rightNow.get(Calendar.YEAR);
if (year == dateYear) {
return chatDate.format(date * 1000);
}
return chatFullDate.format(date * 1000);
}
public static String formatDate(long date) {
Calendar rightNow = Calendar.getInstance();
int day = rightNow.get(Calendar.DAY_OF_YEAR);
int year = rightNow.get(Calendar.YEAR);
rightNow.setTimeInMillis(date * 1000);
int dateDay = rightNow.get(Calendar.DAY_OF_YEAR);
int dateYear = rightNow.get(Calendar.YEAR);
if (dateDay == day && year == dateYear) {
return formatterDay.format(new Date(date * 1000));
} else if (dateDay + 1 == day && year == dateYear) {
return ApplicationLoader.applicationContext.getResources().getString(R.string.Yesterday);
} else if (year == dateYear) {
return formatterMonth.format(new Date(date * 1000));
} else {
return formatterYear.format(new Date(date * 1000));
}
}
public static String formatDateOnline(long date) {
Calendar rightNow = Calendar.getInstance();
int day = rightNow.get(Calendar.DAY_OF_YEAR);
int year = rightNow.get(Calendar.YEAR);
rightNow.setTimeInMillis(date * 1000);
int dateDay = rightNow.get(Calendar.DAY_OF_YEAR);
int dateYear = rightNow.get(Calendar.YEAR);
if (dateDay == day && year == dateYear) {
return String.format("%s %s %s", LocaleController.getString("LastSeen", R.string.LastSeen), LocaleController.getString("TodayAt", R.string.TodayAt), formatterDay.format(new Date(date * 1000)));
} else if (dateDay + 1 == day && year == dateYear) {
return String.format("%s %s %s", LocaleController.getString("LastSeen", R.string.LastSeen), LocaleController.getString("YesterdayAt", R.string.YesterdayAt), formatterDay.format(new Date(date * 1000)));
} else if (year == dateYear) {
return String.format("%s %s %s %s", LocaleController.getString("LastSeenDate", R.string.LastSeenDate), formatterMonth.format(new Date(date * 1000)), LocaleController.getString("OtherAt", R.string.OtherAt), formatterDay.format(new Date(date * 1000)));
} else {
return String.format("%s %s %s %s", LocaleController.getString("LastSeenDate", R.string.LastSeenDate), formatterYear.format(new Date(date * 1000)), LocaleController.getString("OtherAt", R.string.OtherAt), formatterDay.format(new Date(date * 1000)));
}
}
public static void HideProgressDialog(Activity activity) { public static void HideProgressDialog(Activity activity) {
activity.runOnUiThread(new Runnable() { activity.runOnUiThread(new Runnable() {
@Override @Override
@ -941,7 +835,7 @@ public class Utilities {
} else if (result.length() != 0 && lastName.length() != 0) { } else if (result.length() != 0 && lastName.length() != 0) {
result += " " + lastName; result += " " + lastName;
} }
return result; return result.trim();
} }
public static String formatFileSize(long size) { public static String formatFileSize(long size) {
@ -956,28 +850,6 @@ public class Utilities {
} }
} }
public static String stringForMessageListDate(long date) {
Calendar rightNow = Calendar.getInstance();
int day = rightNow.get(Calendar.DAY_OF_YEAR);
int year = rightNow.get(Calendar.YEAR);
rightNow.setTimeInMillis(date * 1000);
int dateDay = rightNow.get(Calendar.DAY_OF_YEAR);
int dateYear = rightNow.get(Calendar.YEAR);
if (year != dateYear) {
return formatterYear.format(new Date(date * 1000));
} else {
int dayDiff = dateDay - day;
if(dayDiff == 0 || dayDiff == -1 && (int)(System.currentTimeMillis() / 1000) - date < 60 * 60 * 8) {
return formatterDay.format(new Date(date * 1000));
} else if(dayDiff > -7 && dayDiff <= -1) {
return formatterWeek.format(new Date(date * 1000));
} else {
return formatterMonth.format(new Date(date * 1000));
}
}
}
public static byte[] decodeQuotedPrintable(final byte[] bytes) { public static byte[] decodeQuotedPrintable(final byte[] bytes) {
if (bytes == null) { if (bytes == null) {
return null; return null;

View file

@ -202,7 +202,7 @@ public class MessageObject {
} }
} }
} else if (message.action instanceof TLRPC.TL_messageActionLoginUnknownLocation) { } else if (message.action instanceof TLRPC.TL_messageActionLoginUnknownLocation) {
String date = String.format("%s %s %s", Utilities.formatterYear.format(((long)message.date) * 1000), LocaleController.getString("OtherAt", R.string.OtherAt), Utilities.formatterDay.format(((long)message.date) * 1000)); String date = String.format("%s %s %s", LocaleController.formatterYear.format(((long)message.date) * 1000), LocaleController.getString("OtherAt", R.string.OtherAt), LocaleController.formatterDay.format(((long)message.date) * 1000));
messageText = LocaleController.formatString("NotificationUnrecognizedDevice", R.string.NotificationUnrecognizedDevice, UserConfig.currentUser.first_name, date, message.action.title, message.action.address); messageText = LocaleController.formatString("NotificationUnrecognizedDevice", R.string.NotificationUnrecognizedDevice, UserConfig.currentUser.first_name, date, message.action.title, message.action.address);
} else if (message.action instanceof TLRPC.TL_messageActionUserJoined) { } else if (message.action instanceof TLRPC.TL_messageActionUserJoined) {
if (fromUser != null) { if (fromUser != null) {

View file

@ -9,7 +9,6 @@
package org.telegram.ui.Adapters; package org.telegram.ui.Adapters;
import android.content.Context; import android.content.Context;
import android.text.Html;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -114,7 +113,6 @@ public class ContactsActivityAdapter extends SectionedBaseAdapter {
if (user != null) { if (user != null) {
if (convertView == null) { if (convertView == null) {
convertView = new ChatOrUserCell(mContext); convertView = new ChatOrUserCell(mContext);
((ChatOrUserCell)convertView).useBoldFont = true;
((ChatOrUserCell)convertView).usePadding = false; ((ChatOrUserCell)convertView).usePadding = false;
} }
@ -153,11 +151,11 @@ public class ContactsActivityAdapter extends SectionedBaseAdapter {
} }
} }
if (contact.first_name != null && contact.last_name != null) { if (contact.first_name != null && contact.last_name != null) {
textView.setText(Html.fromHtml(contact.first_name + " <b>" + contact.last_name + "</b>")); textView.setText(contact.first_name + " " + contact.last_name);
} else if (contact.first_name != null && contact.last_name == null) { } else if (contact.first_name != null && contact.last_name == null) {
textView.setText(Html.fromHtml("<b>" + contact.first_name + "</b>")); textView.setText(contact.first_name);
} else { } else {
textView.setText(Html.fromHtml("<b>" + contact.last_name + "</b>")); textView.setText(contact.last_name);
} }
return convertView; return convertView;
} }

View file

@ -30,7 +30,7 @@ public class ContactsActivitySearchAdapter extends BaseFragmentAdapter {
private HashMap<Integer, TLRPC.User> ignoreUsers; private HashMap<Integer, TLRPC.User> ignoreUsers;
private ArrayList<TLRPC.User> searchResult; private ArrayList<TLRPC.User> searchResult;
private ArrayList<CharSequence> searchResultNames; private ArrayList<CharSequence> searchResultNames;
private Timer searchDialogsTimer; private Timer searchTimer;
public ContactsActivitySearchAdapter(Context context, HashMap<Integer, TLRPC.User> arg1) { public ContactsActivitySearchAdapter(Context context, HashMap<Integer, TLRPC.User> arg1) {
mContext = context; mContext = context;
@ -44,19 +44,19 @@ public class ContactsActivitySearchAdapter extends BaseFragmentAdapter {
notifyDataSetChanged(); notifyDataSetChanged();
} else { } else {
try { try {
if (searchDialogsTimer != null) { if (searchTimer != null) {
searchDialogsTimer.cancel(); searchTimer.cancel();
} }
} catch (Exception e) { } catch (Exception e) {
FileLog.e("tmessages", e); FileLog.e("tmessages", e);
} }
searchDialogsTimer = new Timer(); searchTimer = new Timer();
searchDialogsTimer.schedule(new TimerTask() { searchTimer.schedule(new TimerTask() {
@Override @Override
public void run() { public void run() {
try { try {
searchDialogsTimer.cancel(); searchTimer.cancel();
searchDialogsTimer = null; searchTimer = null;
} catch (Exception e) { } catch (Exception e) {
FileLog.e("tmessages", e); FileLog.e("tmessages", e);
} }

View file

@ -30,6 +30,7 @@ import com.google.android.gms.gcm.GoogleCloudMessaging;
import org.telegram.messenger.BuildVars; import org.telegram.messenger.BuildVars;
import org.telegram.messenger.ConnectionsManager; import org.telegram.messenger.ConnectionsManager;
import org.telegram.messenger.FileLog; import org.telegram.messenger.FileLog;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.MessagesController; import org.telegram.messenger.MessagesController;
import org.telegram.messenger.NativeLoader; import org.telegram.messenger.NativeLoader;
import org.telegram.messenger.ScreenReceiver; import org.telegram.messenger.ScreenReceiver;
@ -39,7 +40,6 @@ import org.telegram.ui.Views.BaseFragment;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Locale;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
public class ApplicationLoader extends Application { public class ApplicationLoader extends Application {
@ -52,7 +52,6 @@ public class ApplicationLoader extends Application {
private static final int PLAY_SERVICES_RESOLUTION_REQUEST = 9000; private static final int PLAY_SERVICES_RESOLUTION_REQUEST = 9000;
public static long lastPauseTime; public static long lastPauseTime;
public static Bitmap cachedWallpaper = null; public static Bitmap cachedWallpaper = null;
private Locale currentLocale;
public static volatile Context applicationContext = null; public static volatile Context applicationContext = null;
public static volatile Handler applicationHandler = null; public static volatile Handler applicationHandler = null;
@ -120,8 +119,14 @@ public class ApplicationLoader extends Application {
super.onCreate(); super.onCreate();
lastPauseTime = System.currentTimeMillis(); lastPauseTime = System.currentTimeMillis();
applicationContext = getApplicationContext(); applicationContext = getApplicationContext();
NativeLoader.initNativeLibs(this);
try {
LocaleController.getInstance();
} catch (Exception e) {
e.printStackTrace();
}
applicationHandler = new Handler(applicationContext.getMainLooper()); applicationHandler = new Handler(applicationContext.getMainLooper());
currentLocale = Locale.getDefault();
java.lang.System.setProperty("java.net.preferIPv4Stack", "true"); java.lang.System.setProperty("java.net.preferIPv4Stack", "true");
java.lang.System.setProperty("java.net.preferIPv6Addresses", "false"); java.lang.System.setProperty("java.net.preferIPv6Addresses", "false");
@ -136,23 +141,17 @@ public class ApplicationLoader extends Application {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
FileLog.e("tmessages", "start application with time " + lastPauseTime);
} }
@Override @Override
public void onConfigurationChanged(Configuration newConfig) { public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig); super.onConfigurationChanged(newConfig);
Locale newLocale = newConfig.locale; try {
if (newLocale != null) { LocaleController.getInstance().onDeviceConfigurationChange(newConfig);
String d1 = newLocale.getDisplayName();
String d2 = currentLocale.getDisplayName();
if (d1 != null && d2 != null && !d1.equals(d2)) {
Utilities.recreateFormatters();
}
currentLocale = newLocale;
}
Utilities.checkDisplaySize(); Utilities.checkDisplaySize();
} catch (Exception e) {
e.printStackTrace();
}
} }
public static void resetLastPauseTime() { public static void resetLastPauseTime() {

View file

@ -206,7 +206,7 @@ public class ChatBaseCell extends BaseCell {
currentTimePaint = timePaintIn; currentTimePaint = timePaintIn;
} }
currentTimeString = Utilities.formatterDay.format((long) (currentMessageObject.messageOwner.date) * 1000); currentTimeString = LocaleController.formatterDay.format((long) (currentMessageObject.messageOwner.date) * 1000);
timeWidth = (int)Math.ceil(currentTimePaint.measureText(currentTimeString)); timeWidth = (int)Math.ceil(currentTimePaint.measureText(currentTimeString));
namesOffset = 0; namesOffset = 0;

View file

@ -12,7 +12,6 @@ import android.content.Context;
import android.graphics.Canvas; import android.graphics.Canvas;
import android.graphics.Paint; import android.graphics.Paint;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.text.Html;
import android.text.Layout; import android.text.Layout;
import android.text.StaticLayout; import android.text.StaticLayout;
import android.text.TextPaint; import android.text.TextPaint;
@ -55,7 +54,6 @@ public class ChatOrUserCell extends BaseCell {
private TLRPC.FileLocation lastAvatar = null; private TLRPC.FileLocation lastAvatar = null;
public boolean usePadding = true; public boolean usePadding = true;
public boolean useBoldFont = false;
public boolean useSeparator = false; public boolean useSeparator = false;
public float drawAlpha = 1; public float drawAlpha = 1;
@ -275,7 +273,7 @@ public class ChatOrUserCell extends BaseCell {
if (encryptedChat != null) { if (encryptedChat != null) {
drawNameLock = true; drawNameLock = true;
if (!Utilities.isRTL) { if (!LocaleController.isRTL) {
nameLockLeft = Utilities.dp(61 + (usePadding ? 11 : 0)); nameLockLeft = Utilities.dp(61 + (usePadding ? 11 : 0));
nameLeft = Utilities.dp(65 + (usePadding ? 11 : 0)) + lockDrawable.getIntrinsicWidth(); nameLeft = Utilities.dp(65 + (usePadding ? 11 : 0)) + lockDrawable.getIntrinsicWidth();
} else { } else {
@ -284,7 +282,7 @@ public class ChatOrUserCell extends BaseCell {
} }
} else { } else {
drawNameLock = false; drawNameLock = false;
if (!Utilities.isRTL) { if (!LocaleController.isRTL) {
nameLeft = Utilities.dp(61 + (usePadding ? 11 : 0)); nameLeft = Utilities.dp(61 + (usePadding ? 11 : 0));
} else { } else {
nameLeft = usePadding ? Utilities.dp(11) : 0; nameLeft = usePadding ? Utilities.dp(11) : 0;
@ -293,17 +291,6 @@ public class ChatOrUserCell extends BaseCell {
if (currentName != null) { if (currentName != null) {
nameString = currentName; nameString = currentName;
} else {
if (useBoldFont) {
if (user != null) {
if (user.first_name.length() != 0 && user.last_name.length() != 0) {
nameString = Html.fromHtml(user.first_name + " <b>" + user.last_name + "</b>");
} else if (user.first_name.length() != 0) {
nameString = Html.fromHtml("<b>" + user.first_name + "</b>");
} else {
nameString = Html.fromHtml("<b>" + user.last_name + "</b>");
}
}
} else { } else {
String nameString2 = ""; String nameString2 = "";
if (chat != null) { if (chat != null) {
@ -325,8 +312,10 @@ public class ChatOrUserCell extends BaseCell {
} }
nameString = nameString2.replace("\n", " "); nameString = nameString2.replace("\n", " ");
} }
}
if (nameString.length() == 0) { if (nameString.length() == 0) {
if (user.phone != null && user.phone.length() != 0) {
nameString = PhoneFormat.getInstance().format("+" + user.phone);
}
nameString = LocaleController.getString("HiddenName", R.string.HiddenName); nameString = LocaleController.getString("HiddenName", R.string.HiddenName);
} }
if (encryptedChat != null) { if (encryptedChat != null) {
@ -335,7 +324,7 @@ public class ChatOrUserCell extends BaseCell {
currentNamePaint = namePaint; currentNamePaint = namePaint;
} }
if (!Utilities.isRTL) { if (!LocaleController.isRTL) {
onlineWidth = nameWidth = width - nameLeft - Utilities.dp(3 + (usePadding ? 11 : 0)); onlineWidth = nameWidth = width - nameLeft - Utilities.dp(3 + (usePadding ? 11 : 0));
} else { } else {
onlineWidth = nameWidth = width - nameLeft - Utilities.dp(61 + (usePadding ? 11 : 0)); onlineWidth = nameWidth = width - nameLeft - Utilities.dp(61 + (usePadding ? 11 : 0));
@ -348,7 +337,7 @@ public class ChatOrUserCell extends BaseCell {
nameLayout = new StaticLayout(nameStringFinal, currentNamePaint, nameWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false); nameLayout = new StaticLayout(nameStringFinal, currentNamePaint, nameWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
if (chat == null) { if (chat == null) {
if (!Utilities.isRTL) { if (!LocaleController.isRTL) {
onlineLeft = Utilities.dp(61 + (usePadding ? 11 : 0)); onlineLeft = Utilities.dp(61 + (usePadding ? 11 : 0));
} else { } else {
onlineLeft = usePadding ? Utilities.dp(11) : 0; onlineLeft = usePadding ? Utilities.dp(11) : 0;
@ -372,7 +361,7 @@ public class ChatOrUserCell extends BaseCell {
if (user.status.expires <= 10000) { if (user.status.expires <= 10000) {
onlineString = getResources().getString(R.string.Invisible); onlineString = getResources().getString(R.string.Invisible);
} else { } else {
onlineString = Utilities.formatDateOnline(user.status.expires); onlineString = LocaleController.formatDateOnline(user.status.expires);
} }
} }
} }
@ -387,7 +376,7 @@ public class ChatOrUserCell extends BaseCell {
nameTop = Utilities.dp(22); nameTop = Utilities.dp(22);
} }
if (!Utilities.isRTL) { if (!LocaleController.isRTL) {
avatarLeft = usePadding ? Utilities.dp(11) : 0; avatarLeft = usePadding ? Utilities.dp(11) : 0;
} else { } else {
avatarLeft = width - Utilities.dp(50 + (usePadding ? 11 : 0)); avatarLeft = width - Utilities.dp(50 + (usePadding ? 11 : 0));
@ -399,7 +388,7 @@ public class ChatOrUserCell extends BaseCell {
double widthpx = 0; double widthpx = 0;
float left = 0; float left = 0;
if (Utilities.isRTL) { if (LocaleController.isRTL) {
if (nameLayout.getLineCount() > 0) { if (nameLayout.getLineCount() > 0) {
left = nameLayout.getLineLeft(0); left = nameLayout.getLineLeft(0);
if (left == 0) { if (left == 0) {

View file

@ -359,7 +359,7 @@ public class DialogCell extends BaseCell {
if (encryptedChat != null) { if (encryptedChat != null) {
drawNameLock = true; drawNameLock = true;
if (!Utilities.isRTL) { if (!LocaleController.isRTL) {
nameLockLeft = Utilities.dp(77); nameLockLeft = Utilities.dp(77);
nameLeft = Utilities.dp(81) + lockDrawable.getIntrinsicWidth(); nameLeft = Utilities.dp(81) + lockDrawable.getIntrinsicWidth();
} else { } else {
@ -368,7 +368,7 @@ public class DialogCell extends BaseCell {
} }
} else { } else {
drawNameLock = false; drawNameLock = false;
if (!Utilities.isRTL) { if (!LocaleController.isRTL) {
nameLeft = Utilities.dp(77); nameLeft = Utilities.dp(77);
} else { } else {
nameLeft = Utilities.dp(14); nameLeft = Utilities.dp(14);
@ -407,7 +407,7 @@ public class DialogCell extends BaseCell {
} }
} }
if (currentDialog.last_message_date != 0) { if (currentDialog.last_message_date != 0) {
timeString = Utilities.stringForMessageListDate(currentDialog.last_message_date); timeString = LocaleController.stringForMessageListDate(currentDialog.last_message_date);
} }
drawCheck1 = false; drawCheck1 = false;
drawCheck2 = false; drawCheck2 = false;
@ -418,9 +418,9 @@ public class DialogCell extends BaseCell {
TLRPC.User fromUser = MessagesController.getInstance().users.get(message.messageOwner.from_id); TLRPC.User fromUser = MessagesController.getInstance().users.get(message.messageOwner.from_id);
if (currentDialog.last_message_date != 0) { if (currentDialog.last_message_date != 0) {
timeString = Utilities.stringForMessageListDate(currentDialog.last_message_date); timeString = LocaleController.stringForMessageListDate(currentDialog.last_message_date);
} else { } else {
timeString = Utilities.stringForMessageListDate(message.messageOwner.date); timeString = LocaleController.stringForMessageListDate(message.messageOwner.date);
} }
if (printingString != null) { if (printingString != null) {
lastPrintString = messageString = printingString; lastPrintString = messageString = printingString;
@ -508,7 +508,7 @@ public class DialogCell extends BaseCell {
timeWidth = (int)Math.ceil(timePaint.measureText(timeString)); timeWidth = (int)Math.ceil(timePaint.measureText(timeString));
timeLayout = new StaticLayout(timeString, timePaint, timeWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false); timeLayout = new StaticLayout(timeString, timePaint, timeWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
if (!Utilities.isRTL) { if (!LocaleController.isRTL) {
timeLeft = width - Utilities.dp(11) - timeWidth; timeLeft = width - Utilities.dp(11) - timeWidth;
} else { } else {
timeLeft = Utilities.dp(11); timeLeft = Utilities.dp(11);
@ -539,7 +539,7 @@ public class DialogCell extends BaseCell {
nameString = LocaleController.getString("HiddenName", R.string.HiddenName); nameString = LocaleController.getString("HiddenName", R.string.HiddenName);
} }
if (!Utilities.isRTL) { if (!LocaleController.isRTL) {
nameWidth = width - nameLeft - Utilities.dp(14) - timeWidth; nameWidth = width - nameLeft - Utilities.dp(14) - timeWidth;
} else { } else {
nameWidth = width - nameLeft - Utilities.dp(77) - timeWidth; nameWidth = width - nameLeft - Utilities.dp(77) - timeWidth;
@ -551,7 +551,7 @@ public class DialogCell extends BaseCell {
if (drawClock) { if (drawClock) {
int w = clockDrawable.getIntrinsicWidth() + Utilities.dp(2); int w = clockDrawable.getIntrinsicWidth() + Utilities.dp(2);
nameWidth -= w; nameWidth -= w;
if (!Utilities.isRTL) { if (!LocaleController.isRTL) {
checkDrawLeft = timeLeft - w; checkDrawLeft = timeLeft - w;
} else { } else {
checkDrawLeft = timeLeft + timeWidth + Utilities.dp(2); checkDrawLeft = timeLeft + timeWidth + Utilities.dp(2);
@ -562,7 +562,7 @@ public class DialogCell extends BaseCell {
nameWidth -= w; nameWidth -= w;
if (drawCheck1) { if (drawCheck1) {
nameWidth -= halfCheckDrawable.getIntrinsicWidth() - Utilities.dp(5); nameWidth -= halfCheckDrawable.getIntrinsicWidth() - Utilities.dp(5);
if (!Utilities.isRTL) { if (!LocaleController.isRTL) {
halfCheckDrawLeft = timeLeft - w; halfCheckDrawLeft = timeLeft - w;
checkDrawLeft = halfCheckDrawLeft - Utilities.dp(5); checkDrawLeft = halfCheckDrawLeft - Utilities.dp(5);
} else { } else {
@ -571,7 +571,7 @@ public class DialogCell extends BaseCell {
nameLeft += w + halfCheckDrawable.getIntrinsicWidth() - Utilities.dp(5); nameLeft += w + halfCheckDrawable.getIntrinsicWidth() - Utilities.dp(5);
} }
} else { } else {
if (!Utilities.isRTL) { if (!LocaleController.isRTL) {
checkDrawLeft = timeLeft - w; checkDrawLeft = timeLeft - w;
} else { } else {
checkDrawLeft = timeLeft + timeWidth + Utilities.dp(2); checkDrawLeft = timeLeft + timeWidth + Utilities.dp(2);
@ -584,7 +584,7 @@ public class DialogCell extends BaseCell {
nameLayout = new StaticLayout(nameStringFinal, currentNamePaint, nameWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false); nameLayout = new StaticLayout(nameStringFinal, currentNamePaint, nameWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
messageWidth = width - Utilities.dp(88); messageWidth = width - Utilities.dp(88);
if (!Utilities.isRTL) { if (!LocaleController.isRTL) {
messageLeft = Utilities.dp(77); messageLeft = Utilities.dp(77);
avatarLeft = Utilities.dp(11); avatarLeft = Utilities.dp(11);
} else { } else {
@ -598,7 +598,7 @@ public class DialogCell extends BaseCell {
if (drawError) { if (drawError) {
int w = errorDrawable.getIntrinsicWidth() + Utilities.dp(8); int w = errorDrawable.getIntrinsicWidth() + Utilities.dp(8);
messageWidth -= w; messageWidth -= w;
if (!Utilities.isRTL) { if (!LocaleController.isRTL) {
errorLeft = width - errorDrawable.getIntrinsicWidth() - Utilities.dp(11); errorLeft = width - errorDrawable.getIntrinsicWidth() - Utilities.dp(11);
} else { } else {
errorLeft = Utilities.dp(11); errorLeft = Utilities.dp(11);
@ -609,7 +609,7 @@ public class DialogCell extends BaseCell {
countLayout = new StaticLayout(countString, countPaint, countWidth, Layout.Alignment.ALIGN_CENTER, 1.0f, 0.0f, false); countLayout = new StaticLayout(countString, countPaint, countWidth, Layout.Alignment.ALIGN_CENTER, 1.0f, 0.0f, false);
int w = countWidth + Utilities.dp(18); int w = countWidth + Utilities.dp(18);
messageWidth -= w; messageWidth -= w;
if (!Utilities.isRTL) { if (!LocaleController.isRTL) {
countLeft = width - countWidth - Utilities.dp(16); countLeft = width - countWidth - Utilities.dp(16);
} else { } else {
countLeft = Utilities.dp(16); countLeft = Utilities.dp(16);
@ -636,7 +636,7 @@ public class DialogCell extends BaseCell {
double widthpx = 0; double widthpx = 0;
float left = 0; float left = 0;
if (Utilities.isRTL) { if (LocaleController.isRTL) {
if (nameLayout.getLineCount() > 0) { if (nameLayout.getLineCount() > 0) {
left = nameLayout.getLineLeft(0); left = nameLayout.getLineLeft(0);
if (left == 0) { if (left == 0) {

View file

@ -1315,7 +1315,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
if (currentUser.status.expires <= 10000) { if (currentUser.status.expires <= 10000) {
actionBar.setSubtitle(LocaleController.getString("Invisible", R.string.Invisible)); actionBar.setSubtitle(LocaleController.getString("Invisible", R.string.Invisible));
} else { } else {
actionBar.setSubtitle(Utilities.formatDateOnline(currentUser.status.expires)); actionBar.setSubtitle(LocaleController.formatDateOnline(currentUser.status.expires));
} }
} }
} }
@ -1624,7 +1624,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
messagesByDays.put(obj.dateKey, dayArray); messagesByDays.put(obj.dateKey, dayArray);
TLRPC.Message dateMsg = new TLRPC.Message(); TLRPC.Message dateMsg = new TLRPC.Message();
dateMsg.message = Utilities.formatDateChat(obj.messageOwner.date); dateMsg.message = LocaleController.formatDateChat(obj.messageOwner.date);
dateMsg.id = 0; dateMsg.id = 0;
MessageObject dateObj = new MessageObject(dateMsg, null); MessageObject dateObj = new MessageObject(dateMsg, null);
dateObj.type = 10; dateObj.type = 10;
@ -1902,7 +1902,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
messagesByDays.put(obj.dateKey, dayArray); messagesByDays.put(obj.dateKey, dayArray);
TLRPC.Message dateMsg = new TLRPC.Message(); TLRPC.Message dateMsg = new TLRPC.Message();
dateMsg.message = Utilities.formatDateChat(obj.messageOwner.date); dateMsg.message = LocaleController.formatDateChat(obj.messageOwner.date);
dateMsg.id = 0; dateMsg.id = 0;
MessageObject dateObj = new MessageObject(dateMsg, null); MessageObject dateObj = new MessageObject(dateMsg, null);
dateObj.type = 10; dateObj.type = 10;
@ -3557,7 +3557,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
int type = message.type; int type = message.type;
if (timeTextView != null) { if (timeTextView != null) {
timeTextView.setText(Utilities.formatterDay.format((long) (message.messageOwner.date) * 1000)); timeTextView.setText(LocaleController.formatterDay.format((long) (message.messageOwner.date) * 1000));
} }
if (avatarImageView != null && fromUser != null) { if (avatarImageView != null && fromUser != null) {

View file

@ -684,7 +684,6 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
if (view == null) { if (view == null) {
view = new ChatOrUserCell(mContext); view = new ChatOrUserCell(mContext);
((ChatOrUserCell)view).useBoldFont = true;
((ChatOrUserCell)view).usePadding = false; ((ChatOrUserCell)view).usePadding = false;
((ChatOrUserCell)view).useSeparator = true; ((ChatOrUserCell)view).useSeparator = true;
} }

View file

@ -141,7 +141,7 @@ public class ContactAddActivity extends BaseFragment implements NotificationCent
if (user.status.expires <= 10000) { if (user.status.expires <= 10000) {
onlineText.setText(LocaleController.getString("Invisible", R.string.Invisible)); onlineText.setText(LocaleController.getString("Invisible", R.string.Invisible));
} else { } else {
onlineText.setText(Utilities.formatDateOnline(user.status.expires)); onlineText.setText(LocaleController.formatDateOnline(user.status.expires));
} }
} }
} }

View file

@ -70,7 +70,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
public int selectAlertString = 0; public int selectAlertString = 0;
public String selectAlertStringDesc = null; public String selectAlertStringDesc = null;
private SearchView searchView; private SearchView searchView;
private TextView epmtyTextView; private TextView emptyTextView;
private HashMap<Integer, TLRPC.User> ignoreUsers; private HashMap<Integer, TLRPC.User> ignoreUsers;
private SupportMenuItem searchItem; private SupportMenuItem searchItem;
@ -145,12 +145,12 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
fragmentView = inflater.inflate(R.layout.contacts_layout, container, false); fragmentView = inflater.inflate(R.layout.contacts_layout, container, false);
epmtyTextView = (TextView)fragmentView.findViewById(R.id.searchEmptyView); emptyTextView = (TextView)fragmentView.findViewById(R.id.searchEmptyView);
epmtyTextView.setText(LocaleController.getString("NoContacts", R.string.NoContacts)); emptyTextView.setText(LocaleController.getString("NoContacts", R.string.NoContacts));
searchListViewAdapter = new ContactsActivitySearchAdapter(parentActivity, ignoreUsers); searchListViewAdapter = new ContactsActivitySearchAdapter(parentActivity, ignoreUsers);
listView = (PinnedHeaderListView)fragmentView.findViewById(R.id.listView); listView = (PinnedHeaderListView)fragmentView.findViewById(R.id.listView);
listView.setEmptyView(epmtyTextView); listView.setEmptyView(emptyTextView);
listView.setVerticalScrollBarEnabled(false); listView.setVerticalScrollBarEnabled(false);
listViewAdapter = new ContactsActivityAdapter(parentActivity, onlyUsers, usersAsSections, ignoreUsers); listViewAdapter = new ContactsActivityAdapter(parentActivity, onlyUsers, usersAsSections, ignoreUsers);
@ -284,7 +284,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
} }
} }
}); });
epmtyTextView.setOnTouchListener(new OnSwipeTouchListener() { emptyTextView.setOnTouchListener(new OnSwipeTouchListener() {
public void onSwipeRight() { public void onSwipeRight() {
finishFragment(true); finishFragment(true);
if (searchItem != null) { if (searchItem != null) {
@ -444,8 +444,8 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
listView.setFastScrollEnabled(false); listView.setFastScrollEnabled(false);
listView.setVerticalScrollBarEnabled(true); listView.setVerticalScrollBarEnabled(true);
} }
if (epmtyTextView != null) { if (emptyTextView != null) {
epmtyTextView.setText(LocaleController.getString("NoResult", R.string.NoResult)); emptyTextView.setText(LocaleController.getString("NoResult", R.string.NoResult));
} }
} }
return true; return true;
@ -474,7 +474,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
searchWas = false; searchWas = false;
ViewGroup group = (ViewGroup) listView.getParent(); ViewGroup group = (ViewGroup) listView.getParent();
listView.setAdapter(listViewAdapter); listView.setAdapter(listViewAdapter);
if (!Utilities.isRTL) { if (!LocaleController.isRTL) {
listView.setPadding(Utilities.dp(16), listView.getPaddingTop(), Utilities.dp(30), listView.getPaddingBottom()); listView.setPadding(Utilities.dp(16), listView.getPaddingTop(), Utilities.dp(30), listView.getPaddingBottom());
} else { } else {
listView.setPadding(Utilities.dp(30), listView.getPaddingTop(), Utilities.dp(16), listView.getPaddingBottom()); listView.setPadding(Utilities.dp(30), listView.getPaddingTop(), Utilities.dp(16), listView.getPaddingBottom());
@ -486,7 +486,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
listView.setVerticalScrollBarEnabled(false); listView.setVerticalScrollBarEnabled(false);
((LaunchActivity)parentActivity).updateActionBar(); ((LaunchActivity)parentActivity).updateActionBar();
epmtyTextView.setText(LocaleController.getString("NoContacts", R.string.NoContacts)); emptyTextView.setText(LocaleController.getString("NoContacts", R.string.NoContacts));
return true; return true;
} }
}); });

View file

@ -29,6 +29,7 @@ import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import org.telegram.messenger.FileLog; import org.telegram.messenger.FileLog;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.R; import org.telegram.messenger.R;
import org.telegram.messenger.Utilities; import org.telegram.messenger.Utilities;
import org.telegram.ui.Views.PinnedHeaderListView; import org.telegram.ui.Views.PinnedHeaderListView;
@ -52,11 +53,11 @@ public class CountrySelectActivity extends ActionBarActivity {
private boolean searchWas; private boolean searchWas;
private boolean searching; private boolean searching;
private BaseAdapter searchListViewAdapter; private BaseAdapter searchListViewAdapter;
private TextView epmtyTextView; private TextView emptyTextView;
private HashMap<String, ArrayList<Country>> countries = new HashMap<String, ArrayList<Country>>(); private HashMap<String, ArrayList<Country>> countries = new HashMap<String, ArrayList<Country>>();
private ArrayList<String> sortedCountries = new ArrayList<String>(); private ArrayList<String> sortedCountries = new ArrayList<String>();
private Timer searchDialogsTimer; private Timer searchTimer;
public ArrayList<Country> searchResult; public ArrayList<Country> searchResult;
public static class Country { public static class Country {
@ -112,11 +113,11 @@ public class CountrySelectActivity extends ActionBarActivity {
setContentView(R.layout.country_select_layout); setContentView(R.layout.country_select_layout);
epmtyTextView = (TextView)findViewById(R.id.searchEmptyView); emptyTextView = (TextView)findViewById(R.id.searchEmptyView);
searchListViewAdapter = new SearchAdapter(this); searchListViewAdapter = new SearchAdapter(this);
listView = (PinnedHeaderListView)findViewById(R.id.listView); listView = (PinnedHeaderListView)findViewById(R.id.listView);
listView.setEmptyView(epmtyTextView); listView.setEmptyView(emptyTextView);
listView.setVerticalScrollBarEnabled(false); listView.setVerticalScrollBarEnabled(false);
listView.setAdapter(listViewAdapter = new ListAdapter(this)); listView.setAdapter(listViewAdapter = new ListAdapter(this));
@ -221,7 +222,7 @@ public class CountrySelectActivity extends ActionBarActivity {
@Override @Override
public boolean onQueryTextChange(String s) { public boolean onQueryTextChange(String s) {
searchDialogs(s); search(s);
if (s.length() != 0) { if (s.length() != 0) {
searchWas = true; searchWas = true;
if (listView != null) { if (listView != null) {
@ -233,8 +234,8 @@ public class CountrySelectActivity extends ActionBarActivity {
listView.setFastScrollEnabled(false); listView.setFastScrollEnabled(false);
listView.setVerticalScrollBarEnabled(true); listView.setVerticalScrollBarEnabled(true);
} }
if (epmtyTextView != null) { if (emptyTextView != null) {
epmtyTextView.setText(getString(R.string.NoResult)); emptyTextView.setText(getString(R.string.NoResult));
} }
} }
return true; return true;
@ -252,12 +253,12 @@ public class CountrySelectActivity extends ActionBarActivity {
@Override @Override
public boolean onMenuItemActionCollapse(MenuItem menuItem) { public boolean onMenuItemActionCollapse(MenuItem menuItem) {
searchView.setQuery("", false); searchView.setQuery("", false);
searchDialogs(null); search(null);
searching = false; searching = false;
searchWas = false; searchWas = false;
ViewGroup group = (ViewGroup) listView.getParent(); ViewGroup group = (ViewGroup) listView.getParent();
listView.setAdapter(listViewAdapter); listView.setAdapter(listViewAdapter);
if (!Utilities.isRTL) { if (!LocaleController.isRTL) {
listView.setPadding(Utilities.dp(16), listView.getPaddingTop(), Utilities.dp(30), listView.getPaddingBottom()); listView.setPadding(Utilities.dp(16), listView.getPaddingTop(), Utilities.dp(30), listView.getPaddingBottom());
} else { } else {
listView.setPadding(Utilities.dp(30), listView.getPaddingTop(), Utilities.dp(16), listView.getPaddingBottom()); listView.setPadding(Utilities.dp(30), listView.getPaddingTop(), Utilities.dp(16), listView.getPaddingBottom());
@ -269,7 +270,7 @@ public class CountrySelectActivity extends ActionBarActivity {
listView.setVerticalScrollBarEnabled(false); listView.setVerticalScrollBarEnabled(false);
applySelfActionBar(); applySelfActionBar();
epmtyTextView.setText(getString(R.string.ChooseCountry)); emptyTextView.setText(getString(R.string.ChooseCountry));
return true; return true;
} }
}); });
@ -305,24 +306,24 @@ public class CountrySelectActivity extends ActionBarActivity {
} }
} }
public void searchDialogs(final String query) { public void search(final String query) {
if (query == null) { if (query == null) {
searchResult = null; searchResult = null;
} else { } else {
try { try {
if (searchDialogsTimer != null) { if (searchTimer != null) {
searchDialogsTimer.cancel(); searchTimer.cancel();
} }
} catch (Exception e) { } catch (Exception e) {
FileLog.e("tmessages", e); FileLog.e("tmessages", e);
} }
searchDialogsTimer = new Timer(); searchTimer = new Timer();
searchDialogsTimer.schedule(new TimerTask() { searchTimer.schedule(new TimerTask() {
@Override @Override
public void run() { public void run() {
try { try {
searchDialogsTimer.cancel(); searchTimer.cancel();
searchDialogsTimer = null; searchTimer = null;
} catch (Exception e) { } catch (Exception e) {
FileLog.e("tmessages", e); FileLog.e("tmessages", e);
} }

View file

@ -374,9 +374,9 @@ public class GalleryImageViewer extends AbstractGalleryActivity implements Notif
Utilities.RunOnUIThread(new Runnable() { Utilities.RunOnUIThread(new Runnable() {
@Override @Override
public void run() { public void run() {
getSupportActionBar().setTitle(String.format("%d %s %d", pos, LocaleController.getString("Of", R.string.Of), totalCount)); getSupportActionBar().setTitle(LocaleController.formatString("Of", R.string.Of, pos, totalCount));
if (title != null) { if (title != null) {
fakeTitleView.setText(String.format("%d %s %d", pos, LocaleController.getString("Of", R.string.Of), totalCount)); fakeTitleView.setText(LocaleController.formatString("Of", R.string.Of, pos, totalCount));
fakeTitleView.measure(View.MeasureSpec.makeMeasureSpec(400, View.MeasureSpec.AT_MOST), View.MeasureSpec.makeMeasureSpec(100, View.MeasureSpec.AT_MOST)); fakeTitleView.measure(View.MeasureSpec.makeMeasureSpec(400, View.MeasureSpec.AT_MOST), View.MeasureSpec.makeMeasureSpec(100, View.MeasureSpec.AT_MOST));
title.setWidth(fakeTitleView.getMeasuredWidth() + Utilities.dp(8)); title.setWidth(fakeTitleView.getMeasuredWidth() + Utilities.dp(8));
title.setMaxWidth(fakeTitleView.getMeasuredWidth() + Utilities.dp(8)); title.setMaxWidth(fakeTitleView.getMeasuredWidth() + Utilities.dp(8));
@ -565,7 +565,7 @@ public class GalleryImageViewer extends AbstractGalleryActivity implements Notif
TLRPC.User user = MessagesController.getInstance().users.get(obj.messageOwner.from_id); TLRPC.User user = MessagesController.getInstance().users.get(obj.messageOwner.from_id);
if (user != null) { if (user != null) {
nameTextView.setText(Utilities.formatName(user.first_name, user.last_name)); nameTextView.setText(Utilities.formatName(user.first_name, user.last_name));
timeTextView.setText(Utilities.formatterYearMax.format(((long)obj.messageOwner.date) * 1000)); timeTextView.setText(LocaleController.formatterYearMax.format(((long)obj.messageOwner.date) * 1000));
} else { } else {
nameTextView.setText(""); nameTextView.setText("");
} }
@ -866,9 +866,9 @@ public class GalleryImageViewer extends AbstractGalleryActivity implements Notif
Utilities.RunOnUIThread(new Runnable() { Utilities.RunOnUIThread(new Runnable() {
@Override @Override
public void run() { public void run() {
getSupportActionBar().setTitle(String.format("%d %s %d", (totalCount - imagesArr.size()) + position + 1, LocaleController.getString("Of", R.string.Of), totalCount)); getSupportActionBar().setTitle(LocaleController.formatString("Of", R.string.Of, (totalCount - imagesArr.size()) + position + 1, totalCount));
if (title != null) { if (title != null) {
fakeTitleView.setText(String.format("%d %s %d", (totalCount - imagesArr.size()) + position + 1, LocaleController.getString("Of", R.string.Of), totalCount)); fakeTitleView.setText(LocaleController.formatString("Of", R.string.Of, (totalCount - imagesArr.size()) + position + 1, totalCount));
fakeTitleView.measure(View.MeasureSpec.makeMeasureSpec(400, View.MeasureSpec.AT_MOST), View.MeasureSpec.makeMeasureSpec(100, View.MeasureSpec.AT_MOST)); fakeTitleView.measure(View.MeasureSpec.makeMeasureSpec(400, View.MeasureSpec.AT_MOST), View.MeasureSpec.makeMeasureSpec(100, View.MeasureSpec.AT_MOST));
title.setWidth(fakeTitleView.getMeasuredWidth() + Utilities.dp(8)); title.setWidth(fakeTitleView.getMeasuredWidth() + Utilities.dp(8));
title.setMaxWidth(fakeTitleView.getMeasuredWidth() + Utilities.dp(8)); title.setMaxWidth(fakeTitleView.getMeasuredWidth() + Utilities.dp(8));
@ -885,9 +885,9 @@ public class GalleryImageViewer extends AbstractGalleryActivity implements Notif
Utilities.RunOnUIThread(new Runnable() { Utilities.RunOnUIThread(new Runnable() {
@Override @Override
public void run() { public void run() {
getSupportActionBar().setTitle(String.format("%d %s %d", position + 1, LocaleController.getString("Of", R.string.Of), imagesArrLocations.size())); getSupportActionBar().setTitle(LocaleController.formatString("Of", R.string.Of, position + 1, imagesArrLocations.size()));
if (title != null) { if (title != null) {
fakeTitleView.setText(String.format("%d %s %d", position + 1, LocaleController.getString("Of", R.string.Of), imagesArrLocations.size())); fakeTitleView.setText(LocaleController.formatString("Of", R.string.Of, position + 1, imagesArrLocations.size()));
fakeTitleView.measure(View.MeasureSpec.makeMeasureSpec(400, View.MeasureSpec.AT_MOST), View.MeasureSpec.makeMeasureSpec(100, View.MeasureSpec.AT_MOST)); fakeTitleView.measure(View.MeasureSpec.makeMeasureSpec(400, View.MeasureSpec.AT_MOST), View.MeasureSpec.makeMeasureSpec(100, View.MeasureSpec.AT_MOST));
title.setWidth(fakeTitleView.getMeasuredWidth() + Utilities.dp(8)); title.setWidth(fakeTitleView.getMeasuredWidth() + Utilities.dp(8));
title.setMaxWidth(fakeTitleView.getMeasuredWidth() + Utilities.dp(8)); title.setMaxWidth(fakeTitleView.getMeasuredWidth() + Utilities.dp(8));

View file

@ -18,7 +18,6 @@ import android.os.Bundle;
import android.support.v4.internal.view.SupportMenuItem; import android.support.v4.internal.view.SupportMenuItem;
import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBar;
import android.text.Editable; import android.text.Editable;
import android.text.Html;
import android.text.Spannable; import android.text.Spannable;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.SpannableStringBuilder; import android.text.SpannableStringBuilder;
@ -35,6 +34,7 @@ import android.widget.EditText;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import org.telegram.PhoneFormat.PhoneFormat;
import org.telegram.messenger.LocaleController; import org.telegram.messenger.LocaleController;
import org.telegram.messenger.TLRPC; import org.telegram.messenger.TLRPC;
import org.telegram.messenger.ConnectionsManager; import org.telegram.messenger.ConnectionsManager;
@ -59,10 +59,8 @@ import java.util.TimerTask;
public class GroupCreateActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate { public class GroupCreateActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate {
private SectionedBaseAdapter listViewAdapter; private SectionedBaseAdapter listViewAdapter;
private PinnedHeaderListView listView; private PinnedHeaderListView listView;
private TextView epmtyTextView; private TextView emptyTextView;
private TextView doneTextView;
private EditText userSelectEditText; private EditText userSelectEditText;
private TextView countTextView;
private boolean ignoreChange = false; private boolean ignoreChange = false;
private HashMap<Integer, Emoji.XImageSpan> selectedContacts = new HashMap<Integer, Emoji.XImageSpan>(); private HashMap<Integer, Emoji.XImageSpan> selectedContacts = new HashMap<Integer, Emoji.XImageSpan>();
@ -70,7 +68,7 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
private boolean searchWas; private boolean searchWas;
private boolean searching; private boolean searching;
private Timer searchDialogsTimer; private Timer searchTimer;
public ArrayList<TLRPC.User> searchResult; public ArrayList<TLRPC.User> searchResult;
public ArrayList<CharSequence> searchResultNames; public ArrayList<CharSequence> searchResultNames;
@ -113,11 +111,10 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
fragmentView = inflater.inflate(R.layout.group_create_layout, container, false); fragmentView = inflater.inflate(R.layout.group_create_layout, container, false);
epmtyTextView = (TextView)fragmentView.findViewById(R.id.searchEmptyView); emptyTextView = (TextView)fragmentView.findViewById(R.id.searchEmptyView);
epmtyTextView.setText(LocaleController.getString("NoContacts", R.string.NoContacts)); emptyTextView.setText(LocaleController.getString("NoContacts", R.string.NoContacts));
userSelectEditText = (EditText)fragmentView.findViewById(R.id.bubble_input_text); userSelectEditText = (EditText)fragmentView.findViewById(R.id.bubble_input_text);
userSelectEditText.setHint(LocaleController.getString("SendMessageTo", R.string.SendMessageTo)); userSelectEditText.setHint(LocaleController.getString("SendMessageTo", R.string.SendMessageTo));
countTextView = (TextView)fragmentView.findViewById(R.id.bubble_counter_text);
if (Build.VERSION.SDK_INT >= 11) { if (Build.VERSION.SDK_INT >= 11) {
userSelectEditText.setTextIsSelectable(false); userSelectEditText.setTextIsSelectable(false);
} }
@ -159,12 +156,10 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
selectedContacts.remove(sp.uid); selectedContacts.remove(sp.uid);
} }
} }
if (selectedContacts.isEmpty()) { if (parentActivity != null) {
doneTextView.setText(LocaleController.getString("Done", R.string.Done)); ActionBar actionBar = parentActivity.getSupportActionBar();
} else { actionBar.setSubtitle(String.format("%d/200 %s", selectedContacts.size(), LocaleController.getString("Members", R.string.Members)));
doneTextView.setText(LocaleController.getString("Done", R.string.Done) + " (" + selectedContacts.size() + ")");
} }
countTextView.setText(selectedContacts.size() + "/200");
listView.invalidateViews(); listView.invalidateViews();
} else { } else {
search = true; search = true;
@ -178,14 +173,14 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
searchDialogs(text); searchDialogs(text);
searching = true; searching = true;
searchWas = true; searchWas = true;
epmtyTextView.setText(LocaleController.getString("NoResult", R.string.NoResult)); emptyTextView.setText(LocaleController.getString("NoResult", R.string.NoResult));
listViewAdapter.notifyDataSetChanged(); listViewAdapter.notifyDataSetChanged();
} else { } else {
searchResult = null; searchResult = null;
searchResultNames = null; searchResultNames = null;
searching = false; searching = false;
searchWas = false; searchWas = false;
epmtyTextView.setText(LocaleController.getString("NoContacts", R.string.NoContacts)); emptyTextView.setText(LocaleController.getString("NoContacts", R.string.NoContacts));
listViewAdapter.notifyDataSetChanged(); listViewAdapter.notifyDataSetChanged();
} }
} }
@ -194,7 +189,7 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
}); });
listView = (PinnedHeaderListView)fragmentView.findViewById(R.id.listView); listView = (PinnedHeaderListView)fragmentView.findViewById(R.id.listView);
listView.setEmptyView(epmtyTextView); listView.setEmptyView(emptyTextView);
listView.setVerticalScrollBarEnabled(false); listView.setVerticalScrollBarEnabled(false);
listView.setAdapter(listViewAdapter = new ListAdapter(parentActivity)); listView.setAdapter(listViewAdapter = new ListAdapter(parentActivity));
@ -230,16 +225,14 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
span.uid = user.id; span.uid = user.id;
ignoreChange = false; ignoreChange = false;
} }
if (selectedContacts.isEmpty()) { if (parentActivity != null) {
doneTextView.setText(LocaleController.getString("Done", R.string.Done)); ActionBar actionBar = parentActivity.getSupportActionBar();
} else { actionBar.setSubtitle(String.format("%d/200 %s", selectedContacts.size(), LocaleController.getString("Members", R.string.Members)));
doneTextView.setText(LocaleController.getString("Done", R.string.Done) + " (" + selectedContacts.size() + ")");
} }
countTextView.setText(selectedContacts.size() + "/200");
if (searching || searchWas) { if (searching || searchWas) {
searching = false; searching = false;
searchWas = false; searchWas = false;
epmtyTextView.setText(LocaleController.getString("NoContacts", R.string.NoContacts)); emptyTextView.setText(LocaleController.getString("NoContacts", R.string.NoContacts));
ignoreChange = true; ignoreChange = true;
SpannableStringBuilder ssb = new SpannableStringBuilder(""); SpannableStringBuilder ssb = new SpannableStringBuilder("");
@ -279,6 +272,7 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
actionBar.setDisplayShowCustomEnabled(false); actionBar.setDisplayShowCustomEnabled(false);
actionBar.setCustomView(null); actionBar.setCustomView(null);
actionBar.setTitle(LocaleController.getString("NewGroup", R.string.NewGroup)); actionBar.setTitle(LocaleController.getString("NewGroup", R.string.NewGroup));
actionBar.setSubtitle(String.format("%d/200 %s", selectedContacts.size(), LocaleController.getString("Members", R.string.Members)));
TextView title = (TextView)parentActivity.findViewById(R.id.action_bar_title); TextView title = (TextView)parentActivity.findViewById(R.id.action_bar_title);
if (title == null) { if (title == null) {
@ -305,7 +299,11 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
LayoutInflater lf = (LayoutInflater)parentActivity.getSystemService(Activity.LAYOUT_INFLATER_SERVICE); LayoutInflater lf = (LayoutInflater)parentActivity.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
View textView = lf.inflate(R.layout.group_create_bubble, null); View textView = lf.inflate(R.layout.group_create_bubble, null);
TextView text = (TextView)textView.findViewById(R.id.bubble_text_view); TextView text = (TextView)textView.findViewById(R.id.bubble_text_view);
text.setText(Utilities.formatName(user.first_name, user.last_name)); String name = Utilities.formatName(user.first_name, user.last_name);
if (name.length() == 0 && user.phone != null && user.phone.length() != 0) {
name = PhoneFormat.getInstance().format("+" + user.phone);
}
text.setText(name + ", ");
int spec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED); int spec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
textView.measure(spec, spec); textView.measure(spec, spec);
@ -341,19 +339,19 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
searchResultNames = null; searchResultNames = null;
} else { } else {
try { try {
if (searchDialogsTimer != null) { if (searchTimer != null) {
searchDialogsTimer.cancel(); searchTimer.cancel();
} }
} catch (Exception e) { } catch (Exception e) {
FileLog.e("tmessages", e); FileLog.e("tmessages", e);
} }
searchDialogsTimer = new Timer(); searchTimer = new Timer();
searchDialogsTimer.schedule(new TimerTask() { searchTimer.schedule(new TimerTask() {
@Override @Override
public void run() { public void run() {
try { try {
searchDialogsTimer.cancel(); searchTimer.cancel();
searchDialogsTimer = null; searchTimer = null;
} catch (Exception e) { } catch (Exception e) {
FileLog.e("tmessages", e); FileLog.e("tmessages", e);
} }
@ -425,8 +423,8 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
inflater.inflate(R.menu.group_create_menu, menu); inflater.inflate(R.menu.group_create_menu, menu);
SupportMenuItem doneItem = (SupportMenuItem)menu.findItem(R.id.done_menu_item); SupportMenuItem doneItem = (SupportMenuItem)menu.findItem(R.id.done_menu_item);
doneTextView = (TextView)doneItem.getActionView().findViewById(R.id.done_button); TextView doneTextView = (TextView)doneItem.getActionView().findViewById(R.id.done_button);
doneTextView.setText(LocaleController.getString("Done", R.string.Done)); doneTextView.setText(LocaleController.getString("Next", R.string.Next));
doneTextView.setOnClickListener(new View.OnClickListener() { doneTextView.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
@ -525,9 +523,9 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
ImageView checkButton = (ImageView)convertView.findViewById(R.id.settings_row_check_button); ImageView checkButton = (ImageView)convertView.findViewById(R.id.settings_row_check_button);
if (selectedContacts.containsKey(user.id)) { if (selectedContacts.containsKey(user.id)) {
checkButton.setImageResource(R.drawable.btn_check_on_old); checkButton.setImageResource(R.drawable.btn_check_on_holo_light);
} else { } else {
checkButton.setImageResource(R.drawable.btn_check_off_old); checkButton.setImageResource(R.drawable.btn_check_off_holo_light);
} }
View divider = convertView.findViewById(R.id.settings_row_divider); View divider = convertView.findViewById(R.id.settings_row_divider);
@ -540,14 +538,16 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
if (searchWas && searching) { if (searchWas && searching) {
holder.nameTextView.setText(searchResultNames.get(position)); holder.nameTextView.setText(searchResultNames.get(position));
} else { } else {
if (user.first_name.length() != 0 && user.last_name.length() != 0) { String name = Utilities.formatName(user.first_name, user.last_name);
holder.nameTextView.setText(Html.fromHtml(user.first_name + " <b>" + user.last_name + "</b>")); if (name.length() == 0) {
} else if (user.first_name.length() != 0) { if (user.phone != null && user.phone.length() != 0) {
holder.nameTextView.setText(Html.fromHtml("<b>" + user.first_name + "</b>")); name = PhoneFormat.getInstance().format("+" + user.phone);
} else { } else {
holder.nameTextView.setText(Html.fromHtml("<b>" + user.last_name + "</b>")); name = LocaleController.getString("HiddenName", R.string.HiddenName);
} }
} }
holder.nameTextView.setText(name);
}
TLRPC.FileLocation photo = null; TLRPC.FileLocation photo = null;
if (user.photo != null) { if (user.photo != null) {
@ -568,7 +568,7 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
if (user.status.expires <= 10000) { if (user.status.expires <= 10000) {
holder.messageTextView.setText(LocaleController.getString("Invisible", R.string.Invisible)); holder.messageTextView.setText(LocaleController.getString("Invisible", R.string.Invisible));
} else { } else {
holder.messageTextView.setText(Utilities.formatDateOnline(user.status.expires)); holder.messageTextView.setText(LocaleController.formatDateOnline(user.status.expires));
} }
holder.messageTextView.setTextColor(0xff808080); holder.messageTextView.setTextColor(0xff808080);
} }

View file

@ -148,6 +148,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
actionBar.setDisplayUseLogoEnabled(false); actionBar.setDisplayUseLogoEnabled(false);
actionBar.setDisplayShowCustomEnabled(false); actionBar.setDisplayShowCustomEnabled(false);
actionBar.setCustomView(null); actionBar.setCustomView(null);
actionBar.setSubtitle(null);
actionBar.setTitle(LocaleController.getString("NewGroup", R.string.NewGroup)); actionBar.setTitle(LocaleController.getString("NewGroup", R.string.NewGroup));
TextView title = (TextView)parentActivity.findViewById(R.id.action_bar_title); TextView title = (TextView)parentActivity.findViewById(R.id.action_bar_title);
@ -346,7 +347,6 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
if (convertView == null) { if (convertView == null) {
convertView = new ChatOrUserCell(mContext); convertView = new ChatOrUserCell(mContext);
((ChatOrUserCell)convertView).useBoldFont = true;
((ChatOrUserCell)convertView).usePadding = false; ((ChatOrUserCell)convertView).usePadding = false;
} }

View file

@ -44,7 +44,7 @@ public class IntroActivity extends ActionBarActivity {
setContentView(R.layout.intro_layout); setContentView(R.layout.intro_layout);
if (Utilities.isRTL) { if (LocaleController.isRTL) {
icons = new int[] { icons = new int[] {
R.drawable.intro7, R.drawable.intro7,
R.drawable.intro6, R.drawable.intro6,
@ -209,7 +209,7 @@ public class IntroActivity extends ActionBarActivity {
protected void onResume() { protected void onResume() {
super.onResume(); super.onResume();
if (justCreated) { if (justCreated) {
if (Utilities.isRTL) { if (LocaleController.isRTL) {
viewPager.setCurrentItem(6); viewPager.setCurrentItem(6);
lastPage = 6; lastPage = 6;
} else { } else {

View file

@ -0,0 +1,492 @@
/*
* This is the source code of Telegram for Android v. 1.3.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;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.internal.view.SupportMenuItem;
import android.support.v4.view.MenuItemCompat;
import android.support.v7.app.ActionBar;
import android.support.v7.widget.SearchView;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import org.telegram.messenger.FileLog;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.R;
import org.telegram.messenger.Utilities;
import org.telegram.ui.Views.BaseFragment;
import org.telegram.ui.Views.OnSwipeTouchListener;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Timer;
import java.util.TimerTask;
public class LanguageSelectActivity extends BaseFragment {
private SupportMenuItem searchItem;
private SearchView searchView;
private BaseAdapter listAdapter;
private ListView listView;
private boolean searchWas;
private boolean searching;
private BaseAdapter searchListViewAdapter;
private TextView emptyTextView;
private Timer searchTimer;
public ArrayList<LocaleController.LocaleInfo> searchResult;
@Override
public boolean onFragmentCreate() {
super.onFragmentCreate();
return true;
}
@Override
public void onFragmentDestroy() {
super.onFragmentDestroy();
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setHasOptionsMenu(true);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
if (fragmentView == null) {
fragmentView = inflater.inflate(R.layout.language_select_layout, container, false);
listAdapter = new ListAdapter(parentActivity);
listView = (ListView)fragmentView.findViewById(R.id.listView);
listView.setAdapter(listAdapter);
emptyTextView = (TextView)fragmentView.findViewById(R.id.searchEmptyView);
listView.setEmptyView(emptyTextView);
searchListViewAdapter = new SearchAdapter(parentActivity);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
if (parentActivity == null) {
return;
}
LocaleController.LocaleInfo localeInfo = null;
if (searching && searchWas) {
if (i >= 0 && i < searchResult.size()) {
localeInfo = searchResult.get(i);
}
} else {
if (i >= 0 && i < LocaleController.getInstance().sortedLanguages.size()) {
localeInfo = LocaleController.getInstance().sortedLanguages.get(i);
}
}
if (localeInfo != null) {
boolean isRTL = LocaleController.isRTL;
LocaleController.getInstance().applyLanguage(localeInfo, true);
if (isRTL != LocaleController.isRTL) {
for (BaseFragment fragment : ApplicationLoader.fragmentsStack) {
if (fragment == LanguageSelectActivity.this) {
continue;
}
if (fragment.fragmentView != null) {
ViewGroup parent = (ViewGroup)fragment.fragmentView.getParent();
if (parent != null) {
parent.removeView(fragment.fragmentView);
}
fragment.fragmentView = null;
}
fragment.parentActivity = parentActivity;
}
}
}
finishFragment();
}
});
listView.setOnTouchListener(new OnSwipeTouchListener() {
public void onSwipeRight() {
finishFragment(true);
}
});
searching = false;
searchWas = false;
} else {
ViewGroup parent = (ViewGroup)fragmentView.getParent();
if (parent != null) {
parent.removeView(fragmentView);
}
}
return fragmentView;
}
@Override
public void applySelfActionBar() {
if (parentActivity == null) {
return;
}
ActionBar actionBar = parentActivity.getSupportActionBar();
actionBar.setDisplayShowTitleEnabled(true);
actionBar.setDisplayShowHomeEnabled(false);
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setDisplayUseLogoEnabled(false);
actionBar.setDisplayShowCustomEnabled(false);
actionBar.setCustomView(null);
actionBar.setSubtitle(null);
TextView title = (TextView)parentActivity.findViewById(R.id.action_bar_title);
if (title == null) {
final int subtitleId = parentActivity.getResources().getIdentifier("action_bar_title", "id", "android");
title = (TextView)parentActivity.findViewById(subtitleId);
}
if (title != null) {
title.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
title.setCompoundDrawablePadding(0);
}
actionBar.setTitle(LocaleController.getString("Language", R.string.Language));
((LaunchActivity)parentActivity).fixBackButton();
}
@Override
public void onResume() {
super.onResume();
if (isFinish) {
return;
}
if (getActivity() == null) {
return;
}
if (!firstStart && listAdapter != null) {
listAdapter.notifyDataSetChanged();
}
firstStart = false;
((LaunchActivity)parentActivity).showActionBar();
((LaunchActivity)parentActivity).updateActionBar();
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int itemId = item.getItemId();
switch (itemId) {
case android.R.id.home:
if (searchItem != null) {
if (searchItem.isActionViewExpanded()) {
searchItem.collapseActionView();
}
}
finishFragment();
break;
}
return true;
}
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
inflater.inflate(R.menu.contacts_menu, menu);
searchItem = (SupportMenuItem)menu.findItem(R.id.messages_list_menu_search);
searchView = (SearchView)searchItem.getActionView();
TextView textView = (TextView) searchView.findViewById(R.id.search_src_text);
if (textView != null) {
textView.setTextColor(0xffffffff);
try {
Field mCursorDrawableRes = TextView.class.getDeclaredField("mCursorDrawableRes");
mCursorDrawableRes.setAccessible(true);
mCursorDrawableRes.set(textView, R.drawable.search_carret);
} catch (Exception e) {
e.printStackTrace();
}
}
ImageView img = (ImageView) searchView.findViewById(R.id.search_close_btn);
if (img != null) {
img.setImageResource(R.drawable.ic_msg_btn_cross_custom);
}
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String s) {
return true;
}
@Override
public boolean onQueryTextChange(String s) {
search(s);
if (s.length() != 0) {
searchWas = true;
if (listView != null) {
listView.setPadding(Utilities.dp(16), listView.getPaddingTop(), Utilities.dp(16), listView.getPaddingBottom());
listView.setAdapter(searchListViewAdapter);
if(android.os.Build.VERSION.SDK_INT >= 11) {
listView.setFastScrollAlwaysVisible(false);
}
listView.setFastScrollEnabled(false);
listView.setVerticalScrollBarEnabled(true);
}
if (emptyTextView != null) {
emptyTextView.setText(getString(R.string.NoResult));
}
}
return true;
}
});
searchItem.setSupportOnActionExpandListener(new MenuItemCompat.OnActionExpandListener() {
@Override
public boolean onMenuItemActionExpand(MenuItem menuItem) {
if (parentActivity != null) {
parentActivity.getSupportActionBar().setIcon(R.drawable.ic_ab_search);
}
searching = true;
return true;
}
@Override
public boolean onMenuItemActionCollapse(MenuItem menuItem) {
searchView.setQuery("", false);
search(null);
searching = false;
searchWas = false;
if (listView != null) {
listView.setEmptyView(emptyTextView);
emptyTextView.setVisibility(View.GONE);
}
if (listAdapter != null) {
listAdapter.notifyDataSetChanged();
}
((LaunchActivity)parentActivity).fixBackButton();
return true;
}
});
super.onCreateOptionsMenu(menu, inflater);
}
public void search(final String query) {
if (query == null) {
searchResult = 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);
}
processSearch(query);
}
}, 100, 300);
}
}
private void processSearch(final String query) {
Utilities.globalQueue.postRunnable(new Runnable() {
@Override
public void run() {
String q = query.trim().toLowerCase();
if (q.length() == 0) {
updateSearchResults(new ArrayList<LocaleController.LocaleInfo>());
return;
}
long time = System.currentTimeMillis();
ArrayList<LocaleController.LocaleInfo> resultArray = new ArrayList<LocaleController.LocaleInfo>();
for (LocaleController.LocaleInfo c : LocaleController.getInstance().sortedLanguages) {
if (c.name.toLowerCase().startsWith(query) || c.nameEnglish.toLowerCase().startsWith(query)) {
resultArray.add(c);
}
}
updateSearchResults(resultArray);
}
});
}
private void updateSearchResults(final ArrayList<LocaleController.LocaleInfo> arrCounties) {
Utilities.RunOnUIThread(new Runnable() {
@Override
public void run() {
searchResult = arrCounties;
searchListViewAdapter.notifyDataSetChanged();
}
});
}
private class SearchAdapter extends BaseAdapter {
private Context mContext;
public SearchAdapter(Context context) {
mContext = context;
}
@Override
public boolean areAllItemsEnabled() {
return true;
}
@Override
public boolean isEnabled(int i) {
return true;
}
@Override
public int getCount() {
if (searchResult == null) {
return 0;
}
return searchResult.size();
}
@Override
public Object getItem(int i) {
return null;
}
@Override
public long getItemId(int i) {
return i;
}
@Override
public boolean hasStableIds() {
return false;
}
@Override
public View getView(int i, View view, ViewGroup viewGroup) {
if (view == null) {
LayoutInflater li = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.settings_row_button_layout, viewGroup, false);
}
TextView textView = (TextView)view.findViewById(R.id.settings_row_text);
View divider = view.findViewById(R.id.settings_row_divider);
LocaleController.LocaleInfo c = searchResult.get(i);
textView.setText(c.name);
if (i == searchResult.size() - 1) {
divider.setVisibility(View.GONE);
} else {
divider.setVisibility(View.VISIBLE);
}
return view;
}
@Override
public int getItemViewType(int i) {
return 0;
}
@Override
public int getViewTypeCount() {
return 1;
}
@Override
public boolean isEmpty() {
return searchResult == null || searchResult.size() == 0;
}
}
private class ListAdapter extends BaseAdapter {
private Context mContext;
public ListAdapter(Context context) {
mContext = context;
}
@Override
public boolean areAllItemsEnabled() {
return true;
}
@Override
public boolean isEnabled(int i) {
return true;
}
@Override
public int getCount() {
if (LocaleController.getInstance().sortedLanguages == null) {
return 0;
}
return LocaleController.getInstance().sortedLanguages.size();
}
@Override
public Object getItem(int i) {
return null;
}
@Override
public long getItemId(int i) {
return i;
}
@Override
public boolean hasStableIds() {
return false;
}
@Override
public View getView(int i, View view, ViewGroup viewGroup) {
if (view == null) {
LayoutInflater li = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.settings_row_button_layout, viewGroup, false);
}
TextView textView = (TextView)view.findViewById(R.id.settings_row_text);
View divider = view.findViewById(R.id.settings_row_divider);
LocaleController.LocaleInfo localeInfo = LocaleController.getInstance().sortedLanguages.get(i);
textView.setText(localeInfo.name);
if (i == LocaleController.getInstance().sortedLanguages.size() - 1) {
divider.setVisibility(View.GONE);
} else {
divider.setVisibility(View.VISIBLE);
}
return view;
}
@Override
public int getItemViewType(int i) {
return 0;
}
@Override
public int getViewTypeCount() {
return 1;
}
@Override
public boolean isEmpty() {
return LocaleController.getInstance().sortedLanguages == null || LocaleController.getInstance().sortedLanguages.size() == 0;
}
}
}

View file

@ -86,7 +86,7 @@ public class LaunchActivity extends ActionBarActivity implements NotificationCen
if (!UserConfig.clientActivated) { if (!UserConfig.clientActivated) {
Intent intent = getIntent(); Intent intent = getIntent();
if (intent != null && intent.getAction() != null && Intent.ACTION_SEND.equals(intent.getAction()) || intent.getAction().equals(Intent.ACTION_SEND_MULTIPLE)) { if (intent != null && intent.getAction() != null && (Intent.ACTION_SEND.equals(intent.getAction()) || intent.getAction().equals(Intent.ACTION_SEND_MULTIPLE))) {
finish(); finish();
return; return;
} }

View file

@ -69,7 +69,7 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
private int activityToken = (int)(MessagesController.random.nextDouble() * Integer.MAX_VALUE); private int activityToken = (int)(MessagesController.random.nextDouble() * Integer.MAX_VALUE);
private long selectedDialog; private long selectedDialog;
private Timer searchDialogsTimer; private Timer searchTimer;
public ArrayList<TLObject> searchResult; public ArrayList<TLObject> searchResult;
public ArrayList<CharSequence> searchResultNames; public ArrayList<CharSequence> searchResultNames;
@ -511,19 +511,19 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
searchResultNames = null; searchResultNames = null;
} else { } else {
try { try {
if (searchDialogsTimer != null) { if (searchTimer != null) {
searchDialogsTimer.cancel(); searchTimer.cancel();
} }
} catch (Exception e) { } catch (Exception e) {
FileLog.e("tmessages", e); FileLog.e("tmessages", e);
} }
searchDialogsTimer = new Timer(); searchTimer = new Timer();
searchDialogsTimer.schedule(new TimerTask() { searchTimer.schedule(new TimerTask() {
@Override @Override
public void run() { public void run() {
try { try {
searchDialogsTimer.cancel(); searchTimer.cancel();
searchDialogsTimer = null; searchTimer = null;
} catch (Exception e) { } catch (Exception e) {
FileLog.e("tmessages", e); FileLog.e("tmessages", e);
} }

View file

@ -87,6 +87,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
private int audioDownloadSection; private int audioDownloadSection;
private int audioDownloadChatRow; private int audioDownloadChatRow;
private int audioDownloadPrivateRow; private int audioDownloadPrivateRow;
private int languageRow;
@Override @Override
public boolean onFragmentCreate() { public boolean onFragmentCreate() {
@ -156,6 +157,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
numberRow = rowCount++; numberRow = rowCount++;
settingsSectionRow = rowCount++; settingsSectionRow = rowCount++;
enableAnimationsRow = rowCount++; enableAnimationsRow = rowCount++;
languageRow = rowCount++;
notificationRow = rowCount++; notificationRow = rowCount++;
blockedRow = rowCount++; blockedRow = rowCount++;
backgroundRow = rowCount++; backgroundRow = rowCount++;
@ -206,7 +208,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
if (i == textSizeRow) { if (i == textSizeRow) {
AlertDialog.Builder builder = new AlertDialog.Builder(parentActivity); AlertDialog.Builder builder = new AlertDialog.Builder(parentActivity);
builder.setTitle(LocaleController.getString("TextSize", R.string.TextSize)); builder.setTitle(LocaleController.getString("TextSize", R.string.TextSize));
builder.setItems(new CharSequence[]{String.format("%d", 12), String.format("%d", 13), String.format("%d", 14), String.format("%d", 15), String.format("%d", 16), String.format("%d", 17), String.format("%d", 18), String.format("%d", 19), String.format("%d", 20)}, new DialogInterface.OnClickListener() { builder.setItems(new CharSequence[]{String.format("%d", 12), String.format("%d", 13), String.format("%d", 14), String.format("%d", 15), String.format("%d", 16), String.format("%d", 17), String.format("%d", 18), String.format("%d", 19), String.format("%d", 20), String.format("%d", 21), String.format("%d", 22), String.format("%d", 23), String.format("%d", 24)}, new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE); SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
@ -404,6 +406,8 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
if (listView != null) { if (listView != null) {
listView.invalidateViews(); listView.invalidateViews();
} }
} else if (i == languageRow) {
((LaunchActivity)parentActivity).presentFragment(new LanguageSelectActivity(), "settings_wallpapers", false);
} }
// else if (i == 6) { // else if (i == 6) {
// UserConfig.saveIncomingPhotos = !UserConfig.saveIncomingPhotos; // UserConfig.saveIncomingPhotos = !UserConfig.saveIncomingPhotos;
@ -538,7 +542,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
public boolean isEnabled(int i) { public boolean isEnabled(int i) {
return i == textSizeRow || i == enableAnimationsRow || i == blockedRow || i == notificationRow || i == backgroundRow || return i == textSizeRow || i == enableAnimationsRow || i == blockedRow || i == notificationRow || i == backgroundRow ||
i == askQuestionRow || i == sendLogsRow || i == sendByEnterRow || i == terminateSessionsRow || i == photoDownloadPrivateRow || i == askQuestionRow || i == sendLogsRow || i == sendByEnterRow || i == terminateSessionsRow || i == photoDownloadPrivateRow ||
i == photoDownloadChatRow || i == clearLogsRow || i == audioDownloadChatRow || i == audioDownloadPrivateRow; i == photoDownloadChatRow || i == clearLogsRow || i == audioDownloadChatRow || i == audioDownloadPrivateRow || i == languageRow;
} }
@Override @Override
@ -569,9 +573,6 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
LayoutInflater li = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); LayoutInflater li = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.settings_name_layout, viewGroup, false); view = li.inflate(R.layout.settings_name_layout, viewGroup, false);
TextView textView = (TextView)view.findViewById(R.id.settings_online);
textView.setText(LocaleController.getString("Online", R.string.Online));
ImageButton button = (ImageButton)view.findViewById(R.id.settings_edit_name); ImageButton button = (ImageButton)view.findViewById(R.id.settings_edit_name);
button.setOnClickListener(new View.OnClickListener() { button.setOnClickListener(new View.OnClickListener() {
@Override @Override
@ -672,7 +673,10 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
} }
}); });
} }
TextView textView = (TextView)view.findViewById(R.id.settings_name); TextView textView = (TextView)view.findViewById(R.id.settings_online);
textView.setText(LocaleController.getString("Online", R.string.Online));
textView = (TextView)view.findViewById(R.id.settings_name);
Typeface typeface = Utilities.getTypeface("fonts/rmedium.ttf"); Typeface typeface = Utilities.getTypeface("fonts/rmedium.ttf");
textView.setTypeface(typeface); textView.setTypeface(typeface);
TLRPC.User user = MessagesController.getInstance().users.get(UserConfig.clientUserId); TLRPC.User user = MessagesController.getInstance().users.get(UserConfig.clientUserId);
@ -860,9 +864,12 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
detailTextView.setText(String.format("%d", size)); detailTextView.setText(String.format("%d", size));
textView.setText(LocaleController.getString("TextSize", R.string.TextSize)); textView.setText(LocaleController.getString("TextSize", R.string.TextSize));
divider.setVisibility(View.VISIBLE); divider.setVisibility(View.VISIBLE);
} else if (i == languageRow) {
detailTextView.setText(LocaleController.getCurrentLanguageName());
textView.setText(LocaleController.getString("Language", R.string.Language));
divider.setVisibility(View.VISIBLE);
} }
} }
return view; return view;
} }
@ -872,7 +879,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
return 0; return 0;
} else if (i == numberSectionRow || i == settingsSectionRow || i == supportSectionRow || i == messagesSectionRow || i == photoDownloadSection || i == audioDownloadSection) { } else if (i == numberSectionRow || i == settingsSectionRow || i == supportSectionRow || i == messagesSectionRow || i == photoDownloadSection || i == audioDownloadSection) {
return 1; return 1;
} else if (i == textSizeRow) { } else if (i == textSizeRow || i == languageRow) {
return 5; return 5;
} else if (i == enableAnimationsRow || i == sendByEnterRow || i == photoDownloadChatRow || i == photoDownloadPrivateRow || i == audioDownloadChatRow || i == audioDownloadPrivateRow) { } else if (i == enableAnimationsRow || i == sendByEnterRow || i == photoDownloadChatRow || i == photoDownloadPrivateRow || i == audioDownloadChatRow || i == audioDownloadPrivateRow) {
return 3; return 3;

View file

@ -386,7 +386,6 @@ public class SettingsBlockedUsers extends BaseFragment implements NotificationCe
if (type == 0) { if (type == 0) {
if (view == null) { if (view == null) {
view = new ChatOrUserCell(mContext); view = new ChatOrUserCell(mContext);
((ChatOrUserCell)view).useBoldFont = true;
((ChatOrUserCell)view).usePadding = false; ((ChatOrUserCell)view).usePadding = false;
((ChatOrUserCell)view).useSeparator = true; ((ChatOrUserCell)view).useSeparator = true;
} }

View file

@ -647,7 +647,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
if (user.status.expires <= 10000) { if (user.status.expires <= 10000) {
onlineText.setText(LocaleController.getString("Invisible", R.string.Invisible)); onlineText.setText(LocaleController.getString("Invisible", R.string.Invisible));
} else { } else {
onlineText.setText(Utilities.formatDateOnline(user.status.expires)); onlineText.setText(LocaleController.formatDateOnline(user.status.expires));
} }
} }
} }

View file

@ -23,6 +23,7 @@ import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.TLRPC; import org.telegram.messenger.TLRPC;
import org.telegram.messenger.FileLog; import org.telegram.messenger.FileLog;
import org.telegram.messenger.MessagesController; import org.telegram.messenger.MessagesController;
@ -305,7 +306,7 @@ public class NotificationView extends LinearLayout {
messageTextView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14); messageTextView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
nameTextView.setPadding(0, Utilities.dp(2), 0, 0); nameTextView.setPadding(0, Utilities.dp(2), 0, 0);
messageTextView.setPadding(0, Utilities.dp(18), 0, 0); messageTextView.setPadding(0, Utilities.dp(18), 0, 0);
if (Utilities.isRTL) { if (LocaleController.isRTL) {
params1.setMargins(Utilities.dp(40), 0, height + Utilities.dp(6), 0); params1.setMargins(Utilities.dp(40), 0, height + Utilities.dp(6), 0);
} else { } else {
params1.setMargins(height + Utilities.dp(6), 0, Utilities.dp(40), 0); params1.setMargins(height + Utilities.dp(6), 0, Utilities.dp(40), 0);
@ -315,7 +316,7 @@ public class NotificationView extends LinearLayout {
messageTextView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 15); messageTextView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 15);
nameTextView.setPadding(0, Utilities.dp(4), 0, 0); nameTextView.setPadding(0, Utilities.dp(4), 0, 0);
messageTextView.setPadding(0, Utilities.dp(24), 0, 0); messageTextView.setPadding(0, Utilities.dp(24), 0, 0);
if (Utilities.isRTL) { if (LocaleController.isRTL) {
params1.setMargins(Utilities.dp(40), 0, height + Utilities.dp(8), 0); params1.setMargins(Utilities.dp(40), 0, height + Utilities.dp(8), 0);
} else { } else {
params1.setMargins(height + Utilities.dp(8), 0, Utilities.dp(40), 0); params1.setMargins(height + Utilities.dp(8), 0, Utilities.dp(40), 0);

View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:color="#ffffff" />
<item android:state_focused="true" android:color="#ffffff" />
<item android:state_selected="true" android:color="#ffffff" />
<item android:color="#035ea8" />
</selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 B

View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/btn_check_off_pressed_holo_light" />
<item android:state_focused="true" android:drawable="@drawable/btn_check_off_pressed_holo_light" />
<item android:state_checked="true" android:drawable="@drawable/btn_check_off_pressed_holo_light" />
<item android:drawable="@drawable/btn_check_off_holo_light" />
</selector>

View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/btn_check_on_pressed_holo_light" />
<item android:state_focused="true" android:drawable="@drawable/btn_check_on_pressed_holo_light" />
<item android:state_checked="true" android:drawable="@drawable/btn_check_on_pressed_holo_light" />
<item android:drawable="@drawable/btn_check_on_holo_light" />
</selector>

View file

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/compose_bubble_down" android:state_pressed="true" />
<item android:drawable="@drawable/compose_bubble_up" />
</selector>

View file

@ -1,14 +1,17 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical"> android:orientation="vertical">
<FrameLayout android:layout_width="fill_parent" <FrameLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/top_layout" android:id="@+id/top_layout"
android:layout_gravity="top"> android:layout_gravity="top">
<FrameLayout android:layout_width="64dp" <FrameLayout
android:layout_width="64dp"
android:layout_height="64dp" android:layout_height="64dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:layout_marginBottom="12dp" android:layout_marginBottom="12dp"
@ -21,10 +24,12 @@
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:src="@drawable/group_blue"/> android:src="@drawable/group_blue"/>
<ImageButton android:id="@+id/settings_change_avatar_button" <ImageButton
android:id="@+id/settings_change_avatar_button"
android:background="@drawable/photo_spinner" android:background="@drawable/photo_spinner"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent"/> android:layout_height="fill_parent"/>
</FrameLayout> </FrameLayout>
<EditText <EditText
@ -47,7 +52,8 @@
</FrameLayout> </FrameLayout>
<FrameLayout android:layout_width="match_parent" <FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<org.telegram.ui.Views.PinnedHeaderListView <org.telegram.ui.Views.PinnedHeaderListView
@ -63,6 +69,7 @@
android:divider="@null" android:divider="@null"
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:scrollbars="none"/> android:scrollbars="none"/>
</FrameLayout> </FrameLayout>
</LinearLayout> </LinearLayout>

View file

@ -21,7 +21,7 @@
android:layout_marginRight="5dp" android:layout_marginRight="5dp"
android:minHeight="52dp" android:minHeight="52dp"
android:gravity="right|center_vertical" android:gravity="right|center_vertical"
android:maxLines="3" android:maxLines="2"
android:paddingTop="3dp" android:paddingTop="3dp"
android:layout_marginTop="0dp" android:layout_marginTop="0dp"
android:inputType="textFilter|textNoSuggestions|textMultiLine" android:inputType="textFilter|textNoSuggestions|textMultiLine"
@ -29,18 +29,6 @@
android:textCursorDrawable="@null" android:textCursorDrawable="@null"
android:textColor="#000000"/> android:textColor="#000000"/>
<TextView
android:textSize="16dp"
android:textColor="#a6a6a6"
android:gravity="center_vertical"
android:layout_gravity="top|left|center"
android:id="@+id/bubble_counter_text"
android:layout_width="wrap_content"
android:layout_height="52dp"
android:layout_marginLeft="16dp"
android:paddingBottom="4dp"
android:text="0/200"/>
</FrameLayout> </FrameLayout>

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="66dp" android:layout_height="66dp"
android:layout_gravity="top"> android:layout_gravity="top">
@ -41,17 +42,20 @@
android:layout_gravity="top|right" android:layout_gravity="top|right"
android:gravity="right"/> android:gravity="right"/>
<ImageView android:layout_gravity="center_vertical|left" <ImageView
android:layout_gravity="center_vertical|left"
android:id="@+id/settings_row_check_button" android:id="@+id/settings_row_check_button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="14dp" android:layout_marginLeft="14dp"
android:src="@drawable/btn_check_off_old"/> android:src="@drawable/btn_check_off_holo_light"/>
<View android:background="@color/divider" <View
android:background="@color/divider"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="1px" android:layout_height="1px"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:id="@+id/settings_row_divider" android:id="@+id/settings_row_divider"
android:visibility="gone"/> android:visibility="gone"/>
</FrameLayout> </FrameLayout>

View file

@ -5,14 +5,16 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<LinearLayout android:orientation="vertical" <LinearLayout
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:paddingRight="16dp" android:paddingRight="16dp"
android:paddingTop="8dp"> android:paddingTop="8dp">
<include layout="@layout/settings_section_layout"/> <include
layout="@layout/settings_section_layout"/>
<EditText <EditText
android:textSize="19dp" android:textSize="19dp"

View file

@ -22,7 +22,8 @@
android:layout_gravity="top"/> android:layout_gravity="top"/>
<TextView android:layout_width="match_parent" <TextView
android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:textColor="#808080" android:textColor="#808080"
android:gravity="center" android:gravity="center"

View file

@ -3,18 +3,16 @@
<FrameLayout <FrameLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="41dp" android:layout_height="41dp"
android:paddingRight="9dp"
android:paddingTop="9dp" android:paddingTop="9dp"
xmlns:android="http://schemas.android.com/apk/res/android"> xmlns:android="http://schemas.android.com/apk/res/android">
<TextView android:layout_width="wrap_content" <TextView
android:layout_height="31dp" android:layout_width="wrap_content"
android:background="@drawable/chat_create_bubble_states" android:layout_height="26dp"
android:textSize="16dp" android:textSize="16dp"
android:paddingRight="8dp"
android:paddingLeft="8dp"
android:gravity="center" android:gravity="center"
android:textColor="@color/chat_create_bubble_text_states" android:textColor="#ff000000"
android:id="@+id/bubble_text_view"/> android:id="@+id/bubble_text_view"/>
</FrameLayout> </FrameLayout>

View file

@ -1,7 +1,7 @@
<FrameLayout <FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_gravity="right|center_vertical" android:layout_gravity="right|center_vertical"
android:minHeight="60dp"> android:minHeight="60dp">
@ -19,6 +19,7 @@
android:paddingRight="16dp" android:paddingRight="16dp"
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:background="@drawable/bar_selector" android:background="@drawable/bar_selector"
android:minHeight="60dp"/> android:minHeight="60dp"
android:textAllCaps="true"/>
</FrameLayout> </FrameLayout>

View file

@ -1,14 +1,17 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical"> android:orientation="vertical">
<FrameLayout android:layout_width="fill_parent" <FrameLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/top_layout" android:id="@+id/top_layout"
android:layout_gravity="top"> android:layout_gravity="top">
<FrameLayout android:layout_width="64dp" <FrameLayout
android:layout_width="64dp"
android:layout_height="64dp" android:layout_height="64dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:layout_marginBottom="12dp" android:layout_marginBottom="12dp"
@ -21,10 +24,12 @@
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:src="@drawable/group_blue"/> android:src="@drawable/group_blue"/>
<ImageButton android:id="@+id/settings_change_avatar_button" <ImageButton
android:id="@+id/settings_change_avatar_button"
android:background="@drawable/photo_spinner" android:background="@drawable/photo_spinner"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent"/> android:layout_height="fill_parent"/>
</FrameLayout> </FrameLayout>
<EditText <EditText
@ -48,7 +53,8 @@
</FrameLayout> </FrameLayout>
<FrameLayout android:layout_width="match_parent" <FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<org.telegram.ui.Views.PinnedHeaderListView <org.telegram.ui.Views.PinnedHeaderListView
@ -64,6 +70,7 @@
android:divider="@null" android:divider="@null"
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:scrollbars="none"/> android:scrollbars="none"/>
</FrameLayout> </FrameLayout>
</LinearLayout> </LinearLayout>

View file

@ -14,14 +14,13 @@
android:textSize="16dp" android:textSize="16dp"
android:textColorHint="#a6a6a6" android:textColorHint="#a6a6a6"
android:id="@+id/bubble_input_text" android:id="@+id/bubble_input_text"
android:paddingRight="60dp"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="5dp" android:layout_marginLeft="5dp"
android:layout_marginRight="5dp" android:layout_marginRight="5dp"
android:minHeight="52dp" android:minHeight="52dp"
android:gravity="left|center_vertical" android:gravity="left|center_vertical"
android:maxLines="3" android:maxLines="2"
android:paddingTop="3dp" android:paddingTop="3dp"
android:layout_marginTop="0dp" android:layout_marginTop="0dp"
android:inputType="textFilter|textNoSuggestions|textMultiLine" android:inputType="textFilter|textNoSuggestions|textMultiLine"
@ -29,18 +28,6 @@
android:textCursorDrawable="@null" android:textCursorDrawable="@null"
android:textColor="#000000"/> android:textColor="#000000"/>
<TextView
android:textSize="16dp"
android:textColor="#a6a6a6"
android:gravity="center_vertical"
android:layout_gravity="top|right|center"
android:id="@+id/bubble_counter_text"
android:layout_width="wrap_content"
android:layout_height="52dp"
android:layout_marginRight="16dp"
android:paddingBottom="4dp"
android:text="0/200"/>
</FrameLayout> </FrameLayout>
<FrameLayout <FrameLayout

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="66dp" android:layout_height="66dp"
android:layout_gravity="top"> android:layout_gravity="top">
@ -39,17 +40,20 @@
android:layout_marginRight="60dp" android:layout_marginRight="60dp"
android:layout_gravity="top"/> android:layout_gravity="top"/>
<ImageView android:layout_gravity="center_vertical|right" <ImageView
android:layout_gravity="center_vertical|right"
android:id="@+id/settings_row_check_button" android:id="@+id/settings_row_check_button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="14dp" android:layout_marginRight="14dp"
android:src="@drawable/btn_check_off_old"/> android:src="@drawable/btn_check_off_holo_light"/>
<View android:background="@color/divider" <View
android:background="@color/divider"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="1px" android:layout_height="1px"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:id="@+id/settings_row_divider" android:id="@+id/settings_row_divider"
android:visibility="gone"/> android:visibility="gone"/>
</FrameLayout> </FrameLayout>

View file

@ -0,0 +1,32 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/listView"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:clipToPadding="false"
android:fadingEdge="none"
android:fadingEdgeLength="0dp"
android:paddingLeft="13dp"
android:paddingRight="13dp"
android:dividerHeight="0dp"
android:divider="@null"
android:scrollbars="none"/>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textColor="#808080"
android:gravity="center"
android:textSize="24dp"
android:id="@+id/searchEmptyView"
android:visibility="invisible"
android:layout_gravity="top"/>
</RelativeLayout>

View file

@ -5,6 +5,9 @@
<resources> <resources>
<string name="AppName">Telegram</string> <string name="AppName">Telegram</string>
<string name="LanguangeName">العربية</string>
<string name="LanguangeNameInEnglish">Arabic</string>
<!--signin view--> <!--signin view-->
<string name="YourPhone">رقم هاتفك المحمول</string> <string name="YourPhone">رقم هاتفك المحمول</string>
<string name="StartText">يرجى التحقق من صحة رمز بلدك وإدخال رقم هاتفك المحمول</string> <string name="StartText">يرجى التحقق من صحة رمز بلدك وإدخال رقم هاتفك المحمول</string>
@ -107,6 +110,7 @@
<string name="DeleteThisGroup">حذف المجموعة</string> <string name="DeleteThisGroup">حذف المجموعة</string>
<string name="SlideToCancel">قم بالسحب للإلغاء</string> <string name="SlideToCancel">قم بالسحب للإلغاء</string>
<string name="SaveToDownloads">حفظ في الجهاز</string> <string name="SaveToDownloads">حفظ في الجهاز</string>
<string name="ApplyLocalizationFile">Apply localization file</string>
<!--notification--> <!--notification-->
<string name="EncryptedChatRequested">تم طلب محادثة سرية</string> <string name="EncryptedChatRequested">تم طلب محادثة سرية</string>
@ -250,6 +254,7 @@
<string name="Events">الأحداث</string> <string name="Events">الأحداث</string>
<string name="ContactJoined">اشترك صديق في تيليجرام</string> <string name="ContactJoined">اشترك صديق في تيليجرام</string>
<string name="Pebble">PEBBLE</string> <string name="Pebble">PEBBLE</string>
<string name="Language">اللغة</string>
<!--media view--> <!--media view-->
<string name="NoMedia">لا توجد وسائط بعد</string> <string name="NoMedia">لا توجد وسائط بعد</string>
@ -268,7 +273,7 @@
<!--photo gallery view--> <!--photo gallery view-->
<string name="ShowAllMedia">عرض كافة الوسائط</string> <string name="ShowAllMedia">عرض كافة الوسائط</string>
<string name="SaveToGallery">حفظ في الجهاز</string> <string name="SaveToGallery">حفظ في الجهاز</string>
<string name="Of">من</string> <string name="Of">%1$d من %2$d</string>
<string name="Gallery">الألبوم</string> <string name="Gallery">الألبوم</string>
<!--button titles--> <!--button titles-->

View file

@ -5,6 +5,9 @@
<resources> <resources>
<string name="AppName">Telegram</string> <string name="AppName">Telegram</string>
<string name="LanguangeName">Deutsch</string>
<string name="LanguangeNameInEnglish">German</string>
<!--signin view--> <!--signin view-->
<string name="YourPhone">Dein Telefon</string> <string name="YourPhone">Dein Telefon</string>
<string name="StartText">Bitte bestätige deine Landesvorwahl und deine Telefonnummer.</string> <string name="StartText">Bitte bestätige deine Landesvorwahl und deine Telefonnummer.</string>
@ -107,6 +110,7 @@
<string name="DeleteThisGroup">Diese Gruppe löschen</string> <string name="DeleteThisGroup">Diese Gruppe löschen</string>
<string name="SlideToCancel">WISCHEN UM ABZUBRECHEN</string> <string name="SlideToCancel">WISCHEN UM ABZUBRECHEN</string>
<string name="SaveToDownloads">In Ordner Downloads speichern</string> <string name="SaveToDownloads">In Ordner Downloads speichern</string>
<string name="ApplyLocalizationFile">Apply localization file</string>
<!--notification--> <!--notification-->
<string name="EncryptedChatRequested">Geheimen Chat angefordert</string> <string name="EncryptedChatRequested">Geheimen Chat angefordert</string>
@ -250,6 +254,7 @@
<string name="Events">EREIGNISSE</string> <string name="Events">EREIGNISSE</string>
<string name="ContactJoined">Kontakt ist Telegram beigetreten</string> <string name="ContactJoined">Kontakt ist Telegram beigetreten</string>
<string name="Pebble">PEBBLE</string> <string name="Pebble">PEBBLE</string>
<string name="Language">Sprache</string>
<!--media view--> <!--media view-->
<string name="NoMedia">Noch keine geteilten Medien vorhanden</string> <string name="NoMedia">Noch keine geteilten Medien vorhanden</string>
@ -268,7 +273,7 @@
<!--photo gallery view--> <!--photo gallery view-->
<string name="ShowAllMedia">Zeige alle Medien</string> <string name="ShowAllMedia">Zeige alle Medien</string>
<string name="SaveToGallery">In der Galerie speichern</string> <string name="SaveToGallery">In der Galerie speichern</string>
<string name="Of">von</string> <string name="Of">%1$d von %2$d</string>
<string name="Gallery">Galerie</string> <string name="Gallery">Galerie</string>
<!--button titles--> <!--button titles-->

View file

@ -5,6 +5,9 @@
<resources> <resources>
<string name="AppName">Telegram</string> <string name="AppName">Telegram</string>
<string name="LanguangeName">Español</string>
<string name="LanguangeNameInEnglish">Spanish</string>
<!--signin view--> <!--signin view-->
<string name="YourPhone">Tu teléfono</string> <string name="YourPhone">Tu teléfono</string>
<string name="StartText">Por favor, confirma tu código de país\ne introduce tu número.</string> <string name="StartText">Por favor, confirma tu código de país\ne introduce tu número.</string>
@ -107,6 +110,7 @@
<string name="DeleteThisGroup">Eliminar este grupo</string> <string name="DeleteThisGroup">Eliminar este grupo</string>
<string name="SlideToCancel">DESLIZA PARA CANCELAR</string> <string name="SlideToCancel">DESLIZA PARA CANCELAR</string>
<string name="SaveToDownloads">Guardar en descargas</string> <string name="SaveToDownloads">Guardar en descargas</string>
<string name="ApplyLocalizationFile">Apply localization file</string>
<!--notification--> <!--notification-->
<string name="EncryptedChatRequested">Chat secreto solicitado</string> <string name="EncryptedChatRequested">Chat secreto solicitado</string>
@ -250,6 +254,7 @@
<string name="Events">EVENTOS</string> <string name="Events">EVENTOS</string>
<string name="ContactJoined">Un contacto se unió a Telegram</string> <string name="ContactJoined">Un contacto se unió a Telegram</string>
<string name="Pebble">PEBBLE</string> <string name="Pebble">PEBBLE</string>
<string name="Language">Idioma</string>
<!--media view--> <!--media view-->
<string name="NoMedia">No hay fotos ni vídeos compartidos aún</string> <string name="NoMedia">No hay fotos ni vídeos compartidos aún</string>
@ -268,7 +273,7 @@
<!--photo gallery view--> <!--photo gallery view-->
<string name="ShowAllMedia">Mostrar todas las fotos y vídeos</string> <string name="ShowAllMedia">Mostrar todas las fotos y vídeos</string>
<string name="SaveToGallery">Guardar en galería</string> <string name="SaveToGallery">Guardar en galería</string>
<string name="Of">de</string> <string name="Of">%1$d de %2$d</string>
<string name="Gallery">Galería</string> <string name="Gallery">Galería</string>
<!--button titles--> <!--button titles-->

View file

@ -5,6 +5,9 @@
<resources> <resources>
<string name="AppName">Telegram</string> <string name="AppName">Telegram</string>
<string name="LanguangeName">Italiano</string>
<string name="LanguangeNameInEnglish">Italian</string>
<!--signin view--> <!--signin view-->
<string name="YourPhone">Il tuo telefono</string> <string name="YourPhone">Il tuo telefono</string>
<string name="StartText">Conferma il prefisso della tua nazione \ne inserisci il tuo numero di telefono.</string> <string name="StartText">Conferma il prefisso della tua nazione \ne inserisci il tuo numero di telefono.</string>
@ -45,10 +48,10 @@
<string name="AwaitingEncryption">In attesa che %s si colleghi…</string> <string name="AwaitingEncryption">In attesa che %s si colleghi…</string>
<string name="EncryptionRejected">Chat segreta annullata</string> <string name="EncryptionRejected">Chat segreta annullata</string>
<string name="EncryptionProcessing">Scambio delle chiavi di cifratura...</string> <string name="EncryptionProcessing">Scambio delle chiavi di cifratura...</string>
<string name="EncryptedChatStartedOutgoing">%s si è unito alla chat segreta.</string> <string name="EncryptedChatStartedOutgoing">%s si è unito alla tua chat segreta.</string>
<string name="EncryptedChatStartedIncoming">Sei entrato nella chat segreta.</string> <string name="EncryptedChatStartedIncoming">Sei entrato nella chat segreta.</string>
<string name="ClearHistory">Cancella cronologia</string> <string name="ClearHistory">Cancella cronologia</string>
<string name="DeleteChat">Abbandona</string> <string name="DeleteChat">Elimina ed esci</string>
<string name="HiddenName">Nome nascosto</string> <string name="HiddenName">Nome nascosto</string>
<string name="SelectChat">Seleziona chat</string> <string name="SelectChat">Seleziona chat</string>
@ -57,9 +60,9 @@
<string name="FreeOfTotal">Liberi %1$s di %2$s</string> <string name="FreeOfTotal">Liberi %1$s di %2$s</string>
<string name="UnknownError">Errore sconosciuto</string> <string name="UnknownError">Errore sconosciuto</string>
<string name="AccessError">Errore durante l\'accesso</string> <string name="AccessError">Errore durante l\'accesso</string>
<string name="NoFiles">Non ci sono file...</string> <string name="NoFiles">Non ci sono ancora file...</string>
<string name="FileUploadLimit">La dimensione del file non dovrebbe superare i %1$s</string> <string name="FileUploadLimit">La dimensione del file non dovrebbe superare i %1$s</string>
<string name="NotMounted">Memoria non montata</string> <string name="NotMounted">Archiviazione non montata</string>
<string name="UsbActive">Trasferimento USB attivo</string> <string name="UsbActive">Trasferimento USB attivo</string>
<string name="InternalStorage">Archiviazione interna</string> <string name="InternalStorage">Archiviazione interna</string>
<string name="ExternalStorage">Archiviazione esterna</string> <string name="ExternalStorage">Archiviazione esterna</string>
@ -68,10 +71,10 @@
<!--chat view--> <!--chat view-->
<string name="Invisible">invisibile</string> <string name="Invisible">invisibile</string>
<string name="Typing">sta scrivendo</string> <string name="Typing">scrivendo</string>
<string name="Attach">Allega</string> <string name="Attach">Allega</string>
<string name="IsTyping">sta scrivendo</string> <string name="IsTyping">sta scrivendo</string>
<string name="AreTyping">scrivono</string> <string name="AreTyping">stanno scrivendo…</string>
<string name="AndMoreTyping">e altre %d persone</string> <string name="AndMoreTyping">e altre %d persone</string>
<string name="GotAQuestion">Hai una domanda\nsu Telegram?</string> <string name="GotAQuestion">Hai una domanda\nsu Telegram?</string>
<string name="ChatTakePhoto">Scatta una foto</string> <string name="ChatTakePhoto">Scatta una foto</string>
@ -79,42 +82,43 @@
<string name="ChatLocation">Posizione</string> <string name="ChatLocation">Posizione</string>
<string name="ChatVideo">Video</string> <string name="ChatVideo">Video</string>
<string name="ChatDocument">Documento</string> <string name="ChatDocument">Documento</string>
<string name="NoMessages">Non ci sono messaggi…</string> <string name="NoMessages">Non ci sono ancora messaggi…</string>
<string name="ViewPhoto">Visualizza foto</string> <string name="ViewPhoto">Visualizza foto</string>
<string name="ViewLocation">Visualizza posizione</string> <string name="ViewLocation">Visualizza posizione</string>
<string name="ViewVideo">Riproduci video</string> <string name="ViewVideo">Riproduci video</string>
<string name="ForwardedMessage">Messaggio inoltrato</string> <string name="ForwardedMessage">Messaggio inoltrato</string>
<string name="From">Da</string> <string name="From">Da</string>
<string name="NoRecent">Nessuno messaggio recente</string> <string name="NoRecent">Nessuno recente</string>
<string name="Members">persone</string> <string name="Members">membri</string>
<string name="Message">Messaggio</string> <string name="Message">Messaggio</string>
<string name="TypeMessage">Invia un messaggio</string> <string name="TypeMessage">Scrivi il messaggio</string>
<string name="DOWNLOAD">Scarica</string> <string name="DOWNLOAD">Scarica</string>
<string name="Selected">Selezionato:</string> <string name="Selected">Selezionato:</string>
<string name="ShareMyContactInfo">CONDIVIDI LE MIE INFORMAZIONI DI CONTATTO</string> <string name="ShareMyContactInfo">CONDIVIDI LE MIE INFORMAZIONI DI CONTATTO</string>
<string name="AddToContacts">AGGIUNGI AI CONTATTI</string> <string name="AddToContacts">AGGIUNGI AI CONTATTI</string>
<string name="EncryptedPlaceholderTitleIncoming">%s ti ha invitato a partecipare ad una chat privata.</string> <string name="EncryptedPlaceholderTitleIncoming">%s ti ha mandato un invito a una chat privata.</string>
<string name="EncryptedPlaceholderTitleOutgoing">Hai invitato %s a partecipare ad una chat segreta.</string> <string name="EncryptedPlaceholderTitleOutgoing">Hai invitato %s a entrare in una chat segreta.</string>
<string name="EncryptedDescriptionTitle">Le chat segrete:</string> <string name="EncryptedDescriptionTitle">Chat segrete:</string>
<string name="EncryptedDescription1">Utilizzano la cifratura punto-punto</string> <string name="EncryptedDescription1">Utilizzano la cifratura punto-punto</string>
<string name="EncryptedDescription2">Non lasciano traccia sui nostri server</string> <string name="EncryptedDescription2">Non lasciano traccia sui nostri server</string>
<string name="EncryptedDescription3">Hanno un sistema di autodistruzione dei messaggi</string> <string name="EncryptedDescription3">Hanno un contatore di autodistruzione</string>
<string name="EncryptedDescription4">Non permettono linoltro</string> <string name="EncryptedDescription4">Non permettono linoltro</string>
<string name="OneNewMessage">%1$d nuovo messaggio</string> <string name="OneNewMessage">%1$d nuovo messaggio</string>
<string name="FewNewMessages">%1$d nuovi messaggi</string> <string name="FewNewMessages">%1$d nuovi messaggi</string>
<string name="YouWereKicked">Sei stato espulso da questo gruppo</string> <string name="YouWereKicked">Sei stato espulso da questo gruppo</string>
<string name="YouLeft">Hai abbandonato il gruppo</string> <string name="YouLeft">Hai lasciato il gruppo</string>
<string name="DeleteThisGroup">Elimina questo gruppo</string> <string name="DeleteThisGroup">Elimina questo gruppo</string>
<string name="SlideToCancel">TRASCINA PER ANNULLARE</string> <string name="SlideToCancel">TRASCINA PER ANNULLARE</string>
<string name="SaveToDownloads">Salva in download</string> <string name="SaveToDownloads">Salva in download</string>
<string name="ApplyLocalizationFile">Apply localization file</string>
<!--notification--> <!--notification-->
<string name="EncryptedChatRequested">Chat segreta richiesta</string> <string name="EncryptedChatRequested">Chat segreta richiesta</string>
<string name="EncryptedChatAccepted">Chat segreta avviata</string> <string name="EncryptedChatAccepted">Chat segreta iniziata</string>
<string name="MessageLifetimeChanged">%1$s ha impostato l\'autodistruzione dopo %2$s</string> <string name="MessageLifetimeChanged">%1$s imposta il contatore di autodistruzione a %2$s</string>
<string name="MessageLifetimeChangedOutgoing">Autodistruzione dopo %1$s</string> <string name="MessageLifetimeChangedOutgoing">Hai impostato il contatore di autodistruzione a %1$s</string>
<string name="MessageLifetimeRemoved">%1$s ha disabilitato l\'autodistruzione</string> <string name="MessageLifetimeRemoved">%1$s ha disabilitato il contatore di autodistruzione</string>
<string name="MessageLifetimeYouRemoved">Autodistruzione disabilitata</string> <string name="MessageLifetimeYouRemoved">Hai disabilitato il contatore di autodistruzione</string>
<string name="MessageLifetime2s">2 secondi</string> <string name="MessageLifetime2s">2 secondi</string>
<string name="MessageLifetime5s">5 secondi</string> <string name="MessageLifetime5s">5 secondi</string>
<string name="MessageLifetime1m">1 minuto</string> <string name="MessageLifetime1m">1 minuto</string>
@ -127,47 +131,47 @@
<string name="NotificationMessagePhoto">%1$s ti ha inviato una foto</string> <string name="NotificationMessagePhoto">%1$s ti ha inviato una foto</string>
<string name="NotificationMessageVideo">%1$s ti ha inviato un video</string> <string name="NotificationMessageVideo">%1$s ti ha inviato un video</string>
<string name="NotificationMessageContact">%1$s ha condiviso un contatto con te</string> <string name="NotificationMessageContact">%1$s ha condiviso un contatto con te</string>
<string name="NotificationMessageMap">%1$s ti ha condiviso una posizione</string> <string name="NotificationMessageMap">%1$s ti ha inviato una posizione</string>
<string name="NotificationMessageDocument">%1$s ti ha inviato un documento</string> <string name="NotificationMessageDocument">%1$s ti ha inviato un documento</string>
<string name="NotificationMessageAudio">%1$s ti ha inviato un messaggio audio</string> <string name="NotificationMessageAudio">%1$s ti ha inviato dell\'audio</string>
<string name="NotificationMessageGroupText">%1$s @ %2$s: %3$s</string> <string name="NotificationMessageGroupText">%1$s @ %2$s: %3$s</string>
<string name="NotificationMessageGroupNoText">%1$s ha inviato un messaggio al gruppo %2$s</string> <string name="NotificationMessageGroupNoText">%1$s ha inviato un messaggio al gruppo %2$s</string>
<string name="NotificationMessageGroupPhoto">%1$s ha inviato una foto al gruppo %2$s</string> <string name="NotificationMessageGroupPhoto">%1$s ha inviato una foto al gruppo %2$s</string>
<string name="NotificationMessageGroupVideo">%1$s ha inviato un video al gruppo %2$s</string> <string name="NotificationMessageGroupVideo">%1$s ha inviato un video al gruppo %2$s</string>
<string name="NotificationMessageGroupContact">%1$s ha condiviso un contatto con il gruppo %2$s</string> <string name="NotificationMessageGroupContact">%1$s ha condiviso un contatto con il gruppo %2$s</string>
<string name="NotificationMessageGroupMap">%1$s ha condiviso la posizione con il gruppo %2$s</string> <string name="NotificationMessageGroupMap">%1$s ha inviato una posizione al gruppo %2$s</string>
<string name="NotificationMessageGroupDocument">%1$s ha inviato un documento al gruppo %2$s</string> <string name="NotificationMessageGroupDocument">%1$s ha inviato un documento al gruppo %2$s</string>
<string name="NotificationMessageGroupAudio">%1$s ha inviato un messaggio audio al gruppo %2$s</string> <string name="NotificationMessageGroupAudio">%1$s ha inviato dell\'audio al gruppo %2$s</string>
<string name="NotificationInvitedToGroup">%1$s ti ha aggiunto al gruppo %2$s</string> <string name="NotificationInvitedToGroup">%1$s ti ha invitato nel gruppo %2$s</string>
<string name="NotificationEditedGroupName">%1$s ha modificato il nome del gruppo %2$s</string> <string name="NotificationEditedGroupName">%1$s ha modificato il nome del gruppo %2$s</string>
<string name="NotificationEditedGroupPhoto">%1$s ha modificato la foto del gruppo %2$s</string> <string name="NotificationEditedGroupPhoto">%1$s ha modificato la foto del gruppo %2$s</string>
<string name="NotificationGroupAddMember">%1$s ha aggiunto %3$s al gruppo %2$s</string> <string name="NotificationGroupAddMember">%1$s ha invitato %3$s nel gruppo %2$s</string>
<string name="NotificationGroupKickMember">%1$s ha rimosso %3$s dal gruppo %2$s</string> <string name="NotificationGroupKickMember">%1$s ha rimosso %3$s dal gruppo %2$s</string>
<string name="NotificationGroupKickYou">%1$s ti ha rimosso dal gruppo %2$s</string> <string name="NotificationGroupKickYou">%1$s ti ha rimosso dal gruppo %2$s</string>
<string name="NotificationGroupLeftMember">%1$s ha lasciato il gruppo %2$s</string> <string name="NotificationGroupLeftMember">%1$s ha lasciato il gruppo %2$s</string>
<string name="NotificationContactJoined">Anche %1$s usa Telegram!</string> <string name="NotificationContactJoined">%1$s ha iniziato a usare Telegram!</string>
<string name="NotificationUnrecognizedDevice">%1$s,\nAbbiamo rilevato un accesso al tuo account da un nuovo dispositivo %2$s\n\nDispositivo: %3$s\nPosizione: %4$s\n\nSe non sei stato tu, puoi andare su Impostazioni - Termina tutte le sessioni.\n\nGrazie,\nil team di Telegram</string> <string name="NotificationUnrecognizedDevice">%1$s,\nAbbiamo rilevato un accesso al tuo account da un nuovo dispositivo %2$s\n\nDispositivo: %3$s\nPosizione: %4$s\n\nSe non sei stato tu, puoi andare su Impostazioni - Termina tutte le sessioni.\n\nGrazie,\nla squadra di Telegram</string>
<string name="NotificationContactNewPhoto">%1$s ha aggiornato la foto del profilo</string> <string name="NotificationContactNewPhoto">%1$s ha aggiornato la foto del profilo</string>
<!--contacts view--> <!--contacts view-->
<string name="SelectContact">Seleziona un contatto</string> <string name="SelectContact">Seleziona contatto</string>
<string name="NoContacts">Ancora nessun contatto</string> <string name="NoContacts">Ancora nessun contatto</string>
<string name="InviteText">Ciao, passa a Telegram: http://telegram.org/dl2</string> <string name="InviteText">Ciao, passa a Telegram: http://telegram.org/dl2</string>
<string name="TodayAt">oggi alle</string> <string name="TodayAt">oggi alle</string>
<string name="YesterdayAt">ieri alle</string> <string name="YesterdayAt">ieri alle</string>
<string name="OtherAt">alle</string> <string name="OtherAt">alle</string>
<string name="Online">online</string> <string name="Online">in linea</string>
<string name="Offline">disconnesso</string> <string name="Offline">non in linea</string>
<string name="LastSeen">ultimo accesso</string> <string name="LastSeen">ultimo accesso</string>
<string name="LastSeenDate">ultimo accesso</string> <string name="LastSeenDate">ultimo accesso</string>
<string name="InviteFriends">Invita amici</string> <string name="InviteFriends">Invita amici</string>
<!--group create view--> <!--group create view-->
<string name="SendMessageTo">Chat di gruppo con...</string> <string name="SendMessageTo">Invia messaggio a...</string>
<string name="EnterGroupNamePlaceholder">Nome del gruppo</string> <string name="EnterGroupNamePlaceholder">Immetti il nome del gruppo</string>
<string name="MEMBER">PERSONA</string> <string name="MEMBER">MEMBRO</string>
<string name="GroupName">Nome gruppo</string> <string name="GroupName">Nome gruppo</string>
<string name="MEMBERS">PERSONE</string> <string name="MEMBERS">MEMBRI</string>
<string name="AllContacts">TUTTI I CONTATTI</string> <string name="AllContacts">TUTTI I CONTATTI</string>
<!--group info view--> <!--group info view-->
@ -176,8 +180,8 @@
<string name="GroupInfo">Info gruppo</string> <string name="GroupInfo">Info gruppo</string>
<string name="SHAREDMEDIA">MEDIA CONDIVISI</string> <string name="SHAREDMEDIA">MEDIA CONDIVISI</string>
<string name="SETTINGS">IMPOSTAZIONI</string> <string name="SETTINGS">IMPOSTAZIONI</string>
<string name="AddMember">Aggiungi un contatto</string> <string name="AddMember">Aggiungi membro</string>
<string name="DeleteAndExit">Abbandona il gruppo</string> <string name="DeleteAndExit">Elimina e lascia il gruppo</string>
<string name="Notifications">Notifiche</string> <string name="Notifications">Notifiche</string>
<string name="KickFromGroup">Rimuovi dal gruppo</string> <string name="KickFromGroup">Rimuovi dal gruppo</string>
@ -196,64 +200,65 @@
<string name="PHONE">TELEFONO</string> <string name="PHONE">TELEFONO</string>
<string name="StartEncryptedChat">Inizia chat segreta</string> <string name="StartEncryptedChat">Inizia chat segreta</string>
<string name="CreateEncryptedChatError">Si è verificato un errore.</string> <string name="CreateEncryptedChatError">Si è verificato un errore.</string>
<string name="CreateEncryptedChatOutdatedError">Impossibile creare una chat segreta con %1$s.\n\n%2$s sta usando una vecchia versione di Telegram.</string> <string name="CreateEncryptedChatOutdatedError">Impossibile creare una chat segreta con %1$s.\n\n%2$s sta usando una vecchia versione di Telegram e deve prima aggiornarla.</string>
<string name="SecretTitle">Chat segreta</string> <string name="SecretTitle">Chat segreta</string>
<string name="EncryptionKey">Chiave di cifratura</string> <string name="EncryptionKey">Chiave di cifratura</string>
<string name="MessageLifetime">Autodistruzione messaggi</string> <string name="MessageLifetime">Contatore di autodistruzione</string>
<string name="ShortMessageLifetimeForever">Non attiva</string> <string name="ShortMessageLifetimeForever">Spento</string>
<string name="ShortMessageLifetime2s">2s</string> <string name="ShortMessageLifetime2s">2s</string>
<string name="ShortMessageLifetime5s">5s</string> <string name="ShortMessageLifetime5s">5s</string>
<string name="ShortMessageLifetime1m">1m</string> <string name="ShortMessageLifetime1m">1m</string>
<string name="ShortMessageLifetime1h">1h</string> <string name="ShortMessageLifetime1h">1h</string>
<string name="ShortMessageLifetime1d">1g</string> <string name="ShortMessageLifetime1d">1g</string>
<string name="ShortMessageLifetime1w">1sett</string> <string name="ShortMessageLifetime1w">1sett</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 l\'immagine è uguale sul suo telefono, la chat è sicura al 200%%.<![CDATA[<br><br>]]>Per saperne di più, visita Telegram.org</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>
<!--settings view--> <!--settings view-->
<string name="ResetNotificationsText">Impostazioni predefinite ripristinate</string> <string name="ResetNotificationsText">Ripristina tutte le impostazioni di notifica predefinite</string>
<string name="TextSize">Dimensione del testo</string> <string name="TextSize">Dimensione testo messaggi</string>
<string name="AskAQuestion">Fai una domanda</string> <string name="AskAQuestion">Fai una domanda</string>
<string name="EnableAnimations">Abilita animazioni</string> <string name="EnableAnimations">Abilita animazioni</string>
<string name="Unblock">Sblocca</string> <string name="Unblock">Sblocca</string>
<string name="UnblockText">Tieni premuto sullutente per sbloccarlo.</string> <string name="UnblockText">Tieni premuto sullutente per sbloccarlo.</string>
<string name="NoBlocked">Nessun utente bloccato</string> <string name="NoBlocked">Ancora nessun utente bloccato</string>
<string name="YourPhoneNumber">IL TUO NUMERO</string> <string name="YourPhoneNumber">IL TUO NUMERO DI TELEFONO</string>
<string name="MessageNotifications">NOTIFICHE CHAT</string> <string name="MessageNotifications">NOTIFICHE MESSAGGI</string>
<string name="Alert">Avviso</string> <string name="Alert">Avviso</string>
<string name="MessagePreview">Anteprima messaggio</string> <string name="MessagePreview">Anteprima messaggio</string>
<string name="GroupNotifications">NOTIFICHE CHAT DI GRUPPO</string> <string name="GroupNotifications">NOTIFICHE DI GRUPPO</string>
<string name="Sound">Tono notifiche</string> <string name="Sound">Suoni</string>
<string name="InAppNotifications">NOTIFICHE IN-APP</string> <string name="InAppNotifications">NOTIFICHE IN-APP</string>
<string name="InAppSounds">Suoni in-app</string> <string name="InAppSounds">Suoni in-app</string>
<string name="InAppVibrate">Vibrazione in-app</string> <string name="InAppVibrate">Vibrazione in-app</string>
<string name="Vibrate">Vibrazione</string> <string name="Vibrate">Vibrazione</string>
<string name="InAppPreview">Anteprima in-app</string> <string name="InAppPreview">Anteprima in-app</string>
<string name="Reset">RIPRISTINA</string> <string name="Reset">RIPRISTINA</string>
<string name="ResetAllNotifications">Ripristina notifiche</string> <string name="ResetAllNotifications">Ripristina tutte le notifiche</string>
<string name="UndoAllCustom">Annulla tutte le impostazioni di notifica personalizzate per tutti i tuoi contatti e gruppi</string> <string name="UndoAllCustom">Annulla tutte le impostazioni di notifica personalizzate per tutti i tuoi contatti e gruppi</string>
<string name="NotificationsAndSounds">Notifiche e toni</string> <string name="NotificationsAndSounds">Notifiche e suoni</string>
<string name="BlockedUsers">Utenti bloccati</string> <string name="BlockedUsers">Utenti bloccati</string>
<string name="SaveIncomingPhotos">Salva foto ricevute</string> <string name="SaveIncomingPhotos">Salva foto ricevute</string>
<string name="LogOut">Disconnetti</string> <string name="LogOut">Disconnetti</string>
<string name="YourFirstNameAndLastName">I TUOI DATI</string> <string name="YourFirstNameAndLastName">IL TUO NOME E COGNOME</string>
<string name="NoSound">Nessuno</string> <string name="NoSound">Nessun suono</string>
<string name="Default">Predefinito</string> <string name="Default">Predefinito</string>
<string name="Support">SUPPORTO</string> <string name="Support">SUPPORTO</string>
<string name="ChatBackground">Sfondo chat</string> <string name="ChatBackground">Sfondo chat</string>
<string name="MessagesSettings">MESSAGGI</string> <string name="MessagesSettings">MESSAGGI</string>
<string name="SendByEnter">Usa invio per inoltrare il messaggio</string> <string name="SendByEnter">Spedisci con Invio</string>
<string name="TerminateAllSessions">Termina tutte le sessioni</string> <string name="TerminateAllSessions">Chiudi tutte le altre sessioni</string>
<string name="AutomaticPhotoDownload">SCARICA AUTOMATICAMENTE LE FOTO</string> <string name="AutomaticPhotoDownload">SCARICAMENTO AUTOMATICO FOTO</string>
<string name="AutomaticAudioDownload">SCARICAMENTO AUDIO AUTOMATICO</string> <string name="AutomaticAudioDownload">SCARICAMENTO AUTOMATICO AUDIO</string>
<string name="AutomaticPhotoDownloadGroups">Chat di gruppo</string> <string name="AutomaticPhotoDownloadGroups">Gruppi</string>
<string name="AutomaticPhotoDownloadPrivateChats">Chat private</string> <string name="AutomaticPhotoDownloadPrivateChats">Chat private</string>
<string name="Events">EVENTI</string> <string name="Events">EVENTI</string>
<string name="ContactJoined">Un nuovo contatto utilizza Telegram</string> <string name="ContactJoined">Un contatto si è collegato a Telegram</string>
<string name="Pebble">PEBBLE</string> <string name="Pebble">PEBBLE</string>
<string name="Language">Lingua</string>
<!--media view--> <!--media view-->
<string name="NoMedia">Nessun media condiviso</string> <string name="NoMedia">Nessun media condiviso</string>
<string name="CancelDownload">Annulla download</string> <string name="CancelDownload">Annulla scaricamento</string>
<!--map view--> <!--map view-->
<string name="MyLocation">La mia posizione</string> <string name="MyLocation">La mia posizione</string>
@ -266,9 +271,9 @@
<string name="ShareLocation">Condividi posizione</string> <string name="ShareLocation">Condividi posizione</string>
<!--photo gallery view--> <!--photo gallery view-->
<string name="ShowAllMedia">Mostra tutti i media</string> <string name="ShowAllMedia">Mostra tutti i file media</string>
<string name="SaveToGallery">Salva nella galleria</string> <string name="SaveToGallery">Salva nella galleria</string>
<string name="Of">di</string> <string name="Of">%1$d di %2$d</string>
<string name="Gallery">Galleria</string> <string name="Gallery">Galleria</string>
<!--button titles--> <!--button titles-->
@ -294,18 +299,18 @@
<!--messages--> <!--messages-->
<string name="ActionKickUser">un1 ha rimosso un2</string> <string name="ActionKickUser">un1 ha rimosso un2</string>
<string name="ActionLeftUser">un1 ha abbandonato il gruppo</string> <string name="ActionLeftUser">un1 ha lasciato il gruppo</string>
<string name="ActionAddUser">un1 ha aggiunto un2</string> <string name="ActionAddUser">un1 ha aggiunto un2</string>
<string name="ActionRemovedPhoto">un1 ha rimosso la foto del gruppo</string> <string name="ActionRemovedPhoto">un1 ha rimosso la foto del gruppo</string>
<string name="ActionChangedPhoto">un1 ha modificato la foto del gruppo</string> <string name="ActionChangedPhoto">un1 ha cambiato la foto del gruppo</string>
<string name="ActionChangedTitle">un1 ha modificato il nome del gruppo in un2</string> <string name="ActionChangedTitle">un1 ha cambiato il nome del gruppo in un2</string>
<string name="ActionCreateGroup">un1 ha creato il gruppo</string> <string name="ActionCreateGroup">un1 ha creato il gruppo</string>
<string name="ActionYouKickUser">Hai rimosso un2</string> <string name="ActionYouKickUser">Hai rimosso un2</string>
<string name="ActionYouLeftUser">Hai abbandonato il gruppo</string> <string name="ActionYouLeftUser">Hai lasciato il gruppo</string>
<string name="ActionYouAddUser">Hai aggiunto un2</string> <string name="ActionYouAddUser">Hai aggiunto un2</string>
<string name="ActionYouRemovedPhoto">Hai rimosso la foto del gruppo</string> <string name="ActionYouRemovedPhoto">Hai rimosso la foto del gruppo</string>
<string name="ActionYouChangedPhoto">Hai modificato la foto del gruppo</string> <string name="ActionYouChangedPhoto">Hai cambiato la foto del gruppo</string>
<string name="ActionYouChangedTitle">Hai modificato il nome del gruppo in un2</string> <string name="ActionYouChangedTitle">Hai cambiato il nome del gruppo in un2</string>
<string name="ActionYouCreateGroup">Hai creato il gruppo</string> <string name="ActionYouCreateGroup">Hai creato il gruppo</string>
<string name="ActionKickUserYou">un1 ti ha rimosso</string> <string name="ActionKickUserYou">un1 ti ha rimosso</string>
<string name="ActionAddUserYou">un1 ti ha aggiunto</string> <string name="ActionAddUserYou">un1 ti ha aggiunto</string>
@ -326,14 +331,14 @@
<string name="InvalidFirstName">Nome non valido</string> <string name="InvalidFirstName">Nome non valido</string>
<string name="InvalidLastName">Cognome non valido</string> <string name="InvalidLastName">Cognome non valido</string>
<string name="Loading">Caricamento…</string> <string name="Loading">Caricamento…</string>
<string name="NoPlayerInstalled">Non hai nessun lettore video, per favore installane uno per continuare</string> <string name="NoPlayerInstalled">Non hai un lettore video, per favore installane uno per continuare</string>
<string name="NoHandleAppInstalled">Non hai nessuna applicazione che può gestire il tipo mime \'%1$s\', installane una per continuare</string> <string name="NoHandleAppInstalled">Non hai nessuna applicazione che può gestire il tipo mime \'%1$s\', installane una per continuare</string>
<string name="InviteUser">Questo utente non usa Telegram, vuoi invitarlo?</string> <string name="InviteUser">Questo utente non ha ancora Telegram, vuoi invitarlo?</string>
<string name="AreYouSure">Sei sicuro?</string> <string name="AreYouSure">Sei sicuro?</string>
<string name="AddContactQ">Desideri aggiungere il contatto?</string> <string name="AddContactQ">Vuoi aggiungere il contatto?</string>
<string name="AddToTheGroup">Desideri aggiungere %1$s al gruppo?</string> <string name="AddToTheGroup">Vuoi aggiungere %1$s al gruppo?</string>
<string name="ForwardMessagesTo">Desideri inoltrare il messaggio a %1$s?</string> <string name="ForwardMessagesTo">Vuoi inoltrare i messaggi a %1$s?</string>
<string name="DeleteChatQuestion">Desideri eliminare la chat?</string> <string name="DeleteChatQuestion">Vuoi eliminare questa chat?</string>
<!--Intro view--> <!--Intro view-->
<string name="Page1Title">Telegram</string> <string name="Page1Title">Telegram</string>
@ -345,8 +350,8 @@
<string name="Page7Title">Privato</string> <string name="Page7Title">Privato</string>
<string name="Page1Message">Benvenuto nell\'era della messaggistica veloce e sicura</string> <string name="Page1Message">Benvenuto nell\'era della messaggistica veloce e sicura</string>
<string name="Page2Message"><![CDATA[<b>Telegram</b>]]> consegna i messaggi più velocemente di qualsiasi altra applicazione</string> <string name="Page2Message"><![CDATA[<b>Telegram</b>]]> consegna i messaggi più velocemente di qualsiasi altra applicazione</string>
<string name="Page3Message"><![CDATA[<b>Telegram</b>]]> è gratuito per sempre. Nessuna pubblicità. Nessun costo di abbonamento</string> <string name="Page3Message"><![CDATA[<b>Telegram</b>]]> è gratuita per sempre. Nessuna pubblicità. Nessun costo di abbonamento</string>
<string name="Page4Message"><![CDATA[<b>Telegram</b>]]> tiene al sicuro i tuoi messaggi da attacchi hacker</string> <string name="Page4Message"><![CDATA[<b>Telegram</b>]]> tiene al sicuro i tuoi messaggi dagli attacchi dei hacker</string>
<string name="Page5Message"><![CDATA[<b>Telegram</b>]]> non ha limiti sulle dimensioni dei tuoi file multimediali e delle chat</string> <string name="Page5Message"><![CDATA[<b>Telegram</b>]]> non ha limiti sulle dimensioni dei tuoi file multimediali e delle chat</string>
<string name="Page6Message"><![CDATA[<b>Telegram</b>]]> ti consente di accedere ai messaggi da più dispositivi</string> <string name="Page6Message"><![CDATA[<b>Telegram</b>]]> ti consente di accedere ai messaggi da più dispositivi</string>
<string name="Page7Message"><![CDATA[<b>Telegram</b>]]> cifra in maniera sicura i messaggi e può far sì che si autodistruggano</string> <string name="Page7Message"><![CDATA[<b>Telegram</b>]]> cifra in maniera sicura i messaggi e può far sì che si autodistruggano</string>

View file

@ -5,6 +5,9 @@
<resources> <resources>
<string name="AppName">Telegram</string> <string name="AppName">Telegram</string>
<string name="LanguangeName">Nederlands</string>
<string name="LanguangeNameInEnglish">Dutch</string>
<!--signin view--> <!--signin view-->
<string name="YourPhone">Uw telefoon</string> <string name="YourPhone">Uw telefoon</string>
<string name="StartText">Bevestig uw landcode\nen voer uw telefoonnummer in.</string> <string name="StartText">Bevestig uw landcode\nen voer uw telefoonnummer in.</string>
@ -107,6 +110,7 @@
<string name="DeleteThisGroup">Deze groep verwijderen</string> <string name="DeleteThisGroup">Deze groep verwijderen</string>
<string name="SlideToCancel">SLEEP OM TE ANNULEREN</string> <string name="SlideToCancel">SLEEP OM TE ANNULEREN</string>
<string name="SaveToDownloads">Opslaan in downloads</string> <string name="SaveToDownloads">Opslaan in downloads</string>
<string name="ApplyLocalizationFile">Apply localization file</string>
<!--notification--> <!--notification-->
<string name="EncryptedChatRequested">Privégesprek aangevraagd</string> <string name="EncryptedChatRequested">Privégesprek aangevraagd</string>
@ -250,6 +254,7 @@
<string name="Events">GEBEURTENISSEN</string> <string name="Events">GEBEURTENISSEN</string>
<string name="ContactJoined">Contact lid geworden van Telegram</string> <string name="ContactJoined">Contact lid geworden van Telegram</string>
<string name="Pebble">PEBBLE</string> <string name="Pebble">PEBBLE</string>
<string name="Language">Taal</string>
<!--media view--> <!--media view-->
<string name="NoMedia">Nog geen media gedeeld</string> <string name="NoMedia">Nog geen media gedeeld</string>
@ -268,7 +273,7 @@
<!--photo gallery view--> <!--photo gallery view-->
<string name="ShowAllMedia">Alle media weergeven</string> <string name="ShowAllMedia">Alle media weergeven</string>
<string name="SaveToGallery">Opslaan in galerij</string> <string name="SaveToGallery">Opslaan in galerij</string>
<string name="Of">van</string> <string name="Of">%1$d van %1$d</string>
<string name="Gallery">Galerij</string> <string name="Gallery">Galerij</string>
<!--button titles--> <!--button titles-->

View file

@ -5,6 +5,9 @@
<resources> <resources>
<string name="AppName">Telegram</string> <string name="AppName">Telegram</string>
<string name="LanguangeName">English</string>
<string name="LanguangeNameInEnglish">English</string>
<!--signin view--> <!--signin view-->
<string name="YourPhone">Your phone</string> <string name="YourPhone">Your phone</string>
<string name="StartText">Please confirm your country code\nand enter your phone number.</string> <string name="StartText">Please confirm your country code\nand enter your phone number.</string>
@ -107,6 +110,7 @@
<string name="DeleteThisGroup">Delete this group</string> <string name="DeleteThisGroup">Delete this group</string>
<string name="SlideToCancel">SLIDE TO CANCEL</string> <string name="SlideToCancel">SLIDE TO CANCEL</string>
<string name="SaveToDownloads">Save to downloads</string> <string name="SaveToDownloads">Save to downloads</string>
<string name="ApplyLocalizationFile">Apply localization file</string>
<!--notification--> <!--notification-->
<string name="EncryptedChatRequested">Secret chat requested</string> <string name="EncryptedChatRequested">Secret chat requested</string>
@ -250,6 +254,7 @@
<string name="Events">EVENTS</string> <string name="Events">EVENTS</string>
<string name="ContactJoined">Contact joined Telegram</string> <string name="ContactJoined">Contact joined Telegram</string>
<string name="Pebble">PEBBLE</string> <string name="Pebble">PEBBLE</string>
<string name="Language">Language</string>
<!--media view--> <!--media view-->
<string name="NoMedia">No shared media yet</string> <string name="NoMedia">No shared media yet</string>
@ -268,7 +273,7 @@
<!--photo gallery view--> <!--photo gallery view-->
<string name="ShowAllMedia">Show all media</string> <string name="ShowAllMedia">Show all media</string>
<string name="SaveToGallery">Save to gallery</string> <string name="SaveToGallery">Save to gallery</string>
<string name="Of">of</string> <string name="Of">%1$d of %2$d</string>
<string name="Gallery">Gallery</string> <string name="Gallery">Gallery</string>
<!--button titles--> <!--button titles-->