Compare commits
53 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fbc61bce2a | |||
| 5c98e34966 | |||
| 9b461d372d | |||
| b57a81c7c2 | |||
| 7cf41805ec | |||
| 59efa059fd | |||
| e462d66746 | |||
| cd0c3f533a | |||
| 0027b17ef9 | |||
| 9ee5325f29 | |||
| ac433edcf8 | |||
| f71e7e58e1 | |||
| 4af1e9263a | |||
| 01d3a75faa | |||
| d015ab4e93 | |||
| abcf3600a6 | |||
| ac6c497721 | |||
| 2dafecc665 | |||
| 3a48f0a04a | |||
| 1caf3a8956 | |||
| ba1dd07b01 | |||
| 695a97276f | |||
| 0d50753754 | |||
| e357786980 | |||
| 54ab0ba860 | |||
| 44675fffe5 | |||
| e5c6fb0e50 | |||
| 82666fb5f0 | |||
| 9ab86ca310 | |||
| 7153b4c7be | |||
| e73f4f30cb | |||
| e365a20d6e | |||
| 4a9f9eefd2 | |||
| 2ff632bb87 | |||
| f5be0708be | |||
| 92908ab673 | |||
| c20f8699f3 | |||
| 81e60a3916 | |||
| 4f8e25a6c0 | |||
| 4038088c5f | |||
| bc972faf2a | |||
| 0720fec295 | |||
| fba37c7c12 | |||
| debaa48e58 | |||
| c4a63657cd | |||
| a723783c01 | |||
| 26a922e16a | |||
| 9a20d33d55 | |||
| 3abe9946d4 | |||
| dcf4857b6e | |||
| 701ae43bd6 | |||
| cb67d0a45b | |||
| 1684bc3acc |
@@ -1,5 +1,24 @@
|
||||
# Delta Chat Changelog
|
||||
|
||||
## v0.9.4
|
||||
2017-08-23
|
||||
|
||||
* Introduce an editable "Status" field that is shown eg. in email footers
|
||||
* Editable and synchronized group images
|
||||
* Show the subject of messages that cannot be decrypted
|
||||
* Do not send "Read receipts" when decryption fails
|
||||
* Deleting a chat always deletes all messages from the device permanently
|
||||
* Ignore messages from mailing lists
|
||||
* Do not spread the original authors name nor address on forwarding
|
||||
* Encrypt mails send to SMTP and to IMAP the same way
|
||||
* Improve showing HTML-mails
|
||||
* Cleanup Android code
|
||||
* Remove badge counter on app restart
|
||||
* Add Ukrainian translation
|
||||
* Add Telugu translation
|
||||
* Add Catalan translation
|
||||
* Update German, Spanish, French, Hungarian, Italian, Polish, Portuguese and Russian translations
|
||||
|
||||
## v0.9.3
|
||||
2017-07-13
|
||||
|
||||
|
||||
@@ -48,7 +48,10 @@ android {
|
||||
|
||||
signingConfigs {
|
||||
debug {
|
||||
storeFile file("config/debug.keystore")
|
||||
def debugKeystore = file("config/debug.keystore")
|
||||
if (debugKeystore.exists()) {
|
||||
storeFile debugKeystore
|
||||
}
|
||||
}
|
||||
|
||||
release {
|
||||
@@ -76,7 +79,7 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
defaultConfig.versionCode = 42
|
||||
defaultConfig.versionCode = 43
|
||||
|
||||
sourceSets.main {
|
||||
jniLibs.srcDir 'libs'
|
||||
@@ -118,6 +121,6 @@ android {
|
||||
minSdkVersion 14 // 14: Android 4.0 Ice Cream Sandwich 2011 (Telegram default), 21: Android 5.0 Lollipop 2014 (recommended for InstantRun)
|
||||
targetSdkVersion 25 // 25: Nougat. CAVE: Do NOT target "Andoid O" without checking the background tasks carefully, see https://developer.android.com/preview/behavior-changes.html#back-all . As long as we target "Nougat", everything works as expected even for "Andoid O" or later
|
||||
// in general, we should not change the target without reason; eg. after the switch to Nougat, the camera stops working (see https://inthecheesefactory.com/blog/how-to-share-access-to-file-with-fileprovider-on-android-nougat/en )
|
||||
versionName "0.9.3" // do NOT forget to increase defaultConfig.versionCode!
|
||||
versionName "0.9.4" // do NOT forget to increase defaultConfig.versionCode!
|
||||
}
|
||||
}
|
||||
|
||||
@@ -421,6 +421,15 @@ JNIEXPORT jint Java_com_b44t_messenger_MrMailbox_setChatName(JNIEnv *env, jclass
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT jint Java_com_b44t_messenger_MrMailbox_setChatImage(JNIEnv *env, jclass cls, jint chat_id, jstring image/*NULL=delete*/)
|
||||
{
|
||||
CHAR_REF(image);
|
||||
jint ret = (jint)mrmailbox_set_chat_image(get_mrmailbox_t(env, cls), chat_id, imagePtr/*CHAR_REF() preserves NULL*/);
|
||||
CHAR_UNREF(image);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT void Java_com_b44t_messenger_MrMailbox_deleteChat(JNIEnv *env, jclass cls, jint chat_id)
|
||||
{
|
||||
mrmailbox_delete_chat(get_mrmailbox_t(env, cls), chat_id);
|
||||
@@ -464,11 +473,11 @@ JNIEXPORT void Java_com_b44t_messenger_MrMailbox_forwardMsgs(JNIEnv *env, jclass
|
||||
|
||||
/* MrMailbox - handle config */
|
||||
|
||||
JNIEXPORT void Java_com_b44t_messenger_MrMailbox_setConfig(JNIEnv *env, jclass cls, jstring key, jstring value)
|
||||
JNIEXPORT void Java_com_b44t_messenger_MrMailbox_setConfig(JNIEnv *env, jclass cls, jstring key, jstring value /*may be NULL*/)
|
||||
{
|
||||
CHAR_REF(key);
|
||||
CHAR_REF(value);
|
||||
mrmailbox_set_config(get_mrmailbox_t(env, cls), keyPtr, valuePtr);
|
||||
mrmailbox_set_config(get_mrmailbox_t(env, cls), keyPtr, valuePtr /*is NULL if value is NULL, CHAR_REF() handles this*/);
|
||||
CHAR_UNREF(key);
|
||||
CHAR_UNREF(value);
|
||||
}
|
||||
@@ -482,16 +491,19 @@ JNIEXPORT void Java_com_b44t_messenger_MrMailbox_setConfigInt(JNIEnv *env, jclas
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT jstring Java_com_b44t_messenger_MrMailbox_getConfig(JNIEnv *env, jclass cls, jstring key, jstring def)
|
||||
JNIEXPORT jstring Java_com_b44t_messenger_MrMailbox_getConfig(JNIEnv *env, jclass cls, jstring key, jstring def/*may be NULL*/)
|
||||
{
|
||||
CHAR_REF(key);
|
||||
CHAR_REF(def);
|
||||
char* temp = mrmailbox_get_config(get_mrmailbox_t(env, cls), keyPtr, defPtr);
|
||||
jstring ret = JSTRING_NEW(temp);
|
||||
char* temp = mrmailbox_get_config(get_mrmailbox_t(env, cls), keyPtr, defPtr /*is NULL if value is NULL, CHAR_REF() handles this*/);
|
||||
jstring ret = NULL;
|
||||
if( temp ) {
|
||||
ret = JSTRING_NEW(temp);
|
||||
}
|
||||
free(temp);
|
||||
CHAR_UNREF(key);
|
||||
CHAR_UNREF(def);
|
||||
return ret;
|
||||
return ret; /* returns NULL only if key is unset and "def" is NULL */
|
||||
}
|
||||
|
||||
|
||||
@@ -643,6 +655,21 @@ JNIEXPORT jstring Java_com_b44t_messenger_MrChat_getSubtitle(JNIEnv *env, jclass
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT jint Java_com_b44t_messenger_MrChat_getParam(JNIEnv *env, jclass cls, jint key, jstring def)
|
||||
{
|
||||
mrchat_t* ths = get_mrchat_t(env, cls);
|
||||
jstring ret = NULL;
|
||||
CHAR_REF(def);
|
||||
char* temp = mrparam_get(ths? ths->m_param:NULL, key, defPtr);
|
||||
if( temp ) {
|
||||
ret = JSTRING_NEW(temp);
|
||||
free(temp);
|
||||
}
|
||||
CHAR_UNREF(def);
|
||||
return ret; /* returns NULL only if key is unset and "def" is NULL */
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT jint Java_com_b44t_messenger_MrChat_getParamInt(JNIEnv *env, jclass cls, jint key, jint def)
|
||||
{
|
||||
mrchat_t* ths = get_mrchat_t(env, cls);
|
||||
@@ -674,12 +701,6 @@ JNIEXPORT jint Java_com_b44t_messenger_MrChat_MrChatGetDraftReplyToMsgId(JNIEnv
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT jint Java_com_b44t_messenger_MrChat_MrChatGetTotalMsgCount(JNIEnv *env, jclass c, jlong hChat)
|
||||
{
|
||||
return mrchat_get_total_msg_count((mrchat_t*)hChat);
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT jint Java_com_b44t_messenger_MrChat_getFreshMsgCount(JNIEnv *env, jclass cls)
|
||||
{
|
||||
return mrchat_get_fresh_msg_count(get_mrchat_t(env, cls));
|
||||
@@ -866,10 +887,13 @@ JNIEXPORT jint Java_com_b44t_messenger_MrMsg_MrMsgGetToId(JNIEnv *env, jclass c,
|
||||
JNIEXPORT jstring Java_com_b44t_messenger_MrMsg_getParam(JNIEnv *env, jobject obj, jint key, jstring def)
|
||||
{
|
||||
mrmsg_t* ths = get_mrmsg_t(env, obj);
|
||||
jstring ret = NULL;
|
||||
CHAR_REF(def);
|
||||
char* temp = mrparam_get(ths? ths->m_param:NULL, key, defPtr);
|
||||
jstring ret = JSTRING_NEW(temp);
|
||||
free(temp);
|
||||
if( temp ) {
|
||||
ret = JSTRING_NEW(temp);
|
||||
free(temp);
|
||||
}
|
||||
CHAR_UNREF(def);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -105,13 +105,6 @@
|
||||
<category android:name="android.intent.category.BROWSABLE"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- if used, add 'android:manageSpaceActivity="com.b44t.ui.ManageSpaceActivity"' to application-tag
|
||||
<activity
|
||||
android:name="com.b44t.ui.ManageSpaceActivity"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
|
||||
android:launchMode="singleTask"
|
||||
android:windowSoftInputMode="adjustPan">
|
||||
</activity> -->
|
||||
<activity
|
||||
android:name="com.b44t.ui.IntroActivity"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
|
||||
|
||||
@@ -98,7 +98,6 @@ public class AndroidUtilities {
|
||||
public static DisplayMetrics displayMetrics = new DisplayMetrics();
|
||||
public static int leftBaseline;
|
||||
public static boolean usingHardwareInput;
|
||||
private static Boolean isTablet = null;
|
||||
private static int adjustOwnerClassGuid = 0;
|
||||
|
||||
static {
|
||||
@@ -121,12 +120,12 @@ public class AndroidUtilities {
|
||||
|
||||
static {
|
||||
density = ApplicationLoader.applicationContext.getResources().getDisplayMetrics().density;
|
||||
leftBaseline = isTablet() ? 80 : 72;
|
||||
leftBaseline = 72;
|
||||
checkDisplaySize();
|
||||
}
|
||||
|
||||
public static void requestAdjustResize(Activity activity, int classGuid) {
|
||||
if (activity == null || isTablet()) {
|
||||
if (activity == null) {
|
||||
return;
|
||||
}
|
||||
activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||
@@ -134,7 +133,7 @@ public class AndroidUtilities {
|
||||
}
|
||||
|
||||
public static void removeAdjustResize(Activity activity, int classGuid) {
|
||||
if (activity == null || isTablet()) {
|
||||
if (activity == null ) {
|
||||
return;
|
||||
}
|
||||
if (adjustOwnerClassGuid == classGuid) {
|
||||
@@ -330,43 +329,6 @@ public class AndroidUtilities {
|
||||
ApplicationLoader.applicationHandler.removeCallbacks(runnable);
|
||||
}
|
||||
|
||||
public static boolean isTablet() {
|
||||
/* -- we do not make any special for tablet or not. _If_ sth. like this is desired, check for an appropriate screen size.
|
||||
if (isTablet == null) {
|
||||
isTablet = ApplicationLoader.applicationContext.getResources().getBoolean(R.bool.isTablet);
|
||||
}
|
||||
return isTablet;
|
||||
*/
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isSmallTablet() {
|
||||
/*
|
||||
float minSide = Math.min(displaySize.x, displaySize.y) / density;
|
||||
return minSide <= 700;
|
||||
*/
|
||||
return false;
|
||||
}
|
||||
|
||||
public static int getMinTabletSide() {
|
||||
if (!isSmallTablet()) {
|
||||
int smallSide = Math.min(displaySize.x, displaySize.y);
|
||||
int leftSide = smallSide * 35 / 100;
|
||||
if (leftSide < dp(320)) {
|
||||
leftSide = dp(320);
|
||||
}
|
||||
return smallSide - leftSide;
|
||||
} else {
|
||||
int smallSide = Math.min(displaySize.x, displaySize.y);
|
||||
int maxSide = Math.max(displaySize.x, displaySize.y);
|
||||
int leftSide = maxSide * 35 / 100;
|
||||
if (leftSide < dp(320)) {
|
||||
leftSide = dp(320);
|
||||
}
|
||||
return Math.min(smallSide, maxSide - leftSide);
|
||||
}
|
||||
}
|
||||
|
||||
public static int getPhotoSize() {
|
||||
if (photoSize == null) {
|
||||
if (Build.VERSION.SDK_INT >= 16) {
|
||||
@@ -378,19 +340,6 @@ public class AndroidUtilities {
|
||||
return photoSize;
|
||||
}
|
||||
|
||||
public static void clearCursorDrawable(EditText editText) {
|
||||
if (editText == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
Field mCursorDrawableRes = TextView.class.getDeclaredField("mCursorDrawableRes");
|
||||
mCursorDrawableRes.setAccessible(true);
|
||||
mCursorDrawableRes.setInt(editText, 0);
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private static Intent createShortcutIntent(int did, Bitmap bitmap) {
|
||||
Intent shortcutIntent = new Intent(ApplicationLoader.applicationContext, OpenChatReceiver.class);
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ public class ApplicationLoader extends Application {
|
||||
}
|
||||
|
||||
public static int getServiceMessageColor() {
|
||||
return 0x44000000; // this color is used as a background for date headlines, empty chat hints and in the drawer
|
||||
return 0x44000000; // this color is used as a background for date headlines and empty chat hints
|
||||
}
|
||||
|
||||
public static void loadWallpaper() {
|
||||
@@ -182,7 +182,7 @@ public class ApplicationLoader extends Application {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
// track screen on/ff
|
||||
// track screen on/off
|
||||
try {
|
||||
final IntentFilter filter = new IntentFilter(Intent.ACTION_SCREEN_ON);
|
||||
filter.addAction(Intent.ACTION_SCREEN_OFF);
|
||||
@@ -227,6 +227,7 @@ public class ApplicationLoader extends Application {
|
||||
|
||||
ImageLoader.getInstance();
|
||||
MediaController.getInstance();
|
||||
NotificationsController.getInstance(); // force instace creation which also does some init stuff
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -167,12 +167,14 @@ public class ContactsController {
|
||||
// get email/name to search avatar image for
|
||||
String tempEmail = null;
|
||||
String tempName = "";
|
||||
String tempPath = "";
|
||||
if (mrContact != null) {
|
||||
tempEmail = mrContact.getAddr();
|
||||
tempName = mrContact.getDisplayName();
|
||||
} else if (mrChat != null) {
|
||||
tempName = mrChat.getName();
|
||||
if (mrChat.getType() == MrChat.MR_CHAT_NORMAL) {
|
||||
int chatType = mrChat.getType();
|
||||
if (chatType == MrChat.MR_CHAT_NORMAL) {
|
||||
int[] contact_ids = MrMailbox.getChatContacts(mrChat.getId());
|
||||
if (contact_ids.length == 1) {
|
||||
MrContact mrc = MrMailbox.getContact(contact_ids[0]);
|
||||
@@ -180,16 +182,20 @@ public class ContactsController {
|
||||
tempName = mrc.getDisplayName();
|
||||
}
|
||||
}
|
||||
else if( chatType == MrChat.MR_CHAT_GROUP ) {
|
||||
tempPath = mrChat.getParam(MrChat.MRP_PROFILE_IMAGE, "");
|
||||
}
|
||||
}
|
||||
|
||||
setupAvatarByStrings(avtView, avtImageReceiver, avtDrawable, tempEmail, tempName);
|
||||
setupAvatarByStrings(avtView, avtImageReceiver, avtDrawable, tempEmail, tempName, tempPath);
|
||||
}
|
||||
|
||||
public static void setupAvatarByStrings(final View avtView,
|
||||
private static void setupAvatarByStrings(final View avtView,
|
||||
final ImageReceiver avtImageReceiver,
|
||||
final AvatarDrawable avtDrawable,
|
||||
String tempEmail,
|
||||
String tempName)
|
||||
String tempName,
|
||||
String tempPath)
|
||||
{
|
||||
if( tempEmail == null ) {
|
||||
tempEmail = "fallback:" + tempName;
|
||||
@@ -197,13 +203,14 @@ public class ContactsController {
|
||||
|
||||
final String email = tempEmail;
|
||||
final String fallbackName = tempName;
|
||||
final String path = tempPath;
|
||||
|
||||
// bind email+name address to view object to detect overwrites and discard loading old images (may happen on fast scrolling)
|
||||
// moreover, check if the avatar is in cache
|
||||
AvtCacheEntry cacheEntry;
|
||||
synchronized (s_sync) {
|
||||
avtImageReceiver.m_userDataUnique = email+fallbackName;
|
||||
cacheEntry = s_avtCache.get(email+fallbackName);
|
||||
avtImageReceiver.m_userDataUnique = email+fallbackName+path;
|
||||
cacheEntry = s_avtCache.get(email+fallbackName+path);
|
||||
}
|
||||
|
||||
if( cacheEntry != null )
|
||||
@@ -231,14 +238,27 @@ public class ContactsController {
|
||||
public void run() {
|
||||
// is the avatar still desired?
|
||||
synchronized (s_sync) {
|
||||
if (!avtImageReceiver.m_userDataUnique.equals(email+fallbackName)) {
|
||||
if (!avtImageReceiver.m_userDataUnique.equals(email+fallbackName+path)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// try to get avatar image from the address book
|
||||
Bitmap tempBitmap = null;
|
||||
if (!email.startsWith("fallback:")) {
|
||||
|
||||
if( !path.isEmpty() ) {
|
||||
try {
|
||||
Bitmap tempBitmap2 = BitmapFactory.decodeFile(path);
|
||||
if (tempBitmap2 != null) {
|
||||
tempBitmap = createRoundBitmap(tempBitmap2);
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
if( tempBitmap==null && !email.startsWith("fallback:")) {
|
||||
try {
|
||||
if (s_cr == null) {
|
||||
s_cr = ApplicationLoader.applicationContext.getContentResolver();
|
||||
@@ -274,7 +294,7 @@ public class ContactsController {
|
||||
public void run() {
|
||||
// is the avatar still desired?
|
||||
synchronized (s_sync) {
|
||||
if (!avtImageReceiver.m_userDataUnique.equals(email+fallbackName)) {
|
||||
if (!avtImageReceiver.m_userDataUnique.equals(email+fallbackName+path)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -288,7 +308,7 @@ public class ContactsController {
|
||||
avtView.invalidate();
|
||||
|
||||
synchronized (s_sync) {
|
||||
s_avtCache.put(email+fallbackName, new AvtCacheEntry(photoBitmap, fallbackName));
|
||||
s_avtCache.put(email+fallbackName+path, new AvtCacheEntry(photoBitmap, fallbackName));
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -334,7 +354,8 @@ public class ContactsController {
|
||||
private static RectF bitmapRect;
|
||||
private static Bitmap createRoundBitmap(Bitmap bitmap) {
|
||||
try {
|
||||
Bitmap result = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888);
|
||||
int wh = Math.min(bitmap.getWidth(), bitmap.getHeight());
|
||||
Bitmap result = Bitmap.createBitmap(wh, wh, Bitmap.Config.ARGB_8888);
|
||||
result.eraseColor(Color.TRANSPARENT);
|
||||
Canvas canvas = new Canvas(result);
|
||||
BitmapShader shader = new BitmapShader(bitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
|
||||
@@ -343,8 +364,8 @@ public class ContactsController {
|
||||
bitmapRect = new RectF();
|
||||
}
|
||||
roundPaint.setShader(shader);
|
||||
bitmapRect.set(0, 0, bitmap.getWidth(), bitmap.getHeight());
|
||||
canvas.drawRoundRect(bitmapRect, bitmap.getWidth(), bitmap.getHeight(), roundPaint);
|
||||
bitmapRect.set(0, 0, wh, wh);
|
||||
canvas.drawRoundRect(bitmapRect, wh, wh, roundPaint);
|
||||
return result;
|
||||
} catch (Throwable e) {
|
||||
;
|
||||
|
||||
@@ -68,7 +68,7 @@ public class Emoji {
|
||||
emojiFullSize = 64;
|
||||
}
|
||||
drawImgSize = AndroidUtilities.dp(20);
|
||||
bigImgSize = AndroidUtilities.dp(AndroidUtilities.isTablet() ? 40 : 32);
|
||||
bigImgSize = AndroidUtilities.dp(32);
|
||||
|
||||
for (int j = 0; j < EmojiData.data.length; j++) {
|
||||
int count2 = (int) Math.ceil(EmojiData.data[j].length / (float) splitCount);
|
||||
|
||||
@@ -325,18 +325,10 @@ public class MessageObject {
|
||||
|
||||
int maxWidth;
|
||||
boolean substractAvatar = !isOut() && MrMailbox.getChat((int)messageOwner.dialog_id).getType()==MrChat.MR_CHAT_GROUP;
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
if (substractAvatar) {
|
||||
maxWidth = AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(122);
|
||||
} else {
|
||||
maxWidth = AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(80);
|
||||
}
|
||||
if (substractAvatar) {
|
||||
maxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(122);
|
||||
} else {
|
||||
if (substractAvatar) {
|
||||
maxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(122);
|
||||
} else {
|
||||
maxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(80);
|
||||
}
|
||||
maxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(80);
|
||||
}
|
||||
|
||||
StaticLayout textLayout;
|
||||
@@ -625,11 +617,7 @@ public class MessageObject {
|
||||
} else if (type == MO_TYPE13_STICKER) {
|
||||
float maxHeight = AndroidUtilities.displaySize.y * 0.4f;
|
||||
float maxWidth;
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
maxWidth = AndroidUtilities.getMinTabletSide() * 0.5f;
|
||||
} else {
|
||||
maxWidth = AndroidUtilities.displaySize.x * 0.5f;
|
||||
}
|
||||
maxWidth = AndroidUtilities.displaySize.x * 0.5f;
|
||||
int photoHeight = 0;
|
||||
int photoWidth = 0;
|
||||
for (TLRPC.DocumentAttribute attribute : messageOwner.media.document.attributes) {
|
||||
@@ -655,11 +643,7 @@ public class MessageObject {
|
||||
int photoHeight;
|
||||
int photoWidth;
|
||||
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
photoWidth = (int) (AndroidUtilities.getMinTabletSide() * 0.7f);
|
||||
} else {
|
||||
photoWidth = (int) (Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) * 0.7f);
|
||||
}
|
||||
photoWidth = (int) (Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) * 0.7f);
|
||||
photoHeight = photoWidth + AndroidUtilities.dp(100);
|
||||
if (photoWidth > AndroidUtilities.getPhotoSize()) {
|
||||
photoWidth = AndroidUtilities.getPhotoSize();
|
||||
@@ -726,11 +710,7 @@ public class MessageObject {
|
||||
}
|
||||
|
||||
public boolean isForwarded() {
|
||||
return isForwardedMessage(messageOwner);
|
||||
}
|
||||
|
||||
private static boolean isForwardedMessage(TLRPC.Message message) {
|
||||
return (message.flags & TLRPC.MESSAGE_FLAG_FWD) != 0;
|
||||
return (messageOwner.flags & TLRPC.MESSAGE_FLAG_FWD) != 0;
|
||||
}
|
||||
|
||||
private boolean isMediaEmpty() {
|
||||
@@ -741,13 +721,6 @@ public class MessageObject {
|
||||
return message == null || message.media == null || message.media instanceof TLRPC.TL_messageMediaEmpty;
|
||||
}
|
||||
|
||||
public String getForwardedName() {
|
||||
if (messageOwner.fwd_from != null) {
|
||||
return messageOwner.fwd_from.m_name;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void checkMediaExistance() {
|
||||
attachPathExists = false;
|
||||
mediaExists = false;
|
||||
|
||||
@@ -35,6 +35,7 @@ public class MrChat {
|
||||
public final static int MR_CHAT_GROUP = 120;
|
||||
|
||||
public final static int MR_CHAT_ID_DEADDROP = 1;
|
||||
public final static int MR_CHAT_ID_LAST_SPECIAL = 9;
|
||||
|
||||
public MrChat(long hChat) {
|
||||
m_hChat = hChat;
|
||||
@@ -50,7 +51,9 @@ public class MrChat {
|
||||
public native String getName();
|
||||
public native String getSubtitle();
|
||||
|
||||
public static int MR_CHAT_PARAM_UNPROMOTED = 'U';
|
||||
public static int MRP_UNPROMOTED = 'U';
|
||||
public static int MRP_PROFILE_IMAGE = 'i';
|
||||
public native String getParam(int key, String def);
|
||||
public native int getParamInt(int key, int def);
|
||||
|
||||
public String getDraft() {
|
||||
@@ -70,10 +73,6 @@ public class MrChat {
|
||||
}
|
||||
public native int getFreshMsgCount();
|
||||
|
||||
public int getTotalMsgCount() {
|
||||
return MrChatGetTotalMsgCount(m_hChat);
|
||||
}
|
||||
|
||||
public native int sendText(String text);
|
||||
|
||||
public native int sendMedia(int type, String file, String mime, int w, int h, int time_ms, String author, String trackname);
|
||||
@@ -84,7 +83,6 @@ public class MrChat {
|
||||
private native static long MrChatGetDraftTimestamp (long hChat); // returns 0 for "no draft"
|
||||
private native static int MrChatGetDraftReplyToMsgId (long hChat); // returns 0 for "no draft"
|
||||
private native static int MrChatSetDraft (long hChat, String draft/*NULL=delete*/, long replyToMsgId);
|
||||
private native static int MrChatGetTotalMsgCount (long hChat);
|
||||
|
||||
|
||||
/* additional functions that are not 1:1 available in the backend
|
||||
|
||||
@@ -134,6 +134,7 @@ public class MrMailbox {
|
||||
public native static int addContactToChat (int chat_id, int contact_id);
|
||||
public native static int removeContactFromChat (int chat_id, int contact_id);
|
||||
public native static int setChatName (int chat_id, String name);
|
||||
public native static int setChatImage (int chat_id, String name);
|
||||
|
||||
public final static int MR_GCM_ADDDAYMARKER = 0x01;
|
||||
public native static int[] getChatMsgs(int chat_id, int flags, int marker1before);
|
||||
@@ -380,6 +381,7 @@ public class MrMailbox {
|
||||
case 30: s = ApplicationLoader.applicationContext.getString(R.string.EncrinfoFingerprints); break;
|
||||
case 31: s = ApplicationLoader.applicationContext.getString(R.string.ReadReceipt); break;
|
||||
case 32: s = ApplicationLoader.applicationContext.getString(R.string.ReadReceiptMailBody); break;
|
||||
case 33: s = ApplicationLoader.applicationContext.getString(R.string.MsgGroupImageDeleted); break;
|
||||
}
|
||||
return String2CPtr(s);
|
||||
|
||||
|
||||
@@ -272,11 +272,6 @@ public class MrMsg {
|
||||
|
||||
if( !getParam('a', "").equals("") ) {
|
||||
ret.flags |= TLRPC.MESSAGE_FLAG_FWD;
|
||||
ret.fwd_from = new TLRPC.TL_messageFwdHeader();
|
||||
ret.fwd_from.m_name = getParam('A', "");
|
||||
if( ret.fwd_from.m_name.isEmpty() ) {
|
||||
ret.fwd_from.m_name = getParam('a', "");
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -48,7 +48,6 @@ public class NotificationCenter {
|
||||
public static final int mediaCountDidLoaded = totalEvents++;
|
||||
public static final int notificationsSettingsUpdated = totalEvents++;
|
||||
public static final int blockedUsersDidLoaded = totalEvents++;
|
||||
public static final int openedChatChanged = totalEvents++;
|
||||
public static final int mainUserInfoChanged = totalEvents++;
|
||||
public static final int recentImagesDidLoaded = totalEvents++;
|
||||
public static final int waveformCalculated = totalEvents++;
|
||||
|
||||
@@ -148,6 +148,8 @@ public class NotificationsController {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
setBadge(0); // the set badge number survives application restarts, so reset it when creating
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -200,10 +200,6 @@ public class TLRPC {
|
||||
public int hash;
|
||||
}
|
||||
|
||||
public static class TL_messageFwdHeader extends TLObject {
|
||||
public String m_name;
|
||||
}
|
||||
|
||||
public static class FileLocation extends TLObject {
|
||||
public int dc_id;
|
||||
public long volume_id;
|
||||
@@ -284,7 +280,6 @@ public class TLRPC {
|
||||
public final int views = 0;
|
||||
public final boolean silent = false;
|
||||
public final boolean post = false;// ? true=avatar wird in gruppen nicht angezeigt, wird aber in isFromUser() auch überprüft...
|
||||
public TL_messageFwdHeader fwd_from;
|
||||
public int send_state = 0; //custom
|
||||
public String attachPath = ""; //custom
|
||||
public HashMap<String, String> params; //custom
|
||||
|
||||
@@ -378,12 +378,6 @@ public class ActionBar extends FrameLayout {
|
||||
if (subtitleTextView != null) {
|
||||
subtitleTextView.setVisibility(visible ? INVISIBLE : VISIBLE);
|
||||
}
|
||||
if( backButtonImageView != null ) {
|
||||
Drawable drawable = backButtonImageView.getDrawable();
|
||||
if (drawable != null && drawable instanceof MenuDrawable) {
|
||||
((MenuDrawable) drawable).setRotation(visible ? 1 : 0, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setInterceptTouches(boolean value) {
|
||||
@@ -435,12 +429,11 @@ public class ActionBar extends FrameLayout {
|
||||
int availableWidth = width - (menu != null ? menu.getMeasuredWidth() : 0) - AndroidUtilities.dp(16) - textLeft;
|
||||
|
||||
if (titleTextView != null && titleTextView.getVisibility() != GONE) {
|
||||
titleTextView.setTextSize(!AndroidUtilities.isTablet() && getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE ? 18 : 20);
|
||||
titleTextView.setTextSize(getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE ? 18 : 20);
|
||||
titleTextView.measure(MeasureSpec.makeMeasureSpec(availableWidth, MeasureSpec.AT_MOST), MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(24), MeasureSpec.AT_MOST));
|
||||
|
||||
}
|
||||
if (subtitleTextView != null && subtitleTextView.getVisibility() != GONE) {
|
||||
//subtitleTextView.setTextSize(!AndroidUtilities.isTablet() && getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE ? 14 : 16);
|
||||
subtitleTextView.measure(MeasureSpec.makeMeasureSpec(availableWidth, MeasureSpec.AT_MOST), MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(20), MeasureSpec.AT_MOST));
|
||||
}
|
||||
}
|
||||
@@ -475,14 +468,14 @@ public class ActionBar extends FrameLayout {
|
||||
if (titleTextView != null && titleTextView.getVisibility() != GONE) {
|
||||
int textTop;
|
||||
if (subtitleTextView != null && subtitleTextView.getVisibility() != GONE) {
|
||||
textTop = (getCurrentActionBarHeight() / 2 - titleTextView.getTextHeight()) / 2 + AndroidUtilities.dp(!AndroidUtilities.isTablet() && getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE ? 2 : 3);
|
||||
textTop = (getCurrentActionBarHeight() / 2 - titleTextView.getTextHeight()) / 2 + AndroidUtilities.dp(getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE ? 2 : 3);
|
||||
} else {
|
||||
textTop = (getCurrentActionBarHeight() - titleTextView.getTextHeight()) / 2;
|
||||
}
|
||||
titleTextView.layout(textLeft, additionalTop + textTop, textLeft + titleTextView.getMeasuredWidth(), additionalTop + textTop + titleTextView.getTextHeight());
|
||||
}
|
||||
if (subtitleTextView != null && subtitleTextView.getVisibility() != GONE) {
|
||||
int textTop = getCurrentActionBarHeight() / 2 + (getCurrentActionBarHeight() / 2 - subtitleTextView.getTextHeight()) / 2 - AndroidUtilities.dp(!AndroidUtilities.isTablet() && getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE ? 1 : 1);
|
||||
int textTop = getCurrentActionBarHeight() / 2 + (getCurrentActionBarHeight() / 2 - subtitleTextView.getTextHeight()) / 2 - AndroidUtilities.dp(getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE ? 1 : 1);
|
||||
subtitleTextView.layout(textLeft, additionalTop + textTop, textLeft + subtitleTextView.getMeasuredWidth(), additionalTop + textTop + subtitleTextView.getTextHeight());
|
||||
}
|
||||
|
||||
@@ -553,22 +546,6 @@ public class ActionBar extends FrameLayout {
|
||||
allowOverlayTitle = value;
|
||||
}
|
||||
|
||||
public void setTitleOverlayText(String text) {
|
||||
/* EDIT BY MR
|
||||
if (!allowOverlayTitle || parentFragment.parentLayout == null) {
|
||||
return;
|
||||
}
|
||||
CharSequence textToSet = text != null ? text : lastTitle;
|
||||
if (textToSet != null && titleTextView == null) {
|
||||
createTitleTextView();
|
||||
}
|
||||
if (titleTextView != null) {
|
||||
titleTextView.setVisibility(textToSet != null && !isSearchFieldVisible ? VISIBLE : INVISIBLE);
|
||||
titleTextView.setText(textToSet);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
public boolean isSearchFieldVisible() {
|
||||
return isSearchFieldVisible;
|
||||
}
|
||||
@@ -605,9 +582,7 @@ public class ActionBar extends FrameLayout {
|
||||
}
|
||||
|
||||
public static int getCurrentActionBarHeight() {
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
return AndroidUtilities.dp(64);
|
||||
} else if (ApplicationLoader.applicationContext.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
if (ApplicationLoader.applicationContext.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
return AndroidUtilities.dp(48);
|
||||
} else {
|
||||
return AndroidUtilities.dp(56);
|
||||
|
||||
@@ -131,7 +131,6 @@ public class ActionBarLayout extends FrameLayout {
|
||||
|
||||
private LinearLayoutContainer containerView;
|
||||
private LinearLayoutContainer containerViewBack;
|
||||
private DrawerLayoutContainer drawerLayoutContainer;
|
||||
private ActionBar currentActionBar;
|
||||
|
||||
private AnimatorSet currentAnimation;
|
||||
@@ -161,8 +160,6 @@ public class ActionBarLayout extends FrameLayout {
|
||||
private float animationProgress = 0.0f;
|
||||
private long lastFrameTime;
|
||||
|
||||
private String titleOverlayText;
|
||||
|
||||
private ActionBarLayoutDelegate delegate = null;
|
||||
protected Activity parentActivity = null;
|
||||
|
||||
@@ -385,7 +382,6 @@ public class ActionBarLayout extends FrameLayout {
|
||||
lastFragment.actionBar.setOccupyStatusBar(false);
|
||||
}
|
||||
containerViewBack.addView(lastFragment.actionBar);
|
||||
lastFragment.actionBar.setTitleOverlayText(titleOverlayText);
|
||||
}
|
||||
containerViewBack.addView(fragmentView);
|
||||
ViewGroup.LayoutParams layoutParams = fragmentView.getLayoutParams();
|
||||
@@ -678,7 +674,6 @@ public class ActionBarLayout extends FrameLayout {
|
||||
parent.removeView(fragment.actionBar);
|
||||
}
|
||||
containerViewBack.addView(fragment.actionBar);
|
||||
fragment.actionBar.setTitleOverlayText(titleOverlayText);
|
||||
}
|
||||
|
||||
containerViewBack.addView(fragmentView);
|
||||
@@ -756,13 +751,7 @@ public class ActionBarLayout extends FrameLayout {
|
||||
}
|
||||
};
|
||||
fragment.onTransitionAnimationStart(true, false);
|
||||
AnimatorSet animation = fragment.onCustomTransitionAnimation(true, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
onAnimationEndCheck(false);
|
||||
}
|
||||
});
|
||||
if (animation == null) {
|
||||
{
|
||||
containerView.setAlpha(0.0f);
|
||||
containerView.setTranslationX(48.0f);
|
||||
if (containerView.isKeyboardVisible || containerViewBack.isKeyboardVisible) {
|
||||
@@ -791,14 +780,6 @@ public class ActionBarLayout extends FrameLayout {
|
||||
} else {
|
||||
startLayoutAnimation(true, true);
|
||||
}
|
||||
} else {
|
||||
if (Build.VERSION.SDK_INT > 15) {
|
||||
//containerView.setLayerType(LAYER_TYPE_HARDWARE, null);
|
||||
//containerViewBack.setLayerType(LAYER_TYPE_HARDWARE, null);
|
||||
}
|
||||
containerView.setAlpha(1.0f);
|
||||
containerView.setTranslationX(0.0f);
|
||||
currentAnimation = animation;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -895,7 +876,6 @@ public class ActionBarLayout extends FrameLayout {
|
||||
parent.removeView(previousFragment.actionBar);
|
||||
}
|
||||
containerView.addView(previousFragment.actionBar);
|
||||
previousFragment.actionBar.setTitleOverlayText(titleOverlayText);
|
||||
}
|
||||
containerView.addView(fragmentView);
|
||||
ViewGroup.LayoutParams layoutParams = fragmentView.getLayoutParams();
|
||||
@@ -932,13 +912,8 @@ public class ActionBarLayout extends FrameLayout {
|
||||
previousFragmentFinal.onBecomeFullyVisible();
|
||||
}
|
||||
};
|
||||
AnimatorSet animation = currentFragment.onCustomTransitionAnimation(false, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
onAnimationEndCheck(false);
|
||||
}
|
||||
});
|
||||
if (animation == null) {
|
||||
|
||||
{
|
||||
if (containerView.isKeyboardVisible || containerViewBack.isKeyboardVisible) {
|
||||
waitingForKeyboardCloseRunnable = new Runnable() {
|
||||
@Override
|
||||
@@ -953,12 +928,6 @@ public class ActionBarLayout extends FrameLayout {
|
||||
} else {
|
||||
startLayoutAnimation(false, true);
|
||||
}
|
||||
} else {
|
||||
if (Build.VERSION.SDK_INT > 15) {
|
||||
//containerView.setLayerType(LAYER_TYPE_HARDWARE, null);
|
||||
//containerViewBack.setLayerType(LAYER_TYPE_HARDWARE, null);
|
||||
}
|
||||
currentAnimation = animation;
|
||||
}
|
||||
} else {
|
||||
currentFragment.onTransitionAnimationEnd(false, false);
|
||||
@@ -978,9 +947,6 @@ public class ActionBarLayout extends FrameLayout {
|
||||
if (backgroundView != null) {
|
||||
backgroundView.setVisibility(GONE);
|
||||
}
|
||||
if (drawerLayoutContainer != null) {
|
||||
drawerLayoutContainer.setAllowOpenDrawer(true, false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1056,7 +1022,6 @@ public class ActionBarLayout extends FrameLayout {
|
||||
parent.removeView(previousFragment.actionBar);
|
||||
}
|
||||
containerView.addView(previousFragment.actionBar);
|
||||
previousFragment.actionBar.setTitleOverlayText(titleOverlayText);
|
||||
}
|
||||
containerView.addView(fragmentView);
|
||||
ViewGroup.LayoutParams layoutParams = fragmentView.getLayoutParams();
|
||||
@@ -1078,11 +1043,7 @@ public class ActionBarLayout extends FrameLayout {
|
||||
}
|
||||
|
||||
public void removeFragmentFromStack(BaseFragment fragment) {
|
||||
if (useAlphaAnimations && fragmentsStack.size() == 1 && AndroidUtilities.isTablet()) {
|
||||
closeLastFragment(true);
|
||||
} else {
|
||||
removeFragmentFromStackInternal(fragment);
|
||||
}
|
||||
removeFragmentFromStackInternal(fragment);
|
||||
}
|
||||
|
||||
public void removeAllFragments() {
|
||||
@@ -1192,27 +1153,10 @@ public class ActionBarLayout extends FrameLayout {
|
||||
backgroundView = view;
|
||||
}
|
||||
|
||||
public void setDrawerLayoutContainer(DrawerLayoutContainer layout) {
|
||||
drawerLayoutContainer = layout;
|
||||
}
|
||||
|
||||
public DrawerLayoutContainer getDrawerLayoutContainer() {
|
||||
return drawerLayoutContainer;
|
||||
}
|
||||
|
||||
public void setRemoveActionBarExtraHeight(boolean value) {
|
||||
removeActionBarExtraHeight = value;
|
||||
}
|
||||
|
||||
public void setTitleOverlayText(String text) {
|
||||
titleOverlayText = text;
|
||||
for (BaseFragment fragment : fragmentsStack) {
|
||||
if (fragment.actionBar != null) {
|
||||
fragment.actionBar.setTitleOverlayText(titleOverlayText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasOverlappingRendering() {
|
||||
return false;
|
||||
|
||||
@@ -466,13 +466,7 @@ public class ActionBarMenuItem extends FrameLayout {
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
Field mCursorDrawableRes = TextView.class.getDeclaredField("mCursorDrawableRes");
|
||||
mCursorDrawableRes.setAccessible(true);
|
||||
mCursorDrawableRes.set(searchField, R.drawable.search_carret);
|
||||
} catch (Exception e) {
|
||||
//nothing to do
|
||||
}
|
||||
|
||||
searchField.setTextIsSelectable(false);
|
||||
if( applyHack ) {
|
||||
searchField.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||
|
||||
@@ -286,10 +286,6 @@ public class BaseFragment {
|
||||
|
||||
}
|
||||
|
||||
protected AnimatorSet onCustomTransitionAnimation(boolean isOpen, final Runnable callback) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void onLowMemory() {
|
||||
|
||||
}
|
||||
|
||||
@@ -307,11 +307,7 @@ public class BottomSheet extends Dialog {
|
||||
if (containerView != null) {
|
||||
if (!fullWidth) {
|
||||
int widthSpec;
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
widthSpec = MeasureSpec.makeMeasureSpec((int) (Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) * 0.8f) + backgroundPaddingLeft * 2, MeasureSpec.EXACTLY);
|
||||
} else {
|
||||
widthSpec = MeasureSpec.makeMeasureSpec(isPortrait ? width + backgroundPaddingLeft * 2 : (int) Math.max(width * 0.8f, Math.min(AndroidUtilities.dp(480), width)) + backgroundPaddingLeft * 2, MeasureSpec.EXACTLY);
|
||||
}
|
||||
widthSpec = MeasureSpec.makeMeasureSpec(isPortrait ? width + backgroundPaddingLeft * 2 : (int) Math.max(width * 0.8f, Math.min(AndroidUtilities.dp(480), width)) + backgroundPaddingLeft * 2, MeasureSpec.EXACTLY);
|
||||
containerView.measure(widthSpec, MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST));
|
||||
} else {
|
||||
containerView.measure(MeasureSpec.makeMeasureSpec(width + backgroundPaddingLeft * 2, MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST));
|
||||
|
||||
@@ -1,520 +0,0 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Delta Chat Android
|
||||
* (C) 2013-2016 Nikolai Kudashov
|
||||
* (C) 2017 Björn Petersen
|
||||
* Contact: r10s@b44t.com, http://b44t.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see http://www.gnu.org/licenses/ .
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
package com.b44t.ui.ActionBar;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorSet;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.view.Gravity;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.VelocityTracker;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowInsets;
|
||||
import android.view.animation.DecelerateInterpolator;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ListView;
|
||||
|
||||
import com.b44t.messenger.AndroidUtilities;
|
||||
import com.b44t.messenger.MrMailbox;
|
||||
import com.b44t.messenger.R;
|
||||
import com.b44t.messenger.AnimatorListenerAdapterProxy;
|
||||
|
||||
public class DrawerLayoutContainer extends FrameLayout {
|
||||
|
||||
public static boolean USE_DRAWER;
|
||||
|
||||
private static final int MIN_DRAWER_MARGIN = 64;
|
||||
|
||||
private ViewGroup drawerLayout;
|
||||
private ActionBarLayout parentActionBarLayout;
|
||||
|
||||
private boolean maybeStartTracking;
|
||||
private boolean startedTracking;
|
||||
private int startedTrackingX;
|
||||
private int startedTrackingY;
|
||||
private int startedTrackingPointerId;
|
||||
private VelocityTracker velocityTracker;
|
||||
private boolean beginTrackingSent;
|
||||
private AnimatorSet currentAnimation;
|
||||
|
||||
private Paint scrimPaint = new Paint();
|
||||
|
||||
private Object lastInsets;
|
||||
private boolean inLayout;
|
||||
private int minDrawerMargin;
|
||||
private float scrimOpacity;
|
||||
private Drawable shadowLeft;
|
||||
private boolean allowOpenDrawer;
|
||||
|
||||
private float drawerPosition;
|
||||
private boolean drawerOpened;
|
||||
private boolean allowDrawContent = true;
|
||||
|
||||
public DrawerLayoutContainer(Context context) {
|
||||
super(context);
|
||||
|
||||
USE_DRAWER = MrMailbox.getConfigInt("drawer", 0)!=0;
|
||||
|
||||
minDrawerMargin = (int) (MIN_DRAWER_MARGIN * AndroidUtilities.density + 0.5f);
|
||||
setDescendantFocusability(ViewGroup.FOCUS_AFTER_DESCENDANTS);
|
||||
setFocusableInTouchMode(true);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
setFitsSystemWindows(true);
|
||||
setOnApplyWindowInsetsListener(new OnApplyWindowInsetsListener() {
|
||||
@SuppressLint("NewApi")
|
||||
@Override
|
||||
public WindowInsets onApplyWindowInsets(View v, WindowInsets insets) {
|
||||
final DrawerLayoutContainer drawerLayout = (DrawerLayoutContainer) v;
|
||||
lastInsets = insets;
|
||||
drawerLayout.setWillNotDraw(insets.getSystemWindowInsetTop() <= 0 && getBackground() == null);
|
||||
drawerLayout.requestLayout();
|
||||
return insets.consumeSystemWindowInsets();
|
||||
}
|
||||
});
|
||||
setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
|
||||
}
|
||||
|
||||
shadowLeft = getResources().getDrawable(R.drawable.menu_shadow);
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
private void dispatchChildInsets(View child, Object insets, int drawerGravity) {
|
||||
WindowInsets wi = (WindowInsets) insets;
|
||||
if (drawerGravity == Gravity.LEFT) {
|
||||
wi = wi.replaceSystemWindowInsets(wi.getSystemWindowInsetLeft(), wi.getSystemWindowInsetTop(), 0, wi.getSystemWindowInsetBottom());
|
||||
} else if (drawerGravity == Gravity.RIGHT) {
|
||||
wi = wi.replaceSystemWindowInsets(0, wi.getSystemWindowInsetTop(), wi.getSystemWindowInsetRight(), wi.getSystemWindowInsetBottom());
|
||||
}
|
||||
child.dispatchApplyWindowInsets(wi);
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
private void applyMarginInsets(MarginLayoutParams lp, Object insets, int drawerGravity, boolean topOnly) {
|
||||
WindowInsets wi = (WindowInsets) insets;
|
||||
if (drawerGravity == Gravity.LEFT) {
|
||||
wi = wi.replaceSystemWindowInsets(wi.getSystemWindowInsetLeft(), wi.getSystemWindowInsetTop(), 0, wi.getSystemWindowInsetBottom());
|
||||
} else if (drawerGravity == Gravity.RIGHT) {
|
||||
wi = wi.replaceSystemWindowInsets(0, wi.getSystemWindowInsetTop(), wi.getSystemWindowInsetRight(), wi.getSystemWindowInsetBottom());
|
||||
}
|
||||
lp.leftMargin = wi.getSystemWindowInsetLeft();
|
||||
lp.topMargin = topOnly ? 0 : wi.getSystemWindowInsetTop();
|
||||
lp.rightMargin = wi.getSystemWindowInsetRight();
|
||||
lp.bottomMargin = wi.getSystemWindowInsetBottom();
|
||||
}
|
||||
|
||||
private int getTopInset(Object insets) { /* not sure, if this or one of the other unsed methods is called indirectly somewhere; however, at the moment, I do not habe the time tp check this. */
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
return insets != null ? ((WindowInsets) insets).getSystemWindowInsetTop() : 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void setDrawerLayout(ViewGroup layout) {
|
||||
drawerLayout = layout;
|
||||
addView(drawerLayout);
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
drawerLayout.setFitsSystemWindows(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void moveDrawerByX(float dx) {
|
||||
setDrawerPosition(drawerPosition + dx);
|
||||
}
|
||||
|
||||
public void setDrawerPosition(float value) {
|
||||
drawerPosition = value;
|
||||
if (drawerPosition > drawerLayout.getMeasuredWidth()) {
|
||||
drawerPosition = drawerLayout.getMeasuredWidth();
|
||||
} else if (drawerPosition < 0) {
|
||||
drawerPosition = 0;
|
||||
}
|
||||
drawerLayout.setTranslationX(drawerPosition);
|
||||
|
||||
final int newVisibility = drawerPosition > 0 ? VISIBLE : GONE;
|
||||
if (drawerLayout.getVisibility() != newVisibility) {
|
||||
drawerLayout.setVisibility(newVisibility);
|
||||
}
|
||||
setScrimOpacity(drawerPosition / (float) drawerLayout.getMeasuredWidth());
|
||||
}
|
||||
|
||||
public float getDrawerPosition() { /* not sure, if this or one of the other unsed methods is called indirectly somewhere; however, at the moment, I do not habe the time tp check this. */
|
||||
return drawerPosition;
|
||||
}
|
||||
|
||||
public void cancelCurrentAnimation() {
|
||||
if (currentAnimation != null) {
|
||||
currentAnimation.cancel();
|
||||
currentAnimation = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void openDrawer(boolean fast) {
|
||||
if (!allowOpenDrawer) {
|
||||
return;
|
||||
}
|
||||
if (AndroidUtilities.isTablet() && parentActionBarLayout != null && parentActionBarLayout.parentActivity != null) {
|
||||
AndroidUtilities.hideKeyboard(parentActionBarLayout.parentActivity.getCurrentFocus());
|
||||
}
|
||||
cancelCurrentAnimation();
|
||||
AnimatorSet animatorSet = new AnimatorSet();
|
||||
animatorSet.playTogether(ObjectAnimator.ofFloat(this, "drawerPosition", drawerLayout.getMeasuredWidth()));
|
||||
animatorSet.setInterpolator(new DecelerateInterpolator());
|
||||
if (fast) {
|
||||
animatorSet.setDuration(Math.max((int) (200.0f / drawerLayout.getMeasuredWidth() * (drawerLayout.getMeasuredWidth() - drawerPosition)), 50));
|
||||
} else {
|
||||
animatorSet.setDuration(300);
|
||||
}
|
||||
animatorSet.addListener(new AnimatorListenerAdapterProxy() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animator) {
|
||||
onDrawerAnimationEnd(true);
|
||||
}
|
||||
});
|
||||
animatorSet.start();
|
||||
currentAnimation = animatorSet;
|
||||
}
|
||||
|
||||
public void closeDrawer(boolean fast) {
|
||||
cancelCurrentAnimation();
|
||||
AnimatorSet animatorSet = new AnimatorSet();
|
||||
animatorSet.playTogether(
|
||||
ObjectAnimator.ofFloat(this, "drawerPosition", 0)
|
||||
);
|
||||
animatorSet.setInterpolator(new DecelerateInterpolator());
|
||||
if (fast) {
|
||||
animatorSet.setDuration(Math.max((int) (200.0f / drawerLayout.getMeasuredWidth() * drawerPosition), 50));
|
||||
} else {
|
||||
animatorSet.setDuration(300);
|
||||
}
|
||||
animatorSet.addListener(new AnimatorListenerAdapterProxy() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animator) {
|
||||
onDrawerAnimationEnd(false);
|
||||
}
|
||||
});
|
||||
animatorSet.start();
|
||||
}
|
||||
|
||||
private void onDrawerAnimationEnd(boolean opened) {
|
||||
startedTracking = false;
|
||||
currentAnimation = null;
|
||||
drawerOpened = opened;
|
||||
if (!opened) {
|
||||
if (drawerLayout instanceof ListView) {
|
||||
((ListView) drawerLayout).setSelectionFromTop(0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void setScrimOpacity(float value) {
|
||||
scrimOpacity = value;
|
||||
invalidate();
|
||||
}
|
||||
|
||||
private float getScrimOpacity() { /* not sure, if this or one of the other unsed methods is called indirectly somewhere; however, at the moment, I do not habe the time tp check this. */
|
||||
return scrimOpacity;
|
||||
}
|
||||
|
||||
public View getDrawerLayout() { /* not sure, if this or one of the other unsed methods is called indirectly somewhere; however, at the moment, I do not habe the time tp check this. */
|
||||
return drawerLayout;
|
||||
}
|
||||
|
||||
public void setParentActionBarLayout(ActionBarLayout layout) {
|
||||
parentActionBarLayout = layout;
|
||||
}
|
||||
|
||||
public void setAllowOpenDrawer(boolean value, boolean animated) {
|
||||
if( !USE_DRAWER ) {
|
||||
allowOpenDrawer = false;
|
||||
return;
|
||||
}
|
||||
|
||||
allowOpenDrawer = value;
|
||||
if (!allowOpenDrawer && drawerPosition != 0) {
|
||||
if (!animated) {
|
||||
setDrawerPosition(0);
|
||||
onDrawerAnimationEnd(false);
|
||||
} else {
|
||||
closeDrawer(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void prepareForDrawerOpen(MotionEvent ev) {
|
||||
maybeStartTracking = false;
|
||||
startedTracking = true;
|
||||
if (ev != null) {
|
||||
startedTrackingX = (int) ev.getX();
|
||||
}
|
||||
beginTrackingSent = false;
|
||||
}
|
||||
|
||||
public boolean isDrawerOpened() {
|
||||
return drawerOpened;
|
||||
}
|
||||
|
||||
public void setAllowDrawContent(boolean value) {
|
||||
if (allowDrawContent != value) {
|
||||
allowDrawContent = value;
|
||||
invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean onTouchEvent(MotionEvent ev) {
|
||||
if (!parentActionBarLayout.checkTransitionAnimation()) {
|
||||
if (drawerOpened && ev != null && ev.getX() > drawerPosition && !startedTracking) {
|
||||
if (ev.getAction() == MotionEvent.ACTION_UP) {
|
||||
closeDrawer(false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (allowOpenDrawer && parentActionBarLayout.fragmentsStack.size() == 1) {
|
||||
if (ev != null && (ev.getAction() == MotionEvent.ACTION_DOWN || ev.getAction() == MotionEvent.ACTION_MOVE) && !startedTracking && !maybeStartTracking) {
|
||||
startedTrackingPointerId = ev.getPointerId(0);
|
||||
maybeStartTracking = true;
|
||||
startedTrackingX = (int) ev.getX();
|
||||
startedTrackingY = (int) ev.getY();
|
||||
cancelCurrentAnimation();
|
||||
if (velocityTracker != null) {
|
||||
velocityTracker.clear();
|
||||
}
|
||||
} else if (ev != null && ev.getAction() == MotionEvent.ACTION_MOVE && ev.getPointerId(0) == startedTrackingPointerId) {
|
||||
if (velocityTracker == null) {
|
||||
velocityTracker = VelocityTracker.obtain();
|
||||
}
|
||||
float dx = (int) (ev.getX() - startedTrackingX);
|
||||
float dy = Math.abs((int) ev.getY() - startedTrackingY);
|
||||
velocityTracker.addMovement(ev);
|
||||
if (maybeStartTracking && !startedTracking && (dx > 0 && dx / 3.0f > Math.abs(dy) && Math.abs(dx) >= AndroidUtilities.getPixelsInCM(0.2f, true) || dx < 0 && Math.abs(dx) >= Math.abs(dy) && Math.abs(dx) >= AndroidUtilities.getPixelsInCM(0.4f, true))) {
|
||||
prepareForDrawerOpen(ev);
|
||||
startedTrackingX = (int) ev.getX();
|
||||
requestDisallowInterceptTouchEvent(true);
|
||||
} else if (startedTracking) {
|
||||
if (!beginTrackingSent) {
|
||||
if (((Activity) getContext()).getCurrentFocus() != null) {
|
||||
AndroidUtilities.hideKeyboard(((Activity) getContext()).getCurrentFocus());
|
||||
}
|
||||
beginTrackingSent = true;
|
||||
}
|
||||
moveDrawerByX(dx);
|
||||
startedTrackingX = (int) ev.getX();
|
||||
}
|
||||
} else if (ev == null || ev != null && ev.getPointerId(0) == startedTrackingPointerId && (ev.getAction() == MotionEvent.ACTION_CANCEL || ev.getAction() == MotionEvent.ACTION_UP || ev.getAction() == MotionEvent.ACTION_POINTER_UP)) {
|
||||
if (velocityTracker == null) {
|
||||
velocityTracker = VelocityTracker.obtain();
|
||||
}
|
||||
velocityTracker.computeCurrentVelocity(1000);
|
||||
/*if (!startedTracking) {
|
||||
float velX = velocityTracker.getXVelocity();
|
||||
float velY = velocityTracker.getYVelocity();
|
||||
if (Math.abs(velX) >= 3500 && Math.abs(velX) > Math.abs(velY)) {
|
||||
prepareForDrawerOpen(ev);
|
||||
if (!beginTrackingSent) {
|
||||
if (((Activity)getContext()).getCurrentFocus() != null) {
|
||||
AndroidUtilities.hideKeyboard(((Activity)getContext()).getCurrentFocus());
|
||||
}
|
||||
beginTrackingSent = true;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
if (startedTracking || drawerPosition != 0 && drawerPosition != drawerLayout.getMeasuredWidth()) {
|
||||
float velX = velocityTracker.getXVelocity();
|
||||
float velY = velocityTracker.getYVelocity();
|
||||
boolean backAnimation = drawerPosition < drawerLayout.getMeasuredWidth() / 2.0f && (velX < 3500 || Math.abs(velX) < Math.abs(velY)) || velX < 0 && Math.abs(velX) >= 3500;
|
||||
if (!backAnimation) {
|
||||
openDrawer(!drawerOpened && Math.abs(velX) >= 3500);
|
||||
} else {
|
||||
closeDrawer(drawerOpened && Math.abs(velX) >= 3500);
|
||||
}
|
||||
startedTracking = false;
|
||||
} else {
|
||||
maybeStartTracking = false;
|
||||
startedTracking = false;
|
||||
}
|
||||
if (velocityTracker != null) {
|
||||
velocityTracker.recycle();
|
||||
velocityTracker = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return startedTracking;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(MotionEvent ev) {
|
||||
return parentActionBarLayout.checkTransitionAnimation() || onTouchEvent(ev);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) {
|
||||
if (maybeStartTracking && !startedTracking) {
|
||||
onTouchEvent(null);
|
||||
}
|
||||
super.requestDisallowInterceptTouchEvent(disallowIntercept);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onLayout(boolean changed, int l, int t, int r, int b) {
|
||||
inLayout = true;
|
||||
final int childCount = getChildCount();
|
||||
for (int i = 0; i < childCount; i++) {
|
||||
final View child = getChildAt(i);
|
||||
|
||||
if (child.getVisibility() == GONE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
|
||||
|
||||
try {
|
||||
if (drawerLayout != child) {
|
||||
child.layout(lp.leftMargin, lp.topMargin, lp.leftMargin + child.getMeasuredWidth(), lp.topMargin + child.getMeasuredHeight());
|
||||
} else {
|
||||
child.layout(-child.getMeasuredWidth(), lp.topMargin, 0, lp.topMargin + child.getMeasuredHeight());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
}
|
||||
inLayout = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void requestLayout() {
|
||||
if (!inLayout) {
|
||||
/*StackTraceElement[] elements = Thread.currentThread().getStackTrace();
|
||||
for (int a = 0; a < elements.length; a++) {
|
||||
Log.d("DeltaChat", "on " + elements[a]);
|
||||
}*/
|
||||
super.requestLayout();
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
int widthSize = MeasureSpec.getSize(widthMeasureSpec);
|
||||
int heightSize = MeasureSpec.getSize(heightMeasureSpec);
|
||||
|
||||
setMeasuredDimension(widthSize, heightSize);
|
||||
|
||||
final boolean applyInsets = lastInsets != null && Build.VERSION.SDK_INT >= 21;
|
||||
|
||||
final int childCount = getChildCount();
|
||||
for (int i = 0; i < childCount; i++) {
|
||||
final View child = getChildAt(i);
|
||||
|
||||
if (child.getVisibility() == GONE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
|
||||
|
||||
if (applyInsets) {
|
||||
if (child.getFitsSystemWindows()) {
|
||||
dispatchChildInsets(child, lastInsets, lp.gravity);
|
||||
} else if (child.getTag() == null) {
|
||||
applyMarginInsets(lp, lastInsets, lp.gravity, Build.VERSION.SDK_INT >= 21);
|
||||
}
|
||||
}
|
||||
|
||||
if (drawerLayout != child) {
|
||||
final int contentWidthSpec = MeasureSpec.makeMeasureSpec(widthSize - lp.leftMargin - lp.rightMargin, MeasureSpec.EXACTLY);
|
||||
final int contentHeightSpec = MeasureSpec.makeMeasureSpec(heightSize - lp.topMargin - lp.bottomMargin, MeasureSpec.EXACTLY);
|
||||
child.measure(contentWidthSpec, contentHeightSpec);
|
||||
} else {
|
||||
child.setPadding(0, 0, 0, 0);
|
||||
final int drawerWidthSpec = getChildMeasureSpec(widthMeasureSpec, minDrawerMargin + lp.leftMargin + lp.rightMargin, lp.width);
|
||||
final int drawerHeightSpec = getChildMeasureSpec(heightMeasureSpec, lp.topMargin + lp.bottomMargin, lp.height);
|
||||
child.measure(drawerWidthSpec, drawerHeightSpec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean drawChild(Canvas canvas, View child, long drawingTime) {
|
||||
if (!allowDrawContent) {
|
||||
return false;
|
||||
}
|
||||
final int height = getHeight();
|
||||
final boolean drawingContent = child != drawerLayout;
|
||||
int lastVisibleChild = 0;
|
||||
int clipLeft = 0, clipRight = getWidth();
|
||||
|
||||
final int restoreCount = canvas.save();
|
||||
if (drawingContent) {
|
||||
final int childCount = getChildCount();
|
||||
for (int i = 0; i < childCount; i++) {
|
||||
final View v = getChildAt(i);
|
||||
if (v.getVisibility() == VISIBLE && v != drawerLayout) {
|
||||
lastVisibleChild = i;
|
||||
}
|
||||
if (v == child || v.getVisibility() != VISIBLE || v != drawerLayout || v.getHeight() < height) {
|
||||
continue;
|
||||
}
|
||||
|
||||
final int vright = v.getRight();
|
||||
if (vright > clipLeft) {
|
||||
clipLeft = vright;
|
||||
}
|
||||
}
|
||||
if (clipLeft != 0) {
|
||||
canvas.clipRect(clipLeft, 0, clipRight, getHeight());
|
||||
}
|
||||
}
|
||||
final boolean result = super.drawChild(canvas, child, drawingTime);
|
||||
canvas.restoreToCount(restoreCount);
|
||||
|
||||
if (scrimOpacity > 0 && drawingContent) {
|
||||
if (indexOfChild(child) == lastVisibleChild) {
|
||||
scrimPaint.setColor((int) (((0x99000000 & 0xff000000) >>> 24) * scrimOpacity) << 24);
|
||||
canvas.drawRect(clipLeft, 0, clipRight, getHeight(), scrimPaint);
|
||||
}
|
||||
} else if (shadowLeft != null) {
|
||||
final float alpha = Math.max(0, Math.min(drawerPosition / AndroidUtilities.dp(20), 1.0f));
|
||||
if (alpha != 0) {
|
||||
shadowLeft.setBounds((int) drawerPosition, child.getTop(), (int) drawerPosition + shadowLeft.getIntrinsicWidth(), child.getBottom());
|
||||
shadowLeft.setAlpha((int) (0xff * alpha));
|
||||
shadowLeft.draw(canvas);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasOverlappingRendering() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,132 +0,0 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Delta Chat Android
|
||||
* (C) 2013-2016 Nikolai Kudashov
|
||||
* (C) 2017 Björn Petersen
|
||||
* Contact: r10s@b44t.com, http://b44t.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see http://www.gnu.org/licenses/ .
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
package com.b44t.ui.ActionBar;
|
||||
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.ColorFilter;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.view.animation.DecelerateInterpolator;
|
||||
|
||||
import com.b44t.messenger.AndroidUtilities;
|
||||
|
||||
public class MenuDrawable extends Drawable {
|
||||
|
||||
private Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
private boolean reverseAngle = false;
|
||||
private long lastFrameTime;
|
||||
//private boolean animationInProgress;
|
||||
private float finalRotation;
|
||||
private float currentRotation;
|
||||
private int currentAnimationTime;
|
||||
private DecelerateInterpolator interpolator = new DecelerateInterpolator();
|
||||
|
||||
public MenuDrawable() {
|
||||
super();
|
||||
paint.setColor(0xffffffff);
|
||||
paint.setStrokeWidth(AndroidUtilities.dp(2));
|
||||
}
|
||||
|
||||
public void setRotation(float rotation, boolean animated) {
|
||||
lastFrameTime = 0;
|
||||
if (currentRotation == 1) {
|
||||
reverseAngle = true;
|
||||
} else if (currentRotation == 0) {
|
||||
reverseAngle = false;
|
||||
}
|
||||
lastFrameTime = 0;
|
||||
if (animated) {
|
||||
if (currentRotation < rotation) {
|
||||
currentAnimationTime = (int) (currentRotation * 300);
|
||||
} else {
|
||||
currentAnimationTime = (int) ((1.0f - currentRotation) * 300);
|
||||
}
|
||||
lastFrameTime = System.currentTimeMillis();
|
||||
finalRotation = rotation;
|
||||
} else {
|
||||
finalRotation = currentRotation = rotation;
|
||||
}
|
||||
invalidateSelf();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Canvas canvas) {
|
||||
if (currentRotation != finalRotation) {
|
||||
if (lastFrameTime != 0) {
|
||||
long dt = System.currentTimeMillis() - lastFrameTime;
|
||||
|
||||
currentAnimationTime += dt;
|
||||
if (currentAnimationTime >= 300) {
|
||||
currentRotation = finalRotation;
|
||||
} else {
|
||||
if (currentRotation < finalRotation) {
|
||||
currentRotation = interpolator.getInterpolation(currentAnimationTime / 300.0f) * finalRotation;
|
||||
} else {
|
||||
currentRotation = 1.0f - interpolator.getInterpolation(currentAnimationTime / 300.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
lastFrameTime = System.currentTimeMillis();
|
||||
invalidateSelf();
|
||||
}
|
||||
|
||||
canvas.save();
|
||||
canvas.translate(getIntrinsicWidth() / 2, getIntrinsicHeight() / 2);
|
||||
canvas.rotate(currentRotation * (reverseAngle ? -180 : 180));
|
||||
canvas.drawLine(-AndroidUtilities.dp(9), 0, AndroidUtilities.dp(9) - AndroidUtilities.dp(3.0f) * currentRotation, 0, paint);
|
||||
float endYDiff = AndroidUtilities.dp(5) * (1 - Math.abs(currentRotation)) - AndroidUtilities.dp(0.5f) * Math.abs(currentRotation);
|
||||
float endXDiff = AndroidUtilities.dp(9) - AndroidUtilities.dp(2.5f) * Math.abs(currentRotation);
|
||||
float startYDiff = AndroidUtilities.dp(5) + AndroidUtilities.dp(2.0f) * Math.abs(currentRotation);
|
||||
float startXDiff = -AndroidUtilities.dp(9) + AndroidUtilities.dp(7.5f) * Math.abs(currentRotation);
|
||||
canvas.drawLine(startXDiff, -startYDiff, endXDiff, -endYDiff, paint);
|
||||
canvas.drawLine(startXDiff, startYDiff, endXDiff, endYDiff, paint);
|
||||
canvas.restore();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAlpha(int alpha) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setColorFilter(ColorFilter cf) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOpacity() {
|
||||
return PixelFormat.TRANSPARENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIntrinsicWidth() {
|
||||
return AndroidUtilities.dp(24);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIntrinsicHeight() {
|
||||
return AndroidUtilities.dp(24);
|
||||
}
|
||||
}
|
||||
@@ -90,9 +90,6 @@ public class DialogsAdapter extends RecyclerView.Adapter {
|
||||
DialogCell cell = (DialogCell) viewHolder.itemView;
|
||||
cell.useSeparator = (i != getItemCount() - 1);
|
||||
MrChat mrChat = getItem(i);
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
cell.setDialogSelected(mrChat.getId() == openedDialogId);
|
||||
}
|
||||
|
||||
MrPoortext mrSummary = MrMailbox.m_currChatlist.getSummaryByIndex(i, mrChat);
|
||||
cell.setDialog(mrChat, mrSummary, i, true);
|
||||
|
||||
@@ -1,157 +0,0 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Delta Chat Android
|
||||
* (C) 2013-2016 Nikolai Kudashov
|
||||
* (C) 2017 Björn Petersen
|
||||
* Contact: r10s@b44t.com, http://b44t.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see http://www.gnu.org/licenses/ .
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
package com.b44t.ui.Adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
|
||||
import com.b44t.messenger.AndroidUtilities;
|
||||
import com.b44t.messenger.R;
|
||||
import com.b44t.ui.Cells.DrawerActionCell;
|
||||
import com.b44t.ui.Cells.DividerCell;
|
||||
import com.b44t.ui.Cells.EmptyCell;
|
||||
import com.b44t.ui.Cells.DrawerProfileCell;
|
||||
|
||||
public class DrawerLayoutAdapter extends BaseAdapter {
|
||||
|
||||
private Context mContext;
|
||||
|
||||
public final static int ROW_PROFILE = 0;
|
||||
public final static int ROW_EMPTY_BELOW_PROFILE = 1;
|
||||
public final static int ROW_NEW_CHAT = 2;
|
||||
public final static int ROW_NEW_GROUP = 3;
|
||||
public final static int ROW_DIVIDER = 4;
|
||||
public final static int ROW_SETTINGS = 5;
|
||||
public final static int ROW_INVITE = 6;
|
||||
public final static int ROW_DEADDROP = 7;
|
||||
public final static int ROW_FAQ = 8;
|
||||
public final static int ROW_COUNT = 9;
|
||||
|
||||
private final static int TYPE_PROFILE = 0;
|
||||
private final static int TYPE_EMPTY = 1;
|
||||
private final static int TYPE_DIVIDER = 2;
|
||||
private final static int TYPE_BUTTON = 3;
|
||||
private final static int TYPE_COUNT = 4;
|
||||
|
||||
public DrawerLayoutAdapter(Context context) {
|
||||
mContext = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean areAllItemsEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled(int i) {
|
||||
return !(i == ROW_PROFILE || i == ROW_EMPTY_BELOW_PROFILE || i == ROW_DIVIDER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return ROW_COUNT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int i) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int i) {
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasStableIds() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int i, View view, ViewGroup viewGroup) {
|
||||
int type = getItemViewType(i);
|
||||
if (type == TYPE_PROFILE) {
|
||||
if (view == null) {
|
||||
view = new DrawerProfileCell(mContext);
|
||||
}
|
||||
((DrawerProfileCell) view).updateUserName();
|
||||
} else if (type == TYPE_EMPTY) {
|
||||
if (view == null) {
|
||||
view = new EmptyCell(mContext, AndroidUtilities.dp(8));
|
||||
}
|
||||
} else if (type == TYPE_DIVIDER) {
|
||||
if (view == null) {
|
||||
view = new DividerCell(mContext);
|
||||
}
|
||||
} else if (type == TYPE_BUTTON) {
|
||||
if (view == null) {
|
||||
view = new DrawerActionCell(mContext);
|
||||
}
|
||||
DrawerActionCell actionCell = (DrawerActionCell) view;
|
||||
if (i == ROW_NEW_CHAT) {
|
||||
actionCell.setTextAndIcon(mContext.getString(R.string.NewChat), R.drawable.menu_newchat);
|
||||
} else if (i == ROW_NEW_GROUP) {
|
||||
actionCell.setTextAndIcon(mContext.getString(R.string.NewGroup), R.drawable.menu_empty);
|
||||
} else if (i == ROW_INVITE) {
|
||||
actionCell.setTextAndIcon(mContext.getString(R.string.InviteMenuEntry), R.drawable.menu_empty);
|
||||
} else if (i == ROW_DEADDROP) {
|
||||
actionCell.setTextAndIcon(mContext.getString(R.string.Deaddrop), R.drawable.menu_empty);
|
||||
// we do not want an icon beside the mailbox:
|
||||
// 1. We do not want to give it much attention,
|
||||
// 2. If the mailbox is shown in the chatlist, it gets the chat icon (KISS), but we should not use this icon in the drawer for the mailbox.
|
||||
// 3. Simplicity - we have two sections, "Add" and "Tools" - Mailbox belongs to the latter
|
||||
} else if (i == ROW_SETTINGS) {
|
||||
actionCell.setTextAndIcon(mContext.getString(R.string.Settings), R.drawable.menu_settings);
|
||||
} else if (i == ROW_FAQ) {
|
||||
actionCell.setTextAndIcon(mContext.getString(R.string.Help), R.drawable.menu_empty);
|
||||
}
|
||||
}
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int i) {
|
||||
if (i == ROW_PROFILE) {
|
||||
return TYPE_PROFILE;
|
||||
} else if (i == ROW_EMPTY_BELOW_PROFILE) {
|
||||
return TYPE_EMPTY;
|
||||
} else if (i == ROW_DIVIDER) {
|
||||
return TYPE_DIVIDER;
|
||||
}
|
||||
return TYPE_BUTTON;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getViewTypeCount() {
|
||||
return TYPE_COUNT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -197,8 +197,6 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
|
||||
private static TextPaint timePaint;
|
||||
private static TextPaint namePaint;
|
||||
private static TextPaint forwardNamePaint;
|
||||
private static TextPaint forward2NamePaint;
|
||||
|
||||
private int backgroundWidth = 100;
|
||||
|
||||
@@ -208,7 +206,6 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
private ImageReceiver avatarImage;
|
||||
private AvatarDrawable avatarDrawable;
|
||||
private boolean avatarPressed;
|
||||
private boolean forwardNamePressed;
|
||||
|
||||
private boolean drawNewchatButton;
|
||||
private boolean newchatPressed;
|
||||
@@ -223,12 +220,11 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
private boolean drawName;
|
||||
private boolean drawNameLayout;
|
||||
|
||||
private StaticLayout[] forwardedNameLayout = new StaticLayout[2];
|
||||
private boolean allowForwardedName;
|
||||
private static TextPaint forwardedNamePaint;
|
||||
private StaticLayout forwardedNameLayout;
|
||||
private int forwardedNameWidth;
|
||||
private boolean drawForwardedName;
|
||||
private int forwardNameX;
|
||||
private int forwardNameY;
|
||||
private float forwardNameOffsetX[] = new float[2];
|
||||
private float forwardedNameOffsetX;
|
||||
|
||||
private StaticLayout timeLayout;
|
||||
private int timeWidth; // includes timeEncrWidth
|
||||
@@ -238,11 +234,9 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
private boolean drawTime = true;
|
||||
|
||||
private TLRPC.User currentUser;
|
||||
private final Object currentChat = null;
|
||||
private TLRPC.FileLocation currentPhoto;
|
||||
private String currentNameString;
|
||||
|
||||
private String currentForwardNameString;
|
||||
|
||||
private ChatMessageCellDelegate delegate;
|
||||
|
||||
@@ -287,12 +281,8 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
namePaint.setTypeface(Typeface.DEFAULT_BOLD);
|
||||
namePaint.setTextSize(dp(14));
|
||||
|
||||
forwardNamePaint = new TextPaint(TextPaint.ANTI_ALIAS_FLAG);
|
||||
forwardNamePaint.setTextSize(dp(14));
|
||||
|
||||
forward2NamePaint = new TextPaint(TextPaint.ANTI_ALIAS_FLAG);
|
||||
forward2NamePaint.setTypeface(Typeface.DEFAULT_BOLD);
|
||||
forward2NamePaint.setTextSize(dp(14));
|
||||
forwardedNamePaint = new TextPaint(TextPaint.ANTI_ALIAS_FLAG);
|
||||
forwardedNamePaint.setTextSize(dp(14));
|
||||
}
|
||||
avatarImage = new ImageReceiver(this);
|
||||
avatarImage.setRoundRadius(dp(21));
|
||||
@@ -664,9 +654,6 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
if (isAvatarVisible && avatarImage.isInsideImage(x, y)) {
|
||||
avatarPressed = true;
|
||||
result = true;
|
||||
} else if (drawForwardedName && forwardedNameLayout[0] != null && x >= forwardNameX && x <= forwardNameX + forwardedNameWidth && y >= forwardNameY && y <= forwardNameY + dp(32)) {
|
||||
forwardNamePressed = true;
|
||||
result = true;
|
||||
} else if (drawNewchatButton && x >= newchatStartX && x <= newchatStartX + dp(40) && y >= newchatStartY && y <= newchatStartY + dp(32)) {
|
||||
newchatPressed = true;
|
||||
result = true;
|
||||
@@ -696,16 +683,6 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
avatarPressed = false;
|
||||
}
|
||||
}
|
||||
} else if (forwardNamePressed) {
|
||||
if (event.getAction() == MotionEvent.ACTION_UP) {
|
||||
forwardNamePressed = false;
|
||||
} else if (event.getAction() == MotionEvent.ACTION_CANCEL) {
|
||||
forwardNamePressed = false;
|
||||
} else if (event.getAction() == MotionEvent.ACTION_MOVE) {
|
||||
if (!(x >= forwardNameX && x <= forwardNameX + forwardedNameWidth && y >= forwardNameY && y <= forwardNameY + dp(32))) {
|
||||
forwardNamePressed = false;
|
||||
}
|
||||
}
|
||||
} else if (newchatPressed) {
|
||||
if (event.getAction() == MotionEvent.ACTION_UP) {
|
||||
newchatPressed = false;
|
||||
@@ -867,7 +844,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
}
|
||||
|
||||
private boolean isUserDataChanged() {
|
||||
if (currentMessageObject == null || currentUser == null && currentChat == null) {
|
||||
if (currentMessageObject == null || currentUser == null) {
|
||||
return false;
|
||||
}
|
||||
if (lastSendState != currentMessageObject.messageOwner.send_state) {
|
||||
@@ -878,12 +855,9 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
}
|
||||
|
||||
TLRPC.User newUser = null;
|
||||
final TLRPC.Chat newChat = null;
|
||||
if (currentMessageObject.isFromUser()) {
|
||||
newUser = MrMailbox.getUser(currentMessageObject.messageOwner.from_id);
|
||||
} /*else if (currentMessageObject.messageOwner.post) {
|
||||
newChat = MessagesController.getInstance().getChat(currentMessageObject.messageOwner.to_id.channel_id);
|
||||
}*/
|
||||
}
|
||||
TLRPC.FileLocation newPhoto = null;
|
||||
|
||||
if (isAvatarVisible) {
|
||||
@@ -900,8 +874,6 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
if (drawName && isGroupChat && !currentMessageObject.isOutOwner()) {
|
||||
if (newUser != null) {
|
||||
newNameString = "ErrName"; // use MrContact.getName(), if really needed
|
||||
} else if (newChat != null) {
|
||||
newNameString = newChat.title;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -909,10 +881,6 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
return true;
|
||||
}
|
||||
|
||||
if (drawForwardedName) {
|
||||
newNameString = currentMessageObject.getForwardedName();
|
||||
return currentForwardNameString == null && newNameString != null || currentForwardNameString != null && newNameString == null || currentForwardNameString != null && newNameString != null && !currentForwardNameString.equals(newNameString);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1083,12 +1051,12 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
}
|
||||
int minutes = duration / 60;
|
||||
int seconds = duration - minutes * 60;
|
||||
String str = String.format("%d:%02d, %s", minutes, seconds, formatFileSize(documentAttach.size));
|
||||
String infoString = String.format("%d:%02d, %s", minutes, seconds, formatFileSize(documentAttach.size));
|
||||
if( MrMailbox.getMsg(messageObject.getId()).isIncreation()!=0 ) {
|
||||
str = ApplicationLoader.applicationContext.getString(R.string.OneMoment);
|
||||
infoString = ApplicationLoader.applicationContext.getString(R.string.OneMoment);
|
||||
}
|
||||
infoWidth = (int) Math.ceil(infoPaint.measureText(str));
|
||||
infoLayout = new StaticLayout(str, infoPaint, infoWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
|
||||
infoWidth = (int) Math.ceil(infoPaint.measureText(infoString));
|
||||
infoLayout = new StaticLayout(infoString, infoPaint, infoWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1103,30 +1071,24 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
}
|
||||
docTitleLayout = StaticLayoutEx.createStaticLayout(name, docNamePaint, maxWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false, TextUtils.TruncateAt.MIDDLE, maxWidth, drawPhotoImage ? 2 : 1);
|
||||
docTitleOffsetX = Integer.MIN_VALUE;
|
||||
int width;
|
||||
if (docTitleLayout != null && docTitleLayout.getLineCount() > 0) {
|
||||
int maxLineWidth = 0;
|
||||
for (int a = 0; a < docTitleLayout.getLineCount(); a++) {
|
||||
maxLineWidth = Math.max(maxLineWidth, (int) Math.ceil(docTitleLayout.getLineWidth(a)));
|
||||
docTitleOffsetX = Math.max(docTitleOffsetX, (int) Math.ceil(-docTitleLayout.getLineLeft(a)));
|
||||
}
|
||||
width = Math.min(maxWidth, maxLineWidth);
|
||||
} else {
|
||||
width = maxWidth;
|
||||
docTitleOffsetX = 0;
|
||||
}
|
||||
|
||||
String str = formatFileSize(documentAttach.size) + " " + FileLoader.getDocumentExtension(documentAttach);
|
||||
infoWidth = Math.min(maxWidth - AndroidUtilities.dp(30), (int) Math.ceil(infoPaint.measureText(str)));
|
||||
CharSequence str2 = TextUtils.ellipsize(str, infoPaint, infoWidth, TextUtils.TruncateAt.END);
|
||||
try {
|
||||
if (infoWidth < 0) {
|
||||
infoWidth = dp(10);
|
||||
}
|
||||
infoLayout = new StaticLayout(str2, infoPaint, infoWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
|
||||
} catch (Exception e) {
|
||||
String infoString = formatFileSize(documentAttach.size) + " " + FileLoader.getDocumentExtension(documentAttach);
|
||||
infoWidth = Math.min(maxWidth - AndroidUtilities.dp(30), (int) Math.ceil(infoPaint.measureText(infoString)));
|
||||
CharSequence str2 = TextUtils.ellipsize(infoString, infoPaint, infoWidth, TextUtils.TruncateAt.END);
|
||||
|
||||
if (infoWidth < 0) {
|
||||
infoWidth = dp(10);
|
||||
}
|
||||
infoLayout = new StaticLayout(str2, infoPaint, infoWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
|
||||
|
||||
if (drawPhotoImage) {
|
||||
currentPhotoObject = FileLoader.getClosestPhotoSizeWithSize(messageObject.photoThumbs, getPhotoSize());
|
||||
@@ -1221,7 +1183,6 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
wasLayout = false;
|
||||
drawNewchatButton = checkNeedDrawNewchatButton(messageObject);
|
||||
currentUser = null;
|
||||
//currentChat = null;
|
||||
drawNameLayout = false;
|
||||
|
||||
resetPressedLink(-1);
|
||||
@@ -1243,7 +1204,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
drawBackground = true;
|
||||
drawName = false;
|
||||
useSeekBarWaveform = false;
|
||||
drawForwardedName = false;
|
||||
allowForwardedName = false;
|
||||
mediaBackground = false;
|
||||
availableTimeWidth = 0;
|
||||
photoImage.setNeedsQualityThumb(false);
|
||||
@@ -1258,25 +1219,15 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
}
|
||||
|
||||
if (messageObject.type == MessageObject.MO_TYPE0_TEXT) {
|
||||
drawForwardedName = true;
|
||||
allowForwardedName = true;
|
||||
|
||||
int maxWidth;
|
||||
if (isTablet()) {
|
||||
if (isGroupChat && !messageObject.isOutOwner() && messageObject.isFromUser()) {
|
||||
maxWidth = getMinTabletSide() - dp(122);
|
||||
drawName = true;
|
||||
} else {
|
||||
drawName = false;
|
||||
maxWidth = getMinTabletSide() - dp(80);
|
||||
}
|
||||
if (isGroupChat && !messageObject.isOutOwner() && messageObject.isFromUser()) {
|
||||
maxWidth = Math.min(displaySize.x, displaySize.y) - dp(122);
|
||||
drawName = true;
|
||||
} else {
|
||||
if (isGroupChat && !messageObject.isOutOwner() && messageObject.isFromUser()) {
|
||||
maxWidth = Math.min(displaySize.x, displaySize.y) - dp(122);
|
||||
drawName = true;
|
||||
} else {
|
||||
maxWidth = Math.min(displaySize.x, displaySize.y) - dp(80);
|
||||
drawName = false;
|
||||
}
|
||||
maxWidth = Math.min(displaySize.x, displaySize.y) - dp(80);
|
||||
drawName = false;
|
||||
}
|
||||
measureTime(messageObject);
|
||||
int timeMore = timeWidth + dp(6);
|
||||
@@ -1309,12 +1260,8 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
photoImage.setImageBitmap((Drawable) null);
|
||||
calcBackgroundWidth(maxWidth, timeMore, maxChildWidth);
|
||||
} else if (messageObject.type == MessageObject.MO_TYPE2_VOICE) {
|
||||
drawForwardedName = true;
|
||||
if (isTablet()) {
|
||||
backgroundWidth = Math.min(getMinTabletSide() - dp(isGroupChat && messageObject.isFromUser() && !messageObject.isOutOwner() ? 102 : 50), dp(270));
|
||||
} else {
|
||||
backgroundWidth = Math.min(displaySize.x - dp(isGroupChat && messageObject.isFromUser() && !messageObject.isOutOwner() ? 102 : 50), dp(270));
|
||||
}
|
||||
allowForwardedName = true;
|
||||
backgroundWidth = Math.min(displaySize.x - dp(isGroupChat && messageObject.isFromUser() && !messageObject.isOutOwner() ? 102 : 50), dp(270));
|
||||
createDocumentLayout(backgroundWidth, messageObject);
|
||||
|
||||
setMessageObjectInternal(messageObject);
|
||||
@@ -1323,11 +1270,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
|
||||
updateWaveform(true);
|
||||
} else if (messageObject.type == MessageObject.MO_TYPE14_MUSIC) {
|
||||
if (isTablet()) {
|
||||
backgroundWidth = Math.min(getMinTabletSide() - dp(isGroupChat && messageObject.isFromUser() && !messageObject.isOutOwner() ? 102 : 50), dp(270));
|
||||
} else {
|
||||
backgroundWidth = Math.min(displaySize.x - dp(isGroupChat && messageObject.isFromUser() && !messageObject.isOutOwner() ? 102 : 50), dp(270));
|
||||
}
|
||||
backgroundWidth = Math.min(displaySize.x - dp(isGroupChat && messageObject.isFromUser() && !messageObject.isOutOwner() ? 102 : 50), dp(270));
|
||||
|
||||
createDocumentLayout(backgroundWidth, messageObject);
|
||||
|
||||
@@ -1335,7 +1278,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
|
||||
totalHeight = dp(80) + namesOffset;
|
||||
} else {
|
||||
drawForwardedName = messageObject.messageOwner.fwd_from != null && messageObject.type != MessageObject.MO_TYPE13_STICKER;
|
||||
allowForwardedName = messageObject.isForwarded() && messageObject.type != MessageObject.MO_TYPE13_STICKER;
|
||||
mediaBackground = messageObject.type != MessageObject.MO_TYPE9_FILE;
|
||||
drawImageButton = false; // we do not want the image button for images
|
||||
drawPhotoImage = true;
|
||||
@@ -1352,11 +1295,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
|
||||
photoImage.setForcePreview(false);
|
||||
if (messageObject.type == MessageObject.MO_TYPE9_FILE) {
|
||||
if (isTablet()) {
|
||||
backgroundWidth = Math.min(getMinTabletSide() - dp(isGroupChat && messageObject.isFromUser() && !messageObject.isOutOwner() ? 102 : 50), dp(270));
|
||||
} else {
|
||||
backgroundWidth = Math.min(displaySize.x - dp(isGroupChat && messageObject.isFromUser() && !messageObject.isOutOwner() ? 102 : 50), dp(270));
|
||||
}
|
||||
backgroundWidth = Math.min(displaySize.x - dp(isGroupChat && messageObject.isFromUser() && !messageObject.isOutOwner() ? 102 : 50), dp(270));
|
||||
if (checkNeedDrawNewchatButton(messageObject)) {
|
||||
backgroundWidth -= dp(20);
|
||||
}
|
||||
@@ -1395,11 +1334,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
}
|
||||
float maxHeight;
|
||||
float maxWidth;
|
||||
if (isTablet()) {
|
||||
maxHeight = maxWidth = getMinTabletSide() * 0.4f;
|
||||
} else {
|
||||
maxHeight = maxWidth = Math.min(displaySize.x, displaySize.y) * 0.5f;
|
||||
}
|
||||
maxHeight = maxWidth = Math.min(displaySize.x, displaySize.y) * 0.5f;
|
||||
if (photoWidth == 0) {
|
||||
photoHeight = (int) maxHeight;
|
||||
photoWidth = photoHeight + dp(100);
|
||||
@@ -1431,11 +1366,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
}
|
||||
} else {
|
||||
int maxPhotoWidth;
|
||||
if (isTablet()) {
|
||||
maxPhotoWidth = photoWidth = (int) (getMinTabletSide() * 0.7f);
|
||||
} else {
|
||||
maxPhotoWidth = photoWidth = (int) (Math.min(displaySize.x, displaySize.y) * 0.7f);
|
||||
}
|
||||
maxPhotoWidth = photoWidth = (int) (Math.min(displaySize.x, displaySize.y) * 0.7f);
|
||||
photoHeight = photoWidth + dp(100);
|
||||
if (checkNeedDrawNewchatButton(messageObject)) {
|
||||
maxPhotoWidth -= dp(20);
|
||||
@@ -1604,7 +1535,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
}
|
||||
setMessageObjectInternal(messageObject);
|
||||
|
||||
if (drawForwardedName) {
|
||||
if (allowForwardedName) {
|
||||
namesOffset += dp(5);
|
||||
} else if (drawNameLayout && messageObject.messageOwner.reply_to_msg_id == 0) {
|
||||
namesOffset += dp(7);
|
||||
@@ -1879,7 +1810,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
}
|
||||
else if (currentMessageObject.type == MessageObject.MO_TYPE1_PHOTO || documentAttachType == DOCUMENT_ATTACH_TYPE_VIDEO) {
|
||||
if (photoImage.getVisible()) {
|
||||
if (infoLayout != null && (buttonState == BS1_CLICK_TO_PAUSE || buttonState == BS0_CLICK_TO_PLAY || buttonState == BS3_NORMAL)) {
|
||||
if (infoLayout != null /*&& (buttonState == BS1_CLICK_TO_PAUSE || buttonState == BS0_CLICK_TO_PLAY || buttonState == BS3_NORMAL)*/) {
|
||||
infoPaint.setColor(Theme.MSG_MEDIA_INFO_TEXT_COLOR);
|
||||
setDrawableBounds(Theme.timeBackgroundDrawable, photoImage.getImageX() + dp(4), photoImage.getImageY() + dp(4), infoWidth + dp(8), dp(16.5f));
|
||||
Theme.timeBackgroundDrawable.draw(canvas);
|
||||
@@ -1975,18 +1906,10 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
private int getMaxNameWidth() {
|
||||
if (documentAttachType == DOCUMENT_ATTACH_TYPE_STICKER) {
|
||||
int maxWidth;
|
||||
if (isTablet()) {
|
||||
if (isGroupChat && !currentMessageObject.isOutOwner() && currentMessageObject.isFromUser()) {
|
||||
maxWidth = getMinTabletSide() - dp(42);
|
||||
} else {
|
||||
maxWidth = getMinTabletSide();
|
||||
}
|
||||
if (isGroupChat && !currentMessageObject.isOutOwner() && currentMessageObject.isFromUser()) {
|
||||
maxWidth = Math.min(displaySize.x, displaySize.y) - dp(42);
|
||||
} else {
|
||||
if (isGroupChat && !currentMessageObject.isOutOwner() && currentMessageObject.isFromUser()) {
|
||||
maxWidth = Math.min(displaySize.x, displaySize.y) - dp(42);
|
||||
} else {
|
||||
maxWidth = Math.min(displaySize.x, displaySize.y);
|
||||
}
|
||||
maxWidth = Math.min(displaySize.x, displaySize.y);
|
||||
}
|
||||
return maxWidth - backgroundWidth - dp(57);
|
||||
}
|
||||
@@ -2109,11 +2032,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
|
||||
if (currentMessageObject.isFromUser()) {
|
||||
currentUser = MrMailbox.getUser(currentMessageObject.messageOwner.from_id);
|
||||
} /*else if (currentMessageObject.messageOwner.from_id < 0) {
|
||||
currentChat = MessagesController.getInstance().getChat(-currentMessageObject.messageOwner.from_id);
|
||||
} else if (currentMessageObject.messageOwner.post) {
|
||||
currentChat = MessagesController.getInstance().getChat(currentMessageObject.messageOwner.to_id.channel_id);
|
||||
}*/
|
||||
}
|
||||
|
||||
MrContact mrContact = null;
|
||||
String cname = "";
|
||||
@@ -2139,21 +2058,15 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
nameWidth = dp(100);
|
||||
}
|
||||
|
||||
if (authorName) {
|
||||
if (currentUser != null) {
|
||||
currentNameString = cname;
|
||||
} /*else if (currentChat != null) {
|
||||
currentNameString = currentChat.title;
|
||||
} */ else {
|
||||
currentNameString = "DELETED";
|
||||
}
|
||||
if (currentUser != null) {
|
||||
currentNameString = cname;
|
||||
} else {
|
||||
currentNameString = "";
|
||||
currentNameString = "DELETED";
|
||||
}
|
||||
CharSequence nameStringFinal = TextUtils.ellipsize(currentNameString.replace('\n', ' '), namePaint, nameWidth, TextUtils.TruncateAt.END);
|
||||
try {
|
||||
nameLayout = new StaticLayout(nameStringFinal, namePaint, nameWidth + dp(2), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
|
||||
if (nameLayout != null && nameLayout.getLineCount() > 0) {
|
||||
if (nameLayout.getLineCount() > 0) {
|
||||
nameWidth = (int) Math.ceil(nameLayout.getLineWidth(0));
|
||||
if (messageObject.type != MessageObject.MO_TYPE13_STICKER) {
|
||||
namesOffset += dp(19);
|
||||
@@ -2174,28 +2087,18 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
nameWidth = 0;
|
||||
}
|
||||
|
||||
currentForwardNameString = null;
|
||||
forwardedNameLayout[0] = null;
|
||||
forwardedNameLayout[1] = null;
|
||||
forwardedNameLayout = null;
|
||||
forwardedNameWidth = 0;
|
||||
if( drawForwardedName && messageObject.isForwarded() && messageObject.messageOwner.fwd_from!=null )
|
||||
if( allowForwardedName && messageObject.isForwarded() )
|
||||
{
|
||||
currentForwardNameString = messageObject.messageOwner.fwd_from.m_name;
|
||||
|
||||
forwardedNameWidth = getMaxNameWidth();
|
||||
int fromWidth = (int) Math.ceil(forwardNamePaint.measureText(ApplicationLoader.applicationContext.getString(R.string.From) + " "));
|
||||
CharSequence name = TextUtils.ellipsize(currentForwardNameString.replace('\n', ' '), forward2NamePaint, forwardedNameWidth - fromWidth, TextUtils.TruncateAt.END);
|
||||
CharSequence lastLine;
|
||||
lastLine = replaceTags(String.format("%s <b>%s</b>", ApplicationLoader.applicationContext.getString(R.string.From), name));
|
||||
lastLine = TextUtils.ellipsize(lastLine, forwardNamePaint, forwardedNameWidth, TextUtils.TruncateAt.END);
|
||||
try {
|
||||
forwardedNameLayout[1] = new StaticLayout(lastLine, forwardNamePaint, forwardedNameWidth + dp(2), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
|
||||
lastLine = TextUtils.ellipsize(replaceTags(ApplicationLoader.applicationContext.getString(R.string.ForwardedMessage)), forwardNamePaint, forwardedNameWidth, TextUtils.TruncateAt.END);
|
||||
forwardedNameLayout[0] = new StaticLayout(lastLine, forwardNamePaint, forwardedNameWidth + dp(2), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
|
||||
forwardedNameWidth = Math.max((int) Math.ceil(forwardedNameLayout[0].getLineWidth(0)), (int) Math.ceil(forwardedNameLayout[1].getLineWidth(0)));
|
||||
forwardNameOffsetX[0] = forwardedNameLayout[0].getLineLeft(0);
|
||||
forwardNameOffsetX[1] = forwardedNameLayout[1].getLineLeft(0);
|
||||
namesOffset += dp(36);
|
||||
lastLine = TextUtils.ellipsize(replaceTags(ApplicationLoader.applicationContext.getString(R.string.ForwardedMessage)), forwardedNamePaint, forwardedNameWidth, TextUtils.TruncateAt.END);
|
||||
forwardedNameLayout = new StaticLayout(lastLine, forwardedNamePaint, forwardedNameWidth + dp(2), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
|
||||
forwardedNameWidth = (int) Math.ceil(forwardedNameLayout.getLineWidth(0));
|
||||
forwardedNameOffsetX = forwardedNameLayout.getLineLeft(0);
|
||||
namesOffset += dp(18);
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
@@ -2301,24 +2204,23 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
canvas.restore();
|
||||
}
|
||||
|
||||
if (drawForwardedName && forwardedNameLayout[0] != null && forwardedNameLayout[1] != null) {
|
||||
forwardNameY = dp(10 + (drawNameLayout ? 19 : 0));
|
||||
forwardNamePaint.setColor(Theme.MSG_IN_TIME_N_FWD_TEXT_COLOR);
|
||||
if (allowForwardedName && forwardedNameLayout != null ) {
|
||||
int forwardedNameX = 0;
|
||||
int forwardedNameY = dp(10 + (drawNameLayout ? 19 : 0));
|
||||
forwardedNamePaint.setColor(Theme.MSG_IN_TIME_N_FWD_TEXT_COLOR);
|
||||
if (currentMessageObject.isOutOwner()) {
|
||||
forwardNameX = currentBackgroundDrawable.getBounds().left + dp(11);
|
||||
forwardedNameX = currentBackgroundDrawable.getBounds().left + dp(11);
|
||||
} else {
|
||||
if (mediaBackground) {
|
||||
forwardNameX = currentBackgroundDrawable.getBounds().left + dp(11);
|
||||
forwardedNameX = currentBackgroundDrawable.getBounds().left + dp(11);
|
||||
} else {
|
||||
forwardNameX = currentBackgroundDrawable.getBounds().left + dp(17);
|
||||
forwardedNameX = currentBackgroundDrawable.getBounds().left + dp(17);
|
||||
}
|
||||
}
|
||||
for (int a = 0; a < 2; a++) {
|
||||
canvas.save();
|
||||
canvas.translate(forwardNameX - forwardNameOffsetX[a], forwardNameY + dp(16) * a);
|
||||
forwardedNameLayout[a].draw(canvas);
|
||||
canvas.restore();
|
||||
}
|
||||
canvas.save();
|
||||
canvas.translate(forwardedNameX - forwardedNameOffsetX, forwardedNameY);
|
||||
forwardedNameLayout.draw(canvas);
|
||||
canvas.restore();
|
||||
}
|
||||
|
||||
if (drawTime || !mediaBackground) {
|
||||
|
||||
@@ -403,10 +403,10 @@ public class DialogCell extends BaseCell {
|
||||
int avatarLeft;
|
||||
if (!LocaleController.isRTL) {
|
||||
messageLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline);
|
||||
avatarLeft = AndroidUtilities.dp(AndroidUtilities.isTablet() ? 13 : 9);
|
||||
avatarLeft = AndroidUtilities.dp(9);
|
||||
} else {
|
||||
messageLeft = AndroidUtilities.dp(16);
|
||||
avatarLeft = getMeasuredWidth() - AndroidUtilities.dp(AndroidUtilities.isTablet() ? 65 : 61);
|
||||
avatarLeft = getMeasuredWidth() - AndroidUtilities.dp(61);
|
||||
}
|
||||
avatarImage.setImageCoords(avatarLeft, avatarTop, AndroidUtilities.dp(52), AndroidUtilities.dp(52));
|
||||
if (drawError) {
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Delta Chat Android
|
||||
* (C) 2013-2016 Nikolai Kudashov
|
||||
* (C) 2017 Björn Petersen
|
||||
* Contact: r10s@b44t.com, http://b44t.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see http://www.gnu.org/licenses/ .
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
package com.b44t.ui.Cells;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
|
||||
import com.b44t.messenger.AndroidUtilities;
|
||||
|
||||
public class DividerCell extends BaseCell {
|
||||
|
||||
private static Paint paint;
|
||||
|
||||
public DividerCell(Context context) {
|
||||
super(context);
|
||||
if (paint == null) {
|
||||
paint = new Paint();
|
||||
paint.setColor(0xffd9d9d9);
|
||||
paint.setStrokeWidth(1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec), AndroidUtilities.dp(16) + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
canvas.drawLine(getPaddingLeft(), AndroidUtilities.dp(8), getWidth() - getPaddingRight(), AndroidUtilities.dp(8), paint);
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Delta Chat Android
|
||||
* (C) 2013-2016 Nikolai Kudashov
|
||||
* (C) 2017 Björn Petersen
|
||||
* Contact: r10s@b44t.com, http://b44t.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see http://www.gnu.org/licenses/ .
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
package com.b44t.ui.Cells;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.TypedValue;
|
||||
import android.view.Gravity;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.b44t.messenger.AndroidUtilities;
|
||||
import com.b44t.ui.Components.LayoutHelper;
|
||||
|
||||
public class DrawerActionCell extends FrameLayout {
|
||||
|
||||
private TextView textView;
|
||||
|
||||
public DrawerActionCell(Context context) {
|
||||
super(context);
|
||||
|
||||
textView = new TextView(context);
|
||||
textView.setTextColor(0xff000000);
|
||||
textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 15);
|
||||
textView.setLines(1);
|
||||
textView.setMaxLines(1);
|
||||
textView.setSingleLine(true);
|
||||
textView.setGravity(Gravity.START | Gravity.CENTER_VERTICAL);
|
||||
textView.setCompoundDrawablePadding(AndroidUtilities.dp(18));
|
||||
addView(textView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.START | Gravity.TOP, 14, 0, 16, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(48), MeasureSpec.EXACTLY));
|
||||
}
|
||||
|
||||
public void setTextAndIcon(String text, int resId) {
|
||||
try {
|
||||
textView.setText(text);
|
||||
textView.setCompoundDrawablesWithIntrinsicBounds(resId, 0, 0, 0);
|
||||
} catch (Throwable e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -49,14 +49,20 @@ public class EditTextCell extends FrameLayout {
|
||||
private static Paint paint;
|
||||
private boolean needDivider;
|
||||
private boolean useLabel;
|
||||
private boolean multiLine;
|
||||
|
||||
public EditTextCell(Context context) {
|
||||
this(context, true);
|
||||
this(context, true, false);
|
||||
}
|
||||
|
||||
public EditTextCell(Context context, boolean useLabel__) {
|
||||
public EditTextCell(Context context, boolean useLabel) {
|
||||
this(context, useLabel, false);
|
||||
}
|
||||
|
||||
public EditTextCell(Context context, boolean useLabel__, boolean multiLine__) {
|
||||
super(context);
|
||||
useLabel = useLabel__;
|
||||
multiLine = multiLine__;
|
||||
|
||||
if (paint == null) {
|
||||
paint = new Paint();
|
||||
@@ -75,41 +81,44 @@ public class EditTextCell extends FrameLayout {
|
||||
addView(labelTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.START | Gravity.TOP,
|
||||
17, 8, 17, 0));
|
||||
|
||||
|
||||
editView = new EditText(context);
|
||||
editView.setTextColor(0xff212121); // ok
|
||||
editView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 18); // ok, normal text is 16
|
||||
editView.setLines(1);
|
||||
editView.setMaxLines(1);
|
||||
editView.setSingleLine(true);
|
||||
editView.setTextColor(0xff212121);
|
||||
editView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 18); // normal text is 16
|
||||
int addImeFlag = 0, addInputType = 0;
|
||||
if( multiLine__ ) {
|
||||
editView.setLines(2);
|
||||
editView.setMaxLines(2);
|
||||
editView.setSingleLine(false);
|
||||
editView.setVerticalScrollBarEnabled(true);
|
||||
editView.setHorizontalScrollBarEnabled(false);
|
||||
editView.setMinimumHeight(AndroidUtilities.dp(100));
|
||||
addInputType = EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE|EditorInfo.TYPE_TEXT_FLAG_CAP_SENTENCES;
|
||||
}
|
||||
else {
|
||||
editView.setLines(1);
|
||||
editView.setMaxLines(1);
|
||||
editView.setSingleLine(true);
|
||||
addInputType = InputType.TYPE_CLASS_TEXT|InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS;
|
||||
addImeFlag = EditorInfo.IME_ACTION_DONE; // just close the keyboard, NEXT would not work as the other entries nay not yet loaded
|
||||
}
|
||||
editView.setHintTextColor(0xffBBBBBB); // was: 0xff979797
|
||||
editView.setGravity(Gravity.START);
|
||||
editView.setInputType(InputType.TYPE_CLASS_TEXT|InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
|
||||
editView.setImeOptions(EditorInfo.IME_ACTION_DONE); // just close the keyboard, NEXT would not work as the other entries nay not yet loaded
|
||||
AndroidUtilities.clearCursorDrawable(editView);
|
||||
/*
|
||||
e.setPadding(0, 0, 0, 0);
|
||||
e.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||
@Override
|
||||
public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {
|
||||
if (i == EditorInfo.IME_ACTION_DONE && doneButton != null) {
|
||||
doneButton.performClick();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
*/
|
||||
editView.setInputType(editView.getInputType()|addInputType);
|
||||
editView.setImeOptions(addImeFlag|EditorInfo.IME_FLAG_NO_EXTRACT_UI);
|
||||
|
||||
addView(editView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.START | Gravity.TOP,
|
||||
17, useLabel? 25 : 25-17, 17, 0));
|
||||
17, useLabel? 25 : 25-17, 17, multiLine?17:0));
|
||||
|
||||
setBackgroundColor(0xffffffff);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(useLabel? 64 : 64-15) + (needDivider ? 1 : 0), MeasureSpec.EXACTLY));
|
||||
int dpheight = multiLine? 49*2 : 49;
|
||||
if( useLabel ) {
|
||||
dpheight += 15;
|
||||
}
|
||||
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(dpheight)+(needDivider ? 1 : 0), MeasureSpec.EXACTLY));
|
||||
}
|
||||
|
||||
public void setValueHintAndLabel(String value, String hint, String label, boolean divider) {
|
||||
|
||||
@@ -31,7 +31,6 @@ import android.widget.FrameLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.b44t.messenger.AndroidUtilities;
|
||||
import com.b44t.messenger.LocaleController;
|
||||
import com.b44t.ui.Components.LayoutHelper;
|
||||
|
||||
public class GreySectionCell extends FrameLayout {
|
||||
|
||||
@@ -31,21 +31,28 @@ import android.widget.FrameLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.b44t.messenger.AndroidUtilities;
|
||||
import com.b44t.messenger.LocaleController;
|
||||
import com.b44t.ui.Components.LayoutHelper;
|
||||
|
||||
public class HeaderCell extends FrameLayout {
|
||||
|
||||
private TextView textView;
|
||||
|
||||
static public TextView createTextView(Context context, String text)
|
||||
{
|
||||
TextView ret = new TextView(context);
|
||||
ret.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 15);
|
||||
ret.setTypeface(Typeface.DEFAULT_BOLD);
|
||||
ret.setTextColor(0xff5099c9);
|
||||
ret.setGravity(Gravity.START | Gravity.CENTER_VERTICAL);
|
||||
if( text != null ) {
|
||||
ret.setText(text);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public HeaderCell(Context context) {
|
||||
super(context);
|
||||
|
||||
textView = new TextView(getContext());
|
||||
textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 15);
|
||||
textView.setTypeface(Typeface.DEFAULT_BOLD);
|
||||
textView.setTextColor(0xff5099c9);
|
||||
textView.setGravity(Gravity.START | Gravity.CENTER_VERTICAL);
|
||||
textView = createTextView(getContext(), null);
|
||||
addView(textView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.START | Gravity.TOP, 17, 15, 17, 0));
|
||||
}
|
||||
|
||||
|
||||
@@ -158,11 +158,7 @@ public class PhotoPickerAlbumsCell extends FrameLayout {
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
int itemWidth;
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
itemWidth = (AndroidUtilities.dp(490) - ((albumsCount + 1) * AndroidUtilities.dp(4))) / albumsCount;
|
||||
} else {
|
||||
itemWidth = (AndroidUtilities.displaySize.x - ((albumsCount + 1) * AndroidUtilities.dp(4))) / albumsCount;
|
||||
}
|
||||
itemWidth = (AndroidUtilities.displaySize.x - ((albumsCount + 1) * AndroidUtilities.dp(4))) / albumsCount;
|
||||
|
||||
for (int a = 0; a < albumsCount; a++) {
|
||||
LayoutParams layoutParams = (LayoutParams) albumViews[a].getLayoutParams();
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Delta Chat Android
|
||||
* (C) 2013-2016 Nikolai Kudashov
|
||||
* (C) 2017 Björn Petersen
|
||||
* Contact: r10s@b44t.com, http://b44t.com
|
||||
*
|
||||
@@ -27,8 +26,6 @@ import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.PorterDuffColorFilter;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
@@ -42,15 +39,13 @@ import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.b44t.messenger.AndroidUtilities;
|
||||
import com.b44t.messenger.LocaleController;
|
||||
import com.b44t.messenger.MrMailbox;
|
||||
import com.b44t.messenger.ApplicationLoader;
|
||||
import com.b44t.messenger.R;
|
||||
import com.b44t.ui.ActionBar.DrawerLayoutContainer;
|
||||
import com.b44t.ui.Components.LayoutHelper;
|
||||
import com.b44t.ui.ActionBar.Theme;
|
||||
|
||||
public class DrawerProfileCell extends FrameLayout {
|
||||
public class SettingsProfileCell extends FrameLayout {
|
||||
|
||||
private TextView nameTextView;
|
||||
private TextView subtitleTextView;
|
||||
@@ -58,7 +53,7 @@ public class DrawerProfileCell extends FrameLayout {
|
||||
private Rect destRect = new Rect();
|
||||
private Paint paint = new Paint();
|
||||
|
||||
public DrawerProfileCell(Context context) {
|
||||
public SettingsProfileCell(Context context) {
|
||||
super(context);
|
||||
setBackgroundColor(Theme.ACTION_BAR_COLOR);
|
||||
|
||||
@@ -69,7 +64,7 @@ public class DrawerProfileCell extends FrameLayout {
|
||||
|
||||
nameTextView = new TextView(context);
|
||||
nameTextView.setTextColor(0xffffffff);
|
||||
nameTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, DrawerLayoutContainer.USE_DRAWER? 23 : 26);
|
||||
nameTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 26);
|
||||
nameTextView.setLines(1);
|
||||
nameTextView.setMaxLines(1);
|
||||
nameTextView.setSingleLine(true);
|
||||
@@ -79,7 +74,7 @@ public class DrawerProfileCell extends FrameLayout {
|
||||
|
||||
subtitleTextView = new TextView(context);
|
||||
subtitleTextView.setTextColor(0xffc2e5ff);
|
||||
subtitleTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, DrawerLayoutContainer.USE_DRAWER? 13 : Theme.ACTION_BAR_SUBTITLE_TEXT_SIZE);
|
||||
subtitleTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, Theme.ACTION_BAR_SUBTITLE_TEXT_SIZE);
|
||||
subtitleTextView.setLines(1);
|
||||
subtitleTextView.setMaxLines(1);
|
||||
subtitleTextView.setSingleLine(true);
|
||||
@@ -90,7 +85,7 @@ public class DrawerProfileCell extends FrameLayout {
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
int mrHeight = DrawerLayoutContainer.USE_DRAWER? 180 : 100/*see also shadow height above*/;
|
||||
int mrHeight = 100/*see also shadow height above*/;
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(mrHeight) + AndroidUtilities.statusBarHeight, MeasureSpec.EXACTLY));
|
||||
} else {
|
||||
@@ -1,87 +0,0 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Delta Chat Android
|
||||
* (C) 2013-2016 Nikolai Kudashov
|
||||
* (C) 2017 Björn Petersen
|
||||
* Contact: r10s@b44t.com, http://b44t.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see http://www.gnu.org/licenses/ .
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
package com.b44t.ui.Cells;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.TypedValue;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.b44t.messenger.AndroidUtilities;
|
||||
import com.b44t.messenger.LocaleController;
|
||||
import com.b44t.ui.Components.LayoutHelper;
|
||||
|
||||
public class TextDetailCell extends FrameLayout {
|
||||
|
||||
private TextView textView;
|
||||
private TextView valueTextView;
|
||||
private ImageView imageView;
|
||||
|
||||
public TextDetailCell(Context context) {
|
||||
super(context);
|
||||
|
||||
textView = new TextView(context);
|
||||
textView.setTextColor(0xff212121);
|
||||
textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16);
|
||||
textView.setLines(1);
|
||||
textView.setMaxLines(1);
|
||||
textView.setSingleLine(true);
|
||||
textView.setGravity(Gravity.START);
|
||||
addView(textView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.START, LocaleController.isRTL ? 16 : 71, 10, LocaleController.isRTL ? 71 : 16, 0));
|
||||
|
||||
valueTextView = new TextView(context);
|
||||
valueTextView.setTextColor(0xff8a8a8a);
|
||||
valueTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 13);
|
||||
valueTextView.setLines(1);
|
||||
valueTextView.setMaxLines(1);
|
||||
valueTextView.setSingleLine(true);
|
||||
valueTextView.setGravity(Gravity.START);
|
||||
addView(valueTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.START, LocaleController.isRTL ? 16 : 71, 35, LocaleController.isRTL ? 71 : 16, 0));
|
||||
|
||||
imageView = new ImageView(context);
|
||||
imageView.setScaleType(ImageView.ScaleType.CENTER);
|
||||
addView(imageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.START | Gravity.CENTER_VERTICAL, LocaleController.isRTL ? 0 : 16, 0, LocaleController.isRTL ? 16 : 0, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
super.onMeasure(MeasureSpec.makeMeasureSpec(MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.EXACTLY), View.MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(64), View.MeasureSpec.EXACTLY));
|
||||
}
|
||||
|
||||
public void setTextAndValue(String text, String value) {
|
||||
textView.setText(text);
|
||||
valueTextView.setText(value);
|
||||
imageView.setVisibility(INVISIBLE);
|
||||
}
|
||||
|
||||
public void setTextAndValueAndIcon(String text, String value, int resId) {
|
||||
textView.setText(text);
|
||||
valueTextView.setText(value);
|
||||
imageView.setVisibility(VISIBLE);
|
||||
imageView.setImageResource(resId);
|
||||
}
|
||||
}
|
||||
@@ -233,10 +233,6 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
NotificationCenter.getInstance().addObserver(this, NotificationCenter.waveformCalculated);
|
||||
NotificationCenter.getInstance().addObserver(this, NotificationCenter.notificationsSettingsUpdated);
|
||||
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
NotificationCenter.getInstance().postNotificationName(NotificationCenter.openedChatChanged, dialog_id, false);
|
||||
}
|
||||
|
||||
AndroidUtilities.runOnUIThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -363,10 +359,6 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.notificationsSettingsUpdated);
|
||||
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.audioPlayStateChanged);
|
||||
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
NotificationCenter.getInstance().postNotificationName(NotificationCenter.openedChatChanged, dialog_id, true);
|
||||
}
|
||||
|
||||
/*
|
||||
if (currentUser != null) {
|
||||
MessagesController.getInstance().cancelLoadFullUser(currentUser.id);
|
||||
@@ -462,7 +454,6 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
args.putInt("user_id", contact_ids[0]);
|
||||
}
|
||||
ProfileActivity fragment = new ProfileActivity(args);
|
||||
fragment.setPlayProfileAnimation(true);
|
||||
presentFragment(fragment);
|
||||
}
|
||||
else if ( id == ID_DELETE_CHAT)
|
||||
@@ -668,11 +659,11 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
|
||||
setMeasuredDimension(width, height);
|
||||
|
||||
actionModeTextView.setTextSize(!AndroidUtilities.isTablet() && getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE ? 18 : 20);
|
||||
actionModeTextView.setTextSize(getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE ? 18 : 20);
|
||||
actionModeTextView.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.AT_MOST), MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(24), MeasureSpec.AT_MOST));
|
||||
|
||||
if (actionModeSubTextView.getVisibility() != GONE) {
|
||||
actionModeSubTextView.setTextSize(!AndroidUtilities.isTablet() && getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE ? 14 : 16);
|
||||
actionModeSubTextView.setTextSize(getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE ? 14 : 16);
|
||||
actionModeSubTextView.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.AT_MOST), MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(20), MeasureSpec.AT_MOST));
|
||||
}
|
||||
}
|
||||
@@ -683,14 +674,14 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
|
||||
int textTop;
|
||||
if (actionModeSubTextView.getVisibility() != GONE) {
|
||||
textTop = (height / 2 - actionModeTextView.getTextHeight()) / 2 + AndroidUtilities.dp(!AndroidUtilities.isTablet() && getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE ? 2 : 3);
|
||||
textTop = (height / 2 - actionModeTextView.getTextHeight()) / 2 + AndroidUtilities.dp(getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE ? 2 : 3);
|
||||
} else {
|
||||
textTop = (height - actionModeTextView.getTextHeight()) / 2;
|
||||
}
|
||||
actionModeTextView.layout(0, textTop, actionModeTextView.getMeasuredWidth(), textTop + actionModeTextView.getTextHeight());
|
||||
|
||||
if (actionModeSubTextView.getVisibility() != GONE) {
|
||||
textTop = height / 2 + (height / 2 - actionModeSubTextView.getTextHeight()) / 2 - AndroidUtilities.dp(!AndroidUtilities.isTablet() && getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE ? 1 : 1);
|
||||
textTop = height / 2 + (height / 2 - actionModeSubTextView.getTextHeight()) / 2 - AndroidUtilities.dp(getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE ? 1 : 1);
|
||||
actionModeSubTextView.layout(0, textTop, actionModeSubTextView.getMeasuredWidth(), textTop + actionModeSubTextView.getTextHeight());
|
||||
}
|
||||
}
|
||||
@@ -861,7 +852,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
|
||||
TextView emptyView = new TextView(context);
|
||||
|
||||
if( m_mrChat.getParamInt(MrChat.MR_CHAT_PARAM_UNPROMOTED, 0)==1 ) {
|
||||
if( m_mrChat.getParamInt(MrChat.MRP_UNPROMOTED, 0)==1 ) {
|
||||
emptyView.setText(context.getString(R.string.MsgNewGroupDraftHint));
|
||||
emptyView.setGravity(Gravity.START);
|
||||
}
|
||||
@@ -1145,8 +1136,6 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
|
||||
updateBottomOverlay();
|
||||
|
||||
fixLayoutInternal();
|
||||
|
||||
return fragmentView;
|
||||
}
|
||||
|
||||
@@ -2344,24 +2333,6 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
}
|
||||
}
|
||||
|
||||
private boolean fixLayoutInternal() {
|
||||
/*if (!AndroidUtilities.isTablet() && ApplicationLoader.applicationContext.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
selectedMessagesCountTextView.setTextSize(18);
|
||||
} else {
|
||||
selectedMessagesCountTextView.setTextSize(20);
|
||||
}*/
|
||||
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
if (AndroidUtilities.isSmallTablet() && ApplicationLoader.applicationContext.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||
actionBar.setBackButtonDrawable(new BackDrawable(false));
|
||||
} else {
|
||||
actionBar.setBackButtonDrawable(new BackDrawable(parentLayout == null || parentLayout.fragmentsStack.isEmpty() || parentLayout.fragmentsStack.get(0) == ChatActivity.this || parentLayout.fragmentsStack.size() == 1));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private void fixLayout() {
|
||||
if (avatarContainer != null) {
|
||||
avatarContainer.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
|
||||
@@ -2370,7 +2341,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
if (avatarContainer != null) {
|
||||
avatarContainer.getViewTreeObserver().removeOnPreDrawListener(this);
|
||||
}
|
||||
return fixLayoutInternal();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2487,9 +2458,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
args.putInt("chat_id", (int)fwd_chat_id);
|
||||
ChatActivity fragment = new ChatActivity(args);
|
||||
if( presentFragment(fragment, true /*remove last*/) ) {
|
||||
if (!AndroidUtilities.isTablet()) {
|
||||
removeSelfFromStack();
|
||||
}
|
||||
removeSelfFromStack();
|
||||
}
|
||||
else {
|
||||
dialogsFragment.finishFragment(false);
|
||||
@@ -2711,7 +2680,6 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
Bundle args = new Bundle();
|
||||
args.putInt("user_id", user.id);
|
||||
ProfileActivity fragment = new ProfileActivity(args);
|
||||
fragment.setPlayProfileAnimation(false);
|
||||
presentFragment(fragment);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,26 +35,18 @@ import android.text.StaticLayout;
|
||||
import android.text.TextPaint;
|
||||
|
||||
import com.b44t.messenger.AndroidUtilities;
|
||||
import com.b44t.messenger.R;
|
||||
import com.b44t.messenger.TLRPC;
|
||||
import com.b44t.messenger.ApplicationLoader;
|
||||
|
||||
public class AvatarDrawable extends Drawable {
|
||||
|
||||
private static Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
private static TextPaint namePaint;
|
||||
private static TextPaint namePaintSmall;
|
||||
private static int[] arrColors = {0xffe56555, 0xfff28c48, 0xff8e85ee, 0xff76c84d, 0xff5bb6cc, 0xff549cdd, 0xffd25c99, 0xffb37800}; /* the colors should contrast to typical action bar colors as well as to white (more important, is used as text color)*/
|
||||
|
||||
private static Drawable photoDrawable;
|
||||
private static int[] arrColors = {0xffe56555, 0xfff28c48, 0xff8e85ee, 0xff76c84d, 0xff5bb6cc, 0xff549cdd, 0xffd25c99, 0xffb37800}; /* the colors should contrast to typical action bar colors as well as to white (more important, is used as text color)*/
|
||||
|
||||
private int color;
|
||||
private StaticLayout textLayout;
|
||||
private float textWidth;
|
||||
private float textHeight;
|
||||
private float textLeft;
|
||||
private boolean drawPhoto;
|
||||
private boolean smallStyle;
|
||||
private StringBuilder stringBuilder = new StringBuilder(5);
|
||||
|
||||
public AvatarDrawable() {
|
||||
@@ -64,60 +56,18 @@ public class AvatarDrawable extends Drawable {
|
||||
namePaint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
|
||||
namePaint.setColor(0xffffffff);
|
||||
namePaint.setTextSize(AndroidUtilities.dp(20));
|
||||
|
||||
namePaintSmall = new TextPaint(Paint.ANTI_ALIAS_FLAG);
|
||||
namePaintSmall.setColor(0xffffffff);
|
||||
namePaintSmall.setTextSize(AndroidUtilities.dp(14));
|
||||
}
|
||||
}
|
||||
|
||||
public AvatarDrawable(TLRPC.User user) {
|
||||
this();
|
||||
if (user != null) {
|
||||
setInfoByName(user.first_name+" "+ user.last_name);
|
||||
}
|
||||
}
|
||||
|
||||
public AvatarDrawable(TLRPC.Chat chat) {
|
||||
this();
|
||||
if (chat != null) {
|
||||
setInfoByName(chat.title);
|
||||
}
|
||||
}
|
||||
|
||||
public void setSmallStyle(boolean value) {
|
||||
smallStyle = value;
|
||||
}
|
||||
|
||||
public static int getColorIndex(int id) {
|
||||
private static int getColorIndex(int id) {
|
||||
return Math.abs(id % arrColors.length);
|
||||
}
|
||||
|
||||
public static int getColorForId(int id) {
|
||||
return arrColors[getColorIndex(id)];
|
||||
}
|
||||
|
||||
public static int getNameColor(String name) {
|
||||
int id = strChecksum(name);
|
||||
return arrColors[getColorIndex(id)];
|
||||
}
|
||||
|
||||
public void setInfoByUser(TLRPC.User user) {
|
||||
if (user != null) {
|
||||
setInfoByName(user.first_name +" "+ user.last_name);
|
||||
}
|
||||
}
|
||||
|
||||
public void setInfoByChat(TLRPC.Chat chat) {
|
||||
if (chat != null) {
|
||||
setInfoByName(chat.title);
|
||||
}
|
||||
}
|
||||
|
||||
public void setColor_(int value) {
|
||||
color = value;
|
||||
}
|
||||
|
||||
private static int strChecksum(String str) {
|
||||
int ret = 0;
|
||||
if( str!=null ) {
|
||||
@@ -130,42 +80,22 @@ public class AvatarDrawable extends Drawable {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public void setInfoByName(String firstName) {
|
||||
String lastName = null;
|
||||
|
||||
int id = strChecksum(firstName);
|
||||
public void setInfoByName(String name) {
|
||||
int id = strChecksum(name);
|
||||
|
||||
color = arrColors[getColorIndex(id)];
|
||||
|
||||
if (firstName == null || firstName.length() == 0) {
|
||||
firstName = lastName;
|
||||
lastName = null;
|
||||
}
|
||||
|
||||
stringBuilder.setLength(0);
|
||||
if (firstName != null && firstName.length() > 0) {
|
||||
stringBuilder.append(firstName.substring(0, 1));
|
||||
}
|
||||
if (lastName != null && lastName.length() > 0) {
|
||||
String lastch = null;
|
||||
for (int a = lastName.length() - 1; a >= 0; a--) {
|
||||
if (lastch != null && lastName.charAt(a) == ' ') {
|
||||
break;
|
||||
}
|
||||
lastch = lastName.substring(a, a + 1);
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= 16) {
|
||||
stringBuilder.append("\u200C");
|
||||
}
|
||||
stringBuilder.append(lastch);
|
||||
} else if (firstName != null && firstName.length() > 0) {
|
||||
for (int a = firstName.length() - 1; a >= 0; a--) {
|
||||
if (firstName.charAt(a) == ' ') {
|
||||
if (a != firstName.length() - 1 && firstName.charAt(a + 1) != ' ') {
|
||||
if (name != null && name.length() > 0) {
|
||||
stringBuilder.appendCodePoint(name.codePointAt(0));
|
||||
|
||||
for (int a = name.length() - 1; a >= 0; a--) {
|
||||
if (name.charAt(a) == ' ') {
|
||||
if (a != name.length() - 1 && name.charAt(a + 1) != ' ') {
|
||||
if (Build.VERSION.SDK_INT >= 16) {
|
||||
stringBuilder.append("\u200C");
|
||||
stringBuilder.append("\u200C"); // ZERO WIDTH NON-JOINER - avoids the two letter to melt into a ligature which would be incorrect on the initials
|
||||
}
|
||||
stringBuilder.append(firstName.substring(a + 1, a + 2));
|
||||
stringBuilder.appendCodePoint(name.codePointAt(a + 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -175,7 +105,7 @@ public class AvatarDrawable extends Drawable {
|
||||
if (stringBuilder.length() > 0) {
|
||||
String text = stringBuilder.toString().toUpperCase();
|
||||
try {
|
||||
textLayout = new StaticLayout(text, (smallStyle ? namePaintSmall : namePaint), AndroidUtilities.dp(100), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
|
||||
textLayout = new StaticLayout(text, namePaint, AndroidUtilities.dp(100), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
|
||||
if (textLayout.getLineCount() > 0) {
|
||||
textLeft = textLayout.getLineLeft(0);
|
||||
textWidth = textLayout.getLineWidth(0);
|
||||
@@ -189,13 +119,6 @@ public class AvatarDrawable extends Drawable {
|
||||
}
|
||||
}
|
||||
|
||||
public void setDrawPhoto(boolean value) {
|
||||
if (value && photoDrawable == null) {
|
||||
photoDrawable = ApplicationLoader.applicationContext.getResources().getDrawable(R.drawable.photo_w);
|
||||
}
|
||||
drawPhoto = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Canvas canvas) {
|
||||
Rect bounds = getBounds();
|
||||
@@ -211,24 +134,17 @@ public class AvatarDrawable extends Drawable {
|
||||
if (textLayout != null) {
|
||||
canvas.translate((size - textWidth) / 2 - textLeft, (size - textHeight) / 2);
|
||||
textLayout.draw(canvas);
|
||||
} else if (drawPhoto && photoDrawable != null) {
|
||||
int x = (size - photoDrawable.getIntrinsicWidth()) / 2;
|
||||
int y = (size - photoDrawable.getIntrinsicHeight()) / 2;
|
||||
photoDrawable.setBounds(x, y, x + photoDrawable.getIntrinsicWidth(), y + photoDrawable.getIntrinsicHeight());
|
||||
photoDrawable.draw(canvas);
|
||||
}
|
||||
|
||||
canvas.restore();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAlpha(int alpha) {
|
||||
|
||||
public void setAlpha(int alpha) { // must be present in non-abstract classes derived from Drawable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setColorFilter(ColorFilter cf) {
|
||||
|
||||
public void setColorFilter(ColorFilter cf) { // must be present in non-abstract classes derived from Drawable
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -149,26 +149,26 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
||||
|
||||
private class EditTextCaption extends EditText {
|
||||
|
||||
private Object editor;
|
||||
private Field editorField;
|
||||
private Drawable[] mCursorDrawable;
|
||||
private Field mCursorDrawableField;
|
||||
//private Object editor;
|
||||
//private Field editorField;
|
||||
//private Drawable[] mCursorDrawable;
|
||||
//private Field mCursorDrawableField;
|
||||
|
||||
public EditTextCaption(Context context) {
|
||||
super(context);
|
||||
|
||||
try {
|
||||
Field field = TextView.class.getDeclaredField("mEditor");
|
||||
field.setAccessible(true);
|
||||
editor = field.get(this);
|
||||
Class editorClass = Class.forName("android.widget.Editor");
|
||||
editorField = editorClass.getDeclaredField("mShowCursor");
|
||||
editorField.setAccessible(true);
|
||||
mCursorDrawableField = editorClass.getDeclaredField("mCursorDrawable");
|
||||
mCursorDrawableField.setAccessible(true);
|
||||
mCursorDrawable = (Drawable[]) mCursorDrawableField.get(editor);
|
||||
} catch (Throwable e) {
|
||||
}
|
||||
//try {
|
||||
//Field field = TextView.class.getDeclaredField("mEditor");
|
||||
//field.setAccessible(true);
|
||||
//editor = field.get(this);
|
||||
//Class editorClass = Class.forName("android.widget.Editor");
|
||||
//editorField = editorClass.getDeclaredField("mShowCursor");
|
||||
//editorField.setAccessible(true);
|
||||
//mCursorDrawableField = editorClass.getDeclaredField("mCursorDrawable");
|
||||
//mCursorDrawableField.setAccessible(true);
|
||||
//mCursorDrawable = (Drawable[]) mCursorDrawableField.get(editor);
|
||||
//} catch (Throwable e) {
|
||||
//}
|
||||
}
|
||||
|
||||
@SuppressLint("DrawAllocation")
|
||||
@@ -189,10 +189,10 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
try {
|
||||
//try {
|
||||
// the following lines are because otherwise the cursor stops blinking if
|
||||
// the focus was set to another text field in between (eg. search)
|
||||
if (editorField != null && mCursorDrawable != null && mCursorDrawable[0] != null) {
|
||||
/*if (editorField != null && mCursorDrawable != null && mCursorDrawable[0] != null) {
|
||||
long mShowCursor = editorField.getLong(editor);
|
||||
boolean showCursor = (SystemClock.uptimeMillis() - mShowCursor) % (2 * 500) < 500;
|
||||
if (showCursor) {
|
||||
@@ -201,9 +201,9 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
||||
mCursorDrawable[0].draw(canvas);
|
||||
canvas.restore();
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
}
|
||||
}*/
|
||||
//} catch (Throwable e) {
|
||||
//}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -575,13 +575,6 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
||||
}
|
||||
}
|
||||
});
|
||||
try {
|
||||
Field mCursorDrawableRes = TextView.class.getDeclaredField("mCursorDrawableRes");
|
||||
mCursorDrawableRes.setAccessible(true);
|
||||
mCursorDrawableRes.set(messageEditText, R.drawable.field_carret);
|
||||
} catch (Exception e) {
|
||||
//nothing to do
|
||||
}
|
||||
|
||||
if (isChat) {
|
||||
attachButton = new LinearLayout(context);
|
||||
|
||||
@@ -757,7 +757,7 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N
|
||||
}
|
||||
|
||||
private void setUseRevealAnimation(boolean value) {
|
||||
if (!value || value && Build.VERSION.SDK_INT >= 18 && !AndroidUtilities.isTablet()) {
|
||||
if (!value || value && Build.VERSION.SDK_INT >= 18) {
|
||||
useRevealAnimation = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
package com.b44t.ui.Components;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
@@ -35,7 +34,6 @@ import com.b44t.messenger.AndroidUtilities;
|
||||
import com.b44t.messenger.ContactsController;
|
||||
import com.b44t.messenger.MrChat;
|
||||
import com.b44t.messenger.MrMailbox;
|
||||
import com.b44t.messenger.TLRPC;
|
||||
import com.b44t.ui.ActionBar.ActionBar;
|
||||
import com.b44t.ui.ActionBar.SimpleTextView;
|
||||
import com.b44t.ui.ActionBar.Theme;
|
||||
@@ -88,7 +86,6 @@ public class ChatAvatarContainer extends FrameLayout {
|
||||
}
|
||||
|
||||
ProfileActivity fragment = new ProfileActivity(args);
|
||||
fragment.setPlayProfileAnimation(true);
|
||||
parentFragment.presentFragment(fragment);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -159,7 +159,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
|
||||
pickerView.setSelection(0);
|
||||
}
|
||||
view.getLocationOnScreen(location);
|
||||
int x = emojiSize * pickerView.getSelection() + AndroidUtilities.dp(4 * pickerView.getSelection() - (AndroidUtilities.isTablet() ? 5 : 1));
|
||||
int x = emojiSize * pickerView.getSelection() + AndroidUtilities.dp(4 * pickerView.getSelection() - 1);
|
||||
if (location[0] - x < AndroidUtilities.dp(5)) {
|
||||
x += (location[0] - x) - AndroidUtilities.dp(5);
|
||||
} else if (location[0] - x + popupWidth > AndroidUtilities.displaySize.x - AndroidUtilities.dp(5)) {
|
||||
@@ -168,7 +168,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
|
||||
int xOffset = -x;
|
||||
int yOffset = view.getTop() < 0 ? view.getTop() : 0;
|
||||
|
||||
pickerView.setEmoji(code, AndroidUtilities.dp(AndroidUtilities.isTablet() ? 30 : 22) - xOffset + (int) AndroidUtilities.dpf2(0.5f));
|
||||
pickerView.setEmoji(code, AndroidUtilities.dp(22) - xOffset + (int) AndroidUtilities.dpf2(0.5f));
|
||||
|
||||
pickerViewPopup.setFocusable(true);
|
||||
pickerViewPopup.showAsDropDown(view, xOffset, -view.getMeasuredHeight() - popupHeight + (view.getMeasuredHeight() - emojiSize) / 2 - yOffset);
|
||||
@@ -264,11 +264,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
|
||||
}
|
||||
//setImageDrawable(Emoji.getEmojiBigDrawable(code));
|
||||
int bigImgSize;
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
bigImgSize = AndroidUtilities.dp(40);
|
||||
} else {
|
||||
bigImgSize = AndroidUtilities.dp(32);
|
||||
}
|
||||
bigImgSize = AndroidUtilities.dp(32);
|
||||
setImageDrawable(TextDrawable.builder().beginConfig().textColor(Color.BLACK).fontSize(bigImgSize).endConfig().buildRect(code, Color.TRANSPARENT));
|
||||
sendEmoji(null);
|
||||
saveEmojiColors();
|
||||
@@ -461,10 +457,10 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
backgroundDrawable.setBounds(0, 0, getMeasuredWidth(), AndroidUtilities.dp(AndroidUtilities.isTablet() ? 60 : 52));
|
||||
backgroundDrawable.setBounds(0, 0, getMeasuredWidth(), AndroidUtilities.dp(52));
|
||||
backgroundDrawable.draw(canvas);
|
||||
|
||||
arrowDrawable.setBounds(arrowX - AndroidUtilities.dp(9), AndroidUtilities.dp(AndroidUtilities.isTablet() ? 55.5f : 47.5f), arrowX + AndroidUtilities.dp(9), AndroidUtilities.dp((AndroidUtilities.isTablet() ? 55.5f : 47.5f) + 8));
|
||||
arrowDrawable.setBounds(arrowX - AndroidUtilities.dp(9), AndroidUtilities.dp(47.5f), arrowX + AndroidUtilities.dp(9), AndroidUtilities.dp(47.5f + 8));
|
||||
arrowDrawable.draw(canvas);
|
||||
|
||||
if (currentEmoji != null) {
|
||||
@@ -499,11 +495,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
|
||||
}
|
||||
|
||||
int bigImgSize;
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
bigImgSize = AndroidUtilities.dp(40);
|
||||
} else {
|
||||
bigImgSize = AndroidUtilities.dp(32);
|
||||
}
|
||||
bigImgSize = AndroidUtilities.dp(32);
|
||||
Drawable drawable = TextDrawable.builder().beginConfig().textColor(Color.BLACK).fontSize(bigImgSize).endConfig().buildRect(code, Color.TRANSPARENT);
|
||||
|
||||
//Drawable drawable = Emoji.getEmojiBigDrawable(code);
|
||||
@@ -581,11 +573,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
|
||||
|
||||
for (int i = 0; i < EmojiData.dataColored.length + 1; i++) {
|
||||
GridView gridView = new GridView(context);
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
gridView.setColumnWidth(AndroidUtilities.dp(60));
|
||||
} else {
|
||||
gridView.setColumnWidth(AndroidUtilities.dp(45));
|
||||
}
|
||||
gridView.setColumnWidth(AndroidUtilities.dp(45));
|
||||
gridView.setNumColumns(-1);
|
||||
views.add(gridView);
|
||||
|
||||
@@ -936,9 +924,9 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
|
||||
|
||||
addView(pager, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.START | Gravity.TOP, 0, 48, 0, 0));
|
||||
|
||||
emojiSize = AndroidUtilities.dp(AndroidUtilities.isTablet() ? 40 : 32);
|
||||
emojiSize = AndroidUtilities.dp(32);
|
||||
pickerView = new EmojiColorPickerView(context);
|
||||
pickerViewPopup = new EmojiPopupWindow(pickerView, popupWidth = AndroidUtilities.dp((AndroidUtilities.isTablet() ? 40 : 32) * 6 + 10 + 4 * 5), popupHeight = AndroidUtilities.dp(AndroidUtilities.isTablet() ? 64 : 56));
|
||||
pickerViewPopup = new EmojiPopupWindow(pickerView, popupWidth = AndroidUtilities.dp(32 * 6 + 10 + 4 * 5), popupHeight = AndroidUtilities.dp(56));
|
||||
pickerViewPopup.setOutsideTouchable(true);
|
||||
pickerViewPopup.setClippingEnabled(true);
|
||||
pickerViewPopup.setInputMethodMode(EmojiPopupWindow.INPUT_METHOD_NOT_NEEDED);
|
||||
@@ -1787,11 +1775,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
|
||||
//imageView.setImageDrawable(Emoji.getEmojiBigDrawable(code));
|
||||
imageView.setTag(code);
|
||||
int bigImgSize;
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
bigImgSize = AndroidUtilities.dp(40);
|
||||
} else {
|
||||
bigImgSize = AndroidUtilities.dp(32);
|
||||
}
|
||||
bigImgSize = AndroidUtilities.dp(32);
|
||||
imageView.setImageDrawable(TextDrawable.builder().beginConfig().textColor(Color.BLACK).fontSize(bigImgSize).endConfig().buildRect(coloredCode, Color.TRANSPARENT));
|
||||
return imageView;
|
||||
}
|
||||
|
||||
@@ -159,7 +159,6 @@ public class PasscodeView extends FrameLayout {
|
||||
passwordEditText.setImeOptions(EditorInfo.IME_ACTION_DONE);
|
||||
passwordEditText.setTypeface(Typeface.DEFAULT);
|
||||
passwordEditText.setBackgroundDrawable(null);
|
||||
AndroidUtilities.clearCursorDrawable(passwordEditText);
|
||||
passwordFrameLayout.addView(passwordEditText);
|
||||
layoutParams = (FrameLayout.LayoutParams) passwordEditText.getLayoutParams();
|
||||
layoutParams.height = LayoutHelper.WRAP_CONTENT;
|
||||
@@ -666,7 +665,7 @@ public class PasscodeView extends FrameLayout {
|
||||
|
||||
LayoutParams layoutParams;
|
||||
|
||||
if (!AndroidUtilities.isTablet() && getContext().getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
if (getContext().getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
layoutParams = (LayoutParams) passwordFrameLayout.getLayoutParams();
|
||||
layoutParams.width = UserConfig.passcodeType == 0 ? width / 2 : width;
|
||||
layoutParams.height = AndroidUtilities.dp(140);
|
||||
@@ -682,16 +681,6 @@ public class PasscodeView extends FrameLayout {
|
||||
} else {
|
||||
int top = 0;
|
||||
int left = 0;
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
if (width > AndroidUtilities.dp(498)) {
|
||||
left = (width - AndroidUtilities.dp(498)) / 2;
|
||||
width = AndroidUtilities.dp(498);
|
||||
}
|
||||
if (height > AndroidUtilities.dp(528)) {
|
||||
top = (height - AndroidUtilities.dp(528)) / 2;
|
||||
height = AndroidUtilities.dp(528);
|
||||
}
|
||||
}
|
||||
layoutParams = (LayoutParams) passwordFrameLayout.getLayoutParams();
|
||||
layoutParams.height = height / 3;
|
||||
layoutParams.width = width;
|
||||
@@ -759,7 +748,7 @@ public class PasscodeView extends FrameLayout {
|
||||
getWindowVisibleDisplayFrame(rect);
|
||||
keyboardHeight = usableViewHeight - (rect.bottom - rect.top);
|
||||
|
||||
if (UserConfig.passcodeType == 1 && (AndroidUtilities.isTablet() || getContext().getResources().getConfiguration().orientation != Configuration.ORIENTATION_LANDSCAPE)) {
|
||||
if (UserConfig.passcodeType == 1 && getContext().getResources().getConfiguration().orientation != Configuration.ORIENTATION_LANDSCAPE) {
|
||||
int t = 0;
|
||||
if (passwordFrameLayout.getTag() != null) {
|
||||
t = (Integer) passwordFrameLayout.getTag();
|
||||
|
||||
@@ -2292,7 +2292,7 @@ public class PhotoFilterView extends FrameLayout {
|
||||
}
|
||||
}
|
||||
});
|
||||
editView.addView(valueSeekBar, LayoutHelper.createFrame(AndroidUtilities.isTablet() ? 498 : LayoutHelper.MATCH_PARENT, 60, AndroidUtilities.isTablet() ? Gravity.CENTER_HORIZONTAL | Gravity.TOP : Gravity.START | Gravity.TOP, 14, 10, 14, 0));
|
||||
editView.addView(valueSeekBar, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 60, Gravity.START | Gravity.TOP, 14, 10, 14, 0));
|
||||
|
||||
curveLayout = new FrameLayout(context);
|
||||
editView.addView(curveLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 78, Gravity.CENTER_HORIZONTAL));
|
||||
@@ -2699,19 +2699,6 @@ public class PhotoFilterView extends FrameLayout {
|
||||
layoutParams = (LayoutParams) curvesControl.getLayoutParams();
|
||||
layoutParams.height = viewHeight + AndroidUtilities.dp(28);
|
||||
curvesControl.setLayoutParams(layoutParams);
|
||||
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
int total = AndroidUtilities.dp(86) * 10;
|
||||
layoutParams = (FrameLayout.LayoutParams) recyclerListView.getLayoutParams();
|
||||
if (total < viewWidth) {
|
||||
layoutParams.width = total;
|
||||
layoutParams.leftMargin = (viewWidth - total) / 2;
|
||||
} else {
|
||||
layoutParams.width = LayoutHelper.MATCH_PARENT;
|
||||
layoutParams.leftMargin = 0;
|
||||
}
|
||||
recyclerListView.setLayoutParams(layoutParams);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Delta Chat Android
|
||||
* (C) 2013-2016 Nikolai Kudashov
|
||||
* (C) 2017 Björn Petersen
|
||||
* Contact: r10s@b44t.com, http://b44t.com
|
||||
*
|
||||
@@ -26,38 +25,30 @@ package com.b44t.ui;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.InputFilter;
|
||||
import android.text.InputType;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.TypedValue;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.widget.EditText;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.b44t.messenger.AndroidUtilities;
|
||||
import com.b44t.messenger.ApplicationLoader;
|
||||
import com.b44t.messenger.ContactsController;
|
||||
import com.b44t.messenger.LocaleController;
|
||||
import com.b44t.messenger.MrContact;
|
||||
import com.b44t.messenger.MrMailbox;
|
||||
import com.b44t.messenger.TLRPC;
|
||||
import com.b44t.messenger.NotificationCenter;
|
||||
import com.b44t.messenger.R;
|
||||
import com.b44t.ui.ActionBar.ActionBar;
|
||||
import com.b44t.ui.ActionBar.ActionBarMenu;
|
||||
import com.b44t.ui.Components.AvatarDrawable;
|
||||
import com.b44t.ui.Components.AvatarUpdater;
|
||||
import com.b44t.ui.Components.BackupImageView;
|
||||
import com.b44t.ui.ActionBar.BaseFragment;
|
||||
import com.b44t.ui.Cells.HeaderCell;
|
||||
import com.b44t.ui.Components.LayoutHelper;
|
||||
|
||||
|
||||
public class ContactAddActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate, AvatarUpdater.AvatarUpdaterDelegate {
|
||||
public class ContactAddActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate {
|
||||
|
||||
private int do_what = 0;
|
||||
public final static int CREATE_CONTACT = 1;
|
||||
@@ -65,11 +56,6 @@ public class ContactAddActivity extends BaseFragment implements NotificationCent
|
||||
|
||||
private EditText nameTextView;
|
||||
private EditText emailTextView;
|
||||
private TLRPC.FileLocation avatar;
|
||||
private TLRPC.InputFile uploadedAvatar;
|
||||
private BackupImageView avatarImage;
|
||||
private AvatarDrawable avatarDrawable;
|
||||
private AvatarUpdater avatarUpdater = new AvatarUpdater();
|
||||
private String nameToSet = null;
|
||||
private int chat_id; // only used for EDIT_NAME in chats
|
||||
private int user_id;
|
||||
@@ -79,16 +65,12 @@ public class ContactAddActivity extends BaseFragment implements NotificationCent
|
||||
|
||||
public ContactAddActivity(Bundle args) {
|
||||
super(args);
|
||||
avatarDrawable = new AvatarDrawable();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public boolean onFragmentCreate() {
|
||||
NotificationCenter.getInstance().addObserver(this, NotificationCenter.updateInterfaces);
|
||||
avatarUpdater.parentFragment = this;
|
||||
avatarUpdater.delegate = this;
|
||||
avatarUpdater.returnOnly = true;
|
||||
do_what = getArguments().getInt("do_what", 0);
|
||||
user_id = getArguments().getInt("user_id", 0);
|
||||
chat_id = getArguments().getInt("chat_id", 0);
|
||||
@@ -100,8 +82,6 @@ public class ContactAddActivity extends BaseFragment implements NotificationCent
|
||||
public void onFragmentDestroy() {
|
||||
super.onFragmentDestroy();
|
||||
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.updateInterfaces);
|
||||
|
||||
avatarUpdater.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -182,74 +162,22 @@ public class ContactAddActivity extends BaseFragment implements NotificationCent
|
||||
LinearLayout linearLayout = (LinearLayout) fragmentView;
|
||||
linearLayout.setOrientation(LinearLayout.VERTICAL);
|
||||
|
||||
FrameLayout frameLayout = new FrameLayout(context);
|
||||
linearLayout.addView(frameLayout);
|
||||
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) frameLayout.getLayoutParams();
|
||||
layoutParams.width = LayoutHelper.MATCH_PARENT;
|
||||
layoutParams.height = LayoutHelper.WRAP_CONTENT;
|
||||
layoutParams.gravity = Gravity.TOP | Gravity.START;
|
||||
frameLayout.setLayoutParams(layoutParams);
|
||||
nameTextView = new EditText(context);
|
||||
|
||||
avatarImage = new BackupImageView(context);
|
||||
avatarImage.setRoundRadius(AndroidUtilities.dp(32));
|
||||
avatarImage.setImageDrawable(avatarDrawable);
|
||||
frameLayout.addView(avatarImage);
|
||||
FrameLayout.LayoutParams layoutParams1 = (FrameLayout.LayoutParams) avatarImage.getLayoutParams();
|
||||
layoutParams1.width = AndroidUtilities.dp(64);
|
||||
layoutParams1.height = AndroidUtilities.dp(64);
|
||||
layoutParams1.topMargin = AndroidUtilities.dp(12);
|
||||
layoutParams1.bottomMargin = AndroidUtilities.dp(12);
|
||||
layoutParams1.leftMargin = LocaleController.isRTL ? 0 : AndroidUtilities.dp(16);
|
||||
layoutParams1.rightMargin = LocaleController.isRTL ? AndroidUtilities.dp(16) : 0;
|
||||
layoutParams1.gravity = Gravity.TOP | Gravity.START;
|
||||
avatarImage.setLayoutParams(layoutParams1);
|
||||
{
|
||||
//avatarDrawable.setDrawPhoto(true);
|
||||
/* TODO: let the user select a photo for groups (contact photos come from the system's address book)
|
||||
avatarImage.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (getParentActivity() == null) {
|
||||
return;
|
||||
}
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
|
||||
|
||||
CharSequence[] items;
|
||||
|
||||
if (avatar != null) {
|
||||
items = new CharSequence[]{LocaleController.getString("FromCamera", R.string.FromCamera), LocaleController.getString("FromGalley", R.string.FromGalley), LocaleController.getString("DeletePhoto", R.string.DeletePhoto)};
|
||||
} else {
|
||||
items = new CharSequence[]{LocaleController.getString("FromCamera", R.string.FromCamera), LocaleController.getString("FromGalley", R.string.FromGalley)};
|
||||
}
|
||||
|
||||
builder.setItems(items, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
if (i == 0) {
|
||||
avatarUpdater.openCamera();
|
||||
} else if (i == 1) {
|
||||
avatarUpdater.openGallery();
|
||||
} else if (i == 2) {
|
||||
avatar = null;
|
||||
uploadedAvatar = null;
|
||||
avatarImage.setImage(avatar, "50_50", avatarDrawable);
|
||||
}
|
||||
}
|
||||
});
|
||||
showDialog(builder.create());
|
||||
}
|
||||
});
|
||||
*/
|
||||
if(do_what==CREATE_CONTACT) {
|
||||
TextView label = HeaderCell.createTextView(context, context.getString(R.string.Name));
|
||||
linearLayout.addView(label, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER_VERTICAL, 18, 18, 18, 0));
|
||||
}
|
||||
else {
|
||||
nameTextView.setHint(context.getString(R.string.Name));
|
||||
}
|
||||
|
||||
nameTextView = new EditText(context);
|
||||
nameTextView.setHint(context.getString(R.string.Name));
|
||||
if (nameToSet != null) {
|
||||
nameTextView.setText(nameToSet);
|
||||
}
|
||||
nameTextView.setMaxLines(4);
|
||||
nameTextView.setGravity(Gravity.CENTER_VERTICAL | Gravity.START);
|
||||
nameTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16);
|
||||
nameTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 18);
|
||||
nameTextView.setHintTextColor(0xff979797);
|
||||
nameTextView.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);
|
||||
nameTextView.setInputType(InputType.TYPE_TEXT_FLAG_CAP_WORDS);
|
||||
@@ -257,36 +185,15 @@ public class ContactAddActivity extends BaseFragment implements NotificationCent
|
||||
InputFilter[] inputFilters = new InputFilter[1];
|
||||
inputFilters[0] = new InputFilter.LengthFilter(100);
|
||||
nameTextView.setFilters(inputFilters);
|
||||
AndroidUtilities.clearCursorDrawable(nameTextView);
|
||||
nameTextView.setTextColor(0xff212121);
|
||||
frameLayout.addView(nameTextView);
|
||||
layoutParams1 = (FrameLayout.LayoutParams) nameTextView.getLayoutParams();
|
||||
layoutParams1.width = LayoutHelper.MATCH_PARENT;
|
||||
layoutParams1.height = LayoutHelper.WRAP_CONTENT;
|
||||
layoutParams1.leftMargin = LocaleController.isRTL ? AndroidUtilities.dp(16) : AndroidUtilities.dp(96);
|
||||
layoutParams1.rightMargin = LocaleController.isRTL ? AndroidUtilities.dp(96) : AndroidUtilities.dp(16);
|
||||
layoutParams1.gravity = Gravity.CENTER_VERTICAL;
|
||||
nameTextView.setLayoutParams(layoutParams1);
|
||||
nameTextView.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
updateAvatar();
|
||||
}
|
||||
});
|
||||
linearLayout.addView(nameTextView, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER_VERTICAL, 18, do_what==CREATE_CONTACT? 1:18, 18, 0));
|
||||
|
||||
if( do_what==CREATE_CONTACT ) {
|
||||
TextView label = HeaderCell.createTextView(context, context.getString(R.string.EmailAddress));
|
||||
linearLayout.addView(label, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER_VERTICAL, 18, 18, 18, 0));
|
||||
|
||||
emailTextView = new EditText(context);
|
||||
emailTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16);
|
||||
emailTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 18);
|
||||
emailTextView.setHintTextColor(0xff979797);
|
||||
emailTextView.setTextColor(0xff212121);
|
||||
emailTextView.setMaxLines(4);
|
||||
@@ -294,70 +201,19 @@ public class ContactAddActivity extends BaseFragment implements NotificationCent
|
||||
emailTextView.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
|
||||
emailTextView.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);
|
||||
emailTextView.setPadding(0, 0, 0, AndroidUtilities.dp(8));
|
||||
emailTextView.setHint(context.getString(R.string.EmailAddress));
|
||||
emailTextView.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
updateAvatar();
|
||||
}
|
||||
});
|
||||
AndroidUtilities.clearCursorDrawable(emailTextView);
|
||||
linearLayout.addView(emailTextView);
|
||||
LinearLayout.LayoutParams layoutParams2 = (LinearLayout.LayoutParams) emailTextView.getLayoutParams();
|
||||
layoutParams2.width = LayoutHelper.MATCH_PARENT;
|
||||
layoutParams2.height = LayoutHelper.WRAP_CONTENT;
|
||||
layoutParams2.topMargin = AndroidUtilities.dp(16);
|
||||
layoutParams2.leftMargin = AndroidUtilities.dp(16);
|
||||
layoutParams2.rightMargin = AndroidUtilities.dp(16);
|
||||
layoutParams2.gravity = Gravity.CENTER_VERTICAL;
|
||||
emailTextView.setLayoutParams(layoutParams2);
|
||||
linearLayout.addView(emailTextView, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER_VERTICAL, 18, 1, 18, 0));
|
||||
}
|
||||
|
||||
updateAvatar();
|
||||
|
||||
nameToSet = null;
|
||||
return fragmentView;
|
||||
}
|
||||
|
||||
private void updateAvatar()
|
||||
{
|
||||
String email = null;
|
||||
if( emailTextView != null ) {
|
||||
email = emailTextView.length() > 0? emailTextView.getText().toString() : null;
|
||||
}
|
||||
else if( user_id != 0 ) {
|
||||
email = MrMailbox.getContact(user_id).getAddr();
|
||||
}
|
||||
ContactsController.setupAvatarByStrings(avatarImage, avatarImage.imageReceiver, avatarDrawable,
|
||||
email,
|
||||
nameTextView.length() > 0 ? nameTextView.getText().toString() : "?");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void didUploadedPhoto(final TLRPC.InputFile file, final TLRPC.PhotoSize small, final TLRPC.PhotoSize big) {
|
||||
Toast.makeText(getParentActivity(), ApplicationLoader.applicationContext.getString(R.string.NotYetImplemented), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResultFragment(int requestCode, int resultCode, Intent data) {
|
||||
avatarUpdater.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveSelfArgs(Bundle args) {
|
||||
if (avatarUpdater != null && avatarUpdater.currentPicturePath != null) {
|
||||
args.putString("path", avatarUpdater.currentPicturePath);
|
||||
}
|
||||
if (nameTextView != null) {
|
||||
String text = nameTextView.getText().toString();
|
||||
if (text != null && text.length() != 0) {
|
||||
@@ -368,9 +224,6 @@ public class ContactAddActivity extends BaseFragment implements NotificationCent
|
||||
|
||||
@Override
|
||||
public void restoreSelfArgs(Bundle args) {
|
||||
if (avatarUpdater != null) {
|
||||
avatarUpdater.currentPicturePath = args.getString("path");
|
||||
}
|
||||
String text = args.getString("nameTextView");
|
||||
if (text != null) {
|
||||
if (nameTextView != null) {
|
||||
@@ -383,7 +236,7 @@ public class ContactAddActivity extends BaseFragment implements NotificationCent
|
||||
|
||||
@Override
|
||||
public void onTransitionAnimationEnd(boolean isOpen, boolean backward) {
|
||||
if (isOpen) {
|
||||
if (isOpen && nameTextView!=null) {
|
||||
nameTextView.requestFocus();
|
||||
AndroidUtilities.showKeyboard(nameTextView);
|
||||
}
|
||||
|
||||
@@ -291,7 +291,6 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
|
||||
userSelectEditText.setPadding(0, 0, 0, 0);
|
||||
userSelectEditText.setImeOptions(EditorInfo.IME_ACTION_DONE | EditorInfo.IME_FLAG_NO_EXTRACT_UI);
|
||||
userSelectEditText.setGravity(Gravity.START | Gravity.CENTER_VERTICAL);
|
||||
AndroidUtilities.clearCursorDrawable(userSelectEditText);
|
||||
frameLayout.addView(userSelectEditText, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.START, 10, 0, 10, 0));
|
||||
|
||||
userSelectEditText.setHint(ApplicationLoader.applicationContext.getString(R.string.Search));
|
||||
|
||||
@@ -36,12 +36,8 @@ import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.Outline;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.PowerManager;
|
||||
import android.provider.Settings;
|
||||
import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
import android.view.Gravity;
|
||||
import android.view.MotionEvent;
|
||||
@@ -53,7 +49,6 @@ import android.widget.EditText;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.b44t.messenger.AndroidUtilities;
|
||||
@@ -64,24 +59,20 @@ import com.b44t.messenger.MrChat;
|
||||
import com.b44t.messenger.MrMailbox;
|
||||
import com.b44t.messenger.MrMsg;
|
||||
import com.b44t.messenger.Utilities;
|
||||
import com.b44t.messenger.browser.Browser;
|
||||
import com.b44t.messenger.support.widget.LinearLayoutManager;
|
||||
import com.b44t.messenger.support.widget.RecyclerView;
|
||||
import com.b44t.messenger.NotificationCenter;
|
||||
import com.b44t.messenger.R;
|
||||
import com.b44t.messenger.UserConfig;
|
||||
import com.b44t.ui.ActionBar.BackDrawable;
|
||||
import com.b44t.ui.ActionBar.DrawerLayoutContainer;
|
||||
import com.b44t.ui.Adapters.DialogsAdapter;
|
||||
import com.b44t.ui.Adapters.DialogsSearchAdapter;
|
||||
import com.b44t.ui.Adapters.DrawerLayoutAdapter;
|
||||
import com.b44t.ui.Cells.UserCell;
|
||||
import com.b44t.ui.Cells.DialogCell;
|
||||
import com.b44t.ui.ActionBar.ActionBar;
|
||||
import com.b44t.ui.ActionBar.ActionBarMenu;
|
||||
import com.b44t.ui.ActionBar.ActionBarMenuItem;
|
||||
import com.b44t.ui.ActionBar.BaseFragment;
|
||||
import com.b44t.ui.ActionBar.MenuDrawable;
|
||||
import com.b44t.ui.Components.EmptyTextProgressView;
|
||||
import com.b44t.ui.Components.LayoutHelper;
|
||||
import com.b44t.ui.Components.RecyclerListView;
|
||||
@@ -129,6 +120,10 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
ActionBarMenuItem headerItem;
|
||||
|
||||
private static final int ID_LOCK_APP = 1;
|
||||
private static final int ID_NEW_CHAT = 2;
|
||||
private static final int ID_NEW_GROUP= 3;
|
||||
private static final int ID_SETTINGS = 5;
|
||||
private static final int ID_DEADDROP = 7;
|
||||
|
||||
public interface DialogsActivityDelegate {
|
||||
void didSelectDialog(DialogsActivity fragment, long dialog_id, boolean param);
|
||||
@@ -157,7 +152,6 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
NotificationCenter.getInstance().addObserver(this, NotificationCenter.emojiDidLoaded);
|
||||
NotificationCenter.getInstance().addObserver(this, NotificationCenter.updateInterfaces);
|
||||
NotificationCenter.getInstance().addObserver(this, NotificationCenter.contactsDidLoaded);
|
||||
NotificationCenter.getInstance().addObserver(this, NotificationCenter.openedChatChanged);
|
||||
NotificationCenter.getInstance().addObserver(this, NotificationCenter.notificationsSettingsUpdated);
|
||||
NotificationCenter.getInstance().addObserver(this, NotificationCenter.messageSendError);
|
||||
NotificationCenter.getInstance().addObserver(this, NotificationCenter.didSetPasscode);
|
||||
@@ -177,7 +171,6 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.emojiDidLoaded);
|
||||
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.updateInterfaces);
|
||||
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.contactsDidLoaded);
|
||||
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.openedChatChanged);
|
||||
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.notificationsSettingsUpdated);
|
||||
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.messageSendError);
|
||||
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.didSetPasscode);
|
||||
@@ -205,7 +198,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
final ActionBarMenuItem item = menu.addItem(0, R.drawable.ic_ab_search).setIsSearchField(true, true).setActionBarMenuItemSearchListener(new ActionBarMenuItem.ActionBarMenuItemSearchListener() {
|
||||
@Override
|
||||
public void onSearchExpand() {
|
||||
if( !DrawerLayoutContainer.USE_DRAWER && headerItem!=null ) {
|
||||
if( headerItem!=null ) {
|
||||
headerItem.setVisibility(View.GONE);
|
||||
actionBar.setBackButtonDrawable(new BackDrawable(false));
|
||||
}
|
||||
@@ -225,7 +218,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
|
||||
@Override
|
||||
public void onSearchCollapse() {
|
||||
if( !DrawerLayoutContainer.USE_DRAWER && headerItem!=null ) {
|
||||
if( headerItem!=null ) {
|
||||
headerItem.setVisibility(View.VISIBLE);
|
||||
actionBar.setBackButtonDrawable(null);
|
||||
}
|
||||
@@ -279,20 +272,15 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
actionBar.setBackButtonImage(R.drawable.ic_ab_back);
|
||||
actionBar.setTitle(onlySelectTitle);
|
||||
} else {
|
||||
if( DrawerLayoutContainer.USE_DRAWER ) {
|
||||
actionBar.setBackButtonDrawable(new MenuDrawable());
|
||||
}
|
||||
actionBar.setTitle(ApplicationLoader.applicationContext.getString(R.string.AppName));
|
||||
}
|
||||
actionBar.setAllowOverlayTitle(true);
|
||||
|
||||
if( !DrawerLayoutContainer.USE_DRAWER ) {
|
||||
headerItem = menu.addItem(0, R.drawable.ic_ab_other);
|
||||
headerItem.addSubItem(DrawerLayoutAdapter.ROW_NEW_CHAT, ApplicationLoader.applicationContext.getString(R.string.NewChat), 0);
|
||||
headerItem.addSubItem(DrawerLayoutAdapter.ROW_NEW_GROUP, ApplicationLoader.applicationContext.getString(R.string.NewGroup), 0);
|
||||
headerItem.addSubItem(DrawerLayoutAdapter.ROW_DEADDROP, ApplicationLoader.applicationContext.getString(R.string.Deaddrop), 0);
|
||||
headerItem.addSubItem(DrawerLayoutAdapter.ROW_SETTINGS, ApplicationLoader.applicationContext.getString(R.string.Settings), 0);
|
||||
}
|
||||
headerItem = menu.addItem(0, R.drawable.ic_ab_other);
|
||||
headerItem.addSubItem(ID_NEW_CHAT, ApplicationLoader.applicationContext.getString(R.string.NewChat), 0);
|
||||
headerItem.addSubItem(ID_NEW_GROUP, ApplicationLoader.applicationContext.getString(R.string.NewGroup), 0);
|
||||
headerItem.addSubItem(ID_DEADDROP, ApplicationLoader.applicationContext.getString(R.string.Deaddrop), 0);
|
||||
headerItem.addSubItem(ID_SETTINGS, ApplicationLoader.applicationContext.getString(R.string.Settings), 0);
|
||||
|
||||
actionBar.setActionBarMenuOnItemClick(new ActionBar.ActionBarMenuOnItemClick() {
|
||||
@Override
|
||||
@@ -300,8 +288,6 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
if (id == -1) {
|
||||
if (onlySelect) {
|
||||
finishFragment();
|
||||
} else if (parentLayout != null) {
|
||||
parentLayout.getDrawerLayoutContainer().openDrawer(false);
|
||||
}
|
||||
} else if (id == ID_LOCK_APP) {
|
||||
|
||||
@@ -330,20 +316,20 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
}, 200);
|
||||
}
|
||||
}
|
||||
else if( !DrawerLayoutContainer.USE_DRAWER ) {
|
||||
if (id == DrawerLayoutAdapter.ROW_NEW_CHAT) {
|
||||
else {
|
||||
if (id == ID_NEW_CHAT) {
|
||||
Bundle args = new Bundle();
|
||||
args.putInt("do_what", ContactsActivity.SELECT_CONTACT_FOR_NEW_CHAT);
|
||||
presentFragment(new ContactsActivity(args));
|
||||
} else if (id == DrawerLayoutAdapter.ROW_NEW_GROUP) {
|
||||
} else if (id == ID_NEW_GROUP) {
|
||||
Bundle args = new Bundle();
|
||||
args.putInt("do_what", ContactsActivity.SELECT_CONTACTS_FOR_NEW_GROUP);
|
||||
presentFragment(new ContactsActivity(args));
|
||||
} else if (id == DrawerLayoutAdapter.ROW_DEADDROP) {
|
||||
} else if (id == ID_DEADDROP) {
|
||||
Bundle args = new Bundle();
|
||||
args.putInt("chat_id", MrChat.MR_CHAT_ID_DEADDROP);
|
||||
presentFragment(new ChatActivity(args));
|
||||
} else if (id == DrawerLayoutAdapter.ROW_SETTINGS) {
|
||||
} else if (id == ID_SETTINGS) {
|
||||
presentFragment(new SettingsActivity());
|
||||
}
|
||||
}
|
||||
@@ -411,16 +397,6 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
args.putInt("message_id", message_id);
|
||||
}
|
||||
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
if (openedDialogId == dialog_id && adapter != dialogsSearchAdapter) {
|
||||
return;
|
||||
}
|
||||
if (dialogsAdapter != null) {
|
||||
dialogsAdapter.setOpenedDialogId(openedDialogId = dialog_id);
|
||||
updateVisibleRows(MrMailbox.UPDATE_MASK_SELECT_DIALOG);
|
||||
}
|
||||
}
|
||||
|
||||
presentFragment(new ChatActivity(args));
|
||||
}
|
||||
}
|
||||
@@ -539,9 +515,6 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
});
|
||||
|
||||
dialogsAdapter = new DialogsAdapter(context);
|
||||
if (AndroidUtilities.isTablet() && openedDialogId != 0) {
|
||||
dialogsAdapter.setOpenedDialogId(openedDialogId);
|
||||
}
|
||||
listView.setAdapter(dialogsAdapter);
|
||||
dialogsSearchAdapter = new DialogsSearchAdapter(context);
|
||||
|
||||
@@ -747,22 +720,6 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
updateVisibleRows((Integer) args[0]);
|
||||
} else if (id == NotificationCenter.contactsDidLoaded) {
|
||||
updateVisibleRows(0);
|
||||
} else if (id == NotificationCenter.openedChatChanged) {
|
||||
if ( AndroidUtilities.isTablet()) {
|
||||
boolean close = (Boolean) args[1];
|
||||
long dialog_id = (Long) args[0];
|
||||
if (close) {
|
||||
if (dialog_id == openedDialogId) {
|
||||
openedDialogId = 0;
|
||||
}
|
||||
} else {
|
||||
openedDialogId = dialog_id;
|
||||
}
|
||||
if (dialogsAdapter != null) {
|
||||
dialogsAdapter.setOpenedDialogId(openedDialogId);
|
||||
}
|
||||
updateVisibleRows(MrMailbox.UPDATE_MASK_SELECT_DIALOG);
|
||||
}
|
||||
} else if (id == NotificationCenter.notificationsSettingsUpdated) {
|
||||
updateVisibleRows(0);
|
||||
} else if ( id == NotificationCenter.messageSendError) {
|
||||
@@ -806,13 +763,8 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
DialogCell cell = (DialogCell) child;
|
||||
if ((mask & MrMailbox.UPDATE_MASK_NEW_MESSAGE) != 0) {
|
||||
cell.checkCurrentDialogIndex();
|
||||
if ( AndroidUtilities.isTablet()) {
|
||||
cell.setDialogSelected(cell.getDialogId() == openedDialogId);
|
||||
}
|
||||
} else if ((mask & MrMailbox.UPDATE_MASK_SELECT_DIALOG) != 0) {
|
||||
if ( AndroidUtilities.isTablet()) {
|
||||
cell.setDialogSelected(cell.getDialogId() == openedDialogId);
|
||||
}
|
||||
;
|
||||
} else {
|
||||
cell.update(mask);
|
||||
}
|
||||
|
||||
@@ -368,7 +368,7 @@ public class DocumentSelectActivity extends BaseFragment {
|
||||
if (selectedMessagesCountTextView == null) {
|
||||
return;
|
||||
}
|
||||
if (!AndroidUtilities.isTablet() && ApplicationLoader.applicationContext.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
if (ApplicationLoader.applicationContext.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
selectedMessagesCountTextView.setTextSize(18);
|
||||
} else {
|
||||
selectedMessagesCountTextView.setTextSize(20);
|
||||
|
||||
@@ -26,10 +26,8 @@ package com.b44t.ui;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.InputFilter;
|
||||
import android.text.InputType;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.TypedValue;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
@@ -42,12 +40,8 @@ import android.widget.ListView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.b44t.messenger.AndroidUtilities;
|
||||
import com.b44t.messenger.ApplicationLoader;
|
||||
import com.b44t.messenger.ContactsController;
|
||||
import com.b44t.messenger.LocaleController;
|
||||
import com.b44t.messenger.MrContact;
|
||||
import com.b44t.messenger.MrMailbox;
|
||||
import com.b44t.messenger.TLRPC;
|
||||
import com.b44t.messenger.NotificationCenter;
|
||||
import com.b44t.messenger.R;
|
||||
import com.b44t.ui.Adapters.BaseFragmentAdapter;
|
||||
@@ -55,41 +49,29 @@ import com.b44t.ui.Cells.GreySectionCell;
|
||||
import com.b44t.ui.Cells.UserCell;
|
||||
import com.b44t.ui.ActionBar.ActionBar;
|
||||
import com.b44t.ui.ActionBar.ActionBarMenu;
|
||||
import com.b44t.ui.Components.AvatarDrawable;
|
||||
import com.b44t.ui.Components.AvatarUpdater;
|
||||
import com.b44t.ui.Components.BackupImageView;
|
||||
import com.b44t.ui.ActionBar.BaseFragment;
|
||||
import com.b44t.ui.Components.LayoutHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class GroupCreateFinalActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate, AvatarUpdater.AvatarUpdaterDelegate {
|
||||
public class GroupCreateFinalActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate {
|
||||
|
||||
private ListAdapter listAdapter;
|
||||
private ListView listView;
|
||||
private EditText nameTextView;
|
||||
private TLRPC.FileLocation avatar;
|
||||
private TLRPC.InputFile uploadedAvatar;
|
||||
private ArrayList<Integer> selectedContacts;
|
||||
private BackupImageView avatarImage;
|
||||
private AvatarDrawable avatarDrawable;
|
||||
private AvatarUpdater avatarUpdater = new AvatarUpdater();
|
||||
private String nameToSet = null;
|
||||
|
||||
private final static int done_button = 1;
|
||||
|
||||
public GroupCreateFinalActivity(Bundle args) {
|
||||
super(args);
|
||||
avatarDrawable = new AvatarDrawable();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public boolean onFragmentCreate() {
|
||||
NotificationCenter.getInstance().addObserver(this, NotificationCenter.updateInterfaces);
|
||||
avatarUpdater.parentFragment = this;
|
||||
avatarUpdater.delegate = this;
|
||||
avatarUpdater.returnOnly = true;
|
||||
selectedContacts = getArguments().getIntegerArrayList("result"); /* may be empty - in this case a group only with SELF is created */
|
||||
if( selectedContacts == null ) { selectedContacts = new ArrayList<>(); }
|
||||
selectedContacts.add(MrContact.MR_CONTACT_ID_SELF);
|
||||
@@ -100,7 +82,6 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
|
||||
public void onFragmentDestroy() {
|
||||
super.onFragmentDestroy();
|
||||
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.updateInterfaces);
|
||||
avatarUpdater.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -148,9 +129,6 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
|
||||
Bundle args2 = new Bundle();
|
||||
args2.putInt("chat_id", chat_id);
|
||||
presentFragment(new ChatActivity(args2), true);
|
||||
if (uploadedAvatar != null) {
|
||||
//MessagesController.getInstance().changeChatAvatar(chat_id, uploadedAvatar);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -170,59 +148,6 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
|
||||
layoutParams.gravity = Gravity.TOP | Gravity.START;
|
||||
frameLayout.setLayoutParams(layoutParams);
|
||||
|
||||
avatarImage = new BackupImageView(context);
|
||||
avatarImage.setRoundRadius(AndroidUtilities.dp(32));
|
||||
//avatarDrawable.setInfoByName("?");
|
||||
avatarImage.setImageDrawable(avatarDrawable);
|
||||
frameLayout.addView(avatarImage);
|
||||
FrameLayout.LayoutParams layoutParams1 = (FrameLayout.LayoutParams) avatarImage.getLayoutParams();
|
||||
layoutParams1.width = AndroidUtilities.dp(64);
|
||||
layoutParams1.height = AndroidUtilities.dp(64);
|
||||
layoutParams1.topMargin = AndroidUtilities.dp(12);
|
||||
layoutParams1.bottomMargin = AndroidUtilities.dp(12);
|
||||
layoutParams1.leftMargin = LocaleController.isRTL ? 0 : AndroidUtilities.dp(16);
|
||||
layoutParams1.rightMargin = LocaleController.isRTL ? AndroidUtilities.dp(16) : 0;
|
||||
layoutParams1.gravity = Gravity.TOP | Gravity.START;
|
||||
avatarImage.setLayoutParams(layoutParams1);
|
||||
{
|
||||
//avatarDrawable.setDrawPhoto(true);
|
||||
/* TODO: let the user select a photo for the group
|
||||
avatarImage.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (getParentActivity() == null) {
|
||||
return;
|
||||
}
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
|
||||
|
||||
CharSequence[] items;
|
||||
|
||||
if (avatar != null) {
|
||||
items = new CharSequence[]{LocaleController.getString("FromCamera", R.string.FromCamera), LocaleController.getString("FromGalley", R.string.FromGalley), LocaleController.getString("DeletePhoto", R.string.DeletePhoto)};
|
||||
} else {
|
||||
items = new CharSequence[]{LocaleController.getString("FromCamera", R.string.FromCamera), LocaleController.getString("FromGalley", R.string.FromGalley)};
|
||||
}
|
||||
|
||||
builder.setItems(items, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
if (i == 0) {
|
||||
avatarUpdater.openCamera();
|
||||
} else if (i == 1) {
|
||||
avatarUpdater.openGallery();
|
||||
} else if (i == 2) {
|
||||
avatar = null;
|
||||
uploadedAvatar = null;
|
||||
avatarImage.setImage(avatar, "50_50", avatarDrawable);
|
||||
}
|
||||
}
|
||||
});
|
||||
showDialog(builder.create());
|
||||
}
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
nameTextView = new EditText(context);
|
||||
nameTextView.setHint(context.getString(R.string.EnterGroupNamePlaceholder));
|
||||
if (nameToSet != null) {
|
||||
@@ -231,7 +156,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
|
||||
}
|
||||
nameTextView.setMaxLines(4);
|
||||
nameTextView.setGravity(Gravity.CENTER_VERTICAL | Gravity.START);
|
||||
nameTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16);
|
||||
nameTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 18);
|
||||
nameTextView.setHintTextColor(0xff979797);
|
||||
nameTextView.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);
|
||||
nameTextView.setInputType(InputType.TYPE_TEXT_FLAG_CAP_WORDS);
|
||||
@@ -239,34 +164,17 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
|
||||
InputFilter[] inputFilters = new InputFilter[1];
|
||||
inputFilters[0] = new InputFilter.LengthFilter(100);
|
||||
nameTextView.setFilters(inputFilters);
|
||||
AndroidUtilities.clearCursorDrawable(nameTextView);
|
||||
nameTextView.setTextColor(0xff212121);
|
||||
frameLayout.addView(nameTextView);
|
||||
layoutParams1 = (FrameLayout.LayoutParams) nameTextView.getLayoutParams();
|
||||
FrameLayout.LayoutParams layoutParams1 = (FrameLayout.LayoutParams) nameTextView.getLayoutParams();
|
||||
layoutParams1.width = LayoutHelper.MATCH_PARENT;
|
||||
layoutParams1.height = LayoutHelper.WRAP_CONTENT;
|
||||
layoutParams1.leftMargin = LocaleController.isRTL ? AndroidUtilities.dp(16) : AndroidUtilities.dp(96);
|
||||
layoutParams1.rightMargin = LocaleController.isRTL ? AndroidUtilities.dp(96) : AndroidUtilities.dp(16);
|
||||
layoutParams1.topMargin = AndroidUtilities.dp(18);
|
||||
layoutParams1.bottomMargin = AndroidUtilities.dp(18);
|
||||
layoutParams1.leftMargin = AndroidUtilities.dp(18);
|
||||
layoutParams1.rightMargin = AndroidUtilities.dp(18);
|
||||
layoutParams1.gravity = Gravity.CENTER_VERTICAL;
|
||||
nameTextView.setLayoutParams(layoutParams1);
|
||||
{
|
||||
nameTextView.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
updateAvatar();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
GreySectionCell sectionCell = new GreySectionCell(context);
|
||||
sectionCell.setText(context.getResources().getQuantityString(R.plurals.Members, selectedContacts.size(), selectedContacts.size()));
|
||||
@@ -282,45 +190,16 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
|
||||
layoutParams.height = LayoutHelper.MATCH_PARENT;
|
||||
listView.setLayoutParams(layoutParams);
|
||||
|
||||
updateAvatar();
|
||||
|
||||
return fragmentView;
|
||||
}
|
||||
|
||||
private void updateAvatar()
|
||||
{
|
||||
ContactsController.setupAvatarByStrings(avatarImage, avatarImage.imageReceiver, avatarDrawable, null,
|
||||
nameTextView.length() > 0 ? nameTextView.getText().toString() : "?");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void didUploadedPhoto(final TLRPC.InputFile file, final TLRPC.PhotoSize small, final TLRPC.PhotoSize big) {
|
||||
Toast.makeText(getParentActivity(), ApplicationLoader.applicationContext.getString(R.string.NotYetImplemented), Toast.LENGTH_SHORT).show();
|
||||
/*
|
||||
AndroidUtilities.runOnUIThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
uploadedAvatar = file;
|
||||
avatar = small.location;
|
||||
avatarImage.setImage(avatar, "50_50", avatarDrawable);
|
||||
if (createAfterUpload) {
|
||||
MessagesController.getInstance().createChat(nameTextView.getText().toString(), selectedContacts, null, chatType, GroupCreateFinalActivity.this);
|
||||
}
|
||||
}
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResultFragment(int requestCode, int resultCode, Intent data) {
|
||||
avatarUpdater.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveSelfArgs(Bundle args) {
|
||||
if (avatarUpdater != null && avatarUpdater.currentPicturePath != null) {
|
||||
args.putString("path", avatarUpdater.currentPicturePath);
|
||||
}
|
||||
if (nameTextView != null) {
|
||||
String text = nameTextView.getText().toString();
|
||||
if (text != null && text.length() != 0) {
|
||||
@@ -331,9 +210,6 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
|
||||
|
||||
@Override
|
||||
public void restoreSelfArgs(Bundle args) {
|
||||
if (avatarUpdater != null) {
|
||||
avatarUpdater.currentPicturePath = args.getString("path");
|
||||
}
|
||||
String text = args.getString("nameTextView");
|
||||
if (text != null) {
|
||||
if (nameTextView != null) {
|
||||
@@ -346,7 +222,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
|
||||
|
||||
@Override
|
||||
public void onTransitionAnimationEnd(boolean isOpen, boolean backward) {
|
||||
if (isOpen) {
|
||||
if (isOpen && nameTextView!=null) {
|
||||
nameTextView.requestFocus();
|
||||
AndroidUtilities.showKeyboard(nameTextView);
|
||||
}
|
||||
|
||||
@@ -31,8 +31,6 @@ import android.content.ContentResolver;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.Point;
|
||||
import android.net.MailTo;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
@@ -44,37 +42,25 @@ import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.ActionMode;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.AbsListView;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.b44t.messenger.AndroidUtilities;
|
||||
import com.b44t.messenger.ContactsController;
|
||||
import com.b44t.messenger.ImageLoader;
|
||||
import com.b44t.messenger.KeepAliveService;
|
||||
import com.b44t.messenger.MrChat;
|
||||
import com.b44t.messenger.MrMailbox;
|
||||
import com.b44t.messenger.SendMessagesHelper;
|
||||
import com.b44t.messenger.ApplicationLoader;
|
||||
import com.b44t.messenger.LocaleController;
|
||||
import com.b44t.messenger.NotificationCenter;
|
||||
import com.b44t.messenger.R;
|
||||
import com.b44t.messenger.browser.Browser;
|
||||
import com.b44t.messenger.UserConfig;
|
||||
import com.b44t.ui.Adapters.DrawerLayoutAdapter;
|
||||
import com.b44t.ui.ActionBar.ActionBarLayout;
|
||||
import com.b44t.ui.ActionBar.BaseFragment;
|
||||
import com.b44t.ui.ActionBar.DrawerLayoutContainer;
|
||||
import com.b44t.ui.Components.LayoutHelper;
|
||||
import com.b44t.ui.Components.PasscodeView;
|
||||
import com.b44t.ui.ActionBar.Theme;
|
||||
@@ -97,18 +83,10 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
private ArrayList<String> documentsOriginalPathsArray;
|
||||
private ArrayList<Integer> contactsToSend;
|
||||
private static ArrayList<BaseFragment> mainFragmentsStack = new ArrayList<>();
|
||||
private static ArrayList<BaseFragment> layerFragmentsStack = new ArrayList<>();
|
||||
private static ArrayList<BaseFragment> rightFragmentsStack = new ArrayList<>();
|
||||
private ViewTreeObserver.OnGlobalLayoutListener onGlobalLayoutListener;
|
||||
|
||||
private ActionBarLayout actionBarLayout;
|
||||
private ActionBarLayout layersActionBarLayout;
|
||||
private ActionBarLayout rightActionBarLayout;
|
||||
private FrameLayout shadowTablet;
|
||||
private FrameLayout shadowTabletSide;
|
||||
private ImageView backgroundTablet;
|
||||
protected DrawerLayoutContainer drawerLayoutContainer;
|
||||
private DrawerLayoutAdapter drawerLayoutAdapter;
|
||||
protected LaunchLayoutContainer launchLayoutContainer;
|
||||
private PasscodeView passcodeView;
|
||||
private AlertDialog visibleDialog;
|
||||
|
||||
@@ -116,8 +94,6 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
private boolean passcodeSaveIntentIsNew;
|
||||
private boolean passcodeSaveIntentIsRestore;
|
||||
|
||||
private boolean tabletFullSize;
|
||||
|
||||
private Runnable lockRunnable;
|
||||
|
||||
@Override
|
||||
@@ -152,188 +128,18 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
|
||||
actionBarLayout = new ActionBarLayout(this);
|
||||
|
||||
drawerLayoutContainer = new DrawerLayoutContainer(this);
|
||||
setContentView(drawerLayoutContainer, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
|
||||
launchLayoutContainer = new LaunchLayoutContainer(this);
|
||||
setContentView(launchLayoutContainer, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
|
||||
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||
launchLayoutContainer.addView(actionBarLayout, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
|
||||
|
||||
RelativeLayout launchLayout = new RelativeLayout(this);
|
||||
drawerLayoutContainer.addView(launchLayout);
|
||||
FrameLayout.LayoutParams layoutParams1 = (FrameLayout.LayoutParams) launchLayout.getLayoutParams();
|
||||
layoutParams1.width = LayoutHelper.MATCH_PARENT;
|
||||
layoutParams1.height = LayoutHelper.MATCH_PARENT;
|
||||
launchLayout.setLayoutParams(layoutParams1);
|
||||
|
||||
backgroundTablet = new ImageView(this);
|
||||
backgroundTablet.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
backgroundTablet.setImageResource(R.drawable.background_hd);
|
||||
launchLayout.addView(backgroundTablet);
|
||||
RelativeLayout.LayoutParams relativeLayoutParams = (RelativeLayout.LayoutParams) backgroundTablet.getLayoutParams();
|
||||
relativeLayoutParams.width = LayoutHelper.MATCH_PARENT;
|
||||
relativeLayoutParams.height = LayoutHelper.MATCH_PARENT;
|
||||
backgroundTablet.setLayoutParams(relativeLayoutParams);
|
||||
|
||||
launchLayout.addView(actionBarLayout);
|
||||
relativeLayoutParams = (RelativeLayout.LayoutParams) actionBarLayout.getLayoutParams();
|
||||
relativeLayoutParams.width = LayoutHelper.MATCH_PARENT;
|
||||
relativeLayoutParams.height = LayoutHelper.MATCH_PARENT;
|
||||
actionBarLayout.setLayoutParams(relativeLayoutParams);
|
||||
|
||||
rightActionBarLayout = new ActionBarLayout(this);
|
||||
launchLayout.addView(rightActionBarLayout);
|
||||
relativeLayoutParams = (RelativeLayout.LayoutParams)rightActionBarLayout.getLayoutParams();
|
||||
relativeLayoutParams.width = AndroidUtilities.dp(320);
|
||||
relativeLayoutParams.height = LayoutHelper.MATCH_PARENT;
|
||||
rightActionBarLayout.setLayoutParams(relativeLayoutParams);
|
||||
rightActionBarLayout.init(rightFragmentsStack);
|
||||
rightActionBarLayout.setDelegate(this);
|
||||
|
||||
shadowTabletSide = new FrameLayout(this);
|
||||
shadowTabletSide.setBackgroundColor(0x40295274);
|
||||
launchLayout.addView(shadowTabletSide);
|
||||
relativeLayoutParams = (RelativeLayout.LayoutParams) shadowTabletSide.getLayoutParams();
|
||||
relativeLayoutParams.width = AndroidUtilities.dp(1);
|
||||
relativeLayoutParams.height = LayoutHelper.MATCH_PARENT;
|
||||
shadowTabletSide.setLayoutParams(relativeLayoutParams);
|
||||
|
||||
shadowTablet = new FrameLayout(this);
|
||||
shadowTablet.setVisibility(View.GONE);
|
||||
shadowTablet.setBackgroundColor(0x7F000000);
|
||||
launchLayout.addView(shadowTablet);
|
||||
relativeLayoutParams = (RelativeLayout.LayoutParams) shadowTablet.getLayoutParams();
|
||||
relativeLayoutParams.width = LayoutHelper.MATCH_PARENT;
|
||||
relativeLayoutParams.height = LayoutHelper.MATCH_PARENT;
|
||||
shadowTablet.setLayoutParams(relativeLayoutParams);
|
||||
shadowTablet.setOnTouchListener(new View.OnTouchListener() {
|
||||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
if (!actionBarLayout.fragmentsStack.isEmpty() && event.getAction() == MotionEvent.ACTION_UP) {
|
||||
float x = event.getX();
|
||||
float y = event.getY();
|
||||
int location[] = new int[2];
|
||||
layersActionBarLayout.getLocationOnScreen(location);
|
||||
int viewX = location[0];
|
||||
int viewY = location[1];
|
||||
|
||||
if (layersActionBarLayout.checkTransitionAnimation() || x > viewX && x < viewX + layersActionBarLayout.getWidth() && y > viewY && y < viewY + layersActionBarLayout.getHeight()) {
|
||||
return false;
|
||||
} else {
|
||||
if (!layersActionBarLayout.fragmentsStack.isEmpty()) {
|
||||
for (int a = 0; a < layersActionBarLayout.fragmentsStack.size() - 1; a++) {
|
||||
layersActionBarLayout.removeFragmentFromStack(layersActionBarLayout.fragmentsStack.get(0));
|
||||
a--;
|
||||
}
|
||||
layersActionBarLayout.closeLastFragment(true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
shadowTablet.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
layersActionBarLayout = new ActionBarLayout(this);
|
||||
layersActionBarLayout.setRemoveActionBarExtraHeight(true);
|
||||
layersActionBarLayout.setBackgroundView(shadowTablet);
|
||||
layersActionBarLayout.setUseAlphaAnimations(true);
|
||||
layersActionBarLayout.setBackgroundResource(R.drawable.boxshadow);
|
||||
launchLayout.addView(layersActionBarLayout);
|
||||
relativeLayoutParams = (RelativeLayout.LayoutParams)layersActionBarLayout.getLayoutParams();
|
||||
relativeLayoutParams.width = AndroidUtilities.dp(530);
|
||||
relativeLayoutParams.height = AndroidUtilities.dp(528);
|
||||
layersActionBarLayout.setLayoutParams(relativeLayoutParams);
|
||||
layersActionBarLayout.init(layerFragmentsStack);
|
||||
layersActionBarLayout.setDelegate(this);
|
||||
layersActionBarLayout.setDrawerLayoutContainer(drawerLayoutContainer);
|
||||
layersActionBarLayout.setVisibility(View.GONE);
|
||||
} else {
|
||||
drawerLayoutContainer.addView(actionBarLayout, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
|
||||
}
|
||||
|
||||
ListView listView = new ListView(this) {
|
||||
@Override
|
||||
public boolean hasOverlappingRendering() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
listView.setBackgroundColor(0xffffffff);
|
||||
listView.setAdapter(drawerLayoutAdapter = new DrawerLayoutAdapter(this));
|
||||
listView.setChoiceMode(AbsListView.CHOICE_MODE_SINGLE);
|
||||
listView.setDivider(null);
|
||||
listView.setDividerHeight(0);
|
||||
listView.setVerticalScrollBarEnabled(false);
|
||||
drawerLayoutContainer.setDrawerLayout(listView);
|
||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) listView.getLayoutParams();
|
||||
Point screenSize = AndroidUtilities.getRealScreenSize();
|
||||
|
||||
// Set the width of the drawer
|
||||
layoutParams.width = AndroidUtilities.isTablet() ?
|
||||
AndroidUtilities.dp(285)
|
||||
: Math.min( AndroidUtilities.dp(285), Math.min(screenSize.x,screenSize.y)-AndroidUtilities.dp(56) );
|
||||
|
||||
layoutParams.height = LayoutHelper.MATCH_PARENT;
|
||||
listView.setLayoutParams(layoutParams);
|
||||
|
||||
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
if (position == DrawerLayoutAdapter.ROW_NEW_CHAT) {
|
||||
Bundle args = new Bundle();
|
||||
args.putInt("do_what", ContactsActivity.SELECT_CONTACT_FOR_NEW_CHAT);
|
||||
presentFragment(new ContactsActivity(args));
|
||||
drawerLayoutContainer.closeDrawer(false);
|
||||
}
|
||||
else if (position == DrawerLayoutAdapter.ROW_NEW_GROUP) {
|
||||
Bundle args = new Bundle();
|
||||
args.putInt("do_what", ContactsActivity.SELECT_CONTACTS_FOR_NEW_GROUP);
|
||||
presentFragment(new ContactsActivity(args));
|
||||
drawerLayoutContainer.closeDrawer(false);
|
||||
}
|
||||
else if (position == DrawerLayoutAdapter.ROW_INVITE) {
|
||||
try {
|
||||
Intent intent = new Intent(Intent.ACTION_SEND);
|
||||
intent.setType("text/plain");
|
||||
intent.putExtra(Intent.EXTRA_TEXT, MrMailbox.getInviteText());
|
||||
startActivity(Intent.createChooser(intent, ApplicationLoader.applicationContext.getString(R.string.InviteMenuEntry)));
|
||||
} catch (Exception e) {
|
||||
}
|
||||
drawerLayoutContainer.closeDrawer(false);
|
||||
}
|
||||
else if (position == DrawerLayoutAdapter.ROW_DEADDROP) {
|
||||
Bundle args = new Bundle();
|
||||
args.putInt("chat_id", MrChat.MR_CHAT_ID_DEADDROP);
|
||||
presentFragment(new ChatActivity(args));
|
||||
drawerLayoutContainer.closeDrawer(false);
|
||||
}
|
||||
else if (position == DrawerLayoutAdapter.ROW_SETTINGS) {
|
||||
presentFragment(new SettingsActivity());
|
||||
drawerLayoutContainer.closeDrawer(false);
|
||||
}
|
||||
else if (position == DrawerLayoutAdapter.ROW_FAQ) {
|
||||
String helpUrl = ApplicationLoader.applicationContext.getString(R.string.HelpUrl);
|
||||
Browser.openUrl(LaunchActivity.this, helpUrl);
|
||||
drawerLayoutContainer.closeDrawer(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
drawerLayoutContainer.setParentActionBarLayout(actionBarLayout);
|
||||
actionBarLayout.setDrawerLayoutContainer(drawerLayoutContainer);
|
||||
actionBarLayout.init(mainFragmentsStack);
|
||||
actionBarLayout.setDelegate(this);
|
||||
|
||||
ApplicationLoader.loadWallpaper();
|
||||
|
||||
passcodeView = new PasscodeView(this);
|
||||
drawerLayoutContainer.addView(passcodeView);
|
||||
launchLayoutContainer.addView(passcodeView);
|
||||
FrameLayout.LayoutParams layoutParams1 = (FrameLayout.LayoutParams) passcodeView.getLayoutParams();
|
||||
layoutParams1.width = LayoutHelper.MATCH_PARENT;
|
||||
layoutParams1.height = LayoutHelper.MATCH_PARENT;
|
||||
@@ -349,10 +155,8 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
Bundle args = new Bundle();
|
||||
args.putBoolean("fromIntro", true);
|
||||
actionBarLayout.addFragmentToStack(new SettingsAccountActivity(args));
|
||||
drawerLayoutContainer.setAllowOpenDrawer(false, false);
|
||||
} else {
|
||||
actionBarLayout.addFragmentToStack(new DialogsActivity(null));
|
||||
drawerLayoutContainer.setAllowOpenDrawer(true, false);
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -403,12 +207,6 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
} else {
|
||||
boolean allowOpen = true;
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
allowOpen = actionBarLayout.fragmentsStack.size() <= 1 && layersActionBarLayout.fragmentsStack.isEmpty();
|
||||
}
|
||||
drawerLayoutContainer.setAllowOpenDrawer(allowOpen, false);
|
||||
}
|
||||
|
||||
handleIntent(getIntent(), false, savedInstanceState != null, false);
|
||||
@@ -437,7 +235,6 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
}
|
||||
passcodeView.onShow();
|
||||
UserConfig.isWaitingForPasscodeEnter = true;
|
||||
drawerLayoutContainer.setAllowOpenDrawer(false, false);
|
||||
passcodeView.setDelegate(new PasscodeView.PasscodeViewDelegate() {
|
||||
@Override
|
||||
public void didAcceptedPassword() {
|
||||
@@ -446,12 +243,7 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
handleIntent(passcodeSaveIntent, passcodeSaveIntentIsNew, passcodeSaveIntentIsRestore, true);
|
||||
passcodeSaveIntent = null;
|
||||
}
|
||||
drawerLayoutContainer.setAllowOpenDrawer(true, false);
|
||||
actionBarLayout.showLastFragment();
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
layersActionBarLayout.showLastFragment();
|
||||
rightActionBarLayout.showLastFragment();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -814,25 +606,13 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
}
|
||||
else if (showDialogsList)
|
||||
{
|
||||
if (!AndroidUtilities.isTablet()) {
|
||||
actionBarLayout.removeAllFragments();
|
||||
} else {
|
||||
if (!layersActionBarLayout.fragmentsStack.isEmpty()) {
|
||||
for (int a = 0; a < layersActionBarLayout.fragmentsStack.size() - 1; a++) {
|
||||
layersActionBarLayout.removeFragmentFromStack(layersActionBarLayout.fragmentsStack.get(0));
|
||||
a--;
|
||||
}
|
||||
layersActionBarLayout.closeLastFragment(false);
|
||||
}
|
||||
}
|
||||
actionBarLayout.removeAllFragments();
|
||||
pushOpened = false;
|
||||
isNew = false;
|
||||
}
|
||||
else if (videoPath != null || photoPathsArray != null || sendingText != null || documentsPathsArray != null || contactsToSend != null || documentsUrisArray != null)
|
||||
{
|
||||
if (!AndroidUtilities.isTablet()) {
|
||||
NotificationCenter.getInstance().postNotificationName(NotificationCenter.closeChats);
|
||||
}
|
||||
NotificationCenter.getInstance().postNotificationName(NotificationCenter.closeChats);
|
||||
if (dialogId == 0) {
|
||||
Bundle args = new Bundle();
|
||||
args.putBoolean("onlySelect", true);
|
||||
@@ -842,24 +622,13 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
DialogsActivity fragment = new DialogsActivity(args);
|
||||
fragment.setDelegate(this);
|
||||
boolean removeLast;
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
removeLast = layersActionBarLayout.fragmentsStack.size() > 0 && layersActionBarLayout.fragmentsStack.get(layersActionBarLayout.fragmentsStack.size() - 1) instanceof DialogsActivity;
|
||||
} else {
|
||||
removeLast = actionBarLayout.fragmentsStack.size() > 1 && actionBarLayout.fragmentsStack.get(actionBarLayout.fragmentsStack.size() - 1) instanceof DialogsActivity;
|
||||
}
|
||||
removeLast = actionBarLayout.fragmentsStack.size() > 1 && actionBarLayout.fragmentsStack.get(actionBarLayout.fragmentsStack.size() - 1) instanceof DialogsActivity;
|
||||
actionBarLayout.presentFragment(fragment, removeLast, true, true);
|
||||
pushOpened = true;
|
||||
if (PhotoViewer.getInstance().isVisible()) {
|
||||
PhotoViewer.getInstance().closePhoto(false, true);
|
||||
}
|
||||
|
||||
drawerLayoutContainer.setAllowOpenDrawer(false, false);
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
actionBarLayout.showLastFragment();
|
||||
rightActionBarLayout.showLastFragment();
|
||||
} else {
|
||||
drawerLayoutContainer.setAllowOpenDrawer(true, false);
|
||||
}
|
||||
} else {
|
||||
didSelectDialog(null, dialogId, false);
|
||||
}
|
||||
@@ -867,23 +636,10 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
|
||||
if (!pushOpened && !isNew)
|
||||
{
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
if (actionBarLayout.fragmentsStack.isEmpty()) {
|
||||
actionBarLayout.addFragmentToStack(new DialogsActivity(null));
|
||||
drawerLayoutContainer.setAllowOpenDrawer(true, false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (actionBarLayout.fragmentsStack.isEmpty()) {
|
||||
actionBarLayout.addFragmentToStack(new DialogsActivity(null));
|
||||
drawerLayoutContainer.setAllowOpenDrawer(true, false);
|
||||
}
|
||||
if (actionBarLayout.fragmentsStack.isEmpty()) {
|
||||
actionBarLayout.addFragmentToStack(new DialogsActivity(null));
|
||||
}
|
||||
actionBarLayout.showLastFragment();
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
layersActionBarLayout.showLastFragment();
|
||||
rightActionBarLayout.showLastFragment();
|
||||
}
|
||||
}
|
||||
|
||||
intent.setAction(null);
|
||||
@@ -901,25 +657,17 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
if (dialog_id != 0) {
|
||||
Bundle args = new Bundle();
|
||||
args.putBoolean("scrollToTopOnResume", true);
|
||||
if (!AndroidUtilities.isTablet()) {
|
||||
NotificationCenter.getInstance().postNotificationName(NotificationCenter.closeChats);
|
||||
}
|
||||
NotificationCenter.getInstance().postNotificationName(NotificationCenter.closeChats);
|
||||
|
||||
args.putInt("chat_id", (int)dialog_id);
|
||||
ChatActivity fragment = new ChatActivity(args);
|
||||
|
||||
if (videoPath != null) {
|
||||
if(android.os.Build.VERSION.SDK_INT >= 16) {
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
actionBarLayout.presentFragment(fragment, false, true, true);
|
||||
} else {
|
||||
actionBarLayout.addFragmentToStack(fragment, actionBarLayout.fragmentsStack.size() - 1);
|
||||
}
|
||||
actionBarLayout.addFragmentToStack(fragment, actionBarLayout.fragmentsStack.size() - 1);
|
||||
|
||||
if (!fragment.openVideoEditor(videoPath, dialogsFragment != null, false) && dialogsFragment != null) {
|
||||
if (!AndroidUtilities.isTablet()) {
|
||||
dialogsFragment.finishFragment(true);
|
||||
}
|
||||
dialogsFragment.finishFragment(true);
|
||||
}
|
||||
} else {
|
||||
actionBarLayout.presentFragment(fragment, dialogsFragment != null, dialogsFragment == null, true);
|
||||
@@ -983,106 +731,9 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
}
|
||||
|
||||
public void needLayout() {
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
RelativeLayout.LayoutParams relativeLayoutParams = (RelativeLayout.LayoutParams) layersActionBarLayout.getLayoutParams();
|
||||
relativeLayoutParams.leftMargin = (AndroidUtilities.displaySize.x - relativeLayoutParams.width) / 2;
|
||||
int y = (Build.VERSION.SDK_INT >= 21 ? AndroidUtilities.statusBarHeight : 0);
|
||||
relativeLayoutParams.topMargin = y + (AndroidUtilities.displaySize.y - relativeLayoutParams.height - y) / 2;
|
||||
layersActionBarLayout.setLayoutParams(relativeLayoutParams);
|
||||
|
||||
|
||||
if (!AndroidUtilities.isSmallTablet() || getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
tabletFullSize = false;
|
||||
int leftWidth = AndroidUtilities.displaySize.x / 100 * 35;
|
||||
if (leftWidth < AndroidUtilities.dp(320)) {
|
||||
leftWidth = AndroidUtilities.dp(320);
|
||||
}
|
||||
|
||||
relativeLayoutParams = (RelativeLayout.LayoutParams) actionBarLayout.getLayoutParams();
|
||||
relativeLayoutParams.width = leftWidth;
|
||||
relativeLayoutParams.height = LayoutHelper.MATCH_PARENT;
|
||||
actionBarLayout.setLayoutParams(relativeLayoutParams);
|
||||
|
||||
relativeLayoutParams = (RelativeLayout.LayoutParams) shadowTabletSide.getLayoutParams();
|
||||
relativeLayoutParams.leftMargin = leftWidth;
|
||||
shadowTabletSide.setLayoutParams(relativeLayoutParams);
|
||||
|
||||
relativeLayoutParams = (RelativeLayout.LayoutParams) rightActionBarLayout.getLayoutParams();
|
||||
relativeLayoutParams.width = AndroidUtilities.displaySize.x - leftWidth;
|
||||
relativeLayoutParams.height = LayoutHelper.MATCH_PARENT;
|
||||
relativeLayoutParams.leftMargin = leftWidth;
|
||||
rightActionBarLayout.setLayoutParams(relativeLayoutParams);
|
||||
|
||||
if (AndroidUtilities.isSmallTablet() && actionBarLayout.fragmentsStack.size() >= 2) {
|
||||
for (int a = 1; a < actionBarLayout.fragmentsStack.size(); a++) {
|
||||
BaseFragment chatFragment = actionBarLayout.fragmentsStack.get(a);
|
||||
chatFragment.onPause();
|
||||
actionBarLayout.fragmentsStack.remove(a);
|
||||
rightActionBarLayout.fragmentsStack.add(chatFragment);
|
||||
a--;
|
||||
}
|
||||
if (passcodeView.getVisibility() != View.VISIBLE) {
|
||||
actionBarLayout.showLastFragment();
|
||||
rightActionBarLayout.showLastFragment();
|
||||
}
|
||||
}
|
||||
|
||||
rightActionBarLayout.setVisibility(rightActionBarLayout.fragmentsStack.isEmpty() ? View.GONE : View.VISIBLE);
|
||||
backgroundTablet.setVisibility(rightActionBarLayout.fragmentsStack.isEmpty() ? View.VISIBLE : View.GONE);
|
||||
shadowTabletSide.setVisibility(!actionBarLayout.fragmentsStack.isEmpty() ? View.VISIBLE : View.GONE);
|
||||
} else {
|
||||
tabletFullSize = true;
|
||||
|
||||
relativeLayoutParams = (RelativeLayout.LayoutParams) actionBarLayout.getLayoutParams();
|
||||
relativeLayoutParams.width = LayoutHelper.MATCH_PARENT;
|
||||
relativeLayoutParams.height = LayoutHelper.MATCH_PARENT;
|
||||
actionBarLayout.setLayoutParams(relativeLayoutParams);
|
||||
|
||||
shadowTabletSide.setVisibility(View.GONE);
|
||||
rightActionBarLayout.setVisibility(View.GONE);
|
||||
backgroundTablet.setVisibility(!actionBarLayout.fragmentsStack.isEmpty() ? View.GONE : View.VISIBLE);
|
||||
|
||||
if (!rightActionBarLayout.fragmentsStack.isEmpty()) {
|
||||
for (int a = 0; a < rightActionBarLayout.fragmentsStack.size(); a++) {
|
||||
BaseFragment chatFragment = rightActionBarLayout.fragmentsStack.get(a);
|
||||
chatFragment.onPause();
|
||||
rightActionBarLayout.fragmentsStack.remove(a);
|
||||
actionBarLayout.fragmentsStack.add(chatFragment);
|
||||
a--;
|
||||
}
|
||||
if (passcodeView.getVisibility() != View.VISIBLE) {
|
||||
actionBarLayout.showLastFragment();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void fixLayout() {
|
||||
if (!AndroidUtilities.isTablet()) {
|
||||
return;
|
||||
}
|
||||
if (actionBarLayout == null) {
|
||||
return;
|
||||
}
|
||||
actionBarLayout.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||
@Override
|
||||
public void onGlobalLayout() {
|
||||
AndroidUtilities.runOnUIThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
needLayout();
|
||||
}
|
||||
});
|
||||
if (actionBarLayout != null) {
|
||||
if (Build.VERSION.SDK_INT < 16) {
|
||||
actionBarLayout.getViewTreeObserver().removeGlobalOnLayoutListener(this);
|
||||
} else {
|
||||
actionBarLayout.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1096,16 +747,6 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
BaseFragment fragment = actionBarLayout.fragmentsStack.get(actionBarLayout.fragmentsStack.size() - 1);
|
||||
fragment.onActivityResultFragment(requestCode, resultCode, data);
|
||||
}
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
if (rightActionBarLayout.fragmentsStack.size() != 0) {
|
||||
BaseFragment fragment = rightActionBarLayout.fragmentsStack.get(rightActionBarLayout.fragmentsStack.size() - 1);
|
||||
fragment.onActivityResultFragment(requestCode, resultCode, data);
|
||||
}
|
||||
if (layersActionBarLayout.fragmentsStack.size() != 0) {
|
||||
BaseFragment fragment = layersActionBarLayout.fragmentsStack.get(layersActionBarLayout.fragmentsStack.size() - 1);
|
||||
fragment.onActivityResultFragment(requestCode, resultCode, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static final int REQ_CONTACT_N_STORAGE_PERMISON_ID = 1;
|
||||
@@ -1168,16 +809,6 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
BaseFragment fragment = actionBarLayout.fragmentsStack.get(actionBarLayout.fragmentsStack.size() - 1);
|
||||
fragment.onRequestPermissionsResultFragment(requestCode, permissions, grantResults);
|
||||
}
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
if (rightActionBarLayout.fragmentsStack.size() != 0) {
|
||||
BaseFragment fragment = rightActionBarLayout.fragmentsStack.get(rightActionBarLayout.fragmentsStack.size() - 1);
|
||||
fragment.onRequestPermissionsResultFragment(requestCode, permissions, grantResults);
|
||||
}
|
||||
if (layersActionBarLayout.fragmentsStack.size() != 0) {
|
||||
BaseFragment fragment = layersActionBarLayout.fragmentsStack.get(layersActionBarLayout.fragmentsStack.size() - 1);
|
||||
fragment.onRequestPermissionsResultFragment(requestCode, permissions, grantResults);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1187,10 +818,6 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
ApplicationLoader.mainInterfacePaused = true;
|
||||
onPasscodePause();
|
||||
actionBarLayout.onPause();
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
rightActionBarLayout.onPause();
|
||||
layersActionBarLayout.onPause();
|
||||
}
|
||||
if (passcodeView != null) {
|
||||
passcodeView.onPause();
|
||||
}
|
||||
@@ -1200,18 +827,6 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
ApplicationLoader.stayAwakeForAMoment();
|
||||
}
|
||||
|
||||
/*@Override
|
||||
protected void onStart() {
|
||||
Log.i("DeltaChat", "*** LaunchActivity.onStart()");
|
||||
super.onStart();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
Log.i("DeltaChat", "*** LaunchActivity.onStop()");
|
||||
super.onStop();
|
||||
}*/
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
MrMailbox.log_i("DeltaChat", "*** LaunchActivity.onDestroy()");
|
||||
@@ -1249,10 +864,6 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
onPasscodeResume();
|
||||
if (passcodeView.getVisibility() != View.VISIBLE) {
|
||||
actionBarLayout.onResume();
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
rightActionBarLayout.onResume();
|
||||
layersActionBarLayout.onResume();
|
||||
}
|
||||
} else {
|
||||
passcodeView.onResume();
|
||||
}
|
||||
@@ -1278,7 +889,6 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
finish();
|
||||
}
|
||||
} else if (id == NotificationCenter.mainUserInfoChanged) {
|
||||
drawerLayoutAdapter.notifyDataSetChanged();
|
||||
KeepAliveService kas = KeepAliveService.getInstance();
|
||||
if( kas != null ) {
|
||||
kas.updateForegroundNotification();
|
||||
@@ -1337,18 +947,8 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
try {
|
||||
super.onSaveInstanceState(outState);
|
||||
BaseFragment lastFragment = null;
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
if (!layersActionBarLayout.fragmentsStack.isEmpty()) {
|
||||
lastFragment = layersActionBarLayout.fragmentsStack.get(layersActionBarLayout.fragmentsStack.size() - 1);
|
||||
} else if (!rightActionBarLayout.fragmentsStack.isEmpty()) {
|
||||
lastFragment = rightActionBarLayout.fragmentsStack.get(rightActionBarLayout.fragmentsStack.size() - 1);
|
||||
} else if (!actionBarLayout.fragmentsStack.isEmpty()) {
|
||||
lastFragment = actionBarLayout.fragmentsStack.get(actionBarLayout.fragmentsStack.size() - 1);
|
||||
}
|
||||
} else {
|
||||
if (!actionBarLayout.fragmentsStack.isEmpty()) {
|
||||
lastFragment = actionBarLayout.fragmentsStack.get(actionBarLayout.fragmentsStack.size() - 1);
|
||||
}
|
||||
if (!actionBarLayout.fragmentsStack.isEmpty()) {
|
||||
lastFragment = actionBarLayout.fragmentsStack.get(actionBarLayout.fragmentsStack.size() - 1);
|
||||
}
|
||||
|
||||
if (lastFragment != null) {
|
||||
@@ -1382,21 +982,6 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
}
|
||||
if (PhotoViewer.getInstance().isVisible()) {
|
||||
PhotoViewer.getInstance().closePhoto(true, false);
|
||||
} else if (drawerLayoutContainer.isDrawerOpened()) {
|
||||
drawerLayoutContainer.closeDrawer(false);
|
||||
} else if (AndroidUtilities.isTablet()) {
|
||||
if (layersActionBarLayout.getVisibility() == View.VISIBLE) {
|
||||
layersActionBarLayout.onBackPressed();
|
||||
} else {
|
||||
boolean cancel = false;
|
||||
if (rightActionBarLayout.getVisibility() == View.VISIBLE && !rightActionBarLayout.fragmentsStack.isEmpty()) {
|
||||
BaseFragment lastFragment = rightActionBarLayout.fragmentsStack.get(rightActionBarLayout.fragmentsStack.size() - 1);
|
||||
cancel = !lastFragment.onBackPressed();
|
||||
}
|
||||
if (!cancel) {
|
||||
actionBarLayout.onBackPressed();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
actionBarLayout.onBackPressed();
|
||||
}
|
||||
@@ -1406,10 +991,6 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
public void onLowMemory() {
|
||||
super.onLowMemory();
|
||||
actionBarLayout.onLowMemory();
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
rightActionBarLayout.onLowMemory();
|
||||
layersActionBarLayout.onLowMemory();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1419,10 +1000,6 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
return;
|
||||
}
|
||||
actionBarLayout.onActionModeStarted(mode);
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
rightActionBarLayout.onActionModeStarted(mode);
|
||||
layersActionBarLayout.onActionModeStarted(mode);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1432,10 +1009,6 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
return;
|
||||
}
|
||||
actionBarLayout.onActionModeFinished(mode);
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
rightActionBarLayout.onActionModeFinished(mode);
|
||||
layersActionBarLayout.onActionModeFinished(mode);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1450,27 +1023,12 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
@Override
|
||||
public boolean onKeyUp(int keyCode, @NonNull KeyEvent event) {
|
||||
if (keyCode == KeyEvent.KEYCODE_MENU && !UserConfig.isWaitingForPasscodeEnter) {
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
if (layersActionBarLayout.getVisibility() == View.VISIBLE && !layersActionBarLayout.fragmentsStack.isEmpty()) {
|
||||
layersActionBarLayout.onKeyUp(keyCode, event);
|
||||
} else if (rightActionBarLayout.getVisibility() == View.VISIBLE && !rightActionBarLayout.fragmentsStack.isEmpty()) {
|
||||
rightActionBarLayout.onKeyUp(keyCode, event);
|
||||
} else {
|
||||
actionBarLayout.onKeyUp(keyCode, event);
|
||||
if (actionBarLayout.fragmentsStack.size() == 1) {
|
||||
if (getCurrentFocus() != null) {
|
||||
AndroidUtilities.hideKeyboard(getCurrentFocus());
|
||||
}
|
||||
} else {
|
||||
if (actionBarLayout.fragmentsStack.size() == 1) {
|
||||
if (!drawerLayoutContainer.isDrawerOpened()) {
|
||||
if (getCurrentFocus() != null) {
|
||||
AndroidUtilities.hideKeyboard(getCurrentFocus());
|
||||
}
|
||||
drawerLayoutContainer.openDrawer(false);
|
||||
} else {
|
||||
drawerLayoutContainer.closeDrawer(false);
|
||||
}
|
||||
} else {
|
||||
actionBarLayout.onKeyUp(keyCode, event);
|
||||
}
|
||||
actionBarLayout.onKeyUp(keyCode, event);
|
||||
}
|
||||
}
|
||||
return super.onKeyUp(keyCode, event);
|
||||
@@ -1478,182 +1036,25 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
|
||||
@Override
|
||||
public boolean needPresentFragment(BaseFragment fragment, boolean removeLast, boolean forceWithoutAnimation, ActionBarLayout layout) {
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
drawerLayoutContainer.setAllowOpenDrawer(layersActionBarLayout.getVisibility() != View.VISIBLE, true);
|
||||
if (fragment instanceof DialogsActivity) {
|
||||
DialogsActivity dialogsActivity = (DialogsActivity)fragment;
|
||||
if (dialogsActivity.isMainDialogList() && layout != actionBarLayout) {
|
||||
actionBarLayout.removeAllFragments();
|
||||
actionBarLayout.presentFragment(fragment, removeLast, forceWithoutAnimation, false);
|
||||
layersActionBarLayout.removeAllFragments();
|
||||
layersActionBarLayout.setVisibility(View.GONE);
|
||||
drawerLayoutContainer.setAllowOpenDrawer(true, false);
|
||||
if (!tabletFullSize) {
|
||||
shadowTabletSide.setVisibility(View.VISIBLE);
|
||||
if (rightActionBarLayout.fragmentsStack.isEmpty()) {
|
||||
backgroundTablet.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (fragment instanceof ChatActivity) {
|
||||
if (!tabletFullSize && layout == rightActionBarLayout || tabletFullSize && layout == actionBarLayout) {
|
||||
boolean result = !(tabletFullSize && layout == actionBarLayout && actionBarLayout.fragmentsStack.size() == 1);
|
||||
if (!layersActionBarLayout.fragmentsStack.isEmpty()) {
|
||||
for (int a = 0; a < layersActionBarLayout.fragmentsStack.size() - 1; a++) {
|
||||
layersActionBarLayout.removeFragmentFromStack(layersActionBarLayout.fragmentsStack.get(0));
|
||||
a--;
|
||||
}
|
||||
layersActionBarLayout.closeLastFragment(!forceWithoutAnimation);
|
||||
}
|
||||
if (!result) {
|
||||
actionBarLayout.presentFragment(fragment, false, forceWithoutAnimation, false);
|
||||
}
|
||||
return result;
|
||||
} else if (!tabletFullSize && layout != rightActionBarLayout) {
|
||||
rightActionBarLayout.setVisibility(View.VISIBLE);
|
||||
backgroundTablet.setVisibility(View.GONE);
|
||||
rightActionBarLayout.removeAllFragments();
|
||||
rightActionBarLayout.presentFragment(fragment, removeLast, true, false);
|
||||
if (!layersActionBarLayout.fragmentsStack.isEmpty()) {
|
||||
for (int a = 0; a < layersActionBarLayout.fragmentsStack.size() - 1; a++) {
|
||||
layersActionBarLayout.removeFragmentFromStack(layersActionBarLayout.fragmentsStack.get(0));
|
||||
a--;
|
||||
}
|
||||
layersActionBarLayout.closeLastFragment(!forceWithoutAnimation);
|
||||
}
|
||||
return false;
|
||||
} else if (tabletFullSize && layout != actionBarLayout) {
|
||||
actionBarLayout.presentFragment(fragment, actionBarLayout.fragmentsStack.size() > 1, forceWithoutAnimation, false);
|
||||
if (!layersActionBarLayout.fragmentsStack.isEmpty()) {
|
||||
for (int a = 0; a < layersActionBarLayout.fragmentsStack.size() - 1; a++) {
|
||||
layersActionBarLayout.removeFragmentFromStack(layersActionBarLayout.fragmentsStack.get(0));
|
||||
a--;
|
||||
}
|
||||
layersActionBarLayout.closeLastFragment(!forceWithoutAnimation);
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
if (!layersActionBarLayout.fragmentsStack.isEmpty()) {
|
||||
for (int a = 0; a < layersActionBarLayout.fragmentsStack.size() - 1; a++) {
|
||||
layersActionBarLayout.removeFragmentFromStack(layersActionBarLayout.fragmentsStack.get(0));
|
||||
a--;
|
||||
}
|
||||
layersActionBarLayout.closeLastFragment(!forceWithoutAnimation);
|
||||
}
|
||||
actionBarLayout.presentFragment(fragment, actionBarLayout.fragmentsStack.size() > 1, forceWithoutAnimation, false);
|
||||
return false;
|
||||
}
|
||||
} else if (layout != layersActionBarLayout) {
|
||||
layersActionBarLayout.setVisibility(View.VISIBLE);
|
||||
drawerLayoutContainer.setAllowOpenDrawer(false, true);
|
||||
shadowTablet.setBackgroundColor(0x7F000000);
|
||||
layersActionBarLayout.presentFragment(fragment, removeLast, forceWithoutAnimation, false);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
drawerLayoutContainer.setAllowOpenDrawer(true, false);
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean needAddFragmentToStack(BaseFragment fragment, ActionBarLayout layout) {
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
drawerLayoutContainer.setAllowOpenDrawer(layersActionBarLayout.getVisibility() != View.VISIBLE, true);
|
||||
if (fragment instanceof DialogsActivity) {
|
||||
DialogsActivity dialogsActivity = (DialogsActivity)fragment;
|
||||
if (dialogsActivity.isMainDialogList() && layout != actionBarLayout) {
|
||||
actionBarLayout.removeAllFragments();
|
||||
actionBarLayout.addFragmentToStack(fragment);
|
||||
layersActionBarLayout.removeAllFragments();
|
||||
layersActionBarLayout.setVisibility(View.GONE);
|
||||
drawerLayoutContainer.setAllowOpenDrawer(true, false);
|
||||
if (!tabletFullSize) {
|
||||
shadowTabletSide.setVisibility(View.VISIBLE);
|
||||
if (rightActionBarLayout.fragmentsStack.isEmpty()) {
|
||||
backgroundTablet.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} else if (fragment instanceof ChatActivity) {
|
||||
if (!tabletFullSize && layout != rightActionBarLayout) {
|
||||
rightActionBarLayout.setVisibility(View.VISIBLE);
|
||||
backgroundTablet.setVisibility(View.GONE);
|
||||
rightActionBarLayout.removeAllFragments();
|
||||
rightActionBarLayout.addFragmentToStack(fragment);
|
||||
if (!layersActionBarLayout.fragmentsStack.isEmpty()) {
|
||||
for (int a = 0; a < layersActionBarLayout.fragmentsStack.size() - 1; a++) {
|
||||
layersActionBarLayout.removeFragmentFromStack(layersActionBarLayout.fragmentsStack.get(0));
|
||||
a--;
|
||||
}
|
||||
layersActionBarLayout.closeLastFragment(true);
|
||||
}
|
||||
return false;
|
||||
} else if (tabletFullSize && layout != actionBarLayout) {
|
||||
actionBarLayout.addFragmentToStack(fragment);
|
||||
if (!layersActionBarLayout.fragmentsStack.isEmpty()) {
|
||||
for (int a = 0; a < layersActionBarLayout.fragmentsStack.size() - 1; a++) {
|
||||
layersActionBarLayout.removeFragmentFromStack(layersActionBarLayout.fragmentsStack.get(0));
|
||||
a--;
|
||||
}
|
||||
layersActionBarLayout.closeLastFragment(true);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} else if (layout != layersActionBarLayout) {
|
||||
layersActionBarLayout.setVisibility(View.VISIBLE);
|
||||
drawerLayoutContainer.setAllowOpenDrawer(false, true);
|
||||
shadowTablet.setBackgroundColor(0x7F000000);
|
||||
layersActionBarLayout.addFragmentToStack(fragment);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
drawerLayoutContainer.setAllowOpenDrawer(true, false);
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean needCloseLastFragment(ActionBarLayout layout) {
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
if (layout == actionBarLayout && layout.fragmentsStack.size() <= 1) {
|
||||
onFinish();
|
||||
finish();
|
||||
return false;
|
||||
} else if (layout == rightActionBarLayout) {
|
||||
if (!tabletFullSize) {
|
||||
backgroundTablet.setVisibility(View.VISIBLE);
|
||||
}
|
||||
} else if (layout == layersActionBarLayout && actionBarLayout.fragmentsStack.isEmpty() && layersActionBarLayout.fragmentsStack.size() == 1) {
|
||||
onFinish();
|
||||
finish();
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (layout.fragmentsStack.size() <= 1) {
|
||||
onFinish();
|
||||
finish();
|
||||
return false;
|
||||
}
|
||||
if (layout.fragmentsStack.size() <= 1) {
|
||||
onFinish();
|
||||
finish();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRebuildAllFragments(ActionBarLayout layout) {
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
if (layout == layersActionBarLayout) {
|
||||
rightActionBarLayout.rebuildAllFragmentViews(true);
|
||||
rightActionBarLayout.showLastFragment();
|
||||
actionBarLayout.rebuildAllFragmentViews(true);
|
||||
actionBarLayout.showLastFragment();
|
||||
}
|
||||
}
|
||||
drawerLayoutAdapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Delta Chat Android
|
||||
* (C) 2017 Björn Petersen
|
||||
* Contact: r10s@b44t.com, http://b44t.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see http://www.gnu.org/licenses/ .
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
package com.b44t.ui;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowInsets;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
public class LaunchLayoutContainer extends FrameLayout {
|
||||
|
||||
private Object lastInsets;
|
||||
private boolean inLayout;
|
||||
|
||||
public LaunchLayoutContainer(Context context) {
|
||||
super(context);
|
||||
|
||||
setDescendantFocusability(ViewGroup.FOCUS_AFTER_DESCENDANTS);
|
||||
setFocusableInTouchMode(true);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
setFitsSystemWindows(true);
|
||||
setOnApplyWindowInsetsListener(new OnApplyWindowInsetsListener() {
|
||||
@SuppressLint("NewApi")
|
||||
@Override
|
||||
public WindowInsets onApplyWindowInsets(View v, WindowInsets insets) {
|
||||
final LaunchLayoutContainer launchLayout = (LaunchLayoutContainer) v;
|
||||
lastInsets = insets;
|
||||
launchLayout.setWillNotDraw(insets.getSystemWindowInsetTop() <= 0 && getBackground() == null);
|
||||
launchLayout.requestLayout();
|
||||
return insets.consumeSystemWindowInsets();
|
||||
}
|
||||
});
|
||||
setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
private void dispatchChildInsets(View child, Object insets, int gravity) {
|
||||
WindowInsets wi = (WindowInsets) insets;
|
||||
if (gravity == Gravity.LEFT) {
|
||||
wi = wi.replaceSystemWindowInsets(wi.getSystemWindowInsetLeft(), wi.getSystemWindowInsetTop(), 0, wi.getSystemWindowInsetBottom());
|
||||
} else if (gravity == Gravity.RIGHT) {
|
||||
wi = wi.replaceSystemWindowInsets(0, wi.getSystemWindowInsetTop(), wi.getSystemWindowInsetRight(), wi.getSystemWindowInsetBottom());
|
||||
}
|
||||
child.dispatchApplyWindowInsets(wi);
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
private void applyMarginInsets(MarginLayoutParams lp, Object insets, int gravity, boolean topOnly) {
|
||||
WindowInsets wi = (WindowInsets) insets;
|
||||
if (gravity == Gravity.LEFT) {
|
||||
wi = wi.replaceSystemWindowInsets(wi.getSystemWindowInsetLeft(), wi.getSystemWindowInsetTop(), 0, wi.getSystemWindowInsetBottom());
|
||||
} else if (gravity == Gravity.RIGHT) {
|
||||
wi = wi.replaceSystemWindowInsets(0, wi.getSystemWindowInsetTop(), wi.getSystemWindowInsetRight(), wi.getSystemWindowInsetBottom());
|
||||
}
|
||||
lp.leftMargin = wi.getSystemWindowInsetLeft();
|
||||
lp.topMargin = topOnly ? 0 : wi.getSystemWindowInsetTop();
|
||||
lp.rightMargin = wi.getSystemWindowInsetRight();
|
||||
lp.bottomMargin = wi.getSystemWindowInsetBottom();
|
||||
}
|
||||
|
||||
private int getTopInset(Object insets) { /* not sure, if this or one of the other unsed methods is called indirectly somewhere; however, at the moment, I do not habe the time tp check this. */
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
return insets != null ? ((WindowInsets) insets).getSystemWindowInsetTop() : 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onLayout(boolean changed, int l, int t, int r, int b) {
|
||||
inLayout = true;
|
||||
final int childCount = getChildCount();
|
||||
for (int i = 0; i < childCount; i++) {
|
||||
final View child = getChildAt(i);
|
||||
|
||||
if (child.getVisibility() == GONE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
|
||||
|
||||
try {
|
||||
child.layout(lp.leftMargin, lp.topMargin, lp.leftMargin + child.getMeasuredWidth(), lp.topMargin + child.getMeasuredHeight());
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
}
|
||||
inLayout = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void requestLayout() {
|
||||
if (!inLayout) {
|
||||
/*StackTraceElement[] elements = Thread.currentThread().getStackTrace();
|
||||
for (int a = 0; a < elements.length; a++) {
|
||||
Log.d("DeltaChat", "on " + elements[a]);
|
||||
}*/
|
||||
super.requestLayout();
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
int widthSize = MeasureSpec.getSize(widthMeasureSpec);
|
||||
int heightSize = MeasureSpec.getSize(heightMeasureSpec);
|
||||
|
||||
setMeasuredDimension(widthSize, heightSize);
|
||||
|
||||
final boolean applyInsets = lastInsets != null && Build.VERSION.SDK_INT >= 21;
|
||||
|
||||
final int childCount = getChildCount();
|
||||
for (int i = 0; i < childCount; i++) {
|
||||
final View child = getChildAt(i);
|
||||
|
||||
if (child.getVisibility() == GONE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
|
||||
|
||||
if (applyInsets) {
|
||||
if (child.getFitsSystemWindows()) {
|
||||
dispatchChildInsets(child, lastInsets, lp.gravity);
|
||||
} else if (child.getTag() == null) {
|
||||
applyMarginInsets(lp, lastInsets, lp.gravity, Build.VERSION.SDK_INT >= 21);
|
||||
}
|
||||
}
|
||||
|
||||
final int contentWidthSpec = MeasureSpec.makeMeasureSpec(widthSize - lp.leftMargin - lp.rightMargin, MeasureSpec.EXACTLY);
|
||||
final int contentHeightSpec = MeasureSpec.makeMeasureSpec(heightSize - lp.topMargin - lp.bottomMargin, MeasureSpec.EXACTLY);
|
||||
child.measure(contentWidthSpec, contentHeightSpec);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasOverlappingRendering() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,381 +0,0 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Delta Chat Android
|
||||
* (C) 2013-2016 Nikolai Kudashov
|
||||
* (C) 2017 Björn Petersen
|
||||
* Contact: r10s@b44t.com, http://b44t.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see http://www.gnu.org/licenses/ .
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
package com.b44t.ui;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import com.b44t.messenger.AndroidUtilities;
|
||||
import com.b44t.messenger.ApplicationLoader;
|
||||
import com.b44t.messenger.NotificationCenter;
|
||||
import com.b44t.messenger.R;
|
||||
import com.b44t.ui.ActionBar.ActionBarLayout;
|
||||
import com.b44t.ui.ActionBar.BaseFragment;
|
||||
import com.b44t.ui.ActionBar.DrawerLayoutContainer;
|
||||
import com.b44t.ui.Components.LayoutHelper;
|
||||
import com.b44t.ui.ActionBar.Theme;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ManageSpaceActivity extends Activity implements ActionBarLayout.ActionBarLayoutDelegate {
|
||||
|
||||
private boolean finished;
|
||||
private static ArrayList<BaseFragment> mainFragmentsStack = new ArrayList<>();
|
||||
private static ArrayList<BaseFragment> layerFragmentsStack = new ArrayList<>();
|
||||
|
||||
private ActionBarLayout actionBarLayout;
|
||||
private ActionBarLayout layersActionBarLayout;
|
||||
protected DrawerLayoutContainer drawerLayoutContainer;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
setTheme(R.style.Theme_MessengerProj);
|
||||
getWindow().setBackgroundDrawableResource(R.drawable.transparent);
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
Theme.loadRecources(this);
|
||||
|
||||
int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android");
|
||||
if (resourceId > 0) {
|
||||
AndroidUtilities.statusBarHeight = getResources().getDimensionPixelSize(resourceId);
|
||||
}
|
||||
|
||||
actionBarLayout = new ActionBarLayout(this);
|
||||
|
||||
drawerLayoutContainer = new DrawerLayoutContainer(this);
|
||||
drawerLayoutContainer.setAllowOpenDrawer(false, false);
|
||||
setContentView(drawerLayoutContainer, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
|
||||
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||
|
||||
RelativeLayout launchLayout = new RelativeLayout(this);
|
||||
drawerLayoutContainer.addView(launchLayout);
|
||||
FrameLayout.LayoutParams layoutParams1 = (FrameLayout.LayoutParams) launchLayout.getLayoutParams();
|
||||
layoutParams1.width = LayoutHelper.MATCH_PARENT;
|
||||
layoutParams1.height = LayoutHelper.MATCH_PARENT;
|
||||
launchLayout.setLayoutParams(layoutParams1);
|
||||
|
||||
ImageView backgroundTablet = new ImageView(this);
|
||||
backgroundTablet.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
backgroundTablet.setImageResource(R.drawable.background_hd);
|
||||
launchLayout.addView(backgroundTablet);
|
||||
RelativeLayout.LayoutParams relativeLayoutParams = (RelativeLayout.LayoutParams) backgroundTablet.getLayoutParams();
|
||||
relativeLayoutParams.width = LayoutHelper.MATCH_PARENT;
|
||||
relativeLayoutParams.height = LayoutHelper.MATCH_PARENT;
|
||||
backgroundTablet.setLayoutParams(relativeLayoutParams);
|
||||
|
||||
launchLayout.addView(actionBarLayout);
|
||||
relativeLayoutParams = (RelativeLayout.LayoutParams) actionBarLayout.getLayoutParams();
|
||||
relativeLayoutParams.width = LayoutHelper.MATCH_PARENT;
|
||||
relativeLayoutParams.height = LayoutHelper.MATCH_PARENT;
|
||||
actionBarLayout.setLayoutParams(relativeLayoutParams);
|
||||
|
||||
FrameLayout shadowTablet = new FrameLayout(this);
|
||||
shadowTablet.setBackgroundColor(0x7F000000);
|
||||
launchLayout.addView(shadowTablet);
|
||||
relativeLayoutParams = (RelativeLayout.LayoutParams) shadowTablet.getLayoutParams();
|
||||
relativeLayoutParams.width = LayoutHelper.MATCH_PARENT;
|
||||
relativeLayoutParams.height = LayoutHelper.MATCH_PARENT;
|
||||
shadowTablet.setLayoutParams(relativeLayoutParams);
|
||||
shadowTablet.setOnTouchListener(new View.OnTouchListener() {
|
||||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
if (!actionBarLayout.fragmentsStack.isEmpty() && event.getAction() == MotionEvent.ACTION_UP) {
|
||||
float x = event.getX();
|
||||
float y = event.getY();
|
||||
int location[] = new int[2];
|
||||
layersActionBarLayout.getLocationOnScreen(location);
|
||||
int viewX = location[0];
|
||||
int viewY = location[1];
|
||||
|
||||
if (layersActionBarLayout.checkTransitionAnimation() || x > viewX && x < viewX + layersActionBarLayout.getWidth() && y > viewY && y < viewY + layersActionBarLayout.getHeight()) {
|
||||
return false;
|
||||
} else {
|
||||
if (!layersActionBarLayout.fragmentsStack.isEmpty()) {
|
||||
for (int a = 0; a < layersActionBarLayout.fragmentsStack.size() - 1; a++) {
|
||||
layersActionBarLayout.removeFragmentFromStack(layersActionBarLayout.fragmentsStack.get(0));
|
||||
a--;
|
||||
}
|
||||
layersActionBarLayout.closeLastFragment(true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
shadowTablet.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
layersActionBarLayout = new ActionBarLayout(this);
|
||||
layersActionBarLayout.setRemoveActionBarExtraHeight(true);
|
||||
layersActionBarLayout.setBackgroundView(shadowTablet);
|
||||
layersActionBarLayout.setUseAlphaAnimations(true);
|
||||
layersActionBarLayout.setBackgroundResource(R.drawable.boxshadow);
|
||||
launchLayout.addView(layersActionBarLayout);
|
||||
relativeLayoutParams = (RelativeLayout.LayoutParams)layersActionBarLayout.getLayoutParams();
|
||||
relativeLayoutParams.width = AndroidUtilities.dp(530);
|
||||
relativeLayoutParams.height = AndroidUtilities.dp(528);
|
||||
layersActionBarLayout.setLayoutParams(relativeLayoutParams);
|
||||
layersActionBarLayout.init(layerFragmentsStack);
|
||||
layersActionBarLayout.setDelegate(this);
|
||||
layersActionBarLayout.setDrawerLayoutContainer(drawerLayoutContainer);
|
||||
} else {
|
||||
drawerLayoutContainer.addView(actionBarLayout, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
|
||||
}
|
||||
|
||||
// drawerLayoutContainer.setDrawerLayout(listView);
|
||||
|
||||
drawerLayoutContainer.setParentActionBarLayout(actionBarLayout);
|
||||
actionBarLayout.setDrawerLayoutContainer(drawerLayoutContainer);
|
||||
actionBarLayout.init(mainFragmentsStack);
|
||||
actionBarLayout.setDelegate(this);
|
||||
|
||||
NotificationCenter.getInstance().postNotificationName(NotificationCenter.closeOtherAppActivities, this);
|
||||
|
||||
handleIntent(getIntent(), false, savedInstanceState != null, false);
|
||||
needLayout();
|
||||
}
|
||||
|
||||
private boolean handleIntent(Intent intent, boolean isNew, boolean restore, boolean fromPassword) {
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
if (layersActionBarLayout.fragmentsStack.isEmpty()) {
|
||||
layersActionBarLayout.addFragmentToStack(new CacheControlActivity());
|
||||
}
|
||||
} else {
|
||||
if (actionBarLayout.fragmentsStack.isEmpty()) {
|
||||
actionBarLayout.addFragmentToStack(new CacheControlActivity());
|
||||
}
|
||||
}
|
||||
actionBarLayout.showLastFragment();
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
layersActionBarLayout.showLastFragment();
|
||||
}
|
||||
intent.setAction(null);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPreIme() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewIntent(Intent intent) {
|
||||
super.onNewIntent(intent);
|
||||
handleIntent(intent, true, false, false);
|
||||
}
|
||||
|
||||
private void onFinish() {
|
||||
if (finished) {
|
||||
return;
|
||||
}
|
||||
finished = true;
|
||||
}
|
||||
|
||||
public void presentFragment(BaseFragment fragment) {
|
||||
actionBarLayout.presentFragment(fragment);
|
||||
}
|
||||
|
||||
public boolean presentFragment(final BaseFragment fragment, final boolean removeLast, boolean forceWithoutAnimation) {
|
||||
return actionBarLayout.presentFragment(fragment, removeLast, forceWithoutAnimation, true);
|
||||
}
|
||||
|
||||
public void needLayout() {
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
RelativeLayout.LayoutParams relativeLayoutParams = (RelativeLayout.LayoutParams)layersActionBarLayout.getLayoutParams();
|
||||
relativeLayoutParams.leftMargin = (AndroidUtilities.displaySize.x - relativeLayoutParams.width) / 2;
|
||||
int y = (Build.VERSION.SDK_INT >= 21 ? AndroidUtilities.statusBarHeight : 0);
|
||||
relativeLayoutParams.topMargin = y + (AndroidUtilities.displaySize.y - relativeLayoutParams.height - y) / 2;
|
||||
layersActionBarLayout.setLayoutParams(relativeLayoutParams);
|
||||
|
||||
|
||||
if (!AndroidUtilities.isSmallTablet() || getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
int leftWidth = AndroidUtilities.displaySize.x / 100 * 35;
|
||||
if (leftWidth < AndroidUtilities.dp(320)) {
|
||||
leftWidth = AndroidUtilities.dp(320);
|
||||
}
|
||||
|
||||
relativeLayoutParams = (RelativeLayout.LayoutParams) actionBarLayout.getLayoutParams();
|
||||
relativeLayoutParams.width = leftWidth;
|
||||
relativeLayoutParams.height = LayoutHelper.MATCH_PARENT;
|
||||
actionBarLayout.setLayoutParams(relativeLayoutParams);
|
||||
|
||||
if (AndroidUtilities.isSmallTablet() && actionBarLayout.fragmentsStack.size() == 2) {
|
||||
BaseFragment chatFragment = actionBarLayout.fragmentsStack.get(1);
|
||||
chatFragment.onPause();
|
||||
actionBarLayout.fragmentsStack.remove(1);
|
||||
actionBarLayout.showLastFragment();
|
||||
}
|
||||
} else {
|
||||
relativeLayoutParams = (RelativeLayout.LayoutParams) actionBarLayout.getLayoutParams();
|
||||
relativeLayoutParams.width = LayoutHelper.MATCH_PARENT;
|
||||
relativeLayoutParams.height = LayoutHelper.MATCH_PARENT;
|
||||
actionBarLayout.setLayoutParams(relativeLayoutParams);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void fixLayout() {
|
||||
if (!AndroidUtilities.isTablet()) {
|
||||
return;
|
||||
}
|
||||
if (actionBarLayout == null) {
|
||||
return;
|
||||
}
|
||||
actionBarLayout.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||
@Override
|
||||
public void onGlobalLayout() {
|
||||
needLayout();
|
||||
if (actionBarLayout != null) {
|
||||
if (Build.VERSION.SDK_INT < 16) {
|
||||
actionBarLayout.getViewTreeObserver().removeGlobalOnLayoutListener(this);
|
||||
} else {
|
||||
actionBarLayout.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
actionBarLayout.onPause();
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
layersActionBarLayout.onPause();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
onFinish();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
actionBarLayout.onResume();
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
layersActionBarLayout.onResume();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(android.content.res.Configuration newConfig) {
|
||||
AndroidUtilities.checkDisplaySize();
|
||||
super.onConfigurationChanged(newConfig);
|
||||
fixLayout();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if (PhotoViewer.getInstance().isVisible()) {
|
||||
PhotoViewer.getInstance().closePhoto(true, false);
|
||||
} else if (drawerLayoutContainer.isDrawerOpened()) {
|
||||
drawerLayoutContainer.closeDrawer(false);
|
||||
} else if (AndroidUtilities.isTablet()) {
|
||||
if (layersActionBarLayout.getVisibility() == View.VISIBLE) {
|
||||
layersActionBarLayout.onBackPressed();
|
||||
} else {
|
||||
actionBarLayout.onBackPressed();
|
||||
}
|
||||
} else {
|
||||
actionBarLayout.onBackPressed();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLowMemory() {
|
||||
super.onLowMemory();
|
||||
actionBarLayout.onLowMemory();
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
layersActionBarLayout.onLowMemory();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean needPresentFragment(BaseFragment fragment, boolean removeLast, boolean forceWithoutAnimation, ActionBarLayout layout) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean needAddFragmentToStack(BaseFragment fragment, ActionBarLayout layout) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean needCloseLastFragment(ActionBarLayout layout) {
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
if (layout == actionBarLayout && layout.fragmentsStack.size() <= 1) {
|
||||
onFinish();
|
||||
finish();
|
||||
return false;
|
||||
} else if (layout == layersActionBarLayout && actionBarLayout.fragmentsStack.isEmpty() && layersActionBarLayout.fragmentsStack.size() == 1) {
|
||||
onFinish();
|
||||
finish();
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (layout.fragmentsStack.size() <= 1) {
|
||||
onFinish();
|
||||
finish();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRebuildAllFragments(ActionBarLayout layout) {
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
if (layout == layersActionBarLayout) {
|
||||
actionBarLayout.rebuildAllFragmentViews(true);
|
||||
actionBarLayout.showLastFragment();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -195,7 +195,6 @@ public class PasscodeActivity extends BaseFragment implements NotificationCenter
|
||||
}
|
||||
passwordEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
|
||||
passwordEditText.setTypeface(Typeface.DEFAULT);
|
||||
AndroidUtilities.clearCursorDrawable(passwordEditText);
|
||||
frameLayout.addView(passwordEditText);
|
||||
layoutParams = (FrameLayout.LayoutParams) passwordEditText.getLayoutParams();
|
||||
layoutParams.topMargin = AndroidUtilities.dp(90);
|
||||
@@ -272,7 +271,7 @@ public class PasscodeActivity extends BaseFragment implements NotificationCenter
|
||||
layoutParams.height = LayoutHelper.MATCH_PARENT;
|
||||
layoutParams.width = LayoutHelper.WRAP_CONTENT;
|
||||
layoutParams.rightMargin = AndroidUtilities.dp(40);
|
||||
layoutParams.leftMargin = AndroidUtilities.isTablet() ? AndroidUtilities.dp(64) : AndroidUtilities.dp(56);
|
||||
layoutParams.leftMargin = AndroidUtilities.dp(56);
|
||||
layoutParams.gravity = Gravity.TOP | Gravity.START;
|
||||
dropDownContainer.setLayoutParams(layoutParams);
|
||||
dropDownContainer.setOnClickListener(new View.OnClickListener() {
|
||||
@@ -595,12 +594,10 @@ public class PasscodeActivity extends BaseFragment implements NotificationCenter
|
||||
|
||||
private void fixLayoutInternal() {
|
||||
if (dropDownContainer != null) {
|
||||
if (!AndroidUtilities.isTablet()) {
|
||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) dropDownContainer.getLayoutParams();
|
||||
layoutParams.topMargin = (Build.VERSION.SDK_INT >= 21 ? AndroidUtilities.statusBarHeight : 0);
|
||||
dropDownContainer.setLayoutParams(layoutParams);
|
||||
}
|
||||
if (!AndroidUtilities.isTablet() && ApplicationLoader.applicationContext.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) dropDownContainer.getLayoutParams();
|
||||
layoutParams.topMargin = (Build.VERSION.SDK_INT >= 21 ? AndroidUtilities.statusBarHeight : 0);
|
||||
dropDownContainer.setLayoutParams(layoutParams);
|
||||
if (ApplicationLoader.applicationContext.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
dropDown.setTextSize(18);
|
||||
} else {
|
||||
dropDown.setTextSize(20);
|
||||
|
||||
@@ -172,7 +172,7 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati
|
||||
layoutParams.height = LayoutHelper.MATCH_PARENT;
|
||||
layoutParams.width = LayoutHelper.WRAP_CONTENT;
|
||||
layoutParams.rightMargin = AndroidUtilities.dp(40);
|
||||
layoutParams.leftMargin = AndroidUtilities.isTablet() ? AndroidUtilities.dp(64) : AndroidUtilities.dp(56);
|
||||
layoutParams.leftMargin = AndroidUtilities.dp(56);
|
||||
layoutParams.gravity = Gravity.TOP | Gravity.START;
|
||||
dropDownContainer.setLayoutParams(layoutParams);
|
||||
dropDownContainer.setOnClickListener(new View.OnClickListener() {
|
||||
@@ -391,19 +391,17 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati
|
||||
WindowManager manager = (WindowManager) ApplicationLoader.applicationContext.getSystemService(Activity.WINDOW_SERVICE);
|
||||
int rotation = manager.getDefaultDisplay().getRotation();
|
||||
columnsCount = 2;
|
||||
if (!AndroidUtilities.isTablet() && (rotation == Surface.ROTATION_270 || rotation == Surface.ROTATION_90)) {
|
||||
if (rotation == Surface.ROTATION_270 || rotation == Surface.ROTATION_90) {
|
||||
columnsCount = 4;
|
||||
}
|
||||
listAdapter.notifyDataSetChanged();
|
||||
|
||||
if (dropDownContainer != null) {
|
||||
if (!AndroidUtilities.isTablet()) {
|
||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) dropDownContainer.getLayoutParams();
|
||||
layoutParams.topMargin = (Build.VERSION.SDK_INT >= 21 ? AndroidUtilities.statusBarHeight : 0);
|
||||
dropDownContainer.setLayoutParams(layoutParams);
|
||||
}
|
||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) dropDownContainer.getLayoutParams();
|
||||
layoutParams.topMargin = (Build.VERSION.SDK_INT >= 21 ? AndroidUtilities.statusBarHeight : 0);
|
||||
dropDownContainer.setLayoutParams(layoutParams);
|
||||
|
||||
if (!AndroidUtilities.isTablet() && ApplicationLoader.applicationContext.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
if (ApplicationLoader.applicationContext.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
dropDown.setTextSize(18);
|
||||
} else {
|
||||
dropDown.setTextSize(20);
|
||||
|
||||
@@ -398,11 +398,7 @@ public class PhotoCropActivity extends BaseFragment {
|
||||
}
|
||||
}
|
||||
int size;
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
size = AndroidUtilities.dp(520);
|
||||
} else {
|
||||
size = Math.max(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y);
|
||||
}
|
||||
size = Math.max(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y);
|
||||
imageToCrop = ImageLoader.loadBitmap(photoPath, photoUri, size, size, true);
|
||||
if (imageToCrop == null) {
|
||||
return false;
|
||||
|
||||
@@ -430,21 +430,13 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen
|
||||
int rotation = manager.getDefaultDisplay().getRotation();
|
||||
|
||||
int columnsCount;
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
columnsCount = 3;
|
||||
if (rotation == Surface.ROTATION_270 || rotation == Surface.ROTATION_90) {
|
||||
columnsCount = 5;
|
||||
} else {
|
||||
if (rotation == Surface.ROTATION_270 || rotation == Surface.ROTATION_90) {
|
||||
columnsCount = 5;
|
||||
} else {
|
||||
columnsCount = 3;
|
||||
}
|
||||
columnsCount = 3;
|
||||
}
|
||||
listView.setNumColumns(columnsCount);
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
itemWidth = (AndroidUtilities.dp(490) - ((columnsCount + 1) * AndroidUtilities.dp(4))) / columnsCount;
|
||||
} else {
|
||||
itemWidth = (AndroidUtilities.displaySize.x - ((columnsCount + 1) * AndroidUtilities.dp(4))) / columnsCount;
|
||||
}
|
||||
itemWidth = (AndroidUtilities.displaySize.x - ((columnsCount + 1) * AndroidUtilities.dp(4))) / columnsCount;
|
||||
listView.setColumnWidth(itemWidth);
|
||||
|
||||
listAdapter.notifyDataSetChanged();
|
||||
|
||||
@@ -279,14 +279,6 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
||||
super(color);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAlpha(int alpha) {
|
||||
if (parentActivity instanceof LaunchActivity) {
|
||||
((LaunchActivity) parentActivity).drawerLayoutContainer.setAllowDrawContent(!isVisible || alpha != 255);
|
||||
}
|
||||
super.setAlpha(alpha);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Canvas canvas) {
|
||||
super.draw(canvas);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Delta Chat Android
|
||||
* (C) 2013-2016 Nikolai Kudashov
|
||||
* (C) 2017 Björn Petersen
|
||||
* Contact: r10s@b44t.com, http://b44t.com
|
||||
*
|
||||
@@ -23,16 +22,11 @@
|
||||
|
||||
package com.b44t.ui;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorSet;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
@@ -46,16 +40,12 @@ import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.view.animation.AccelerateInterpolator;
|
||||
import android.view.animation.DecelerateInterpolator;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.b44t.messenger.AndroidUtilities;
|
||||
import com.b44t.messenger.AnimatorListenerAdapterProxy;
|
||||
import com.b44t.messenger.ContactsController;
|
||||
import com.b44t.messenger.LocaleController;
|
||||
import com.b44t.messenger.FileLoader;
|
||||
import com.b44t.messenger.MrChat;
|
||||
import com.b44t.messenger.MrContact;
|
||||
import com.b44t.messenger.MrMailbox;
|
||||
@@ -69,11 +59,9 @@ import com.b44t.messenger.R;
|
||||
import com.b44t.messenger.MessageObject;
|
||||
import com.b44t.ui.ActionBar.BackDrawable;
|
||||
import com.b44t.ui.ActionBar.SimpleTextView;
|
||||
import com.b44t.ui.Cells.DividerCell;
|
||||
import com.b44t.ui.Cells.EmptyCell;
|
||||
import com.b44t.ui.Cells.ShadowSectionCell;
|
||||
import com.b44t.ui.Cells.TextCell;
|
||||
import com.b44t.ui.Cells.TextDetailCell;
|
||||
import com.b44t.ui.Cells.UserCell;
|
||||
import com.b44t.ui.ActionBar.ActionBar;
|
||||
import com.b44t.ui.ActionBar.ActionBarMenu;
|
||||
@@ -86,7 +74,7 @@ import com.b44t.ui.Components.LayoutHelper;
|
||||
import com.b44t.ui.Components.RecyclerListView;
|
||||
import com.b44t.ui.ActionBar.Theme;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.io.File;
|
||||
|
||||
|
||||
public class ProfileActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate, PhotoViewer.PhotoViewerProvider {
|
||||
@@ -95,8 +83,6 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
private int chat_id; // show the profile of a group
|
||||
|
||||
private final int typeEmpty = 0;
|
||||
private final int typeDivider = 1;
|
||||
private final int typeTextDetailCell = 2;
|
||||
private final int typeTextCell = 3;
|
||||
private final int typeContactCell = 4;
|
||||
private final int typeSection = 5;
|
||||
@@ -104,35 +90,22 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
private RecyclerListView listView;
|
||||
private ListAdapter listAdapter;
|
||||
private BackupImageView avatarImage;
|
||||
private SimpleTextView nameTextView[] = new SimpleTextView[2];
|
||||
private SimpleTextView onlineTextView[] = new SimpleTextView[2];
|
||||
private ImageView writeButton;
|
||||
private AnimatorSet writeButtonAnimation;
|
||||
private SimpleTextView nameTextView;
|
||||
private SimpleTextView subtitleTextView;
|
||||
private AvatarDrawable avatarDrawable;
|
||||
private ActionBarMenuItem animatingItem;
|
||||
private TopView topView;
|
||||
|
||||
private long dialog_id;
|
||||
|
||||
private boolean openAnimationInProgress;
|
||||
private boolean playProfileAnimation;
|
||||
private boolean allowProfileAnimation = true;
|
||||
private int extraHeight;
|
||||
private int initialAnimationExtraHeight;
|
||||
|
||||
private AvatarUpdater avatarUpdater;
|
||||
private int[] sortedUserIds;
|
||||
|
||||
private final static int ID_STOP_ENCRYPTION_FOR_THIS_USER = 2;
|
||||
private final static int ID_BLOCK_CONTACT = 3;
|
||||
private final static int ID_DELETE_CONTACT = 5;
|
||||
private final static int ID_INVITE_TO_GROUP = 9;
|
||||
private final static int ID_ADD_SHORTCUT = 14;
|
||||
private final static int ID_COPY_EMAIL_TO_CLIPBOARD = 15;
|
||||
|
||||
private int emptyRow = -1;
|
||||
private int userSectionRow = -1;
|
||||
private int sectionRow = -1;
|
||||
private int settingsNotificationsRow = -1;
|
||||
private int changeNameRow = -1;
|
||||
private int startChatRow = -1;
|
||||
@@ -187,8 +160,6 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
user_id = arguments.getInt("user_id", 0);
|
||||
chat_id = getArguments().getInt("chat_id", 0);
|
||||
if (user_id != 0) {
|
||||
dialog_id = arguments.getLong("dialog_id", 0);
|
||||
|
||||
TLRPC.User user = MrMailbox.getUser(user_id);
|
||||
if (user == null) {
|
||||
return false;
|
||||
@@ -200,11 +171,15 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
sortedUserIds = MrMailbox.getChatContacts(chat_id);
|
||||
|
||||
avatarUpdater = new AvatarUpdater();
|
||||
avatarUpdater.returnOnly = true;
|
||||
avatarUpdater.delegate = new AvatarUpdater.AvatarUpdaterDelegate() {
|
||||
@Override
|
||||
public void didUploadedPhoto(TLRPC.InputFile file, TLRPC.PhotoSize small, TLRPC.PhotoSize big) {
|
||||
if (chat_id != 0) {
|
||||
//MessagesController.getInstance().changeChatAvatar(chat_id, file);
|
||||
if (user_id==0 && chat_id > MrChat.MR_CHAT_ID_LAST_SPECIAL) {
|
||||
String nameonly = big.location.volume_id + "_" + big.location.local_id + ".jpg";
|
||||
File fileobj = new File(FileLoader.getInstance().getDirectory(FileLoader.MEDIA_DIR_CACHE), nameonly);
|
||||
String fullpath = fileobj.getAbsolutePath();
|
||||
MrMailbox.setChatImage(chat_id, fullpath);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -245,7 +220,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
actionBar.setBackButtonDrawable(new BackDrawable(false));
|
||||
actionBar.setCastShadows(false);
|
||||
actionBar.setAddToContainer(false);
|
||||
actionBar.setOccupyStatusBar(Build.VERSION.SDK_INT >= 21 && !AndroidUtilities.isTablet());
|
||||
actionBar.setOccupyStatusBar(Build.VERSION.SDK_INT >= 21);
|
||||
return actionBar;
|
||||
}
|
||||
|
||||
@@ -264,10 +239,6 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
if (id == -1) {
|
||||
finishFragment();
|
||||
}
|
||||
else if( id==ID_STOP_ENCRYPTION_FOR_THIS_USER )
|
||||
{
|
||||
Toast.makeText(getParentActivity(), context.getString(R.string.NotYetImplemented), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
else if( id==ID_COPY_EMAIL_TO_CLIPBOARD )
|
||||
{
|
||||
AndroidUtilities.addToClipboard(MrMailbox.getContact(user_id).getAddr());
|
||||
@@ -550,100 +521,64 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
avatarImage.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (user_id != 0) {
|
||||
TLRPC.User user = MrMailbox.getUser(user_id);
|
||||
if (user.photo != null && user.photo.photo_big != null) {
|
||||
PhotoViewer.getInstance().setParentActivity(getParentActivity());
|
||||
PhotoViewer.getInstance().openPhoto(user.photo.photo_big, ProfileActivity.this);
|
||||
}
|
||||
} else if (chat_id != 0) {
|
||||
TLRPC.Chat chat = MrChat.chatId2chat(chat_id);
|
||||
if (chat.photo != null && chat.photo.photo_big != null) {
|
||||
PhotoViewer.getInstance().setParentActivity(getParentActivity());
|
||||
PhotoViewer.getInstance().openPhoto(chat.photo.photo_big, ProfileActivity.this);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
for (int a = 0; a < 2; a++) {
|
||||
if (!playProfileAnimation && a == 0) {
|
||||
continue;
|
||||
}
|
||||
nameTextView[a] = new SimpleTextView(context);
|
||||
nameTextView[a].setTextColor(Theme.ACTION_BAR_TITLE_COLOR);
|
||||
nameTextView[a].setTextSize(18);
|
||||
nameTextView[a].setGravity(Gravity.START);
|
||||
nameTextView[a].setLeftDrawableTopPadding(-AndroidUtilities.dp(1.3f));
|
||||
nameTextView[a].setRightDrawableTopPadding(-AndroidUtilities.dp(1.3f));
|
||||
nameTextView[a].setPivotX(0);
|
||||
nameTextView[a].setPivotY(0);
|
||||
frameLayout.addView(nameTextView[a], LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.START | Gravity.TOP, 118-ANIM_OFF, 0, a == 0 ? 48 : 0, 0));
|
||||
|
||||
onlineTextView[a] = new SimpleTextView(context);
|
||||
onlineTextView[a].setTextColor(Theme.ACTION_BAR_SUBTITLE_COLOR);
|
||||
onlineTextView[a].setTextSize(14);
|
||||
onlineTextView[a].setGravity(Gravity.START);
|
||||
frameLayout.addView(onlineTextView[a], LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.START | Gravity.TOP, 118-ANIM_OFF, 0, a == 0 ? 48 : 8, 0));
|
||||
}
|
||||
|
||||
if ( chat_id != 0 && chat_id!= MrChat.MR_CHAT_ID_DEADDROP ) {
|
||||
/* TODO: let the user select a photo for the group
|
||||
writeButton = new ImageView(context);
|
||||
try {
|
||||
writeButton.setBackgroundResource(R.drawable.floating_user_states);
|
||||
} catch (Throwable e) {
|
||||
|
||||
}
|
||||
writeButton.setScaleType(ImageView.ScaleType.CENTER);
|
||||
writeButton.setImageResource(R.drawable.floating_camera);
|
||||
|
||||
frameLayout.addView(writeButton, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.END | Gravity.TOP, 0, 0, 16, 0));
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
StateListAnimator animator = new StateListAnimator();
|
||||
animator.addState(new int[]{android.R.attr.state_pressed}, ObjectAnimator.ofFloat(writeButton, "translationZ", AndroidUtilities.dp(2), AndroidUtilities.dp(4)).setDuration(200));
|
||||
animator.addState(new int[]{}, ObjectAnimator.ofFloat(writeButton, "translationZ", AndroidUtilities.dp(4), AndroidUtilities.dp(2)).setDuration(200));
|
||||
writeButton.setStateListAnimator(animator);
|
||||
writeButton.setOutlineProvider(new ViewOutlineProvider() {
|
||||
@SuppressLint("NewApi")
|
||||
@Override
|
||||
public void getOutline(View view, Outline outline) {
|
||||
outline.setOval(0, 0, AndroidUtilities.dp(56), AndroidUtilities.dp(56));
|
||||
}
|
||||
});
|
||||
}
|
||||
writeButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (getParentActivity() == null) {
|
||||
return;
|
||||
}
|
||||
if (user_id==0 && chat_id > MrChat.MR_CHAT_ID_LAST_SPECIAL) {
|
||||
// show menu to change the group image
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
|
||||
CharSequence[] items;
|
||||
TLRPC.Chat chat = MrChat.chatId2chat(chat_id);
|
||||
if (chat.photo == null || chat.photo.photo_big == null ) {
|
||||
items = new CharSequence[]{LocaleController.getString("FromCamera", R.string.FromCamera), LocaleController.getString("FromGalley", R.string.FromGalley)};
|
||||
boolean hasPhoto = MrMailbox.getChat(chat_id).getParam(MrChat.MRP_PROFILE_IMAGE, null)!=null;
|
||||
if ( !hasPhoto ) {
|
||||
items = new CharSequence[]{context.getString(R.string.FromCamera), context.getString(R.string.FromGalley)};
|
||||
} else {
|
||||
items = new CharSequence[]{LocaleController.getString("FromCamera", R.string.FromCamera), LocaleController.getString("FromGalley", R.string.FromGalley), LocaleController.getString("DeletePhoto", R.string.DeletePhoto)};
|
||||
items = new CharSequence[]{context.getString(R.string.FromCamera), context.getString(R.string.FromGalley), context.getString(R.string.Delete)};
|
||||
}
|
||||
|
||||
builder.setTitle(context.getString(R.string.EditImage));
|
||||
builder.setItems(items, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
if (i == 0) {
|
||||
avatarUpdater.openCamera();
|
||||
avatarUpdater.openCamera(); // results in a call to didUploadedPhoto()
|
||||
} else if (i == 1) {
|
||||
avatarUpdater.openGallery();
|
||||
avatarUpdater.openGallery(); // results in a call to didUploadedPhoto()
|
||||
} else if (i == 2) {
|
||||
MessagesController.getInstance().changeChatAvatar(chat_id, null);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
|
||||
builder.setMessage(context.getString(R.string.AskDeleteGroupImage));
|
||||
builder.setPositiveButton(context.getString(R.string.OK), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
if( MrMailbox.setChatImage(chat_id, null)!=0 ) {
|
||||
AndroidUtilities.showDoneHint(getParentActivity());
|
||||
}
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton(context.getString(R.string.Cancel), null);
|
||||
showDialog(builder.create());
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
showDialog(builder.create());
|
||||
}
|
||||
});
|
||||
*/
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
nameTextView = new SimpleTextView(context);
|
||||
nameTextView.setTextColor(Theme.ACTION_BAR_TITLE_COLOR);
|
||||
nameTextView.setTextSize(18);
|
||||
nameTextView.setGravity(Gravity.START);
|
||||
nameTextView.setLeftDrawableTopPadding(-AndroidUtilities.dp(1.3f));
|
||||
nameTextView.setRightDrawableTopPadding(-AndroidUtilities.dp(1.3f));
|
||||
nameTextView.setPivotX(0);
|
||||
nameTextView.setPivotY(0);
|
||||
frameLayout.addView(nameTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.START | Gravity.TOP, 118-ANIM_OFF, 0, 0, 0));
|
||||
|
||||
subtitleTextView = new SimpleTextView(context);
|
||||
subtitleTextView.setTextColor(Theme.ACTION_BAR_SUBTITLE_COLOR);
|
||||
subtitleTextView.setTextSize(14);
|
||||
subtitleTextView.setGravity(Gravity.START);
|
||||
frameLayout.addView(subtitleTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.START | Gravity.TOP, 118-ANIM_OFF, 0, 8, 0));
|
||||
|
||||
needLayout();
|
||||
|
||||
listView.setOnScrollListener(new RecyclerView.OnScrollListener() {
|
||||
@@ -683,7 +618,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
}
|
||||
|
||||
private void checkListViewScroll() {
|
||||
if (listView.getChildCount() <= 0 || openAnimationInProgress) {
|
||||
if (listView.getChildCount() <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -697,9 +632,6 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
if (extraHeight != newOffset) {
|
||||
extraHeight = newOffset;
|
||||
topView.invalidate();
|
||||
if (playProfileAnimation) {
|
||||
allowProfileAnimation = extraHeight != 0;
|
||||
}
|
||||
needLayout();
|
||||
}
|
||||
}
|
||||
@@ -707,7 +639,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
private void needLayout() {
|
||||
FrameLayout.LayoutParams layoutParams;
|
||||
int newTop = (actionBar.getOccupyStatusBar() ? AndroidUtilities.statusBarHeight : 0) + ActionBar.getCurrentActionBarHeight();
|
||||
if (listView != null && !openAnimationInProgress) {
|
||||
if (listView != null) {
|
||||
layoutParams = (FrameLayout.LayoutParams) listView.getLayoutParams();
|
||||
if (layoutParams.topMargin != newTop) {
|
||||
layoutParams.topMargin = newTop;
|
||||
@@ -719,53 +651,6 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
float diff = extraHeight / (float) AndroidUtilities.dp(88);
|
||||
listView.setTopGlowOffset(extraHeight);
|
||||
|
||||
if (writeButton != null) {
|
||||
writeButton.setTranslationY((actionBar.getOccupyStatusBar() ? AndroidUtilities.statusBarHeight : 0) + ActionBar.getCurrentActionBarHeight() + extraHeight - AndroidUtilities.dp(29.5f));
|
||||
|
||||
if (!openAnimationInProgress) {
|
||||
final boolean setVisible = diff > 0.2f;
|
||||
boolean currentVisible = writeButton.getTag() == null;
|
||||
if (setVisible != currentVisible) {
|
||||
if (setVisible) {
|
||||
writeButton.setTag(null);
|
||||
} else {
|
||||
writeButton.setTag(0);
|
||||
}
|
||||
if (writeButtonAnimation != null) {
|
||||
AnimatorSet old = writeButtonAnimation;
|
||||
writeButtonAnimation = null;
|
||||
old.cancel();
|
||||
}
|
||||
writeButtonAnimation = new AnimatorSet();
|
||||
if (setVisible) {
|
||||
writeButtonAnimation.setInterpolator(new DecelerateInterpolator());
|
||||
writeButtonAnimation.playTogether(
|
||||
ObjectAnimator.ofFloat(writeButton, "scaleX", 1.0f),
|
||||
ObjectAnimator.ofFloat(writeButton, "scaleY", 1.0f),
|
||||
ObjectAnimator.ofFloat(writeButton, "alpha", 1.0f)
|
||||
);
|
||||
} else {
|
||||
writeButtonAnimation.setInterpolator(new AccelerateInterpolator());
|
||||
writeButtonAnimation.playTogether(
|
||||
ObjectAnimator.ofFloat(writeButton, "scaleX", 0.2f),
|
||||
ObjectAnimator.ofFloat(writeButton, "scaleY", 0.2f),
|
||||
ObjectAnimator.ofFloat(writeButton, "alpha", 0.0f)
|
||||
);
|
||||
}
|
||||
writeButtonAnimation.setDuration(150);
|
||||
writeButtonAnimation.addListener(new AnimatorListenerAdapterProxy() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
if (writeButtonAnimation != null && writeButtonAnimation.equals(animation)) {
|
||||
writeButtonAnimation = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
writeButtonAnimation.start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float avatarY = (actionBar.getOccupyStatusBar() ? AndroidUtilities.statusBarHeight : 0)
|
||||
+ ActionBar.getCurrentActionBarHeight() / 2.0f * (1.0f + diff)
|
||||
- 21 * AndroidUtilities.density + 12 * AndroidUtilities.density * diff;
|
||||
@@ -773,38 +658,28 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
avatarImage.setScaleY((42 + 40 * diff) / 42.0f);
|
||||
avatarImage.setTranslationX(-AndroidUtilities.dp(42) * diff);
|
||||
avatarImage.setTranslationY((float) Math.ceil(avatarY));
|
||||
for (int a = 0; a < 2; a++) {
|
||||
if (nameTextView[a] == null) {
|
||||
continue;
|
||||
}
|
||||
nameTextView[a].setTranslationX(/*-21 * AndroidUtilities.density * diff*/1);
|
||||
nameTextView[a].setTranslationY((float) Math.floor(avatarY) + AndroidUtilities.dp(1.3f) + AndroidUtilities.dp(14) * diff);
|
||||
onlineTextView[a].setTranslationX(/*-21 * AndroidUtilities.density * diff*/1);
|
||||
onlineTextView[a].setTranslationY((float) Math.floor(avatarY) + AndroidUtilities.dp(24) + (float) Math.floor(25 * AndroidUtilities.density) * diff);
|
||||
nameTextView[a].setScaleX(1.0f + 0.4f * diff);
|
||||
nameTextView[a].setScaleY(1.0f + 0.4f * diff);
|
||||
if (a == 1 && !openAnimationInProgress) {
|
||||
int width;
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
width = AndroidUtilities.dp(490);
|
||||
} else {
|
||||
width = AndroidUtilities.displaySize.x;
|
||||
}
|
||||
width = (int) (width - AndroidUtilities.dp(118 + 8 + 40 * (1.0f - diff)) - nameTextView[a].getTranslationX());
|
||||
float width2 = nameTextView[a].getPaint().measureText(nameTextView[a].getText().toString()) * nameTextView[a].getScaleX() + nameTextView[a].getSideDrawablesSize();
|
||||
layoutParams = (FrameLayout.LayoutParams) nameTextView[a].getLayoutParams();
|
||||
if (width < width2) {
|
||||
layoutParams.width = (int) Math.ceil(width / nameTextView[a].getScaleX());
|
||||
} else {
|
||||
layoutParams.width = LayoutHelper.WRAP_CONTENT;
|
||||
}
|
||||
nameTextView[a].setLayoutParams(layoutParams);
|
||||
|
||||
layoutParams = (FrameLayout.LayoutParams) onlineTextView[a].getLayoutParams();
|
||||
layoutParams.rightMargin = (int) Math.ceil(onlineTextView[a].getTranslationX() + AndroidUtilities.dp(8) + AndroidUtilities.dp(40) * (1.0f - diff));
|
||||
onlineTextView[a].setLayoutParams(layoutParams);
|
||||
}
|
||||
nameTextView.setTranslationX(/*-21 * AndroidUtilities.density * diff*/1);
|
||||
nameTextView.setTranslationY((float) Math.floor(avatarY) + AndroidUtilities.dp(1.3f) + AndroidUtilities.dp(14) * diff);
|
||||
subtitleTextView.setTranslationX(/*-21 * AndroidUtilities.density * diff*/1);
|
||||
subtitleTextView.setTranslationY((float) Math.floor(avatarY) + AndroidUtilities.dp(24) + (float) Math.floor(25 * AndroidUtilities.density) * diff);
|
||||
nameTextView.setScaleX(1.0f + 0.4f * diff);
|
||||
nameTextView.setScaleY(1.0f + 0.4f * diff);
|
||||
int width;
|
||||
width = AndroidUtilities.displaySize.x;
|
||||
width = (int) (width - AndroidUtilities.dp(118 + 8 + 40 * (1.0f - diff)) - nameTextView.getTranslationX());
|
||||
float width2 = nameTextView.getPaint().measureText(nameTextView.getText().toString()) * nameTextView.getScaleX() + nameTextView.getSideDrawablesSize();
|
||||
layoutParams = (FrameLayout.LayoutParams) nameTextView.getLayoutParams();
|
||||
if (width < width2) {
|
||||
layoutParams.width = (int) Math.ceil(width / nameTextView.getScaleX());
|
||||
} else {
|
||||
layoutParams.width = LayoutHelper.WRAP_CONTENT;
|
||||
}
|
||||
nameTextView.setLayoutParams(layoutParams);
|
||||
|
||||
layoutParams = (FrameLayout.LayoutParams) subtitleTextView.getLayoutParams();
|
||||
layoutParams.rightMargin = (int) Math.ceil(subtitleTextView.getTranslationX() + AndroidUtilities.dp(8) + AndroidUtilities.dp(40) * (1.0f - diff));
|
||||
subtitleTextView.setLayoutParams(layoutParams);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -875,173 +750,17 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
fixLayout();
|
||||
}
|
||||
|
||||
public void setPlayProfileAnimation(boolean value) {
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
|
||||
if (!AndroidUtilities.isTablet() && preferences.getBoolean("view_animations2", true)) {
|
||||
playProfileAnimation = value;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onTransitionAnimationStart(boolean isOpen, boolean backward) {
|
||||
if (!backward && playProfileAnimation && allowProfileAnimation) {
|
||||
openAnimationInProgress = true;
|
||||
}
|
||||
NotificationCenter.getInstance().setAllowedNotificationsDutingAnimation(new int[]{NotificationCenter.dialogsNeedReload, NotificationCenter.closeChats});
|
||||
NotificationCenter.getInstance().setAnimationInProgress(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onTransitionAnimationEnd(boolean isOpen, boolean backward) {
|
||||
if (!backward && playProfileAnimation && allowProfileAnimation) {
|
||||
openAnimationInProgress = false;
|
||||
}
|
||||
NotificationCenter.getInstance().setAnimationInProgress(false);
|
||||
}
|
||||
|
||||
public void setAnimationProgress(float progress) {
|
||||
//animationProgress = progress;
|
||||
listView.setAlpha(progress);
|
||||
|
||||
listView.setTranslationX(AndroidUtilities.dp(48) - AndroidUtilities.dp(48) * progress);
|
||||
int color = Theme.ACTION_BAR_COLOR;
|
||||
|
||||
int r = Color.red(Theme.ACTION_BAR_COLOR);
|
||||
int g = Color.green(Theme.ACTION_BAR_COLOR);
|
||||
int b = Color.blue(Theme.ACTION_BAR_COLOR);
|
||||
|
||||
int rD = (int) ((Color.red(color) - r) * progress);
|
||||
int gD = (int) ((Color.green(color) - g) * progress);
|
||||
int bD = (int) ((Color.blue(color) - b) * progress);
|
||||
topView.setBackgroundColor(Color.rgb(r + rD, g + gD, b + bD));
|
||||
color = Theme.ACTION_BAR_SUBTITLE_COLOR;
|
||||
|
||||
r = Color.red(Theme.ACTION_BAR_SUBTITLE_COLOR);
|
||||
g = Color.green(Theme.ACTION_BAR_SUBTITLE_COLOR);
|
||||
b = Color.blue(Theme.ACTION_BAR_SUBTITLE_COLOR);
|
||||
|
||||
rD = (int) ((Color.red(color) - r) * progress);
|
||||
gD = (int) ((Color.green(color) - g) * progress);
|
||||
bD = (int) ((Color.blue(color) - b) * progress);
|
||||
for (int a = 0; a < 2; a++) {
|
||||
if (onlineTextView[a] == null) {
|
||||
continue;
|
||||
}
|
||||
onlineTextView[a].setTextColor(Color.rgb(r + rD, g + gD, b + bD));
|
||||
}
|
||||
extraHeight = (int) (initialAnimationExtraHeight * progress);
|
||||
color = AvatarDrawable.getColorForId(user_id != 0 ? user_id : chat_id);
|
||||
int color2 = AvatarDrawable.getColorForId(user_id != 0 ? user_id : chat_id);
|
||||
if (color != color2) {
|
||||
rD = (int) ((Color.red(color) - Color.red(color2)) * progress);
|
||||
gD = (int) ((Color.green(color) - Color.green(color2)) * progress);
|
||||
bD = (int) ((Color.blue(color) - Color.blue(color2)) * progress);
|
||||
avatarDrawable.setColor_(Color.rgb(Color.red(color2) + rD, Color.green(color2) + gD, Color.blue(color2) + bD));
|
||||
avatarImage.invalidate();
|
||||
}
|
||||
|
||||
needLayout();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AnimatorSet onCustomTransitionAnimation(final boolean isOpen, final Runnable callback) {
|
||||
if (playProfileAnimation && allowProfileAnimation) {
|
||||
final AnimatorSet animatorSet = new AnimatorSet();
|
||||
animatorSet.setDuration(180);
|
||||
if (Build.VERSION.SDK_INT > 15) {
|
||||
listView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
||||
}
|
||||
ActionBarMenu menu = actionBar.createMenu();
|
||||
if (menu.getItem(10) == null) {
|
||||
if (animatingItem == null) {
|
||||
animatingItem = menu.addItem(10, R.drawable.ic_ab_other);
|
||||
}
|
||||
}
|
||||
if (isOpen) {
|
||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) onlineTextView[1].getLayoutParams();
|
||||
layoutParams.rightMargin = (int) (-21 * AndroidUtilities.density + AndroidUtilities.dp(8));
|
||||
onlineTextView[1].setLayoutParams(layoutParams);
|
||||
|
||||
int width = (int) Math.ceil(AndroidUtilities.displaySize.x - AndroidUtilities.dp(118 + 8) + 21 * AndroidUtilities.density);
|
||||
float width2 = nameTextView[1].getPaint().measureText(nameTextView[1].getText().toString()) * 1.12f + nameTextView[1].getSideDrawablesSize();
|
||||
layoutParams = (FrameLayout.LayoutParams) nameTextView[1].getLayoutParams();
|
||||
if (width < width2) {
|
||||
layoutParams.width = (int) Math.ceil(width / 1.12f);
|
||||
} else {
|
||||
layoutParams.width = LayoutHelper.WRAP_CONTENT;
|
||||
}
|
||||
nameTextView[1].setLayoutParams(layoutParams);
|
||||
|
||||
initialAnimationExtraHeight = AndroidUtilities.dp(88);
|
||||
fragmentView.setBackgroundColor(0);
|
||||
setAnimationProgress(0);
|
||||
ArrayList<Animator> animators = new ArrayList<>();
|
||||
animators.add(ObjectAnimator.ofFloat(this, "animationProgress", 0.0f, 1.0f));
|
||||
if (writeButton != null) {
|
||||
writeButton.setScaleX(0.2f);
|
||||
writeButton.setScaleY(0.2f);
|
||||
writeButton.setAlpha(0.0f);
|
||||
animators.add(ObjectAnimator.ofFloat(writeButton, "scaleX", 1.0f));
|
||||
animators.add(ObjectAnimator.ofFloat(writeButton, "scaleY", 1.0f));
|
||||
animators.add(ObjectAnimator.ofFloat(writeButton, "alpha", 1.0f));
|
||||
}
|
||||
for (int a = 0; a < 2; a++) {
|
||||
onlineTextView[a].setAlpha(a == 0 ? 1.0f : 0.0f);
|
||||
nameTextView[a].setAlpha(a == 0 ? 1.0f : 0.0f);
|
||||
animators.add(ObjectAnimator.ofFloat(onlineTextView[a], "alpha", a == 0 ? 0.0f : 1.0f));
|
||||
animators.add(ObjectAnimator.ofFloat(nameTextView[a], "alpha", a == 0 ? 0.0f : 1.0f));
|
||||
}
|
||||
if (animatingItem != null) {
|
||||
animatingItem.setAlpha(1.0f);
|
||||
animators.add(ObjectAnimator.ofFloat(animatingItem, "alpha", 0.0f));
|
||||
}
|
||||
animatorSet.playTogether(animators);
|
||||
} else {
|
||||
initialAnimationExtraHeight = extraHeight;
|
||||
ArrayList<Animator> animators = new ArrayList<>();
|
||||
animators.add(ObjectAnimator.ofFloat(this, "animationProgress", 1.0f, 0.0f));
|
||||
if (writeButton != null) {
|
||||
animators.add(ObjectAnimator.ofFloat(writeButton, "scaleX", 0.2f));
|
||||
animators.add(ObjectAnimator.ofFloat(writeButton, "scaleY", 0.2f));
|
||||
animators.add(ObjectAnimator.ofFloat(writeButton, "alpha", 0.0f));
|
||||
}
|
||||
for (int a = 0; a < 2; a++) {
|
||||
animators.add(ObjectAnimator.ofFloat(onlineTextView[a], "alpha", a == 0 ? 1.0f : 0.0f));
|
||||
animators.add(ObjectAnimator.ofFloat(nameTextView[a], "alpha", a == 0 ? 1.0f : 0.0f));
|
||||
}
|
||||
if (animatingItem != null) {
|
||||
animatingItem.setAlpha(0.0f);
|
||||
animators.add(ObjectAnimator.ofFloat(animatingItem, "alpha", 1.0f));
|
||||
}
|
||||
animatorSet.playTogether(animators);
|
||||
}
|
||||
animatorSet.addListener(new AnimatorListenerAdapterProxy() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
if (Build.VERSION.SDK_INT > 15) {
|
||||
listView.setLayerType(View.LAYER_TYPE_NONE, null);
|
||||
}
|
||||
if (animatingItem != null) {
|
||||
ActionBarMenu menu = actionBar.createMenu();
|
||||
menu.clearItems();
|
||||
animatingItem = null;
|
||||
}
|
||||
callback.run();
|
||||
}
|
||||
});
|
||||
animatorSet.setInterpolator(new DecelerateInterpolator());
|
||||
|
||||
AndroidUtilities.runOnUIThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
animatorSet.start();
|
||||
}
|
||||
}, 50);
|
||||
return animatorSet;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePhotoAtIndex(int index) {
|
||||
|
||||
@@ -1180,6 +899,9 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
mrContact = MrMailbox.getContact(user_id);
|
||||
newString = mrContact.getDisplayName();
|
||||
newString2 = mrContact.getAddr();
|
||||
/*if( !newString.equals(mrContact.getAuthName()) ) { -- not sure if it is really useful to display the auth-name here
|
||||
newString += " (" + mrContact.getAuthName() + ")";
|
||||
}*/
|
||||
}
|
||||
else {
|
||||
mrChat = MrMailbox.getChat(chat_id);
|
||||
@@ -1187,16 +909,11 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
newString2 = mrChat.getSubtitle();
|
||||
}
|
||||
|
||||
for (int a = 0; a < 2; a++) {
|
||||
if (nameTextView[a] == null) {
|
||||
continue;
|
||||
}
|
||||
if (!nameTextView[a].getText().equals(newString)) {
|
||||
nameTextView[a].setText(newString);
|
||||
}
|
||||
if (!onlineTextView[a].getText().equals(newString2)) {
|
||||
onlineTextView[a].setText(newString2);
|
||||
}
|
||||
if (!nameTextView.getText().equals(newString)) {
|
||||
nameTextView.setText(newString);
|
||||
}
|
||||
if (!subtitleTextView.getText().equals(newString2)) {
|
||||
subtitleTextView.setText(newString2);
|
||||
}
|
||||
|
||||
ContactsController.setupAvatar(avatarImage, avatarImage.imageReceiver, avatarDrawable, mrContact, mrChat);
|
||||
@@ -1205,7 +922,6 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
private void createActionBarMenu() {
|
||||
ActionBarMenu menu = actionBar.createMenu();
|
||||
menu.clearItems();
|
||||
animatingItem = null;
|
||||
|
||||
ActionBarMenuItem item = menu.addItem(10, R.drawable.ic_ab_other);
|
||||
|
||||
@@ -1215,7 +931,6 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
|
||||
if (user_id != 0) {
|
||||
item.addSubItem(ID_COPY_EMAIL_TO_CLIPBOARD, ApplicationLoader.applicationContext.getString(R.string.CopyToClipboard), 0);
|
||||
//item.addSubItem(ID_STOP_ENCRYPTION_FOR_THIS_USER, ApplicationLoader.applicationContext.getString(R.string.ResetContactsKey), 0); -- not needed by Autocrypt (?)
|
||||
item.addSubItem(ID_BLOCK_CONTACT, userBlocked()? ApplicationLoader.applicationContext.getString(R.string.UnblockContact) : ApplicationLoader.applicationContext.getString(R.string.BlockContact), 0);
|
||||
item.addSubItem(ID_DELETE_CONTACT, ApplicationLoader.applicationContext.getString(R.string.DeleteContact), 0);
|
||||
}
|
||||
@@ -1251,23 +966,6 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
case typeEmpty:
|
||||
view = new EmptyCell(mContext);
|
||||
break;
|
||||
case typeDivider:
|
||||
view = new DividerCell(mContext);
|
||||
view.setPadding(AndroidUtilities.dp(72), 0, 0, 0);
|
||||
break;
|
||||
case typeTextDetailCell:
|
||||
view = new TextDetailCell(mContext) {
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if (Build.VERSION.SDK_INT >= 21 && getBackground() != null) {
|
||||
if (event.getAction() == MotionEvent.ACTION_DOWN || event.getAction() == MotionEvent.ACTION_MOVE) {
|
||||
getBackground().setHotspot(event.getX(), event.getY());
|
||||
}
|
||||
}
|
||||
return super.onTouchEvent(event);
|
||||
}
|
||||
};
|
||||
break;
|
||||
case typeTextCell:
|
||||
view = new TextCell(mContext) {
|
||||
@Override
|
||||
@@ -1310,12 +1008,9 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
if (i == emptyRowChat || i == emptyRowChat2) {
|
||||
((EmptyCell) holder.itemView).setHeight(AndroidUtilities.dp(8));
|
||||
} else {
|
||||
((EmptyCell) holder.itemView).setHeight(AndroidUtilities.dp(14)); // was 36 when we used the "writeButton" for taking photos etc.
|
||||
((EmptyCell) holder.itemView).setHeight(AndroidUtilities.dp(14));
|
||||
}
|
||||
break;
|
||||
case typeTextDetailCell:
|
||||
TextDetailCell textDetailCell = (TextDetailCell) holder.itemView;
|
||||
break;
|
||||
case typeTextCell:
|
||||
TextCell textCell = (TextCell) holder.itemView;
|
||||
textCell.setTextColor(0xff212121);
|
||||
@@ -1379,8 +1074,6 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
public int getItemViewType(int i) {
|
||||
if (i == emptyRow || i == emptyRowChat || i == emptyRowChat2) {
|
||||
return typeEmpty;
|
||||
} else if (i == sectionRow || i == userSectionRow) {
|
||||
return typeDivider;
|
||||
} else if ( i == changeNameRow || i==compareKeysRow || i==startChatRow || i == settingsNotificationsRow || i == addMemberRow) {
|
||||
return typeTextCell;
|
||||
} else if (i >= firstMemberRow && i <= lastMemberRow) {
|
||||
|
||||
@@ -391,10 +391,6 @@ public class SettingsAccountActivity extends BaseFragment implements Notificatio
|
||||
if( (int)args[0]==1 ) {
|
||||
if (fromIntro) {
|
||||
presentFragment(new DialogsActivity(null), true);
|
||||
LaunchActivity la = ((LaunchActivity) getParentActivity());
|
||||
if (la != null) {
|
||||
la.drawerLayoutContainer.setAllowOpenDrawer(true, false);
|
||||
}
|
||||
} else {
|
||||
finishFragment();
|
||||
}
|
||||
@@ -417,6 +413,7 @@ public class SettingsAccountActivity extends BaseFragment implements Notificatio
|
||||
|
||||
@Override
|
||||
public void onTransitionAnimationEnd(boolean isOpen, boolean backward) {
|
||||
// if the address is empty, automatically show the keyboard
|
||||
if (isOpen && addrCell!=null) {
|
||||
if(addrCell.getValue().isEmpty()) {
|
||||
addrCell.getEditTextView().requestFocus();
|
||||
|
||||
@@ -26,18 +26,13 @@
|
||||
|
||||
package com.b44t.ui;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.b44t.messenger.ApplicationLoader;
|
||||
import com.b44t.messenger.MrMailbox;
|
||||
@@ -46,24 +41,22 @@ import com.b44t.messenger.UserConfig;
|
||||
import com.b44t.messenger.browser.Browser;
|
||||
import com.b44t.ui.ActionBar.ActionBar;
|
||||
import com.b44t.ui.ActionBar.BaseFragment;
|
||||
import com.b44t.ui.ActionBar.DrawerLayoutContainer;
|
||||
import com.b44t.ui.Adapters.BaseFragmentAdapter;
|
||||
import com.b44t.ui.Cells.DrawerProfileCell;
|
||||
import com.b44t.ui.Cells.SettingsProfileCell;
|
||||
import com.b44t.ui.Cells.HeaderCell;
|
||||
import com.b44t.ui.Cells.ShadowSectionCell;
|
||||
import com.b44t.ui.Cells.TextCheckCell;
|
||||
import com.b44t.ui.Cells.TextDetailSettingsCell;
|
||||
import com.b44t.ui.Cells.TextSettingsCell;
|
||||
import com.b44t.ui.Components.LayoutHelper;
|
||||
import com.b44t.ui.Components.NumberPicker;
|
||||
|
||||
|
||||
public class SettingsActivity extends BaseFragment {
|
||||
|
||||
// the list
|
||||
private int profileRow, accountHeaderRow, usernameRow, accountShadowRow;
|
||||
private int settingsHeaderRow, notificationRow, backgroundRow, textSizeRow, advRow, settingsShadowRow;
|
||||
private int readReceiptsRow, blockedRow, passcodeRow;
|
||||
private int profileRow, nameAndStatusRow;
|
||||
private int notificationRow, backgroundRow, advRow, settingsShadowRow;
|
||||
private int readReceiptsRow, passcodeRow;
|
||||
private int aboutHeaderRow, aboutRow, inviteRow, helpRow, aboutShadowRow;
|
||||
private int rowCount;
|
||||
|
||||
@@ -86,50 +79,19 @@ public class SettingsActivity extends BaseFragment {
|
||||
|
||||
rowCount = 0;
|
||||
|
||||
if (DrawerLayoutContainer.USE_DRAWER) {
|
||||
profileRow = -1;
|
||||
accountHeaderRow = rowCount++;
|
||||
} else {
|
||||
profileRow = rowCount++;
|
||||
accountHeaderRow = -1;
|
||||
}
|
||||
|
||||
usernameRow = rowCount++;
|
||||
if (DrawerLayoutContainer.USE_DRAWER) {
|
||||
accountShadowRow = rowCount++;
|
||||
settingsHeaderRow = rowCount++;
|
||||
}
|
||||
else {
|
||||
accountShadowRow = -1;
|
||||
settingsHeaderRow = -1;
|
||||
}
|
||||
|
||||
if (DrawerLayoutContainer.USE_DRAWER) {
|
||||
notificationRow = rowCount++;
|
||||
backgroundRow = rowCount++;
|
||||
textSizeRow = rowCount++;
|
||||
}
|
||||
else {
|
||||
notificationRow = rowCount++;
|
||||
backgroundRow = rowCount++;
|
||||
textSizeRow = rowCount++;
|
||||
}
|
||||
passcodeRow = rowCount++;
|
||||
blockedRow = rowCount++;
|
||||
readReceiptsRow = rowCount++;
|
||||
advRow = rowCount++;
|
||||
profileRow = rowCount++;
|
||||
nameAndStatusRow = rowCount++;
|
||||
notificationRow = rowCount++;
|
||||
backgroundRow = rowCount++;
|
||||
passcodeRow = rowCount++;
|
||||
readReceiptsRow = rowCount++;
|
||||
advRow = rowCount++;
|
||||
settingsShadowRow = rowCount++;
|
||||
|
||||
aboutHeaderRow = rowCount++;
|
||||
aboutRow = rowCount++;
|
||||
if( DrawerLayoutContainer.USE_DRAWER ) {
|
||||
inviteRow = -1;
|
||||
helpRow = -1;
|
||||
}
|
||||
else {
|
||||
inviteRow = rowCount++;
|
||||
helpRow = rowCount++;
|
||||
}
|
||||
inviteRow = rowCount++;
|
||||
helpRow = rowCount++;
|
||||
aboutShadowRow = rowCount++;
|
||||
|
||||
return true;
|
||||
@@ -170,12 +132,9 @@ public class SettingsActivity extends BaseFragment {
|
||||
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(final AdapterView<?> adapterView, View view, final int i, long l) {
|
||||
if (i == usernameRow) {
|
||||
if (i == nameAndStatusRow) {
|
||||
presentFragment(new SettingsNameActivity());
|
||||
}
|
||||
else if (i == blockedRow) {
|
||||
presentFragment(new BlockedUsersActivity());
|
||||
}
|
||||
else if (i == passcodeRow) {
|
||||
if (UserConfig.passcodeHash.length() > 0) {
|
||||
presentFragment(new PasscodeActivity(PasscodeActivity.SCREEN2_ENTER_CODE2));
|
||||
@@ -202,45 +161,6 @@ public class SettingsActivity extends BaseFragment {
|
||||
else if (i == backgroundRow) {
|
||||
presentFragment(new WallpapersActivity());
|
||||
}
|
||||
if (i == textSizeRow) {
|
||||
if (getParentActivity() == null) {
|
||||
return;
|
||||
}
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
|
||||
builder.setTitle(ApplicationLoader.applicationContext.getString(R.string.TextSize));
|
||||
final NumberPicker numberPicker = new NumberPicker(getParentActivity());
|
||||
final int MIN_VAL = 12;
|
||||
final int MAX_VAL = 30;
|
||||
final int DEF_VAL = SettingsAdvActivity.defMsgFontSize();
|
||||
String displayValues[] = new String[MAX_VAL-MIN_VAL+1];
|
||||
for( int v = MIN_VAL; v <= MAX_VAL; v++ ) {
|
||||
String cur = String.format("%d", v);
|
||||
if( v==DEF_VAL ) {
|
||||
cur += " (" +ApplicationLoader.applicationContext.getString(R.string.Default)+ ")";
|
||||
}
|
||||
displayValues[v-MIN_VAL] = cur;
|
||||
}
|
||||
numberPicker.setMinValue(MIN_VAL);
|
||||
numberPicker.setMaxValue(MAX_VAL);
|
||||
numberPicker.setDisplayedValues(displayValues);
|
||||
numberPicker.setWrapSelectorWheel(false);
|
||||
numberPicker.setValue(ApplicationLoader.fontSize);
|
||||
builder.setView(numberPicker);
|
||||
builder.setPositiveButton(ApplicationLoader.applicationContext.getString(R.string.OK), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
editor.putInt("msg_font_size", numberPicker.getValue());
|
||||
ApplicationLoader.fontSize = numberPicker.getValue();
|
||||
editor.apply();
|
||||
if (listView != null) {
|
||||
listView.invalidateViews();
|
||||
}
|
||||
}
|
||||
});
|
||||
showDialog(builder.create());
|
||||
}
|
||||
else if (i == advRow) {
|
||||
presentFragment(new SettingsAdvActivity());
|
||||
}
|
||||
@@ -283,8 +203,8 @@ public class SettingsActivity extends BaseFragment {
|
||||
|
||||
@Override
|
||||
public boolean isEnabled(int i) {
|
||||
return i == textSizeRow || i == usernameRow ||
|
||||
i == blockedRow || i==passcodeRow || i==readReceiptsRow || i == notificationRow || i == backgroundRow || i == advRow ||
|
||||
return i == nameAndStatusRow ||
|
||||
i==passcodeRow || i==readReceiptsRow || i == notificationRow || i == backgroundRow || i == advRow ||
|
||||
i == aboutRow || i == inviteRow || i == helpRow;
|
||||
}
|
||||
|
||||
@@ -313,9 +233,9 @@ public class SettingsActivity extends BaseFragment {
|
||||
int type = getItemViewType(i);
|
||||
if( type == ROWTYPE_PROFILE ) {
|
||||
if (view == null) {
|
||||
view = new DrawerProfileCell(mContext);
|
||||
view = new SettingsProfileCell(mContext);
|
||||
}
|
||||
((DrawerProfileCell) view).updateUserName();
|
||||
((SettingsProfileCell) view).updateUserName();
|
||||
}
|
||||
else if (type == ROWTYPE_SHADOW) {
|
||||
if (view == null) {
|
||||
@@ -329,11 +249,7 @@ public class SettingsActivity extends BaseFragment {
|
||||
view.setBackgroundColor(0xffffffff);
|
||||
}
|
||||
TextSettingsCell textCell = (TextSettingsCell) view;
|
||||
if (i == blockedRow) {
|
||||
String cntStr = String.format("%d", MrMailbox.getBlockedCount());
|
||||
textCell.setTextAndValue(ApplicationLoader.applicationContext.getString(R.string.BlockedContacts), cntStr, true);
|
||||
}
|
||||
else if (i == passcodeRow) {
|
||||
if (i == passcodeRow) {
|
||||
String val = UserConfig.passcodeHash.length() > 0? mContext.getString(R.string.Enabled) : mContext.getString(R.string.Disabled);
|
||||
textCell.setTextAndValue(mContext.getString(R.string.Passcode), val, true);
|
||||
}
|
||||
@@ -348,11 +264,6 @@ public class SettingsActivity extends BaseFragment {
|
||||
else if (i == backgroundRow) {
|
||||
textCell.setText(mContext.getString(R.string.ChatBackground), true);
|
||||
}
|
||||
else if (i == textSizeRow) {
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
|
||||
int size = preferences.getInt("msg_font_size", SettingsAdvActivity.defMsgFontSize());
|
||||
textCell.setTextAndValue(mContext.getString(R.string.TextSize), String.format("%d", size), true);
|
||||
}
|
||||
else if (i == advRow) {
|
||||
textCell.setText(mContext.getString(R.string.AdvancedSettings), false);
|
||||
}
|
||||
@@ -362,12 +273,8 @@ public class SettingsActivity extends BaseFragment {
|
||||
else if(i == helpRow) {
|
||||
textCell.setText(mContext.getString(R.string.Help), false);
|
||||
}
|
||||
else if (i == usernameRow) {
|
||||
String value = MrMailbox.getConfig("displayname", "");
|
||||
if( value.isEmpty()) {
|
||||
value = mContext.getString(R.string.NotSet);
|
||||
}
|
||||
textCell.setTextAndValue(mContext.getString(R.string.MyName), value, true);
|
||||
else if (i == nameAndStatusRow) {
|
||||
textCell.setText(mContext.getString(R.string.NameAndStatus), true);
|
||||
}
|
||||
}
|
||||
else if (type == ROWTYPE_HEADER) {
|
||||
@@ -375,15 +282,9 @@ public class SettingsActivity extends BaseFragment {
|
||||
view = new HeaderCell(mContext);
|
||||
view.setBackgroundColor(0xffffffff);
|
||||
}
|
||||
if (i == settingsHeaderRow) {
|
||||
((HeaderCell) view).setText(mContext.getString(R.string.Settings));
|
||||
}
|
||||
else if (i == aboutHeaderRow) {
|
||||
if (i == aboutHeaderRow) {
|
||||
((HeaderCell) view).setText(mContext.getString(R.string.Info));
|
||||
}
|
||||
else if (i == accountHeaderRow) {
|
||||
((HeaderCell) view).setText(mContext.getString(R.string.MyAccount));
|
||||
}
|
||||
}
|
||||
else if (type == ROWTYPE_DETAIL_SETTINGS) {
|
||||
if (view == null) {
|
||||
@@ -391,14 +292,7 @@ public class SettingsActivity extends BaseFragment {
|
||||
view.setBackgroundColor(0xffffffff);
|
||||
}
|
||||
TextDetailSettingsCell textCell = (TextDetailSettingsCell) view;
|
||||
if (i == usernameRow) {
|
||||
String subtitle = MrMailbox.getConfig("displayname", "");
|
||||
if( subtitle.isEmpty()) {
|
||||
subtitle = mContext.getString(R.string.NotSet);
|
||||
}
|
||||
textCell.setTextAndValue(mContext.getString(R.string.MyName), subtitle, true);
|
||||
}
|
||||
else if (i == aboutRow) {
|
||||
if (i == aboutRow) {
|
||||
textCell.setTextAndValue(mContext.getString(R.string.AboutThisProgram), "v" + IntroActivity.getVersion(), true);
|
||||
}
|
||||
}
|
||||
@@ -421,13 +315,13 @@ public class SettingsActivity extends BaseFragment {
|
||||
if( i == profileRow ) {
|
||||
return ROWTYPE_PROFILE;
|
||||
}
|
||||
else if (i == accountShadowRow || i == settingsShadowRow || i == aboutShadowRow ) {
|
||||
else if ( i == settingsShadowRow || i == aboutShadowRow ) {
|
||||
return ROWTYPE_SHADOW;
|
||||
}
|
||||
else if ( (DrawerLayoutContainer.USE_DRAWER && (i==usernameRow)) || i==aboutRow ) {
|
||||
else if ( i==aboutRow ) {
|
||||
return ROWTYPE_DETAIL_SETTINGS;
|
||||
}
|
||||
else if (i == settingsHeaderRow || i == aboutHeaderRow || i == accountHeaderRow) {
|
||||
else if (i == aboutHeaderRow) {
|
||||
return ROWTYPE_HEADER;
|
||||
}
|
||||
else if( i==readReceiptsRow ) {
|
||||
|
||||
@@ -53,6 +53,7 @@ import com.b44t.ui.Cells.TextSettingsCell;
|
||||
import com.b44t.ui.ActionBar.ActionBar;
|
||||
import com.b44t.ui.ActionBar.BaseFragment;
|
||||
import com.b44t.ui.Components.LayoutHelper;
|
||||
import com.b44t.ui.Components.NumberPicker;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -60,7 +61,8 @@ import java.io.File;
|
||||
public class SettingsAdvActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate {
|
||||
|
||||
// the list
|
||||
private int directShareRow, cacheRow, raiseToSpeakRow, sendByEnterRow, autoplayGifsRow, showUnknownSendersRow, finalShadowRow;
|
||||
private int directShareRow, cacheRow, raiseToSpeakRow, sendByEnterRow, autoplayGifsRow, textSizeRow, showUnknownSendersRow, finalShadowRow;
|
||||
private int blockedRow;
|
||||
private int accountSettingsRow;
|
||||
private int e2eEncryptionRow;
|
||||
private int manageKeysRow;
|
||||
@@ -77,7 +79,7 @@ public class SettingsAdvActivity extends BaseFragment implements NotificationCen
|
||||
public final int MR_E2EE_DEFAULT_ENABLED = 1; // when changing this constant, also change it in the C-part
|
||||
|
||||
public static int defMsgFontSize() {
|
||||
return AndroidUtilities.isTablet() ? 18 : 16;
|
||||
return 16;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -95,15 +97,17 @@ public class SettingsAdvActivity extends BaseFragment implements NotificationCen
|
||||
else {
|
||||
directShareRow = -1;
|
||||
}
|
||||
autoplayGifsRow = rowCount++;
|
||||
autoplayGifsRow = rowCount++;
|
||||
textSizeRow = rowCount++; // for now, we have the font size in the advanced settings; this is because the numberical selection is a little bit weird and does only affect the message text. It would be better to use the font size defined by the system with "sp" (Scale-independent Pixels which included the user's font size preference)
|
||||
showUnknownSendersRow = rowCount++;
|
||||
sendByEnterRow = rowCount++;
|
||||
raiseToSpeakRow = rowCount++; // outgoing message
|
||||
cacheRow = -1;// for now, the - non-functional - page is reachable by the "storage settings" in the "android App Settings" only
|
||||
sendByEnterRow = rowCount++;
|
||||
raiseToSpeakRow = rowCount++; // outgoing message
|
||||
cacheRow = -1;// for now, the - non-functional - page is reachable by the "storage settings" in the "android App Settings" only
|
||||
blockedRow = rowCount++;
|
||||
e2eEncryptionRow = rowCount++;
|
||||
manageKeysRow = rowCount++;
|
||||
backupRow = -1; //rowCount++; -- disabled for now
|
||||
finalShadowRow = rowCount++;
|
||||
backupRow = -1; //rowCount++; -- disabled for now
|
||||
finalShadowRow = rowCount++;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -175,6 +179,9 @@ public class SettingsAdvActivity extends BaseFragment implements NotificationCen
|
||||
} else if (i == cacheRow) {
|
||||
presentFragment(new CacheControlActivity());
|
||||
}
|
||||
else if (i == blockedRow) {
|
||||
presentFragment(new BlockedUsersActivity());
|
||||
}
|
||||
else if( i==showUnknownSendersRow) {
|
||||
int oldval = MrMailbox.getConfigInt("show_deaddrop", 0);
|
||||
if( oldval == 1 ) {
|
||||
@@ -219,6 +226,45 @@ public class SettingsAdvActivity extends BaseFragment implements NotificationCen
|
||||
{
|
||||
imexShowMenu(ApplicationLoader.applicationContext.getString(R.string.Backup), MrMailbox.MR_IMEX_EXPORT_BACKUP, 0);
|
||||
}
|
||||
else if (i == textSizeRow) {
|
||||
if (getParentActivity() == null) {
|
||||
return;
|
||||
}
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
|
||||
builder.setTitle(ApplicationLoader.applicationContext.getString(R.string.TextSize));
|
||||
final NumberPicker numberPicker = new NumberPicker(getParentActivity());
|
||||
final int MIN_VAL = 12;
|
||||
final int MAX_VAL = 30;
|
||||
final int DEF_VAL = SettingsAdvActivity.defMsgFontSize();
|
||||
String displayValues[] = new String[MAX_VAL-MIN_VAL+1];
|
||||
for( int v = MIN_VAL; v <= MAX_VAL; v++ ) {
|
||||
String cur = String.format("%d", v);
|
||||
if( v==DEF_VAL ) {
|
||||
cur += " (" +ApplicationLoader.applicationContext.getString(R.string.Default)+ ")";
|
||||
}
|
||||
displayValues[v-MIN_VAL] = cur;
|
||||
}
|
||||
numberPicker.setMinValue(MIN_VAL);
|
||||
numberPicker.setMaxValue(MAX_VAL);
|
||||
numberPicker.setDisplayedValues(displayValues);
|
||||
numberPicker.setWrapSelectorWheel(false);
|
||||
numberPicker.setValue(ApplicationLoader.fontSize);
|
||||
builder.setView(numberPicker);
|
||||
builder.setPositiveButton(ApplicationLoader.applicationContext.getString(R.string.OK), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
editor.putInt("msg_font_size", numberPicker.getValue());
|
||||
ApplicationLoader.fontSize = numberPicker.getValue();
|
||||
editor.apply();
|
||||
if (listView != null) {
|
||||
listView.invalidateViews();
|
||||
}
|
||||
}
|
||||
});
|
||||
showDialog(builder.create());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -403,6 +449,10 @@ public class SettingsAdvActivity extends BaseFragment implements NotificationCen
|
||||
if (i == cacheRow) {
|
||||
textCell.setText(mContext.getString(R.string.CacheSettings), true);
|
||||
}
|
||||
else if (i == blockedRow) {
|
||||
String cntStr = String.format("%d", MrMailbox.getBlockedCount());
|
||||
textCell.setTextAndValue(ApplicationLoader.applicationContext.getString(R.string.BlockedContacts), cntStr, true);
|
||||
}
|
||||
else if( i==manageKeysRow ) {
|
||||
textCell.setText(mContext.getString(R.string.E2EManagePrivateKeys), true);
|
||||
}
|
||||
@@ -412,6 +462,11 @@ public class SettingsAdvActivity extends BaseFragment implements NotificationCen
|
||||
else if( i == accountSettingsRow ) {
|
||||
textCell.setText(mContext.getString(R.string.AccountSettings), true);
|
||||
}
|
||||
else if (i == textSizeRow) {
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
|
||||
int size = preferences.getInt("msg_font_size", SettingsAdvActivity.defMsgFontSize());
|
||||
textCell.setTextAndValue(mContext.getString(R.string.TextSize), String.format("%d", size), true);
|
||||
}
|
||||
} else if (type == ROWTYPE_CHECK) {
|
||||
if (view == null) {
|
||||
view = new TextCheckCell(mContext);
|
||||
|
||||
@@ -56,16 +56,16 @@ public class SettingsNameActivity extends BaseFragment {
|
||||
// the list
|
||||
private ListAdapter listAdapter;
|
||||
|
||||
private int rowNameTitle;
|
||||
private int rowDisplayname;
|
||||
private int rowDisplaynameInfo;
|
||||
private int rowDisplaynameHeadline, rowDisplayname, rowDisplaynameInfo;
|
||||
private int rowStatusHeadline, rowStatus, rowStatusInfo;
|
||||
private int rowCount;
|
||||
|
||||
private final int typeInfo = 0; // no gaps here!
|
||||
private final int typeTextEntry = 1;
|
||||
private final int typeSection = 2;
|
||||
private final int ROWTYPE_INFO = 0; // no gaps here!
|
||||
private final int ROWTYPE_TEXT_ENTRY = 1;
|
||||
private final int ROWTYPE_HEADLINE = 2;
|
||||
|
||||
EditTextCell displaynameCell; // warning all these objects may be null!
|
||||
private EditTextCell displaynameCell; // warning all these objects may be null!
|
||||
private EditTextCell statusCell;
|
||||
|
||||
// misc.
|
||||
private final static int done_button = 1;
|
||||
@@ -75,9 +75,14 @@ public class SettingsNameActivity extends BaseFragment {
|
||||
super.onFragmentCreate();
|
||||
|
||||
rowCount = 0;
|
||||
rowNameTitle = -1; // rowCount++;
|
||||
rowDisplayname = rowCount++;
|
||||
rowDisplaynameInfo = rowCount++;
|
||||
|
||||
rowDisplaynameHeadline = rowCount++;
|
||||
rowDisplayname = rowCount++;
|
||||
rowDisplaynameInfo = rowCount++;
|
||||
|
||||
rowStatusHeadline = rowCount++;
|
||||
rowStatus = rowCount++;
|
||||
rowStatusInfo = rowCount++;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -93,7 +98,7 @@ public class SettingsNameActivity extends BaseFragment {
|
||||
// create action bar
|
||||
actionBar.setBackButtonImage(R.drawable.ic_close_white);
|
||||
actionBar.setAllowOverlayTitle(true);
|
||||
actionBar.setTitle(context.getString(R.string.MyName));
|
||||
actionBar.setTitle(context.getString(R.string.NameAndStatus));
|
||||
actionBar.setActionBarMenuOnItemClick(new ActionBar.ActionBarMenuOnItemClick() {
|
||||
@Override
|
||||
public void onItemClick(int id) {
|
||||
@@ -155,21 +160,22 @@ public class SettingsNameActivity extends BaseFragment {
|
||||
MrMailbox.setConfig("displayname", v.isEmpty() ? null : v);
|
||||
}
|
||||
|
||||
if( statusCell != null ) {
|
||||
String newstatus = statusCell.getValue().trim();
|
||||
String defstatus = ApplicationLoader.applicationContext.getString(R.string.DefaultStatusText);
|
||||
if( newstatus.equals(defstatus)) {
|
||||
MrMailbox.setConfig("selfstatus", null); // use default status
|
||||
}
|
||||
else {
|
||||
MrMailbox.setConfig("selfstatus", newstatus); // if v is empty, no status is send
|
||||
}
|
||||
}
|
||||
|
||||
NotificationCenter.getInstance().postNotificationName(NotificationCenter.mainUserInfoChanged);
|
||||
|
||||
finishFragment();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTransitionAnimationEnd(boolean isOpen, boolean backward) {
|
||||
if (isOpen && displaynameCell!=null) {
|
||||
if(displaynameCell.getValue().isEmpty()) {
|
||||
displaynameCell.getEditTextView().requestFocus();
|
||||
AndroidUtilities.showKeyboard(displaynameCell.getEditTextView());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class ListAdapter extends BaseFragmentAdapter {
|
||||
private Context mContext;
|
||||
|
||||
@@ -184,7 +190,7 @@ public class SettingsNameActivity extends BaseFragment {
|
||||
|
||||
@Override
|
||||
public boolean isEnabled(int i) {
|
||||
return (i == rowDisplayname);
|
||||
return (i == rowDisplayname || i==rowStatus);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -210,33 +216,52 @@ public class SettingsNameActivity extends BaseFragment {
|
||||
@Override
|
||||
public View getView(int i, View view, ViewGroup viewGroup) {
|
||||
int type = getItemViewType__(i);
|
||||
if (type == typeSection) {
|
||||
if (type == ROWTYPE_HEADLINE) {
|
||||
if (view == null) {
|
||||
view = new HeaderCell(mContext);
|
||||
view.setBackgroundColor(0xffffffff);
|
||||
}
|
||||
if (i == rowNameTitle) {
|
||||
if (i == rowDisplaynameHeadline) {
|
||||
((HeaderCell) view).setText(mContext.getString(R.string.MyName));
|
||||
}
|
||||
else if (i == rowStatusHeadline) {
|
||||
((HeaderCell) view).setText(mContext.getString(R.string.MyStatus));
|
||||
}
|
||||
}
|
||||
else if (type == typeTextEntry) {
|
||||
else if (type == ROWTYPE_TEXT_ENTRY) {
|
||||
if (i == rowDisplayname) {
|
||||
if(displaynameCell==null) {
|
||||
displaynameCell = new EditTextCell(mContext);
|
||||
displaynameCell = new EditTextCell(mContext, false/*useLabel*/);
|
||||
displaynameCell.getEditTextView().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS | InputType.TYPE_TEXT_FLAG_CAP_WORDS);
|
||||
displaynameCell.setValueHintAndLabel(MrMailbox.getConfig("displayname", ""),
|
||||
"", "", true);
|
||||
}
|
||||
view = displaynameCell;
|
||||
}
|
||||
} else if (type == typeInfo) {
|
||||
else if (i == rowStatus) {
|
||||
if(statusCell==null) {
|
||||
String statusText = MrMailbox.getConfig("selfstatus", null);
|
||||
if( statusText == null ) {
|
||||
statusText = mContext.getString(R.string.DefaultStatusText);
|
||||
}
|
||||
statusCell = new EditTextCell(mContext, false/*useLabel*/, true/*multiLine*/);
|
||||
statusCell.setValueHintAndLabel(statusText, "", "", true);
|
||||
}
|
||||
view = statusCell;
|
||||
}
|
||||
} else if (type == ROWTYPE_INFO) {
|
||||
if (view == null) {
|
||||
view = new TextInfoCell(mContext);
|
||||
}
|
||||
if( i==rowDisplaynameInfo) {
|
||||
((TextInfoCell) view).setText(mContext.getString(R.string.MyNameExplain));
|
||||
view.setBackgroundResource(R.drawable.greydivider);
|
||||
}
|
||||
view.setBackgroundResource(R.drawable.greydivider_bottom);
|
||||
else if( i==rowStatusInfo) {
|
||||
((TextInfoCell) view).setText(mContext.getString(R.string.MyStatusExplain));
|
||||
view.setBackgroundResource(R.drawable.greydivider_bottom);
|
||||
}
|
||||
|
||||
}
|
||||
return view;
|
||||
}
|
||||
@@ -247,13 +272,13 @@ public class SettingsNameActivity extends BaseFragment {
|
||||
}
|
||||
|
||||
private int getItemViewType__(int i) {
|
||||
if (i == rowDisplayname) {
|
||||
return typeTextEntry;
|
||||
if (i == rowDisplayname|| i==rowStatus ) {
|
||||
return ROWTYPE_TEXT_ENTRY;
|
||||
}
|
||||
else if(i==rowNameTitle) {
|
||||
return typeSection;
|
||||
else if(i==rowDisplaynameHeadline || i==rowStatusHeadline) {
|
||||
return ROWTYPE_HEADLINE;
|
||||
}
|
||||
return typeInfo;
|
||||
return ROWTYPE_INFO;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -452,25 +452,16 @@ public class VideoEditorActivity extends BaseFragment implements TextureView.Sur
|
||||
return;
|
||||
}
|
||||
int viewHeight;
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
viewHeight = AndroidUtilities.dp(472);
|
||||
} else {
|
||||
viewHeight = AndroidUtilities.displaySize.y - AndroidUtilities.statusBarHeight - ActionBar.getCurrentActionBarHeight();
|
||||
}
|
||||
viewHeight = AndroidUtilities.displaySize.y - AndroidUtilities.statusBarHeight - ActionBar.getCurrentActionBarHeight();
|
||||
|
||||
int width;
|
||||
int height;
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
width = AndroidUtilities.dp(490);
|
||||
height = viewHeight - AndroidUtilities.dp(276);
|
||||
if (getParentActivity().getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
width = AndroidUtilities.displaySize.x / 3 - AndroidUtilities.dp(24);
|
||||
height = viewHeight - AndroidUtilities.dp(32);
|
||||
} else {
|
||||
if (getParentActivity().getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
width = AndroidUtilities.displaySize.x / 3 - AndroidUtilities.dp(24);
|
||||
height = viewHeight - AndroidUtilities.dp(32);
|
||||
} else {
|
||||
width = AndroidUtilities.displaySize.x;
|
||||
height = viewHeight - AndroidUtilities.dp(276);
|
||||
}
|
||||
width = AndroidUtilities.displaySize.x;
|
||||
height = viewHeight - AndroidUtilities.dp(276);
|
||||
}
|
||||
|
||||
int vwidth = originalRotationValue == 90 || originalRotationValue == 270 ? originalHeight : originalWidth;
|
||||
@@ -499,7 +490,7 @@ public class VideoEditorActivity extends BaseFragment implements TextureView.Sur
|
||||
if (getParentActivity() == null) {
|
||||
return;
|
||||
}
|
||||
if (!AndroidUtilities.isTablet() && getParentActivity().getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
if (getParentActivity().getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
// landscape orientation
|
||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) videoContainerView.getLayoutParams();
|
||||
layoutParams.topMargin = AndroidUtilities.dp(16);
|
||||
|
||||
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 193 B |
|
Before Width: | Height: | Size: 466 B |
|
Before Width: | Height: | Size: 942 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 169 B |
|
Before Width: | Height: | Size: 406 B |
|
Before Width: | Height: | Size: 935 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 211 B |
|
Before Width: | Height: | Size: 578 B |
|
Before Width: | Height: | Size: 944 B |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 298 B |
|
Before Width: | Height: | Size: 748 B |
|
Before Width: | Height: | Size: 955 B |
|
Before Width: | Height: | Size: 1.9 KiB |
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<solid android:color="#ff54a1db" />
|
||||
<size android:width="2dp" android:height="6dp" />
|
||||
</shape>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<solid android:color="#ffffffff" />
|
||||
<size android:width="1dp" android:height="6dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,158 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
|
||||
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<string name="AppName">Delta Chat</string>
|
||||
<!--chats view-->
|
||||
<string name="Settings">Preferències</string>
|
||||
<string name="NewGroup">Nou grup</string>
|
||||
<string name="NoResult">Sense resultat.</string>
|
||||
<string name="NoChats">Encara no hi ha cap xat.</string>
|
||||
<string name="DeleteChat">Esborra el xat</string>
|
||||
<string name="SelectChat">Selecciona el xat ...</string>
|
||||
<string name="Search">Busca</string>
|
||||
<string name="MuteNotifications">Silencia les notificacions</string>
|
||||
<string name="MuteFor">Silencia durant %1$s</string>
|
||||
<string name="UnmuteNotifications">Torna a notificar</string>
|
||||
<string name="Draft">Esborrany</string>
|
||||
<!--audio view-->
|
||||
<string name="NoAudio">Siusplau, afegeix fitxers a l\'arxiu de música del teu dispositiu per veure\'ls aquí.</string>
|
||||
<string name="AttachMusic">Música</string>
|
||||
<!--documents view-->
|
||||
<string name="SelectFile">Selecciona el fitxer</string>
|
||||
<string name="FreeOfTotal">%1$s de %2$s lliure</string>
|
||||
<string name="ErrorHint">Error desconegut</string>
|
||||
<string name="AccessError">Error d\'accés</string>
|
||||
<string name="NoFiles">Encara sense fitxers...</string>
|
||||
<string name="NotMounted">Magatzem sense muntar</string>
|
||||
<string name="UsbActive">Transferència USB activa</string>
|
||||
<string name="InternalStorage">Magatzem intern</string>
|
||||
<string name="ExternalStorage">Magatzem extern</string>
|
||||
<string name="SystemRoot">Arrel del sistema</string>
|
||||
<string name="SdCard">Targeta SD</string>
|
||||
<string name="Folder">Carpeta</string>
|
||||
<string name="GalleryInfo">Per enviar imatges sense compressió</string>
|
||||
<!--chat view-->
|
||||
<string name="ChatGallery">Galeria</string>
|
||||
<string name="ChatCamera">Càmera</string>
|
||||
<string name="NoMessages">Sense missatges.</string>
|
||||
<string name="ForwardedMessage">Missatge reenviat</string>
|
||||
<string name="From">Des de</string>
|
||||
<string name="NoRecent">Cap recent</string>
|
||||
<string name="TypeMessage">Missatge</string>
|
||||
<string name="SaveToDownloads">Guarda a descàrregues</string>
|
||||
<string name="SaveToMusic">Guarda a música</string>
|
||||
<string name="Share">Comparteix</string>
|
||||
<string name="SendItems">Envia %1$s</string>
|
||||
<string name="ClearRecentEmoji">Vols esborrae les emoticones recents?</string>
|
||||
<!--notification-->
|
||||
<string name="Reply">Respon</string>
|
||||
<string name="ReplyToGroup">Respon a %1$s</string>
|
||||
<string name="ReplyToContact">Respon a %1$s</string>
|
||||
<!--contacts view-->
|
||||
<string name="NoContacts">Encara sense contactes.</string>
|
||||
<!--group create view-->
|
||||
<string name="SendMessageTo">Envia un missatge a ...</string>
|
||||
<string name="EnterGroupNamePlaceholder">Introdueix un nom pel grup</string>
|
||||
<!--group info view-->
|
||||
<string name="AddMember">Afegeix un membre</string>
|
||||
<string name="Notifications">Notificacions</string>
|
||||
<string name="RemoveMember">Esborra un membre</string>
|
||||
<!--contact info view-->
|
||||
<string name="NewContactTitle">Contacte nou</string>
|
||||
<string name="BlockContact">Bloqueja el contacte</string>
|
||||
<string name="DeleteContact">Esborra el contacte</string>
|
||||
<string name="Info">Info</string>
|
||||
<!--settings view-->
|
||||
<string name="TextSize">Mida de la font dels missatges</string>
|
||||
<string name="UnblockContact">Desbloqueja el contacte</string>
|
||||
<string name="NoBlocked">Encara no hi ha contactes bloquejats</string>
|
||||
<string name="DefaultForNormalMessages">Missatges normals</string>
|
||||
<string name="MessagePreview">Previsualització del missatge</string>
|
||||
<string name="DefaultForGroupMessages">Missatges de grup</string>
|
||||
<string name="Sound">So</string>
|
||||
<string name="InAppNotifications">Notificacions dins l\'app</string>
|
||||
<string name="Vibrate">Vibra</string>
|
||||
<string name="ResetAllNotifications">Reinicia totes les notificacions</string>
|
||||
<string name="NotificationsAndSounds">Notificacions i so</string>
|
||||
<string name="BlockedContacts">Contactes bloquejats</string>
|
||||
<string name="Default">Per defecte</string>
|
||||
<string name="OnlyIfSilent">Només en mode silenciós</string>
|
||||
<string name="ChatBackground">Fons del xat</string>
|
||||
<string name="Help">Ajuda</string>
|
||||
<string name="Enabled">Activat</string>
|
||||
<string name="Disabled">Desactivat</string>
|
||||
<string name="LedColor">Color del LED</string>
|
||||
<string name="BadgeNumber">Mostra el comptador a la icona si és possible</string>
|
||||
<string name="Short">Curt</string>
|
||||
<string name="Long">Llarg</string>
|
||||
<string name="EditName">Modifica el nom</string>
|
||||
<string name="NotificationsPriority">Mira</string>
|
||||
<string name="NotificationsPriorityDefault">Prioritat normal</string>
|
||||
<string name="NotificationsPriorityHigh">Prioritat alta</string>
|
||||
<string name="NotificationsPriorityMax">Màxima prioritat</string>
|
||||
<string name="RepeatNotifications">Repeteix notificacions</string>
|
||||
<string name="NotificationsOther">Altres</string>
|
||||
<string name="InChatSound">So dins el xats</string>
|
||||
<string name="SmartNotifications">Limita les notificacions</string>
|
||||
<string name="SmartNotificationsTimes">vegades</string>
|
||||
<string name="SmartNotificationsWithin">en</string>
|
||||
<string name="SmartNotificationsMinutes">minuts</string>
|
||||
<string name="DirectShare">Comparteix directament</string>
|
||||
<string name="DirectShareInfo">Mostra els darrers xats al menú compartit</string>
|
||||
<!--cache view-->
|
||||
<string name="CacheSettings">Magatzem</string>
|
||||
<string name="KeepMediaInfo">Les fotos, vídeos i altres fitxers de xats al núvol als que no hagis <![CDATA[<b>accedit</b>]]> durant aquest període seran esborrats d\'aquest dispositiu per estalviar espai de disc.</string>
|
||||
<string name="KeepMediaForever">Per sempre</string>
|
||||
<string name="PasscodePIN">PIN</string>
|
||||
<string name="PasscodePassword">Contrasenya</string>
|
||||
<!--photo gallery view-->
|
||||
<string name="SaveToGallery">Guarda a la galeria</string>
|
||||
<string name="Of">%1$d de %2$d</string>
|
||||
<string name="Gallery">Galeria</string>
|
||||
<string name="AllPhotos">Totes les fotos</string>
|
||||
<string name="AllVideo">Tots els vídeos</string>
|
||||
<string name="NoPhotos">Encara no hi ha cap foto</string>
|
||||
<string name="NoVideo">Encara no hi ha cap vídeo</string>
|
||||
<string name="CropImage">Talla la imatge</string>
|
||||
<string name="EditImage">Modifica la imatge</string>
|
||||
<string name="Contrast">Contrast</string>
|
||||
<string name="Exposure">Exposició</string>
|
||||
<string name="Saturation">Saturació</string>
|
||||
<string name="Curves">Corbes</string>
|
||||
<string name="CurvesAll">TOTS</string>
|
||||
<string name="CurvesRed">VERMELL</string>
|
||||
<string name="CurvesGreen">VERD</string>
|
||||
<string name="CurvesBlue">BLAU</string>
|
||||
<string name="BlurLinear">Lineal</string>
|
||||
<string name="BlurRadial">Radial</string>
|
||||
<string name="DiscardChanges">Descartes els canvis?</string>
|
||||
<string name="ClearButton">Neteja</string>
|
||||
<string name="PickerPhotos">Fotos</string>
|
||||
<string name="PickerVideo">Vídeo</string>
|
||||
<!--privacy settings-->
|
||||
<string name="PrivacySettings">Privacitat i seguretat</string>
|
||||
<string name="SecurityTitle">Seguretat</string>
|
||||
<!--edit video view-->
|
||||
<string name="SendVideo">Envia vídeos</string>
|
||||
<!--button titles-->
|
||||
<string name="Done">Fet</string>
|
||||
<string name="Open">Obert</string>
|
||||
<string name="Cancel">Cancel·la</string>
|
||||
<string name="Edit">Modifica</string>
|
||||
<string name="Send">Envia</string>
|
||||
<string name="Delete">Esborra</string>
|
||||
<string name="FromCamera">Des de la càmera</string>
|
||||
<string name="FromGalley">Des de la galeria</string>
|
||||
<string name="OK">OK</string>
|
||||
<string name="Crop">TALLA</string>
|
||||
<!--messages-->
|
||||
<string name="AttachPhoto">Foto</string>
|
||||
<string name="AttachVideo">Vídeo</string>
|
||||
<string name="AttachGif">GIF</string>
|
||||
<string name="AttachContact">Contacte</string>
|
||||
<string name="AttachDocument">Fitxer</string>
|
||||
<string name="AttachVoiceMessage">Missatge de veu</string>
|
||||
<string name="FromSelf">Jo</string>
|
||||
</resources>
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--Translation by iLLogical2007, DanielGroeger and everyone from https://github.com/DrKLO/Telegram/pull/129 whom I didn't notice -->
|
||||
|
||||
<resources>
|
||||
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<string name="AppName">Delta Chat</string>
|
||||
<!--chats view-->
|
||||
<string name="Settings">Einstellungen</string>
|
||||
@@ -226,7 +226,6 @@
|
||||
<string name="Intro6Message"><![CDATA[<b>Verschlüsselung</b>]]> mit allen gängigen Verfahren. Die Nachrichten bleiben auf Ihren Servern.</string>
|
||||
|
||||
<string name="Intro7Headline">Vertraulich</string>
|
||||
<string name="Intro7Message"><![CDATA[<b>Delta Chat</b>]]> ist für die sichere geschäftliche Kommunikation geeignet.</string>
|
||||
|
||||
<string name="IntroStartMessaging">Jetzt beginnen</string>
|
||||
<!--plural-->
|
||||
@@ -255,9 +254,6 @@
|
||||
<item quantity="other">%d Nachrichten löschen? Die Nachrichten werden auch auf dem Server gelöscht.</item>
|
||||
</plurals>
|
||||
<plurals name="NewMessagesInChats">
|
||||
<!-- Translators: the first string placeholder "%s" gets replaced with the
|
||||
text "%d new messages", so the complete sentence would be e.g.
|
||||
"4 new messages in 2 chats". -->
|
||||
<item quantity="one">%1$s in %2$d Chat</item>
|
||||
<item quantity="other">%1$s in %2$d Chats</item>
|
||||
</plurals>
|
||||
@@ -265,7 +261,6 @@
|
||||
<item quantity="one">%d Chat</item>
|
||||
<item quantity="other">%d Chats</item>
|
||||
</plurals>
|
||||
|
||||
<plurals name="Minutes">
|
||||
<item quantity="one">%d Minute</item>
|
||||
<item quantity="other">%d Minuten</item>
|
||||
@@ -287,9 +282,6 @@
|
||||
<item quantity="other">%d Monate</item>
|
||||
</plurals>
|
||||
<plurals name="MaxNotifications">
|
||||
<!-- Translators: the second string placeholder "%s" gets replaced with the
|
||||
text "%d minutes", so the complete sentence would be e.g.
|
||||
"At most 8 notifications within 3 minutes". -->
|
||||
<item quantity="one">Höchstens %1$d Benachrichtigung in %2$s</item>
|
||||
<item quantity="other">Höchstens %1$d Benachrichtigungen in %2$s</item>
|
||||
</plurals>
|
||||
@@ -306,21 +298,21 @@
|
||||
<string name="AccountSettings">Kontoeinstellungen</string>
|
||||
<string name="MyAccount">Mein Konto</string>
|
||||
<string name="MyName">Mein Name</string>
|
||||
<string name="MyNameExplain">Hier den Namen eingeben, wie er den Empfängern von Nachrichten gezeigt werden soll.\n\nWenn kein Name angegeben wird, erhält der Empfänger nur die E-Mail-Adresse aus den Kontoeinstellungen.</string>
|
||||
<string name="MyNameExplain">Hier den Namen eingeben, wie er den Empfängern von Nachrichten gezeigt werden soll. Wenn kein Name angegeben wird, erhält der Empfänger nur die E-Mail-Adresse.</string>
|
||||
<string name="Password">Passwort</string>
|
||||
<string name="SmtpPassword">SMTP-Passwort</string>
|
||||
<string name="FromAbove">Wie oben</string>
|
||||
<string name="SmtpLoginname">SMTP-Loginname</string>
|
||||
<string name="SmtpPort">SMTP-Port</string>
|
||||
<string name="SmtpServer">SMTP-Server</string>
|
||||
<string name="Automatic">Automatisch</string>
|
||||
<string name="ImapLoginname">IMAP-Loginname</string>
|
||||
<string name="ImapPort">IMAP-Port</string>
|
||||
<string name="ImapServer">IMAP-Server</string>
|
||||
<string name="OutboxHeadline">Postausgang</string>
|
||||
<string name="ImapLoginname">IMAP-Loginname</string>
|
||||
<string name="SmtpServer">SMTP-Server</string>
|
||||
<string name="ImapPort">IMAP-Port</string>
|
||||
<string name="InboxHeadline">Posteingang</string>
|
||||
<string name="OutboxHeadline">Postausgang</string>
|
||||
<string name="MyAccountExplain">Für bekannte E-Mail-Anbieter werden die weiteren Einstellungen automatisch ermittelt.</string>
|
||||
<string name="MyAccountExplain2">Manchmal muss die <![CDATA[<b>]]>IMAP-Funktion<![CDATA[</b>]]> noch in der E-Mail-Weboberfläche <![CDATA[<b>]]>eingeschaltet<![CDATA[</b>]]> werden.\n\nBei Problemen kann der E-Mail-Anbieter oder ein Bekannter weiterhelfen.</string>
|
||||
<string name="MyAccountExplain2" >Manchmal muss die <![CDATA[<b>]]>IMAP-Funktion<![CDATA[</b>]]> noch in der E-Mail-Weboberfläche <![CDATA[<b>]]>eingeschaltet<![CDATA[</b>]]> werden.\n\nBei Problemen kann der E-Mail-Anbieter oder ein Bekannter weiterhelfen.</string>
|
||||
<string name="AccountNotConfigured">Konto nicht konfiguriert</string>
|
||||
<string name="AboutThisProgram">Über Delta Chat</string>
|
||||
<string name="NotSet">Nicht gesetzt</string>
|
||||
@@ -331,25 +323,28 @@
|
||||
<string name="AskStartChatWith">Chat mit <![CDATA[<b>]]>%1$s<![CDATA[</b>]]> starten?</string>
|
||||
<string name="DeaddropHint">Ein Klick auf die Antwort-Pfeile startet einen Chat.</string>
|
||||
<string name="NotYetImplemented">Diese Funktion ist nicht oder nur unvollständig eingebaut.</string>
|
||||
<string name="DefaultStatusText">Mit meinem Delta Chat Messenger gesendet</string>
|
||||
<string name="Name">Name</string>
|
||||
<string name="DefaultStatusText">Mit meinem Delta Chat Messenger gesendet.</string>
|
||||
<string name="Name" >Name</string>
|
||||
<string name="EmailAddress">E-Mail-Adresse</string>
|
||||
<string name="CannotDeleteContact">Der Kontakt kann nicht gelöscht werden, da er verwendet wird; er kann aber blockiert werden.</string>
|
||||
<string name="BadEmailAddress">Ungültige E-Mail-Adresse.</string>
|
||||
<string name="ContactCreated">Kontakt angelegt.</string>
|
||||
<string name="ViewProfile">Profil anzeigen</string>
|
||||
<!-- Translators: please use a very short string here, it should not much longer than
|
||||
the string needed for video time+size (0:00, 12,3 Mib) -->
|
||||
<string name="OneMoment">Einen Moment …</string>
|
||||
<string name="NoChatsHelp">Unten auf das Plussymbol für die erste Chatnachricht tippen; der Menüknopf öffnet die weiteren Optionen.</string>
|
||||
<string name="Intro7Message"><![CDATA[<b>Delta Chat</b>]]> ist für die sichere geschäftliche Kommunikation geeignet.</string>
|
||||
<string name="InviteMenuEntry">Einladungen versenden</string>
|
||||
<string name="InviteText">Ich verwende nun auch den Delta Chat Messenger - %1$s - und bin dort unter %2$s erreichbar.</string>
|
||||
<string name="AdvancedSettings">Fortgeschrittene Einstellungen</string>
|
||||
<string name="AskResetNotifications">Alle Benachrichtigungseinstellungen und Töne dieser Seite und auch der einzelnen Chats zurücksetzen?</string>
|
||||
<string name="AskResetNotifications" >Alle Benachrichtigungseinstellungen und Töne dieser Seite und auch der einzelnen Chats zurücksetzen?</string>
|
||||
<string name="AttachFiles">Dateien anhängen</string>
|
||||
<string name="ErrGroupNameEmpty">Bitte einen Namen für die Gruppe eingeben.</string>
|
||||
<string name="MsgNewGroupDraft">Hallo, ich habe die Gruppe \"%1$s\" für uns erstellt.</string>
|
||||
<string name="MsgNewGroupDraftHint">Eine erste Nachricht schreiben; dann können die anderen in der Gruppe antworten.\n\n• Gruppenmitglieder müssen hierzu Delta Chat nicht installiert haben.\n\n• Die Zustellung der ersten Nachricht kann einen Moment dauern.</string>
|
||||
<string name="MsgGroupImageChanged">Gruppenbild geändert.</string>
|
||||
<string name="MsgNewGroupDraft">Hallo, ich habe die Gruppe \"%1$s\" für uns erstellt.</string>
|
||||
<string name="MsgGroupNameChanged">Gruppenname von \"%1$s\" in \"%2$s\" geändert.</string>
|
||||
<string name="MsgGroupImageChanged">Gruppenbild geändert.</string>
|
||||
<string name="MsgMemberAddedToGroup">%1$s zur Gruppe hinzugefügt.</string>
|
||||
<string name="MsgMemberRemovedFromToGroup">%1$s aus Gruppe entfernt.</string>
|
||||
<string name="AskAddMemberToGroup"><![CDATA[<b>]]>%1$s<![CDATA[</b>]]> zur Gruppe hinzufügen?</string>
|
||||
@@ -357,11 +352,10 @@
|
||||
<string name="ErrSelfNotInGroup">Sie müssen ein Gruppenmitglied sein, um diese Aktion ausführen zu können.</string>
|
||||
<string name="MsgGroupLeft">Gruppe verlassen.</string>
|
||||
<string name="NoMessagesHint">Nachricht an <![CDATA[<b>]]>%1$s<![CDATA[</b>]]> senden:\n\n• <![CDATA[<b>]]>%2$s<![CDATA[</b>]]> muss hierzu Delta Chat nicht installiert haben.\n\n• Die Zustellung der ersten Nachricht kann einen Moment dauern.</string>
|
||||
<string name="PreferE2EEncryption">Ende-zu-Ende-Verschlüsselung bevorzugen</string>
|
||||
<string name="SendNRcvReadReceipts">Emfangsbestätigungen erhalten/senden</string>
|
||||
<string name="PreferE2EEncryption">Ende-zu-Ende-Verschlüsselung bevorzugen</string>
|
||||
<string name="E2EManagePrivateKeys">Private Schlüssel verwalten</string>
|
||||
<string name="E2ECompareKeys">Schlüssel vergleichen</string>
|
||||
<string name="ResetContactsKey">Schlüssel zurücksetzen</string>
|
||||
<string name="ForwardToTitle">Weiterleiten an …</string>
|
||||
<string name="SelectContact">Kontakt auswählen</string>
|
||||
<string name="DoneHint">Fertig.</string>
|
||||
@@ -376,19 +370,23 @@
|
||||
<string name="AutoplayGifs">GIFs automatisch abspielen</string>
|
||||
<string name="HelpUrl">https://delta.chat/de/help</string>
|
||||
<string name="EncryptedMessage">Verschlüsselte Nachricht</string>
|
||||
|
||||
<string name="ImportFromDownloads">Aus \"Downloads\" importieren</string>
|
||||
<string name="ExportToDownloads">Nach \"Downloads\" exportieren</string>
|
||||
<string name="ImportPrivateKeysAsk">Private Schlüssel aus \"Downloads\" importieren?\n\n• Bereits vorhandene private Schlüssel bleiben erhalten\n\n• Der zuletzt importierte private Schlüssel wird der Standardschlüssel\n\nFortfahren?</string>
|
||||
<string name="Encryption">Verschlüsselung</string>
|
||||
<string name="EncrinfoE2E">Ende-zu-Ende-Verschlüsselung ist aktiv.</string>
|
||||
<string name="EncrinfoE2EExplain">Wenn die angezeigten Fingerabdrücke auf dem anderen Gerät genauso angezeigt werden, ist die Verbindung sicher.</string>
|
||||
<string name="EncrinfoTransport">Transportverschlüsselung mindestens bis zu meinem Server.</string>
|
||||
<string name="EncrinfoNone">Keine Verschlüsselung bis zu meinem Server.</string>
|
||||
<string name="EncrinfoNoE2EExplain">Die Ende-zu-Ende-Verschlüsselung wird automatisch aktiviert, sobald der Kontakt Delta Chat oder eine andere Autocrypt-kompatible App verwendet.</string>
|
||||
<string name="EncrinfoFingerprints">Fingerabdrücke</string>
|
||||
|
||||
<string name="ImportFromDownloads">Aus \"Downloads\" importieren</string>
|
||||
<string name="ExportToDownloads">Nach \"Downloads\" exportieren</string>
|
||||
<string name="ImportPrivateKeysAsk">Private Schlüssel aus \"Downloads\" importieren?\n\n• Bereits vorhandene private Schlüssel bleiben erhalten\n\n• Der zuletzt importierte private Schlüssel wird der Standardschlüssel\n\nFortfahren?</string>
|
||||
<string name="Encryption">Verschlüsselung</string>
|
||||
<string name="Backup">Backup</string>
|
||||
<string name="ImportBackupExplain">Um ein Backup zu importieren, kopieren Sie es auf dem Zielgerät in das \"Downloads\"-Verzeichnis und installieren die App neu.</string>
|
||||
<string name="ReadReceiptMailBody">Dies ist eine Empfangsbestätigung für die Nachricht \"%1$s\".\n\nDiese Empfangsbestätigung sagt nur aus, dass die Nachricht am Gerät des Empfängers angezeigt wurde. Es gibt keine Garantie, dass der Empfänger die Nachricht gelesen hat.</string>
|
||||
<string name="ReadReceipt">Empfangsbestätigung</string>
|
||||
<string name="NameAndStatus">Name und Status</string>
|
||||
<string name="MyStatus">Mein Status</string>
|
||||
<string name="MyStatusExplain">Der Status wird im Profil und in der E-Mail-Fußzeile angezeigt</string>
|
||||
<string name="MsgGroupImageDeleted">Gruppenbild gelöscht.</string>
|
||||
<string name="AskDeleteGroupImage">Soll das Gruppenbild für alle Gruppenmitglieder gelöscht werden?</string>
|
||||
</resources>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--Translation by Borja Campina, Edited by Victor Espinoza and Francisco Vila-->
|
||||
|
||||
<resources>
|
||||
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<string name="AppName">Delta Chat</string>
|
||||
<!--chats view-->
|
||||
<string name="Settings">Ajustes</string>
|
||||
<string name="NewGroup">Nuevo grupo</string>
|
||||
<string name="NoResult">Sin resultados</string>
|
||||
<string name="NoResult">Sin resultados.</string>
|
||||
<string name="NoChats">Aún sin chats.</string>
|
||||
<string name="DeleteChat">Eliminar chat</string>
|
||||
<string name="SelectChat">Elige el chat …</string>
|
||||
@@ -54,53 +54,53 @@
|
||||
<string name="ReplyToGroup">Responder a %1$s</string>
|
||||
<string name="ReplyToContact">Responder a %1$s</string>
|
||||
<!--contacts view-->
|
||||
<string name="NoContacts">Aún sin contactos</string>
|
||||
<string name="NoContacts">Aún sin contactos.</string>
|
||||
<!--group create view-->
|
||||
<string name="SendMessageTo">Invitar a…</string>
|
||||
<string name="SendMessageTo">Enviar un mensaje a…</string>
|
||||
<string name="EnterGroupNamePlaceholder">Nombre del grupo</string>
|
||||
<!--group info view-->
|
||||
<string name="AddMember">Añadir miembro</string>
|
||||
<string name="Notifications">Notificaciones</string>
|
||||
<string name="RemoveMember">Eliminar del grupo</string>
|
||||
<string name="RemoveMember">Eliminar miembro</string>
|
||||
<!--contact info view-->
|
||||
<string name="NewContactTitle">Añadir contacto</string>
|
||||
<string name="BlockContact">Bloquear</string>
|
||||
<string name="DeleteContact">Eliminar</string>
|
||||
<string name="Info">Información</string>
|
||||
<!--settings view-->
|
||||
<string name="TextSize">Tamaño del texto</string>
|
||||
<string name="TextSize">Tamaño del texto de los mensajes</string>
|
||||
<string name="UnblockContact">Desbloquear</string>
|
||||
<string name="NoBlocked">Sin usuarios bloqueados</string>
|
||||
<string name="DefaultForNormalMessages">Notificación de mensajes</string>
|
||||
<string name="DefaultForNormalMessages">Mensajes normales</string>
|
||||
<string name="MessagePreview">Vista previa del mensaje</string>
|
||||
<string name="DefaultForGroupMessages">Notificaciones de grupo</string>
|
||||
<string name="DefaultForGroupMessages">Mensajes de grupo</string>
|
||||
<string name="Sound">Sonido</string>
|
||||
<string name="InAppNotifications">Notificaciones en la app</string>
|
||||
<string name="Vibrate">Vibraciones</string>
|
||||
<string name="ResetAllNotifications">Restablecer las notificaciones</string>
|
||||
<string name="NotificationsAndSounds">Notificaciones y sonidos</string>
|
||||
<string name="BlockedContacts">Usuarios bloqueados</string>
|
||||
<string name="BlockedContacts">Contactos bloqueados</string>
|
||||
<string name="Default">Por defecto</string>
|
||||
<string name="OnlyIfSilent">Sólo si está silenciado</string>
|
||||
<string name="ChatBackground">Fondo de chat</string>
|
||||
<string name="SendByEnter">Enviar con “Intro”</string>
|
||||
<string name="Help">Preguntas frecuentes</string>
|
||||
<string name="Help">Ayuda</string>
|
||||
<string name="Enabled">Activadas</string>
|
||||
<string name="Disabled">Desactivadas</string>
|
||||
<string name="LedColor">Color del LED</string>
|
||||
<string name="BadgeNumber">Globo en el ícono</string>
|
||||
<string name="BadgeNumber">Muestra la cantidad en la icona cuando sea posible</string>
|
||||
<string name="Short">Cortas</string>
|
||||
<string name="Long">Largas</string>
|
||||
<string name="RaiseToSpeak">Elevar para hablar</string>
|
||||
<string name="EditName">Editar nombre</string>
|
||||
<string name="NotificationsPriority">Prioridad</string>
|
||||
<string name="NotificationsPriorityDefault">Por defecto</string>
|
||||
<string name="NotificationsPriorityHigh">Alta</string>
|
||||
<string name="NotificationsPriorityMax">Máxima</string>
|
||||
<string name="NotificationsPriority">Ver</string>
|
||||
<string name="NotificationsPriorityDefault">Prioridad normal</string>
|
||||
<string name="NotificationsPriorityHigh">Prioridad alta</string>
|
||||
<string name="NotificationsPriorityMax">Máxima prioridad</string>
|
||||
<string name="RepeatNotifications">Repetir notificaciones</string>
|
||||
<string name="NotificationsOther">Otras</string>
|
||||
<string name="InChatSound">Sonidos en el chat</string>
|
||||
<string name="SmartNotifications">Notificaciones inteligentes</string>
|
||||
<string name="SmartNotifications">Limita las notificaciones</string>
|
||||
<string name="SmartNotificationsSoundAtMost">Sonar como máximo</string>
|
||||
<string name="SmartNotificationsTimes">veces</string>
|
||||
<string name="SmartNotificationsWithin">en</string>
|
||||
@@ -195,7 +195,6 @@
|
||||
<string name="FromSelf">Tú</string>
|
||||
<!--Alert messages-->
|
||||
<string name="NoHandleAppInstalled">No tienes aplicaciones que puedan manejar el tipo de archivo “%1$s”. Por favor, instala una para continuar.</string>
|
||||
<string name="AskAddMemberToGroup">¿Añadir a <![CDATA[<b>]]>%1$s<![CDATA[</b>]]> al grupo?</string>
|
||||
<string name="ContactAlreadyInGroup">Este usuario ya está en el grupo</string>
|
||||
<string name="ForwardMessagesTo">¿Reenviar mensajes a <b>%1$s</b>?</string>
|
||||
<string name="SendMessagesTo">¿Enviar mensajes a <b>%1$s</b>?</string>
|
||||
@@ -255,9 +254,6 @@
|
||||
<item quantity="other">%</item>
|
||||
</plurals>
|
||||
<plurals name="NewMessagesInChats">
|
||||
<!-- Translators: the first string placeholder "%s" gets replaced with the
|
||||
text "%d new messages", so the complete sentence would be e.g.
|
||||
"4 new messages in 2 chats". -->
|
||||
<item quantity="one">%1$s en%2$s conversación</item>
|
||||
<item quantity="other">%1$s en%2$s conversaciones</item>
|
||||
</plurals>
|
||||
@@ -286,9 +282,6 @@
|
||||
<item quantity="other">%d meses</item>
|
||||
</plurals>
|
||||
<plurals name="MaxNotifications">
|
||||
<!-- Translators: the second string placeholder "%s" gets replaced with the
|
||||
text "%d minutes", so the complete sentence would be e.g.
|
||||
"At most 8 notifications within 3 minutes". -->
|
||||
<item quantity="one">Máximo %1$d notificación con %2$d</item>
|
||||
<item quantity="other">Máximo %1$d notificaciones con %2$d</item>
|
||||
</plurals>
|
||||
@@ -305,7 +298,6 @@
|
||||
<string name="AccountSettings">Ajustes de cuenta</string>
|
||||
<string name="MyAccount">Mi cuenta</string>
|
||||
<string name="MyName">Mi nombre</string>
|
||||
<string name="MyNameExplain">Su nombre se muestra a los receptores.\n\nSi no introduce un nombre aquí, los receptores solo verán su dirección de correo de los ajustes de cuenta.</string>
|
||||
<string name="Password">Contraseña</string>
|
||||
<string name="SmtpPassword">Contraseña SMTP</string>
|
||||
<string name="FromAbove">De arriba</string>
|
||||
@@ -330,7 +322,6 @@
|
||||
<string name="AskStartChatWith">¿Iniciar una conversación con <b>%1$s</b>?</string>
|
||||
<string name="DeaddropHint">Haga clic en la flecha de réplica para comenzar una conversación.</string>
|
||||
<string name="NotYetImplemented">Esta función no está disponible o está incompleta.</string>
|
||||
<string name="DefaultStatusText">Enviado desde mi Delta Chat</string>
|
||||
<string name="Name" >Nombre</string>
|
||||
<string name="EmailAddress">Dirección de correo</string>
|
||||
<string name="CannotDeleteContact">No puede borrar contactos en uso. En su lugar, bloquee el contacto.</string>
|
||||
@@ -354,15 +345,13 @@
|
||||
<string name="MsgGroupImageChanged">Imagen de grupo cambiada.</string>
|
||||
<string name="MsgMemberAddedToGroup">Añadido miembro %1$s.</string>
|
||||
<string name="MsgMemberRemovedFromToGroup">Eliminado miembro %1$s.</string>
|
||||
<string name="AskAddMemberToGroup">¿Añadir a <![CDATA[<b>]]>%1$s<![CDATA[</b>]]> al grupo?</string>
|
||||
<string name="AskRemoveMemberFromGroup">¿Eliminar <b>%1$s</b> del grupo?</string>
|
||||
<string name="ErrSelfNotInGroup">Debe ser miembro del grupo para realizar esta acción.</string>
|
||||
<string name="MsgGroupLeft">Grupo abandonado.</string>
|
||||
<string name="NoMessagesHint">Enviar mensaje a <b>%1$s</b>:\n\n• No importa si <b>%2$s</b> no usa Delta Chat.\n\n• El primer mensaje puede tardar un momento.</string>
|
||||
<string name="SendNRcvReadReceipts">Recibir y enviar entradas leídas</string>
|
||||
<string name="E2EEncryption">Cifrado punto a punto</string>
|
||||
<string name="E2EManagePrivateKeys">Gestionar claves privadas</string>
|
||||
<string name="E2ECompareKeys">Comparar claves</string>
|
||||
<string name="ResetContactsKey">Reiniciar claves de contacto</string>
|
||||
<string name="ForwardToTitle">Elige el chat …</string>
|
||||
<string name="SelectContact">Elegir un contacto</string>
|
||||
<string name="DoneHint">Hecho.</string>
|
||||
@@ -374,6 +363,6 @@
|
||||
<string name="SettingsFor">Ajustes para %1$s</string>
|
||||
<string name="AutoplayGifs">Autorreproducción de GIF</string>
|
||||
<string name="HelpUrl">https://delta.chat/es/help</string>
|
||||
|
||||
</resources>
|
||||
|
||||
<string name="Encryption">Encriptación</string>
|
||||
<string name="Backup">Cópia de seguridad</string>
|
||||
</resources>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<resources>
|
||||
|
||||
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<string name="AppName">Delta Chat</string>
|
||||
<!--chats view-->
|
||||
<string name="Settings">Paramètres</string>
|
||||
@@ -223,7 +225,6 @@
|
||||
<string name="Intro6Message"><![CDATA[<b>Chiffré</b>]]> avec des algorithmes reconnus. Les messages restent sur vos serveurs.</string>
|
||||
|
||||
<string name="Intro7Headline">Fiable</string>
|
||||
<string name="Intro7Message"><![CDATA[<b>Delta Chat</b>]]> est sûr pour une utilisation professionnelle, compatible et basé sur des standards.</string>
|
||||
|
||||
<string name="IntroStartMessaging">Commencez à converser</string>
|
||||
<!--plural-->
|
||||
@@ -247,12 +248,10 @@
|
||||
<item quantity="one">%d message</item>
|
||||
<item quantity="other">%d messages</item>
|
||||
</plurals>
|
||||
|
||||
<plurals name="Chats">
|
||||
<item quantity="one">%d conversation</item>
|
||||
<item quantity="other">%d conversations</item>
|
||||
</plurals>
|
||||
|
||||
<plurals name="Minutes">
|
||||
<item quantity="one">%d minute</item>
|
||||
<item quantity="other">%d minutes</item>
|
||||
@@ -286,7 +285,6 @@
|
||||
<string name="AccountSettings">Paramètres du compte</string>
|
||||
<string name="MyAccount">Mon compte</string>
|
||||
<string name="MyName">Mon nom</string>
|
||||
<string name="MyNameExplain">Votre nom, tel que montré aux destinataires.\n\nSi vous ne saisissez pas un nom, les destinataires ne verront que votre adresse e-mail renseignée dans les paramètres de compte.</string>
|
||||
<string name="Password">Mot de passe</string>
|
||||
<string name="SmtpPassword">Mot de passe SMTP</string>
|
||||
<string name="FromAbove">Le même qu\'au dessus</string>
|
||||
@@ -311,15 +309,17 @@
|
||||
<string name="AskStartChatWith">Lancer une conversation avec <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>?</string>
|
||||
<string name="DeaddropHint">Pour lancer une conversation, cliquez sur le bouton de réponse en forme de flèche.</string>
|
||||
<string name="NotYetImplemented">Cette fonction n\'est pas disponible ou non supportée complètement.</string>
|
||||
<string name="DefaultStatusText">Envoyé avec Delta Chat</string>
|
||||
<string name="Name" >Nom</string>
|
||||
<string name="EmailAddress">Adresse e-mail</string>
|
||||
<string name="CannotDeleteContact">Impossible de supprimer les contacts en cours d\'utilisation, bloquez-les à la place.</string>
|
||||
<string name="BadEmailAddress">Mauvaise adresse e-mail.</string>
|
||||
<string name="ContactCreated">Utilisateur créé.</string>
|
||||
<string name="ViewProfile">Voir le profil</string>
|
||||
<!-- Translators: please use a very short string here, it should not much longer than
|
||||
the string needed for video time+size (0:00, 12,3 Mib) -->
|
||||
<string name="OneMoment">Veuillez patienter…</string>
|
||||
<string name="NoChatsHelp">Lancez une conversation en appuyant sur le bouton dans le coin inférieur droit ou appuyez sur le bouton menu pour plus d\'options.</string>
|
||||
<string name="Intro7Message"><![CDATA[<b>Delta Chat</b>]]> est sûr pour une utilisation professionnelle, compatible et basé sur des standards.</string>
|
||||
<string name="InviteMenuEntry">Envoyer des invitations</string>
|
||||
<string name="InviteText">J\'utilise la messagerie Delta Chat maintenant - %1$s - vous pouvez me contacter à %2$s</string>
|
||||
<string name="AdvancedSettings">Paramètres avancés</string>
|
||||
@@ -337,11 +337,8 @@
|
||||
<string name="ErrSelfNotInGroup">Vous devez être membre du groupe pour effectuer cette action.</string>
|
||||
<string name="MsgGroupLeft">Groupe quitté.</string>
|
||||
<string name="NoMessagesHint">Envoyez un message à <![CDATA[<b>]]>%1$s<![CDATA[</b>]]> :\n\n• Ça ne devrait pas poser de problème si <![CDATA[<b>]]>%2$s<![CDATA[</b>]]> n\'utilise pas Delta Chat\n\n• La livraison du premier message peut prendre un moment.</string>
|
||||
<string name="SendNRcvReadReceipts">Recevoir et envoyer les accusés de lecture</string>
|
||||
<string name="E2EEncryption">Chiffrement bout à bout</string>
|
||||
<string name="E2EManagePrivateKeys">Gérer les clefs privées</string>
|
||||
<string name="E2ECompareKeys">Comparer les clefs</string>
|
||||
<string name="ResetContactsKey">Reinitialiser les clefs de l\'utilisateur</string>
|
||||
<string name="ForwardToTitle">Renvoyer à…</string>
|
||||
<string name="DoneHint">Fait.</string>
|
||||
<string name="FileNotFound">Fichier %1$s non trouvé.</string>
|
||||
@@ -359,7 +356,6 @@
|
||||
<string name="ExportToDownloads">Exporter vers \"Downloads\"</string>
|
||||
<string name="ImportPrivateKeysAsk">Importer des clefs privées depuis \"Downloads\"?\n\n• Les clefs privées existantes ne sont pas supprimées\n\n• Les dernières clefs importées seront utilisées par défaut\n\nContinuer ?</string>
|
||||
<string name="Encryption">Chiffrement</string>
|
||||
<string name="EncrinfoE2E">La connexion est maintenant chiffré de bout-à-bout.</string>
|
||||
<string name="EncrinfoE2EExplain">Si toutes les empreintes digitales correspondent sur l\'autre appareil, la connexion est sûre.</string>
|
||||
<string name="EncrinfoTransport">Le chiffrement du transport au moins active sur mon serveur.</string>
|
||||
<string name="EncrinfoNone">Aucun chiffrement sur mon serveur.</string>
|
||||
@@ -367,4 +363,4 @@
|
||||
<string name="EncrinfoFingerprints">Empreintes digitales</string>
|
||||
<string name="Backup">Sauvegarde</string>
|
||||
<string name="ImportBackupExplain">Pour importer une sauvegarde, copiez celle-ci vers le répertoire \"Downloads\" et réinstallez l\'application.</string>
|
||||
</resources>
|
||||
</resources>
|
||||
|
||||
@@ -103,7 +103,6 @@
|
||||
<string name="SmartNotifications">Értesítések korlátja</string>
|
||||
<string name="SmartNotificationsSoundAtMost">Hangjelzés legfeljebb</string>
|
||||
<string name="SmartNotificationsTimes">alkalommal</string>
|
||||
<string name="SmartNotificationsWithin"> </string>
|
||||
<string name="SmartNotificationsMinutes">percen belül</string>
|
||||
<string name="DirectShare">Közvetlen megosztás</string>
|
||||
<string name="DirectShareInfo">A megosztás menüben a legutóbbi beszélgetések mutatása</string>
|
||||
@@ -254,9 +253,6 @@
|
||||
<item quantity="other">%d üzenet törlése? Az üzenetek a szerverről is törlődnek.</item>
|
||||
</plurals>
|
||||
<plurals name="NewMessagesInChats">
|
||||
<!-- Translators: the first string placeholder "%s" gets replaced with the
|
||||
text "%d new messages", so the complete sentence would be e.g.
|
||||
"4 new messages in 2 chats". -->
|
||||
<item quantity="one">%1$s %2$d beszélgetésben</item>
|
||||
<item quantity="other">%1$s %2$d beszélgetésben</item>
|
||||
</plurals>
|
||||
@@ -285,9 +281,6 @@
|
||||
<item quantity="other">%d hónap</item>
|
||||
</plurals>
|
||||
<plurals name="MaxNotifications">
|
||||
<!-- Translators: the second string placeholder "%s" gets replaced with the
|
||||
text "%d minutes", so the complete sentence would be e.g.
|
||||
"At most 8 notifications within 3 minutes". -->
|
||||
<item quantity="one">Legfeljebb %1$d értesítés %2$s alatt</item>
|
||||
<item quantity="other">Legfeljebb %1$d értesítés %2$s alatt</item>
|
||||
</plurals>
|
||||
@@ -304,7 +297,6 @@
|
||||
<string name="AccountSettings">Fiókbeállítások</string>
|
||||
<string name="MyAccount">Fiókom</string>
|
||||
<string name="MyName">Nevem</string>
|
||||
<string name="MyNameExplain">A címzetteknek megjelenő neved.\n\nHa nem adsz meg nevet, a címzett csak a fiókbeállításoknál megadott e-mail címedet látja.</string>
|
||||
<string name="Password">Jelszó</string>
|
||||
<string name="SmtpPassword">SMTP jelszó</string>
|
||||
<string name="FromAbove">fentről másolva</string>
|
||||
@@ -329,7 +321,6 @@
|
||||
<string name="AskStartChatWith">Beszélgetést indítasz <![CDATA[<b>]]>%1$s<![CDATA[</b>]]> partnerrel?</string>
|
||||
<string name="DeaddropHint">Beszélgetés indításához koppints a válasz-nyílra.</string>
|
||||
<string name="NotYetImplemented">Ez a funkció nem érhető el vagy még nem készült el.</string>
|
||||
<string name="DefaultStatusText">Delta Chat Messengerből küldve</string>
|
||||
<string name="Name" >Név</string>
|
||||
<string name="EmailAddress">E-mail cím</string>
|
||||
<string name="CannotDeleteContact">A használatban lévő névjegyet nem lehet törölni, ehelyett letilthatod a partnert.</string>
|
||||
@@ -358,14 +349,10 @@
|
||||
<string name="ErrSelfNotInGroup">Csoporttagnak kell lenned, hogy ezt megtehesd.</string>
|
||||
<string name="MsgGroupLeft">Kiléptél a csoportból.</string>
|
||||
<string name="NoMessagesHint">Üzenetküldés <![CDATA[<b>]]>%1$s<![CDATA[</b>]]> partnernek:\n\n• Nincs gond, ha <![CDATA[<b>]]>%2$s<![CDATA[</b>]]> nem használja a Delta Chatet.\n\n• Az első üzenet kézbesítése kicsit lassabb lehet.</string>
|
||||
<string name="SendNRcvReadReceipts">Tértivevények küldése és fogadása</string>
|
||||
<string name="E2EEncryption">Végpontok közötti titkosítás</string>
|
||||
<string name="E2EManagePrivateKeys">Privát kulcsok kezelése</string>
|
||||
<string name="E2ECompareKeys">Kulcsok összehasonlítása</string>
|
||||
<string name="ResetContactsKey">Partner kulcsának visszaállítása</string>
|
||||
<string name="ForwardToTitle">Továbbítás…</string>
|
||||
<string name="SelectContact">Válassz partnert</string>
|
||||
<string name="DoneHint">Kész.</string>
|
||||
<string name="FileNotFound">%1$s fájl nem található.</string>
|
||||
|
||||
</resources>
|
||||
</resources>
|
||||
|
||||
@@ -1,33 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--https://www.transifex.com/projects/p/telegram/language/it/members/-->
|
||||
|
||||
<resources>
|
||||
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<string name="AppName">Delta Chat</string>
|
||||
<!--chats view-->
|
||||
<string name="Settings">Impostazioni</string>
|
||||
<string name="NewGroup">Nuovo gruppo</string>
|
||||
<string name="NoResult">Nessun risultato</string>
|
||||
<string name="NoChats">Ancora nessuna chat.</string>
|
||||
<string name="NoChats">Ancora nessuna conversazione.</string>
|
||||
<string name="DeleteChat">Elimina chat</string>
|
||||
<string name="SelectChat">Seleziona chat …</string>
|
||||
<string name="Search">Cerca</string>
|
||||
<string name="MuteNotifications">Silenzia notifiche</string>
|
||||
<string name="MuteFor">Silenzia per %1$s</string>
|
||||
<string name="UnmuteNotifications">Suona</string>
|
||||
<string name="Draft">Bozza</string>
|
||||
<!--audio view-->
|
||||
<string name="NoAudio">Aggiungi file nella libreria musicale del tuo dispositivo per vederli qui.</string>
|
||||
<string name="NoAudio">Aggiungere i file nella libreria musicale del proprio dispositivo per vederli qui.</string>
|
||||
<string name="AttachMusic">Musica</string>
|
||||
<!--documents view-->
|
||||
<string name="SelectFile">Seleziona file</string>
|
||||
<string name="FreeOfTotal">Liberi %1$s di %2$s</string>
|
||||
<string name="FreeOfTotal">Liberi %1$s su %2$s</string>
|
||||
<string name="ErrorHint">Errore sconosciuto</string>
|
||||
<string name="AccessError">Errore durante l\'accesso</string>
|
||||
<string name="NoFiles">Ancora nessun file…</string>
|
||||
<string name="NotMounted">Archiviazione non montata</string>
|
||||
<string name="NotMounted">Archivio non montato</string>
|
||||
<string name="UsbActive">Trasferimento USB attivo</string>
|
||||
<string name="InternalStorage">Archiviazione interna</string>
|
||||
<string name="ExternalStorage">Archiviazione esterna</string>
|
||||
<string name="InternalStorage">Archivio interno</string>
|
||||
<string name="ExternalStorage">Archivio esterno</string>
|
||||
<string name="SystemRoot">Root di sistema</string>
|
||||
<string name="SdCard">Scheda SD</string>
|
||||
<string name="Folder">Cartella</string>
|
||||
@@ -35,54 +36,54 @@
|
||||
<!--chat view-->
|
||||
<string name="ChatGallery">Galleria</string>
|
||||
<string name="ChatCamera">Foto</string>
|
||||
<string name="NoMessages">Ancora nessun messaggio qui.</string>
|
||||
<string name="NoMessages">Non sono presenti messaggi.</string>
|
||||
<string name="ForwardedMessage">Messaggio inoltrato</string>
|
||||
<string name="From">Da</string>
|
||||
<string name="NoRecent">Nessun recente</string>
|
||||
<string name="TypeMessage">Messaggi</string>
|
||||
<string name="SlideToCancel">ANNULLA</string>
|
||||
<string name="SlideToCancel">SCORRI PER ANNULLARE</string>
|
||||
<string name="SaveToDownloads">Salva nei download</string>
|
||||
<string name="SaveToMusic">Salva nella musica</string>
|
||||
<string name="Share">Condividi</string>
|
||||
<string name="SendItems">Invia %1$s</string>
|
||||
<string name="ClearRecentEmoji">Cancellare le emoji recenti?</string>
|
||||
<string name="AddShortcut">Aggiungi scorciatoia</string>
|
||||
<string name="AddShortcut">Aggiungi scorciatoia alla home</string>
|
||||
<string name="ShortcutAdded">Scorciatoia aggiunta alla schermata home</string>
|
||||
<!--notification-->
|
||||
<string name="Reply">Rispondi</string>
|
||||
<string name="ReplyToGroup">Rispondi a %1$s</string>
|
||||
<string name="ReplyToContact">Rispondi a %1$s</string>
|
||||
<!--contacts view-->
|
||||
<string name="NoContacts">Ancora nessun contatto</string>
|
||||
<string name="NoContacts">Ancora nessun contatto.</string>
|
||||
<!--group create view-->
|
||||
<string name="SendMessageTo">Invia messaggio a…</string>
|
||||
<string name="EnterGroupNamePlaceholder">Immetti il nome del gruppo</string>
|
||||
<string name="EnterGroupNamePlaceholder">Inserire il nome del gruppo</string>
|
||||
<!--group info view-->
|
||||
<string name="AddMember">Aggiungi membro</string>
|
||||
<string name="AddMember">Aggiungi membri</string>
|
||||
<string name="Notifications">Notifiche</string>
|
||||
<string name="RemoveMember">Rimuovi dal gruppo</string>
|
||||
<!--contact info view-->
|
||||
<string name="NewContactTitle">Aggiungi contatto</string>
|
||||
<string name="BlockContact">Blocca</string>
|
||||
<string name="DeleteContact">Elimina</string>
|
||||
<string name="Info">Info</string>
|
||||
<string name="NewContactTitle">Nuovo contatto</string>
|
||||
<string name="BlockContact">Blocca utente</string>
|
||||
<string name="DeleteContact">Elimina contatto</string>
|
||||
<string name="Info">Informazioni</string>
|
||||
<!--settings view-->
|
||||
<string name="TextSize">Dimensione testo messaggi</string>
|
||||
<string name="UnblockContact">Sblocca</string>
|
||||
<string name="UnblockContact">Sblocca contatto</string>
|
||||
<string name="NoBlocked">Ancora nessun utente bloccato</string>
|
||||
<string name="DefaultForNormalMessages">Notifiche messaggio</string>
|
||||
<string name="DefaultForNormalMessages">Notifiche dei messaggi</string>
|
||||
<string name="MessagePreview">Anteprima messaggio</string>
|
||||
<string name="DefaultForGroupMessages">Notifiche di gruppo</string>
|
||||
<string name="DefaultForGroupMessages">Notifiche dai gruppi</string>
|
||||
<string name="Sound">Suono</string>
|
||||
<string name="InAppNotifications">Notifiche in-app</string>
|
||||
<string name="Vibrate">Vibrazione</string>
|
||||
<string name="ResetAllNotifications">Ripristina tutte le notifiche</string>
|
||||
<string name="NotificationsAndSounds">Notifiche e suoni</string>
|
||||
<string name="BlockedContacts">Utenti bloccati</string>
|
||||
<string name="BlockedContacts">Contatti bloccati</string>
|
||||
<string name="Default">Predefinite</string>
|
||||
<string name="OnlyIfSilent">Solo se silenzioso</string>
|
||||
<string name="ChatBackground">Sfondo chat</string>
|
||||
<string name="SendByEnter">Invia con tasto "invio"</string>
|
||||
<string name="SendByEnter">Invia con tasto \"Invio\"</string>
|
||||
<string name="Help">Domande frequenti</string>
|
||||
<string name="Enabled">Abilitate</string>
|
||||
<string name="Disabled">Disabilitata</string>
|
||||
@@ -105,29 +106,29 @@
|
||||
<string name="SmartNotificationsWithin">in</string>
|
||||
<string name="SmartNotificationsMinutes">minuti</string>
|
||||
<string name="DirectShare">Condivisione diretta</string>
|
||||
<string name="DirectShareInfo">Mostra le chat recenti nel menu condividi</string>
|
||||
<string name="DirectShareInfo">Mostra le chat recenti nel menù di condivisione</string>
|
||||
<!--cache view-->
|
||||
<string name="CacheSettings">Impostazioni cache</string>
|
||||
<string name="KeepMedia">Mantieni media</string>
|
||||
<string name="KeepMediaInfo">Foto, video e altri file dalle chat nel cloud che non hai <![CDATA[<b>aperto</b>]]> in questo periodo verranno eliminati dal dispositivo per preservare lo spazio sul disco.</string>
|
||||
<string name="CacheSettings">Archivio</string>
|
||||
<string name="KeepMedia">Mantieni file</string>
|
||||
<string name="KeepMediaInfo">Foto, video e altri file dalle chat nel cloud che <![CDATA[<b>non sono stati visualizzati</b>]]> in questo periodo verranno eliminati dal dispositivo per preservare lo spazio sul disco.</string>
|
||||
<string name="KeepMediaForever">Per sempre</string>
|
||||
<!--passcode view-->
|
||||
<string name="Passcode">Blocco con codice</string>
|
||||
<string name="ChangePasscode">Cambia codice</string>
|
||||
<string name="ChangePasscodeInfo">Quando imposti un codice, un\'icona col lucchetto apparirà nella pagina delle chat. Premi su di essa per bloccare e sbloccare l\'app.\n\nNota: se ti dimentichi il codice, dovrai disinstallare e reinstallare l\'app.</string>
|
||||
<string name="ChangePasscode">Cambia il codice</string>
|
||||
<string name="ChangePasscodeInfo">Quando viene impostato un codice, un\'icona con un lucchetto apparirà nella pagina delle chat. Premere su di essa per bloccare e sbloccare l\'applicazione.\n\nNota: se il codice viene dimenticato, si dovrà disinstallare e installare nuovamente l\'app.</string>
|
||||
<string name="PasscodePIN">PIN</string>
|
||||
<string name="PasscodePassword">Password</string>
|
||||
<string name="EnterCurrentPasscode">Inserisci il tuo codice corrente</string>
|
||||
<string name="EnterNewFirstPasscode">Inserisci un codice</string>
|
||||
<string name="EnterNewPasscode">Inserisci il nuovo codice</string>
|
||||
<string name="EnterYourPasscode">Inserisci il tuo codice</string>
|
||||
<string name="ReEnterYourPasscode">Reinserisci il nuovo codice</string>
|
||||
<string name="EnterCurrentPasscode">Inserire il codice corrente</string>
|
||||
<string name="EnterNewFirstPasscode">Inserire un codice</string>
|
||||
<string name="EnterNewPasscode">Inserire il nuovo codice</string>
|
||||
<string name="EnterYourPasscode">Inserisci il codice</string>
|
||||
<string name="ReEnterYourPasscode">Inserire nuovamente il nuovo codice</string>
|
||||
<string name="PasscodeDoNotMatch">I codici non corrispondono</string>
|
||||
<string name="AutoLock">Blocco automatico</string>
|
||||
<string name="AutoLockInfo">Richiede il codice se lontano per del tempo.</string>
|
||||
<string name="UnlockFingerprint">Sblocca con impronta digitale</string>
|
||||
<string name="FingerprintInfo">Conferma impronta digitale per continuare</string>
|
||||
<string name="FingerprintNotRecognized">Impronta digitale non riconosciuta. Riprova</string>
|
||||
<string name="FingerprintInfo">Confermare impronta digitale per continuare</string>
|
||||
<string name="FingerprintNotRecognized">Impronta non riconosciuta. Riprovare</string>
|
||||
<!--photo gallery view-->
|
||||
<string name="SaveToGallery">Salva nella galleria</string>
|
||||
<string name="Of">%1$d di %2$d</string>
|
||||
@@ -139,7 +140,7 @@
|
||||
<string name="CropImage">Ritaglia immagine</string>
|
||||
<string name="EditImage">Modifica immagine</string>
|
||||
<string name="Enhance">Migliora</string>
|
||||
<string name="Highlights">Alte luci</string>
|
||||
<string name="Highlights">Punti luce</string>
|
||||
<string name="Contrast">Contrasto</string>
|
||||
<string name="Exposure">Esposizione</string>
|
||||
<string name="Warmth">Calore</string>
|
||||
@@ -148,10 +149,10 @@
|
||||
<string name="Shadows">Ombre</string>
|
||||
<string name="Grain">Grana</string>
|
||||
<string name="Sharpen">Nitidezza</string>
|
||||
<string name="Fade">Sfumatura</string>
|
||||
<string name="Tint">Colore</string>
|
||||
<string name="Fade">Dissolvenza</string>
|
||||
<string name="Tint">Tonalità</string>
|
||||
<string name="TintShadows">OMBRE</string>
|
||||
<string name="TintHighlights">ALTE LUCI</string>
|
||||
<string name="TintHighlights">PUNTI LUCE</string>
|
||||
<string name="Curves">Curve</string>
|
||||
<string name="CurvesAll">TUTTO</string>
|
||||
<string name="CurvesRed">ROSSO</string>
|
||||
@@ -176,7 +177,7 @@
|
||||
<string name="Cancel">Annulla</string>
|
||||
<string name="Edit">Modifica</string>
|
||||
<string name="Send">Invia</string>
|
||||
<string name="CopyToClipboard">Copia</string>
|
||||
<string name="CopyToClipboard">Copia negli appunti</string>
|
||||
<string name="Delete">Elimina</string>
|
||||
<string name="Forward">Inoltra</string>
|
||||
<string name="FromCamera">Dalla fotocamera</string>
|
||||
@@ -193,26 +194,53 @@
|
||||
<string name="AttachVoiceMessage">Messaggio vocale</string>
|
||||
<string name="FromSelf">Tu</string>
|
||||
<!--Alert messages-->
|
||||
<string name="NoHandleAppInstalled">Non hai applicazioni che possono gestire il tipo di file \'%1$s\': installane una per proseguire</string>
|
||||
<string name="AskAddMemberToGroup">Aggiungere <![CDATA[<b>]]>%1$s<![CDATA[</b>]]> al gruppo?</string>
|
||||
<string name="ContactAlreadyInGroup">Questo utente è già membro del gruppo</string>
|
||||
<string name="ForwardMessagesTo">Vuoi inoltrare i messaggi a <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>?</string>
|
||||
<string name="NoHandleAppInstalled">Non sono presenti applicazioni che possono gestire file di tipo \"%1$s\". Installarne una per proseguire</string>
|
||||
<string name="ContactAlreadyInGroup">Questo utente è già membro del gruppo.</string>
|
||||
<string name="ForwardMessagesTo">Inoltrare i messaggi selezionati a <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>?</string>
|
||||
<string name="SendMessagesTo">Inviare i messaggi a <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>?</string>
|
||||
<string name="AreYouSureDeleteThisChat">Sei sicuro di voler eliminare questa chat?</string>
|
||||
<string name="AreYouSureBlockContact">Vuoi bloccare questo contatto?</string>
|
||||
<string name="AreYouSureDeleteContact">Sei sicuro di voler eliminare questo contatto?</string>
|
||||
<string name="AreYouSureDeleteThisChat">Eliminare veramente questa conversazione? In questo modo non verrà più mostrata nell\'elenco delle chat, i messaggi rimarranno sul server.</string>
|
||||
<string name="AreYouSureBlockContact">Bloccare veramente questo contatto?</string>
|
||||
<string name="AreYouSureDeleteContact">Eliminare veramente questo contatto?</string>
|
||||
<!--permissions-->
|
||||
<string name="PermissionContacts">Delta Chat deve accedere ai tuoi contatti per poterti connettere con i tuoi amici su tutti i tuoi dispositivi.</string>
|
||||
<string name="PermissionStorage">Delta Chat deve accedere alla tua memoria per poter inviare e salvare foto,video, musica e altri media.</string>
|
||||
<string name="PermissionNoAudio">Delta Chat deve accedere al microfono per poter inviare messaggi vocali.</string>
|
||||
<string name="PermissionContacts">Delta Chat deve accedere ai contatti per consentire di poter comunicare con loro da tutti i propri dispositivi.</string>
|
||||
<string name="PermissionStorage">Delta Chat deve accedere all\'archivio del dispositivo per poter inviare e salvare foto, video, musica e altri file.</string>
|
||||
<string name="PermissionNoAudio">Delta Chat deve accedere al microfono per consentire l\'invio di messaggi vocali.</string>
|
||||
<string name="PermissionOpenSettings">Impostazioni</string>
|
||||
<!--Intro view-->
|
||||
<string name="IntroStartMessaging">Inizia a chattare</string>
|
||||
<string name="Intro1Headline">Delta Chat</string>
|
||||
<string name="Intro1Message">L\'app di messaggistica con la <![CDATA[<b>maggiore estensione</b>]]> nel mondo.<![CDATA[<br/><b>Libera</b>]]> e <![CDATA[<b>sicura</b>]]>.</string>
|
||||
|
||||
<string name="Intro2Headline">Indipendente</string>
|
||||
<string name="Intro2Message"><![CDATA[<b>Nessuna necessità</b>]]> di servizi o computer sconosciuti. L\'applicazione usa solo il tuo server email.</string>
|
||||
|
||||
<string name="Intro3Headline">Veloce</string>
|
||||
<string name="Intro3Message"><![CDATA[<b>Messaggi push</b>]]> in pochi secondi.<![CDATA[<br/>]]>Interfaccia semplice.</string>
|
||||
|
||||
<string name="Intro4Headline">Potente</string>
|
||||
<string name="Intro4Message"><![CDATA[<b>Invio illimitato</b>]]> di chat, immagini, video, messaggi audio a altro. Anche multi-client.</string>
|
||||
|
||||
<string name="Intro5Headline">Libera</string>
|
||||
<string name="Intro5Message"><![CDATA[<b>Delta Chat</b>]]> è libero per sempre.<![CDATA[<br/>]]>Open-source. No ads. No iscrizioni. No restrizioni del fornitore.</string>
|
||||
|
||||
<string name="Intro6Headline">Sicura</string>
|
||||
<string name="Intro6Message"><![CDATA[<b>Crittografato</b>]]> con tutti gli algoritmi più diffusi. I messaggi rimangono sul tuo server.</string>
|
||||
|
||||
<string name="Intro7Headline">Affidabile</string>
|
||||
|
||||
<string name="IntroStartMessaging">Inizia a comunicare</string>
|
||||
<!--plural-->
|
||||
<plurals name="Members">
|
||||
<item quantity="one">%d membro</item>
|
||||
<item quantity="other">%d membri</item>
|
||||
</plurals>
|
||||
<plurals name="Contacts">
|
||||
<item quantity="one">%d contatto</item>
|
||||
<item quantity="other">%d contatti</item>
|
||||
</plurals>
|
||||
<plurals name="MeAndMembers">
|
||||
<item quantity="one">Io e %d membro</item>
|
||||
<item quantity="other">Io e %d membri</item>
|
||||
</plurals>
|
||||
<plurals name="NewMessages">
|
||||
<item quantity="one">%d nuovo messaggio</item>
|
||||
<item quantity="other">%d nuovi messaggi</item>
|
||||
@@ -221,12 +249,18 @@
|
||||
<item quantity="one">%d messaggio</item>
|
||||
<item quantity="other">%d messaggi</item>
|
||||
</plurals>
|
||||
|
||||
<plurals name="Chats">
|
||||
<item quantity="one">%d chat</item>
|
||||
<item quantity="other">%d chat</item>
|
||||
<plurals name="AreYouSureDeleteMessages">
|
||||
<item quantity="one">Eliminare %d messaggio? Il messaggio verrà eliminato anche dal server.</item>
|
||||
<item quantity="other">Eliminare %d messaggi? I messaggi verranno eliminati anche dal server.</item>
|
||||
</plurals>
|
||||
<plurals name="NewMessagesInChats">
|
||||
<item quantity="one">%1$s in %2$d conversazione</item>
|
||||
<item quantity="other">%1$s in %2$d conversazioni</item>
|
||||
</plurals>
|
||||
<plurals name="Chats">
|
||||
<item quantity="one">%d conversazione</item>
|
||||
<item quantity="other">%d conversazioni</item>
|
||||
</plurals>
|
||||
|
||||
<plurals name="Minutes">
|
||||
<item quantity="one">%d minuto</item>
|
||||
<item quantity="other">%d minuti</item>
|
||||
@@ -247,20 +281,112 @@
|
||||
<item quantity="one">%d mese</item>
|
||||
<item quantity="other">%d mesi</item>
|
||||
</plurals>
|
||||
<plurals name="MaxNotifications">
|
||||
<item quantity="one">Al massimo %1$d notifica in %2$s</item>
|
||||
<item quantity="other">Al massimo %1$d notifiche in %2$s</item>
|
||||
</plurals>
|
||||
<!--date formatters-->
|
||||
<string name="formatterMonthYear">MMMM yyyy</string>
|
||||
<string name="formatterMonth">dd MMM</string>
|
||||
<string name="formatterYear">dd.MM.yyyy</string>
|
||||
<string name="chatDate">EEE, d MMMM</string>
|
||||
<string name="chatFullDate">EEE, d MMMM, yyyy</string>
|
||||
<string name="formatterMonth">d MMMM</string>
|
||||
<string name="formatterYear">dd/MM/yyyy</string>
|
||||
<string name="chatDate">EEE d MMMM</string>
|
||||
<string name="chatFullDate">EEE d MMMM yyyy</string>
|
||||
<string name="formatterWeek">EEE</string>
|
||||
<string name="formatterDay24H">HH:mm</string>
|
||||
<string name="formatterDay12H">h:mm a</string>
|
||||
<string name="formatterDay12H">hh:mm a</string>
|
||||
<string name="formatDateAtTime">%1$s alle %2$s</string>
|
||||
<string name="AccountSettings">Impostazioni account</string>
|
||||
<string name="MyAccount">Il mio account</string>
|
||||
<string name="MyName">Il mio nome</string>
|
||||
<string name="MyNameExplain">Il proprio nome, così some verrà mostrato ai destinatari. Se non verrà inserito nulla, i destinatari visualizzeranno solo l\'indirizzo email.</string>
|
||||
<string name="Password">Password</string>
|
||||
<string name="SmtpPassword">Password SMTP</string>
|
||||
<string name="FromAbove">Da sopra</string>
|
||||
<string name="SmtpLoginname">Nome utente SMTP</string>
|
||||
<string name="SmtpPort">Porta SMTP</string>
|
||||
<string name="Automatic">Automatica</string>
|
||||
<string name="ImapServer">Server IMAP</string>
|
||||
<string name="ImapLoginname">Nome utente IMAP</string>
|
||||
<string name="SmtpServer">Server SMTP</string>
|
||||
<string name="ImapPort">Porta IMAP</string>
|
||||
<string name="InboxHeadline">In arrivo</string>
|
||||
<string name="OutboxHeadline">In uscita</string>
|
||||
<string name="MyAccountExplain">Per i provider email conosciuti, le impostazioni aggiuntive vengono configurate automaticamente.</string>
|
||||
<string name="MyAccountExplain2" >A volte, <![CDATA[<b>]]>IMAP deve essere abilitato<![CDATA[</b>]]> dall\'interfaccia web dell\'email.\n\nSe si riscontrano problemi contattare il proprio provider email o i propri amici.</string>
|
||||
<string name="AccountNotConfigured">Account non configurato</string>
|
||||
<string name="AboutThisProgram">Informazioni su Delta Chat</string>
|
||||
<string name="NotSet">Non impostato</string>
|
||||
<string name="NewChat">Nuova chat</string>
|
||||
<string name="Deaddrop">Richieste di contatto</string>
|
||||
<string name="DeaddropInChatlist">Mostra le richieste di contatto nell\'elenco delle chat</string>
|
||||
<string name="MuteAlways">Sempre silenziato</string>
|
||||
<string name="AskStartChatWith">Iniziare una conversazione con <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>?</string>
|
||||
<string name="DeaddropHint">Per iniziare una conversazione toccare le frecce di risposta.</string>
|
||||
<string name="NotYetImplemented">Funzione non disponibile o incompleta.</string>
|
||||
<string name="DefaultStatusText">Inviato con la mia app di messaggistica Delta Chat. Perdonate la brevità.</string>
|
||||
<string name="Name" >Nome</string>
|
||||
<string name="EmailAddress">Indirizzo email</string>
|
||||
<string name="CannotDeleteContact">Impossibile cancellare i contatti in uso, provare a bloccarli.</string>
|
||||
<string name="BadEmailAddress">Indirizzo email non valido.</string>
|
||||
<string name="ContactCreated">Contatto creato.</string>
|
||||
<string name="ViewProfile">Visualizza profilo</string>
|
||||
<!-- Translators: please use a very short string here, it should not much longer than
|
||||
the string needed for video time+size (0:00, 12,3 Mib) -->
|
||||
<string name="OneMoment">Un momento...</string>
|
||||
<string name="NoChatsHelp">Inizia a conversare toccando il tasto \"Nuova Chat \"nell\'angolo in basso a destra o premere il pulsante menù per altre opzioni.</string>
|
||||
<string name="Intro7Message"><![CDATA[<b>Delta Chat</b>]]> è sicura per l\'uso professionale, compatibile e basata sugli standard.</string>
|
||||
<string name="InviteMenuEntry">Invita amici</string>
|
||||
<string name="InviteText">Ora sto usando l\'applicazione di messaggistica Delta Chat - %1$s - puoi scrivermi all\'indirizzo %2$s</string>
|
||||
<string name="AdvancedSettings">Impostazioni avanzate</string>
|
||||
<string name="AskResetNotifications" >Ripristinare tutte le impostazioni di notifica e suoni per questa pagina, i contatti e i gruppi?</string>
|
||||
<string name="AttachFiles">Allega file</string>
|
||||
<string name="ErrGroupNameEmpty">Inserire un nome per il gruppo.</string>
|
||||
<string name="MsgNewGroupDraftHint">Scrivere il primo messaggio per permettere agli altri componenti di rispondere nel gruppo\n\n• Va bene anche se non tutti i membri usano Delta Chat.\n\n• L\'invio del primo messaggio può richiedere qualche secondo.</string>
|
||||
<string name="MsgNewGroupDraft">Ciao, ho appena creato per noi il gruppo \"%1$s\".</string>
|
||||
<string name="MsgGroupNameChanged">Nome del gruppo cambiato da \"%1$s\" a \"%2$s\".</string>
|
||||
<string name="MsgGroupImageChanged">Immagine del gruppo modificata.</string>
|
||||
<string name="MsgMemberAddedToGroup">Utente %1$s aggiunto.</string>
|
||||
<string name="MsgMemberRemovedFromToGroup">Utente %1$s rimosso.</string>
|
||||
<string name="AskAddMemberToGroup">Aggiungere <![CDATA[<b>]]>%1$s<![CDATA[</b>]]> al gruppo?</string>
|
||||
<string name="AskRemoveMemberFromGroup">Rimuovere <![CDATA[<b>]]>%1$s<![CDATA[</b>]]> dal gruppo?</string>
|
||||
<string name="ErrSelfNotInGroup">È necessario essere un membro del gruppo per eseguire questa azione.</string>
|
||||
<string name="MsgGroupLeft">Gruppo abbandonato.</string>
|
||||
<string name="NoMessagesHint">Invia un messaggio a <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>:\n\n• Va bene anche se <![CDATA[<b>]]>%2$s<![CDATA[</b>]]> non usa Delta Chat.\n\n• L\'invio del primo messaggio può richiedere del tempo.</string>
|
||||
<string name="SendNRcvReadReceipts">Ricevi e invia ricevute di ritorno.</string>
|
||||
<string name="PreferE2EEncryption">Preferisci crittografia end-to-end</string>
|
||||
<string name="E2EManagePrivateKeys">Gestione chiavi private</string>
|
||||
<string name="E2ECompareKeys">Compara chiavi</string>
|
||||
<string name="ForwardToTitle">Seleziona chat …</string>
|
||||
<string name="SelectContact">Scegli un contatto</string>
|
||||
<string name="DoneHint">Fatto.</string>
|
||||
<string name="AutoplayGifs">Autoriproduzione GIF</string>
|
||||
|
||||
<string name="FileNotFound">File %1$s non trovato.</string>
|
||||
<string name="Error">Errore: %1$s</string>
|
||||
<string name="NoNetwork">Rete non disponibile.</string>
|
||||
<string name="Audio">Audio</string>
|
||||
<string name="PleaseCutVideoToMaxSize">Ridurre il video alla dimensione massima di %1$s.</string>
|
||||
<string name="PermNotificationTitle">Connesso a%1$s</string>
|
||||
<string name="PermNotificationText">In attesa di messaggi...</string>
|
||||
<string name="SettingsFor">Impostazioni per %1$s</string>
|
||||
<string name="AutoplayGifs">Riproduzione automatica GIF</string>
|
||||
<string name="HelpUrl">https://delta.chat/en/help</string>
|
||||
<string name="EncryptedMessage">Messaggio cifrato</string>
|
||||
<string name="ImportFromDownloads">Importa da \"Download\"</string>
|
||||
<string name="ExportToDownloads">Esporta in \"Download\"</string>
|
||||
<string name="ImportPrivateKeysAsk">Importare chiavi private da \"Download\"?\n\n• Le chiavi private esistenti non vengono cancellate\n\n• L\'ultima chiave importata sarà usata come predefinita\n\nContinuare?</string>
|
||||
<string name="Encryption">Crittografia</string>
|
||||
<string name="EncrinfoE2E">Crittografia end-to-end abilitata.</string>
|
||||
<string name="EncrinfoE2EExplain">Se tutte le impronte corrispondono sull\'altro dispositivo, la connessione è sicura.</string>
|
||||
<string name="EncrinfoTransport">Crittografa il trasferimento almeno al mio server.</string>
|
||||
<string name="EncrinfoNone">Non crittografare sul mio server.</string>
|
||||
<string name="EncrinfoNoE2EExplain">La crittografia end-to-end verrà attivata automaticamente quando il contatto usa Delta Chat o un altra applicazione che utilizza Autocrypt.</string>
|
||||
<string name="EncrinfoFingerprints">Impronte digitali</string>
|
||||
<string name="Backup">Backup</string>
|
||||
<string name="ImportBackupExplain">Per importare un backup, copiarlo nella cartella \"Download\" e reinstalla l\'app.</string>
|
||||
<string name="ReadReceiptMailBody">Questa è una ricevuta di ritorno del messaggio \"%1$s\".\n\nQuesta ricevuta conferma solo che il messaggio è arrivato sul dispositivo del destinatario. Non c\'è alcuna garanzia che il destinatario abbia letto il contenuto del messaggio.</string>
|
||||
<string name="ReadReceipt">Ricevuta di ritorno</string>
|
||||
<string name="NameAndStatus">Nome e stato</string>
|
||||
<string name="MyStatus">Il mio stato</string>
|
||||
<string name="MyStatusExplain">Lo stato viene mostrato nel proprio profilo e nel piè di pagina delle email.</string>
|
||||
<string name="MsgGroupImageDeleted">Immagine del gruppo eliminata.</string>
|
||||
<string name="AskDeleteGroupImage">Rimuovere veramente l\'immagine del gruppo?\n\nQuesto avrà effetto su tutti i dispositivi di tutti i membri del gruppo.</string>
|
||||
</resources>
|
||||
|
||||
@@ -326,7 +326,7 @@
|
||||
<string name="AccountSettings">Ustawienia konta</string>
|
||||
<string name="MyAccount">Moje konto</string>
|
||||
<string name="MyName">Moja nazwa</string>
|
||||
<string name="MyNameExplain">Twoja nazwa, pokazywana odbiorcom.\n\nJeśli nie wprowadzisz nazwy, odbiorcy będą widzieć tylko twój adres e-mail z ustawień konta.</string>
|
||||
<string name="MyNameExplain">Twoja nazwa, pokazywana odbiorcom. Jeśli nie wprowadzisz nazwy, odbiorcy będą widzieć tylko twój adres e-mail.</string>
|
||||
<string name="Password">Hasło</string>
|
||||
<string name="SmtpPassword">SMTP hasło</string>
|
||||
<string name="FromAbove">Jak wyżej</string>
|
||||
@@ -351,7 +351,7 @@
|
||||
<string name="AskStartChatWith">Rozpocząć czat z <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>?</string>
|
||||
<string name="DeaddropHint">Aby rozpocząć czat, naciśnij strzałkę odpowiedzi.</string>
|
||||
<string name="NotYetImplemented">Ta funkcja jest niedostępna lub niekompletna.</string>
|
||||
<string name="DefaultStatusText">Wysłane z komunikatora Delta Chat</string>
|
||||
<string name="DefaultStatusText">Wysłano moim komunikatorem Delta Chat. Proszę o wybaczenie mojej lakoniczności.</string>
|
||||
<string name="Name" >Nazwa</string>
|
||||
<string name="EmailAddress">Adres e-mail</string>
|
||||
<string name="CannotDeleteContact">Nie możesz usunąć kontaktu w użyciu, zamiast tego zablokuj kontakt.</string>
|
||||
@@ -384,7 +384,6 @@
|
||||
<string name="PreferE2EEncryption">Preferuj pełne szyfrowanie</string>
|
||||
<string name="E2EManagePrivateKeys">Zarządzaj prywatnymi kluczami</string>
|
||||
<string name="E2ECompareKeys">Porównaj klucze</string>
|
||||
<string name="ResetContactsKey">Resetuj klucz kontaktu</string>
|
||||
<string name="ForwardToTitle">Przekaż do…</string>
|
||||
<string name="SelectContact">Wybierz kontakt</string>
|
||||
<string name="DoneHint">Gotowe.</string>
|
||||
@@ -413,4 +412,9 @@
|
||||
<string name="ImportBackupExplain">Aby zaimportować kopię zapasową, skopiuj ją do folderu \"Downloads\" i ponownie zainstaluj aplikację.</string>
|
||||
<string name="ReadReceiptMailBody">To jest potwierdzenie odczytu dla wiadomości ”%1$s„.\n\nTo potwierdzenie odczytu tylko informuje, że wiadomość została wyświetlona na urządzeniu odbiorcy. Nie ma gwarancji, że odbiorca przeczytał treść wiadomości.</string>
|
||||
<string name="ReadReceipt">Potwierdzenie odczytu</string>
|
||||
<string name="NameAndStatus">Nazwa i status</string>
|
||||
<string name="MyStatus">Mój status</string>
|
||||
<string name="MyStatusExplain">Status jest widoczny w twoim profilu i w stopce maili.</string>
|
||||
<string name="MsgGroupImageDeleted">Usunięto obraz grupy.</string>
|
||||
<string name="AskDeleteGroupImage">Czy na pewno usunąć obraz grupy?\n\nTo wpłynie na wszystkie urządzenia, wszystkich członków grupy.</string>
|
||||
</resources>
|
||||
|
||||
@@ -2,41 +2,41 @@
|
||||
|
||||
|
||||
|
||||
<resources>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<string name="AppName">Delta Chat</string>
|
||||
<!--chats view-->
|
||||
<string name="Settings">Configurações</string>
|
||||
<string name="NewGroup">Novo Grupo</string>
|
||||
<string name="NoResult">Nenhum resultado</string>
|
||||
<string name="NoChats">Ainda não há chats.</string>
|
||||
<string name="NewGroup">Novo grupo</string>
|
||||
<string name="NoResult">Nenhum resultado.</string>
|
||||
<string name="NoChats">Ainda não há conversas.</string>
|
||||
<string name="DeleteChat">Apagar conversa</string>
|
||||
<string name="SelectChat">Selecione um Chat …</string>
|
||||
<string name="Search">Busca</string>
|
||||
<string name="SelectChat">Selecione uma conversa…</string>
|
||||
<string name="Search">Buscar</string>
|
||||
<string name="MuteNotifications">Silenciar notificações</string>
|
||||
<string name="MuteFor">Silenciar por %1$s</string>
|
||||
<string name="UnmuteNotifications">Restaurar Som</string>
|
||||
<string name="UnmuteNotifications">Restaurar som</string>
|
||||
<string name="Draft">Rascunho</string>
|
||||
<!--audio view-->
|
||||
<string name="NoAudio">Por favor, adicione arquivos à biblioteca de música de seu dispositivo para vê-los aqui.</string>
|
||||
<string name="NoAudio">Por favor, adicione músicas à sua biblioteca para vê-las aqui.</string>
|
||||
<string name="AttachMusic">Música</string>
|
||||
<!--documents view-->
|
||||
<string name="SelectFile">Selecione um Arquivo</string>
|
||||
<string name="SelectFile">Selecione um arquivo</string>
|
||||
<string name="FreeOfTotal">Disponível %1$s de %2$s</string>
|
||||
<string name="ErrorHint">Erro desconhecido</string>
|
||||
<string name="AccessError">Erro de acesso</string>
|
||||
<string name="NoFiles">Ainda não há arquivos</string>
|
||||
<string name="NotMounted">Armazenamento não está montado</string>
|
||||
<string name="NoFiles">Ainda não há arquivos...</string>
|
||||
<string name="NotMounted">O armazenamento não está acessível</string>
|
||||
<string name="UsbActive">Transferência USB ativa</string>
|
||||
<string name="InternalStorage">Armazenamento interno</string>
|
||||
<string name="ExternalStorage">Armazenamento externo</string>
|
||||
<string name="SystemRoot">Administrador do Sistema</string>
|
||||
<string name="SystemRoot">Raíz do sistema</string>
|
||||
<string name="SdCard">Cartão SD</string>
|
||||
<string name="Folder">Pasta</string>
|
||||
<string name="GalleryInfo">Para enviar imagens sem compressão</string>
|
||||
<string name="GalleryInfo">Enviar imagens sem compressão</string>
|
||||
<!--chat view-->
|
||||
<string name="ChatGallery">Galeria</string>
|
||||
<string name="ChatCamera">Câmera</string>
|
||||
<string name="NoMessages">Ainda não há mensagens aqui.</string>
|
||||
<string name="NoMessages">Sem mensagens.</string>
|
||||
<string name="ForwardedMessage">Mensagem encaminhada</string>
|
||||
<string name="From">De</string>
|
||||
<string name="NoRecent">Nada recente</string>
|
||||
@@ -47,14 +47,14 @@
|
||||
<string name="Share">Compartilhar</string>
|
||||
<string name="SendItems">Enviar %1$s</string>
|
||||
<string name="ClearRecentEmoji">Limpar emojis recentes?</string>
|
||||
<string name="AddShortcut">Adicionar atalho</string>
|
||||
<string name="AddShortcut">Adicionar atalho à tela de início</string>
|
||||
<string name="ShortcutAdded">Atalho adicionado à tela de início</string>
|
||||
<!--notification-->
|
||||
<string name="Reply">Responder</string>
|
||||
<string name="ReplyToGroup">Responder para %1$s</string>
|
||||
<string name="ReplyToContact">Responder para %1$s</string>
|
||||
<!--contacts view-->
|
||||
<string name="NoContacts">Ainda não há contatos</string>
|
||||
<string name="NoContacts">Ainda não há contatos.</string>
|
||||
<!--group create view-->
|
||||
<string name="SendMessageTo">Enviar mensagem para…</string>
|
||||
<string name="EnterGroupNamePlaceholder">Digite o nome do grupo</string>
|
||||
@@ -66,67 +66,67 @@
|
||||
<string name="NewContactTitle">Adicionar contato</string>
|
||||
<string name="BlockContact">Bloquear</string>
|
||||
<string name="DeleteContact">Apagar contato</string>
|
||||
<string name="Info">Info</string>
|
||||
<string name="Info">Informações</string>
|
||||
<!--settings view-->
|
||||
<string name="TextSize">Tamanho do texto nas mensagens</string>
|
||||
<string name="UnblockContact">Desbloquear</string>
|
||||
<string name="NoBlocked">Nenhum usuário bloqueado</string>
|
||||
<string name="DefaultForNormalMessages">Notificações de mensagens</string>
|
||||
<string name="MessagePreview">Visualização de Mensagem</string>
|
||||
<string name="NoBlocked">Nenhum contato bloqueado</string>
|
||||
<string name="DefaultForNormalMessages">Mensagens normais</string>
|
||||
<string name="MessagePreview">Pré-visualização de mensagem</string>
|
||||
<string name="DefaultForGroupMessages">Notificações de grupo</string>
|
||||
<string name="Sound">Som</string>
|
||||
<string name="InAppNotifications">Notificações no aplicativo</string>
|
||||
<string name="Vibrate">Vibrar</string>
|
||||
<string name="Vibrate">Vibração</string>
|
||||
<string name="ResetAllNotifications">Restaurar configurações</string>
|
||||
<string name="NotificationsAndSounds">Notificações e Sons</string>
|
||||
<string name="BlockedContacts">Usuários bloqueados</string>
|
||||
<string name="NotificationsAndSounds">Notificações e sons</string>
|
||||
<string name="BlockedContacts">Contatos bloqueados</string>
|
||||
<string name="Default">Padrão</string>
|
||||
<string name="OnlyIfSilent">Somente no silencioso</string>
|
||||
<string name="ChatBackground">Papel de parede</string>
|
||||
<string name="SendByEnter">Enviar usando \'Enter\'</string>
|
||||
<string name="Help">Ajuda</string>
|
||||
<string name="Help">Perguntas frequentes</string>
|
||||
<string name="Enabled">Ativado</string>
|
||||
<string name="Disabled">Desativado</string>
|
||||
<string name="LedColor">Cor do LED</string>
|
||||
<string name="BadgeNumber">Contador no ícone</string>
|
||||
<string name="BadgeNumber">Exibir contador no ícone se possível</string>
|
||||
<string name="Short">Curta</string>
|
||||
<string name="Long">Longa</string>
|
||||
<string name="RaiseToSpeak">Levantar para Falar</string>
|
||||
<string name="RaiseToSpeak">Levantar para falar</string>
|
||||
<string name="EditName">Editar nome</string>
|
||||
<string name="NotificationsPriority">Prioridade</string>
|
||||
<string name="NotificationsPriorityDefault">Padrão</string>
|
||||
<string name="NotificationsPriorityHigh">Alta</string>
|
||||
<string name="NotificationsPriorityMax">Máxima</string>
|
||||
<string name="RepeatNotifications">Repetir Notificações</string>
|
||||
<string name="NotificationsPriority">Visualizar</string>
|
||||
<string name="NotificationsPriorityDefault">Prioridade normal</string>
|
||||
<string name="NotificationsPriorityHigh">Prioridade alta</string>
|
||||
<string name="NotificationsPriorityMax">Prioridade máxima</string>
|
||||
<string name="RepeatNotifications">Repetir notificações</string>
|
||||
<string name="NotificationsOther">Outro</string>
|
||||
<string name="InChatSound">Sons no Chat</string>
|
||||
<string name="SmartNotifications">Notificações Inteligentes</string>
|
||||
<string name="InChatSound">Sons nas conversas</string>
|
||||
<string name="SmartNotifications">Limitar notificações</string>
|
||||
<string name="SmartNotificationsSoundAtMost">Tocar no máximo</string>
|
||||
<string name="SmartNotificationsTimes">vezes</string>
|
||||
<string name="SmartNotificationsWithin">a cada</string>
|
||||
<string name="SmartNotificationsMinutes">minutos</string>
|
||||
<string name="DirectShare">Compartilhamento direto</string>
|
||||
<string name="DirectShareInfo">Mostrar chats recentes no menu compartilhar</string>
|
||||
<string name="DirectShareInfo">Mostrar conversas recentes no menu compartilhar</string>
|
||||
<!--cache view-->
|
||||
<string name="CacheSettings">Armazenamento</string>
|
||||
<string name="KeepMedia">Manter Mídias</string>
|
||||
<string name="KeepMedia">Manter mídias</string>
|
||||
<string name="KeepMediaInfo">Fotos, vídeos e outros arquivos da nuvem que você <![CDATA[<b>não acessou</b>]]> durante esse período serão removidos deste dispositivo para economizar espaço em disco.</string>
|
||||
<string name="KeepMediaForever">Permanentemente</string>
|
||||
<!--passcode view-->
|
||||
<string name="Passcode">Senha de Bloqueio</string>
|
||||
<string name="ChangePasscode">Alterar Senha</string>
|
||||
<string name="ChangePasscodeInfo">Quando você define uma senha adicional, um ícone de cadeado aparece na página de chats. Clique nele para bloquear e desbloquear o app.\n\nNota: se você esquecer a sua senha, terá de excluir e reinstalar o app.</string>
|
||||
<string name="Passcode">Senha de bloqueio</string>
|
||||
<string name="ChangePasscode">Alterar senha</string>
|
||||
<string name="ChangePasscodeInfo">Quando você define uma senha adicional, um ícone de cadeado aparece na lista de conversas. Toque para bloquear e desbloquear o aplicativo.\n\nNota: se você esquecer a sua senha, terá de excluir e reinstalar o aplicativo.</string>
|
||||
<string name="PasscodePIN">PIN</string>
|
||||
<string name="PasscodePassword">Senha</string>
|
||||
<string name="EnterCurrentPasscode">Insira sua senha atual</string>
|
||||
<string name="EnterNewFirstPasscode">Insira uma senha</string>
|
||||
<string name="EnterNewPasscode">Insira sua nova senha</string>
|
||||
<string name="EnterYourPasscode">Insira sua senha</string>
|
||||
<string name="ReEnterYourPasscode">Re-insira sua nova senha</string>
|
||||
<string name="ReEnterYourPasscode">Reinsira sua nova senha</string>
|
||||
<string name="PasscodeDoNotMatch">As senhas não são iguais</string>
|
||||
<string name="AutoLock">Autobloquear</string>
|
||||
<string name="AutoLockInfo">Requisitar senha se estiver ausente por muito tempo.</string>
|
||||
<string name="UnlockFingerprint">Desbloquear com Impressão Digital</string>
|
||||
<string name="UnlockFingerprint">Desbloquear com impressão digital</string>
|
||||
<string name="FingerprintInfo">Confirme a impressão digital para continuar</string>
|
||||
<string name="FingerprintNotRecognized">Impressão digital não reconhecida.</string>
|
||||
<!--photo gallery view-->
|
||||
@@ -167,10 +167,10 @@
|
||||
<string name="PickerPhotos">Fotos</string>
|
||||
<string name="PickerVideo">Vídeo</string>
|
||||
<!--privacy settings-->
|
||||
<string name="PrivacySettings">Privacidade e Segurança</string>
|
||||
<string name="PrivacySettings">Privacidade e segurança</string>
|
||||
<string name="SecurityTitle">Segurança</string>
|
||||
<!--edit video view-->
|
||||
<string name="SendVideo">Enviar Vídeo</string>
|
||||
<string name="SendVideo">Enviar vídeo</string>
|
||||
<!--button titles-->
|
||||
<string name="Done">Concluído</string>
|
||||
<string name="Open">Abrir</string>
|
||||
@@ -194,33 +194,33 @@
|
||||
<string name="AttachVoiceMessage">Mensagem de voz</string>
|
||||
<string name="FromSelf">Você</string>
|
||||
<!--Alert messages-->
|
||||
<string name="NoHandleAppInstalled">Você não possui um aplicativo que suporte o tipo de arquivo \'%1$s\', por favor instale um para continuar</string>
|
||||
<string name="NoHandleAppInstalled">Você não possui um aplicativo que manipule o tipo de arquivo \'%1$s\', por favor instale um para continuar</string>
|
||||
<string name="ContactAlreadyInGroup">Este usuário já está neste grupo.</string>
|
||||
<string name="ForwardMessagesTo">Encaminhar mensagem para <![CDATA[<b>%1$s</b>]]>?</string>
|
||||
<string name="SendMessagesTo">Enviar mensagens para <![CDATA[<b>%1$s</b>]]>?</string>
|
||||
<string name="AreYouSureDeleteThisChat">Você tem certeza que deseja apagar esta conversa?</string>
|
||||
<string name="ForwardMessagesTo">Encaminhar mensagens selecionadas para <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>?</string>
|
||||
<string name="SendMessagesTo">Enviar mensagens para <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>?</string>
|
||||
<string name="AreYouSureDeleteThisChat">Você tem certeza que deseja apagar esta conversa? Ela não será mais exibida na lista de conversas, mas ficará no servidor.</string>
|
||||
<string name="AreYouSureBlockContact">Você tem certeza que deseja bloquear este contato?</string>
|
||||
<string name="AreYouSureDeleteContact">Você tem certeza que deseja apagar este contato?</string>
|
||||
<!--permissions-->
|
||||
<string name="PermissionContacts">Delta Chat precisa acessar seus contatos para que você possa se conectar aos seus amigos em todos os seus dispositivos.</string>
|
||||
<string name="PermissionStorage">Delta Chat precisa acessar seu armazenamento para que você possa enviar e salvar fotos, vídeos, músicas e outras mídias.</string>
|
||||
<string name="PermissionNoAudio">Delta Chat precisa acessar seu microfone para que você possa enviar mensagens de voz.</string>
|
||||
<string name="PermissionOpenSettings">Configurações</string>
|
||||
<string name="PermissionOpenSettings">Configurações de ajuste</string>
|
||||
<!--Intro view-->
|
||||
<string name="Intro1Headline">Delta Chat</string>
|
||||
<string name="Intro1Message">O aplicativo com o <![CDATA[<b>maior número de usuários</b>]]> do mundo.<![CDATA[<br/><b>Grátis</b> e <b>seguro</b>]]>.</string>
|
||||
<string name="Intro1Message">O aplicativo com a <![CDATA[<b>maior base de contatos</b>]]> do mundo.<![CDATA[<br/><b>Grátis</b>]]> e <![CDATA[<b>seguro</b>]]>.</string>
|
||||
|
||||
<string name="Intro2Headline">Independente</string>
|
||||
<string name="Intro2Message"><![CDATA[<b>Independente</b>]]> de serviços estrangeiros. Este aplicativo só precisa de um e-mail para funcionar.</string>
|
||||
|
||||
<string name="Intro3Headline">Rápido</string>
|
||||
<string name="Intro3Message"><![CDATA[<b>Envie mensagens</b>]]> num átimo.<![CDATA[<br/>]]> Interface leve.</string>
|
||||
<string name="Intro3Message"><![CDATA[<b>Envie mensagens</b>]]> em segundos.<![CDATA[<br/>]]> Interface leve.</string>
|
||||
|
||||
<string name="Intro4Headline">Poderoso</string>
|
||||
<string name="Intro4Message"><![CDATA[<b>Sem limites</b>]]> para chats, imagens, vídeos, áudio e mais. Multicliente.</string>
|
||||
|
||||
<string name="Intro5Headline">Grátis</string>
|
||||
<string name="Intro5Message"><![CDATA[<b>Delta Chat</b>]]> será sempre grátis, de Código livre e sem propagandas.</string>
|
||||
<string name="Intro5Message"><![CDATA[<b>Delta Chat</b>]]> será sempre grátis, de<![CDATA[<br/>]]>Código livre e sem propagandas.</string>
|
||||
|
||||
<string name="Intro6Headline">Seguro</string>
|
||||
<string name="Intro6Message"><![CDATA[<b>Criptografia</b>]]> com as tecnologias mais usadas. Suas mensagens ficam no servidor de e-mail.</string>
|
||||
@@ -251,12 +251,9 @@
|
||||
</plurals>
|
||||
<plurals name="AreYouSureDeleteMessages">
|
||||
<item quantity="one">Deletar a mensagem %d ? Ela também será removida no servidor.</item>
|
||||
<item quantity="other">Deletar as mensagens %d ? Elas também serão removidas no servidor.</item>
|
||||
<item quantity="other">Apagar as mensagens %d ? Elas também serão apagadas no servidor.</item>
|
||||
</plurals>
|
||||
<plurals name="NewMessagesInChats">
|
||||
<!-- Translators: the first string placeholder "%s" gets replaced with the
|
||||
text "%d new messages", so the complete sentence would be e.g.
|
||||
"4 new messages in 2 chats". -->
|
||||
<item quantity="one">%1$s na conversa %2$d</item>
|
||||
<item quantity="other">%1$s nas conversas %2$d</item>
|
||||
</plurals>
|
||||
@@ -285,9 +282,6 @@
|
||||
<item quantity="other">%d meses</item>
|
||||
</plurals>
|
||||
<plurals name="MaxNotifications">
|
||||
<!-- Translators: the second string placeholder "%s" gets replaced with the
|
||||
text "%d minutes", so the complete sentence would be e.g.
|
||||
"At most 8 notifications within 3 minutes". -->
|
||||
<item quantity="one">No máximo %1$d notificação a cada %2$s</item>
|
||||
<item quantity="other">No máximo %1$d notificações dentro de %2$s</item>
|
||||
</plurals>
|
||||
@@ -304,10 +298,10 @@
|
||||
<string name="AccountSettings">Configuração de conta</string>
|
||||
<string name="MyAccount">Minha conta</string>
|
||||
<string name="MyName">Meu nome</string>
|
||||
<string name="MyNameExplain">Assim que seu nome será exibido aos destinatários.\n\nSe não for definido um nome será exibido o seu e-mail aos destinatários.</string>
|
||||
<string name="MyNameExplain">Assim que seu nome será exibido aos destinatários. Se não colocar seu nome aqui, os destinatários só verão o seu endereço e-mail.</string>
|
||||
<string name="Password">Senha</string>
|
||||
<string name="SmtpPassword">Senha SMPT</string>
|
||||
<string name="FromAbove">De acima</string>
|
||||
<string name="SmtpPassword">Senha SMTP</string>
|
||||
<string name="FromAbove">Como acima</string>
|
||||
<string name="SmtpLoginname">Usuário SMTP</string>
|
||||
<string name="SmtpPort">Porta SMTP</string>
|
||||
<string name="Automatic">Automático</string>
|
||||
@@ -318,51 +312,50 @@
|
||||
<string name="InboxHeadline">Caixa de entrada</string>
|
||||
<string name="OutboxHeadline">Caixa de saída</string>
|
||||
<string name="MyAccountExplain">Para provedores de e-mail mais populares as configurações a seguir são detectadas automaticamente.</string>
|
||||
<string name="MyAccountExplain2" >Por vezes é necessário habilitar o IMAP/SMTP nas configurações do servidor de e-mail.\n\nSe tiver dificuldades peça ajuda ao servidor ou a algum amigo.</string>
|
||||
<string name="MyAccountExplain2" >Por vezes <![CDATA[<b>]]> é necessário habilitar o IMAP/SMTP<![CDATA[</b>]]> nas configurações do servidor de e-mail.\n\nSe tiver dificuldades peça ajuda aos administradores do servidor ou a algum amigo.</string>
|
||||
<string name="AccountNotConfigured">Conta não configurada</string>
|
||||
<string name="AboutThisProgram">Sobre Delta Chat</string>
|
||||
<string name="NotSet">Não configurado</string>
|
||||
<string name="NewChat">Novo Chat</string>
|
||||
<string name="NewChat">Nova conversa</string>
|
||||
<string name="Deaddrop">Requisições de contato</string>
|
||||
<string name="DeaddropInChatlist">Exibir solicitações de contato na lista de conversas</string>
|
||||
<string name="DeaddropInChatlist">Exibir requisições de contato na lista de conversas</string>
|
||||
<string name="MuteAlways">Sempre mudo</string>
|
||||
<string name="AskStartChatWith">Começar um chat com <![CDATA[<b>%1$s</b>]]>?</string>
|
||||
<string name="DeaddropHint">Para conversar clique na seta.</string>
|
||||
<string name="AskStartChatWith">Começar uma conversa com <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>?</string>
|
||||
<string name="DeaddropHint">Para conversar toque na seta.</string>
|
||||
<string name="NotYetImplemented">Esta função ainda não está disponível ou ainda não está completamente desenvolvida.</string>
|
||||
<string name="DefaultStatusText">Enviado pelo Delta Chat Messenger</string>
|
||||
<string name="DefaultStatusText">Enviado pelo meu Dela Chat. Desculpas pela brevidade.</string>
|
||||
<string name="Name" >Nome</string>
|
||||
<string name="EmailAddress">Endereço de e-mail</string>
|
||||
<string name="CannotDeleteContact">Impossível deletar um usuário em uso! Bloqueie-o.</string>
|
||||
<string name="BadEmailAddress">Endereço inválido.</string>
|
||||
<string name="ContactCreated">Usuário criado.</string>
|
||||
<string name="CannotDeleteContact">Impossível deletar um contato em uso! Bloqueie-o.</string>
|
||||
<string name="BadEmailAddress">Endereço inválido</string>
|
||||
<string name="ContactCreated">Contato criado.</string>
|
||||
<string name="ViewProfile">Ver perfil</string>
|
||||
<!-- Translators: please use a very short string here, it should not much longer than
|
||||
the string needed for video time+size (0:00, 12,3 Mib) -->
|
||||
<string name="OneMoment">Um momento…</string>
|
||||
<string name="NoChatsHelp">Comece uma conversa pressionando \"+\" do canto direito inferior. Pressione o menu para mais opções.</string>
|
||||
<string name="Intro7Message"><![CDATA[<b>Delta Chat</b>]]> é seguro para uso comercial e compatível com os padrões de uso.</string>
|
||||
<string name="InviteMenuEntry">Convidar Amigos</string>
|
||||
<string name="InviteMenuEntry">Convidar amigos</string>
|
||||
<string name="InviteText">Estou usando o Delta Chat messenger - %1$s - meu contato neste app é: %2$s</string>
|
||||
<string name="AdvancedSettings">Configurações avançadas</string>
|
||||
<string name="AskResetNotifications" >Zerar todas as configurações e sons desta página, dos contatos e dos grupos?</string>
|
||||
<string name="AskResetNotifications" >Zerar todas as configurações e sons gerais, dos contatos e dos grupos?</string>
|
||||
<string name="AttachFiles">Anexar arquivos</string>
|
||||
<string name="ErrGroupNameEmpty">Por favor designar um nome ao grupo.</string>
|
||||
<string name="ErrGroupNameEmpty">Por favor, designar um nome ao grupo.</string>
|
||||
<string name="MsgNewGroupDraftHint">Escreva a primeira mensagem, possibilitando assim que os demais participem do grupo.\n\n• Tudo bem se nem todos usarem o Delta Chat.\n\n• A primeira mensagem pode demorar um pouco.</string>
|
||||
<string name="MsgNewGroupDraft">Olá! Acabei de criar o grupo \"%1$s\" para conversarmos!</string>
|
||||
<string name="MsgGroupNameChanged">O grupo mudou o nome \"%1$s\" para \"%2$s\".</string>
|
||||
<string name="MsgGroupImageChanged">Imagem do grupo alterada.</string>
|
||||
<string name="MsgMemberAddedToGroup">Adicionado %1$s como membro.</string>
|
||||
<string name="MsgMemberRemovedFromToGroup">%1$s removido.</string>
|
||||
<string name="AskAddMemberToGroup">Adicionar <![CDATA[<b>%1$s</b>]]> no grupo?</string>
|
||||
<string name="AskRemoveMemberFromGroup">Remover usuário <![CDATA[<b>%1$s</b>]]> do grupo?</string>
|
||||
<string name="MsgMemberRemovedFromToGroup">%1$s removido do grupo.</string>
|
||||
<string name="AskAddMemberToGroup">Adicionar <![CDATA[<b>]]>%1$s<![CDATA[</b>]]> no grupo?</string>
|
||||
<string name="AskRemoveMemberFromGroup">Remover <![CDATA[<b>]]>%1$s<![CDATA[</b>]]> do grupo?</string>
|
||||
<string name="ErrSelfNotInGroup">É necessário ser um membro do grupo para fazer isso.</string>
|
||||
<string name="MsgGroupLeft">Deixou o grupo.</string>
|
||||
<string name="NoMessagesHint">Enviar mensagem para <![CDATA[<b>%1$s</b>]]>:\n\n• Tudo bem se <![CDATA[<b>%2$s</b>]]> não usa Delta Chat.\n\n• A primeira mensagem pode demorar um pouco.</string>
|
||||
<string name="SendNRcvReadReceipts">Receber e dar confirmações</string>
|
||||
<string name="NoMessagesHint">Enviar mensagem para <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>:\n\n• Tudo bem se <![CDATA[<b>]]>%2$s<![CDATA[</b>]]> não usa Delta Chat.\n\n• A primeira mensagem pode demorar um pouco.</string>
|
||||
<string name="SendNRcvReadReceipts">Receber e dar confirmações de recebimento</string>
|
||||
<string name="PreferE2EEncryption">Preferir criptografia ponta-a-ponta</string>
|
||||
<string name="E2EManagePrivateKeys">Gerir chaves privadas</string>
|
||||
<string name="E2ECompareKeys">Comparar chaves</string>
|
||||
<string name="ResetContactsKey">Apagar chave do usuário</string>
|
||||
<string name="ForwardToTitle">Encaminhar para …</string>
|
||||
<string name="SelectContact">Escolha um contato</string>
|
||||
<string name="DoneHint">Concluído.</string>
|
||||
@@ -370,23 +363,30 @@
|
||||
<string name="Error">Erro: %1$s</string>
|
||||
<string name="NoNetwork">Rede indisponível</string>
|
||||
<string name="Audio">Áudio</string>
|
||||
<string name="PleaseCutVideoToMaxSize">Favor cortar o vídeo ao tamanho máx. de 1$s.</string>
|
||||
<string name="PleaseCutVideoToMaxSize">Favor cortar o vídeo ao tamanho máx. de %1$s.</string>
|
||||
<string name="PermNotificationTitle">Conectado em %1$s</string>
|
||||
<string name="PermNotificationText">Aguardando mensagens …</string>
|
||||
<string name="SettingsFor">Configuração para %1$s</string>
|
||||
<string name="AutoplayGifs">Animar GIFs automaticamente</string>
|
||||
<string name="HelpUrl">https://delta.chat/pt/help</string>
|
||||
<string name="EncryptedMessage">Mensagem criptografada</string>
|
||||
<string name="ImportFromDownloads">Importar de \"Downloads"</string>
|
||||
<string name="ExportToDownloads">Exportar para \"Downloads"</string>
|
||||
<string name="ImportPrivateKeysAsk">Importar chaves privadas da pasta \"Downloads\"?\n\n• As chaves já constantes do aplicativo não serão deletadas\n\n• A última chave importada será usada como a padrão\n\nContinuar?</string>
|
||||
<string name="Encryption">Criptografia</string>
|
||||
<string name="EncrinfoE2E">A conexão está criptografada ponta-a-ponta.</string>
|
||||
<string name="EncrinfoE2E">Criptografia ponta-a-ponta habilitada.</string>
|
||||
<string name="EncrinfoE2EExplain">Se ambas impressões combinam no outro dispositivo, a conexão é segura.</string>
|
||||
<string name="EncrinfoTransport">Criptografar tráfego ao menos até o meu servidor.</string>
|
||||
<string name="EncrinfoTransport">Tráfego criptografado ao menos até o meu servidor.</string>
|
||||
<string name="EncrinfoNone">Sem encriptação para meu servidor.</string>
|
||||
<string name="EncrinfoNoE2EExplain">A criptografia ponta-a-ponta será ativada automaticamente tão logo o seu contato utilize algum aplicativo que tenha suporte ao Autocrypt, como o Delta Chat.</string>
|
||||
<string name="EncrinfoFingerprints">Impressões</string>
|
||||
<string name="Backup">Becape</string>
|
||||
<string name="ImportBackupExplain">Para importar um becape, copie-o na pasta \"Downloads\" e reinstale o aplicativo.</string>
|
||||
<string name="ReadReceiptMailBody">Confirmação de recebimento da mensagem \"%1$s\". \n\n Esta confirmação somente assegura que a mensagem foi exibida no aparelho do destinatário, mas não há garantia de que ele tenha lido o seu conteúdo.</string>
|
||||
<string name="ReadReceipt">Confirmação de recebimento</string>
|
||||
<string name="NameAndStatus">Nome e status</string>
|
||||
<string name="MyStatus">Meu status</string>
|
||||
<string name="MyStatusExplain">Seu status será exibido no seu perfil e na assinatura de seus e-mails.</string>
|
||||
<string name="MsgGroupImageDeleted">Imagem do grupo apagada.</string>
|
||||
<string name="AskDeleteGroupImage">Tem certeza que quer apagar a imagem do grupo?\n\nEsta ação repercutirá nos dispositivos dos outros membros do grupo.</string>
|
||||
</resources>
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<string name="SelectChat">Выбрать чат …</string>
|
||||
<string name="Search">Поиск</string>
|
||||
<string name="MuteNotifications">Отключить уведомления</string>
|
||||
<string name="MuteFor">Отключить на %1$s</string>
|
||||
<string name="MuteFor">Не оповещать %1$s</string>
|
||||
<string name="UnmuteNotifications">Включить уведомления</string>
|
||||
<string name="Draft">Черновик</string>
|
||||
<!--audio view-->
|
||||
@@ -25,14 +25,14 @@
|
||||
<string name="ErrorHint">Неизвестная ошибка</string>
|
||||
<string name="AccessError">Ошибка входа</string>
|
||||
<string name="NoFiles">Нет файлов …</string>
|
||||
<string name="NotMounted">Устройство не подсоединено</string>
|
||||
<string name="NotMounted">Устройство не смонтированно</string>
|
||||
<string name="UsbActive">Передача по USB активирована</string>
|
||||
<string name="InternalStorage">Внутренняя память</string>
|
||||
<string name="ExternalStorage">Внешняя память</string>
|
||||
<string name="SystemRoot">Каталог системы</string>
|
||||
<string name="SdCard">SD карта</string>
|
||||
<string name="Folder">Папка</string>
|
||||
<string name="GalleryInfo">Отправить изображение без сжатия</string>
|
||||
<string name="GalleryInfo">Отправить изображения без сжатия</string>
|
||||
<!--chat view-->
|
||||
<string name="ChatGallery">Галерея</string>
|
||||
<string name="ChatCamera">Камера</string>
|
||||
@@ -43,7 +43,7 @@
|
||||
<string name="TypeMessage">Сообщение</string>
|
||||
<string name="SlideToCancel">ОТПУСТИТЕ ДЛЯ ОСТАНОВКИ</string>
|
||||
<string name="SaveToDownloads">Сохранить в папку Загрузки</string>
|
||||
<string name="SaveToMusic">Сохранить в Музыку</string>
|
||||
<string name="SaveToMusic">Сохранить в музыку</string>
|
||||
<string name="Share">Поделиться</string>
|
||||
<string name="SendItems">Отправить %1$s</string>
|
||||
<string name="ClearRecentEmoji">Очистить актуальные смайлики?</string>
|
||||
@@ -71,23 +71,23 @@
|
||||
<string name="TextSize">Размер шрифта сообщений</string>
|
||||
<string name="UnblockContact">Разблокировать контакт</string>
|
||||
<string name="NoBlocked">Пока нет заблокированных контактов</string>
|
||||
<string name="DefaultForNormalMessages">Нормальное сообщение по умолчанию</string>
|
||||
<string name="MessagePreview">Предварительный просмотр сообщения</string>
|
||||
<string name="DefaultForGroupMessages">Групповые сообщения по умолчанию</string>
|
||||
<string name="DefaultForNormalMessages">Обычное сообщение</string>
|
||||
<string name="MessagePreview">Предпросмотр сообщения</string>
|
||||
<string name="DefaultForGroupMessages">Сообщения группы</string>
|
||||
<string name="Sound">Звук</string>
|
||||
<string name="InAppNotifications">Уведомления внутри программы</string>
|
||||
<string name="Vibrate">Вибрировать</string>
|
||||
<string name="InAppNotifications">Уведомления программы</string>
|
||||
<string name="Vibrate">Вибрация</string>
|
||||
<string name="ResetAllNotifications">Сбросить все уведомления</string>
|
||||
<string name="NotificationsAndSounds">Уведомления и Звуки</string>
|
||||
<string name="BlockedContacts">Заблокированные контакты</string>
|
||||
<string name="BlockedContacts">Блокированные контакты</string>
|
||||
<string name="Default">По умолчанию</string>
|
||||
<string name="OnlyIfSilent">Только если тишина</string>
|
||||
<string name="ChatBackground">Фоновое изображение чата</string>
|
||||
<string name="ChatBackground">Фон чата</string>
|
||||
<string name="SendByEnter">Отправить нажав "Ввод"</string>
|
||||
<string name="Help">Помощь</string>
|
||||
<string name="Enabled">Вкл</string>
|
||||
<string name="Disabled">Выкл</string>
|
||||
<string name="LedColor">Цвет Светодиода</string>
|
||||
<string name="LedColor">Цвет LED</string>
|
||||
<string name="BadgeNumber">Показывать кол-во на иконке, по возможности</string>
|
||||
<string name="Short">Коротко</string>
|
||||
<string name="Long">Длинно</string>
|
||||
@@ -110,7 +110,7 @@
|
||||
<!--cache view-->
|
||||
<string name="CacheSettings">Место хранения</string>
|
||||
<string name="KeepMedia">Сохранить медиафайлы</string>
|
||||
<string name="KeepMediaInfo">Фотографии, видео и другие файлы из облачных чатов, которые у вас есть <![CDATA[<b>not accessed</b>]]> в течение этого периода, будут удалены с этого устройства, чтобы сэкономить место на диске.</string>
|
||||
<string name="KeepMediaInfo">Фотографии, видео и другие файлы из облачных чатов, имеющиеся у вас <![CDATA[<b>not accessed</b>]]> в течение этого периода, будут удалены с этого устройства, чтобы сэкономить место на диске.</string>
|
||||
<string name="KeepMediaForever">Навсегда</string>
|
||||
<!--passcode view-->
|
||||
<string name="Passcode">Код блокировки</string>
|
||||
@@ -127,7 +127,7 @@
|
||||
<string name="AutoLock">Автоблокировка</string>
|
||||
<string name="AutoLockInfo">Необходим код блокировки если лимит времени превышен.</string>
|
||||
<string name="UnlockFingerprint">Разблокировать с помощью отпечатка пальца</string>
|
||||
<string name="FingerprintInfo">Подтвердить отпечаток пальца для продолжения</string>
|
||||
<string name="FingerprintInfo">Подтвердите отпечаток пальца для продолжения</string>
|
||||
<string name="FingerprintNotRecognized">Отпечаток пальца не опознан. Повторите снова</string>
|
||||
<!--photo gallery view-->
|
||||
<string name="SaveToGallery">Сохранить в Галерее</string>
|
||||
@@ -143,7 +143,7 @@
|
||||
<string name="Highlights">Световые эффекты</string>
|
||||
<string name="Contrast">Контраст</string>
|
||||
<string name="Exposure">Выдержка</string>
|
||||
<string name="Warmth">Тёплый колорит</string>
|
||||
<string name="Warmth">Тёплый </string>
|
||||
<string name="Saturation">Насыщенность</string>
|
||||
<string name="Vignette">Виньетка</string>
|
||||
<string name="Shadows">Тени</string>
|
||||
@@ -153,8 +153,8 @@
|
||||
<string name="Tint">Оттенок</string>
|
||||
<string name="TintShadows">ТЕНИ</string>
|
||||
<string name="TintHighlights">СВЕТОВЫЕ ЭФФЕКТЫ</string>
|
||||
<string name="Curves">Кривые</string>
|
||||
<string name="CurvesAll">Всё</string>
|
||||
<string name="Curves">Линии</string>
|
||||
<string name="CurvesAll">ВСЕ</string>
|
||||
<string name="CurvesRed">КРАСНЫЙ</string>
|
||||
<string name="CurvesGreen">ЗЕЛЁНЫЙ</string>
|
||||
<string name="CurvesBlue">СИНИЙ</string>
|
||||
@@ -194,9 +194,9 @@
|
||||
<string name="AttachVoiceMessage">Голосовое сообщение</string>
|
||||
<string name="FromSelf">Мне</string>
|
||||
<!--Alert messages-->
|
||||
<string name="NoHandleAppInstalled">У вас нет приложений, которые могут обрабатывать тип файла \'%1$s\, пожалуйста, установите его, чтобы продолжить</string>
|
||||
<string name="ContactAlreadyInGroup">Этот контакт уже находится в этой группе.</string>
|
||||
<string name="ForwardMessagesTo">Переслать выбранные сообщения в <![CDATA[<b>]]>%1$s<![CDATA[</ b>]]>?</string>
|
||||
<string name="NoHandleAppInstalled">У вас нет приложений, которые могут обрабатывать тип файла \'%1$s\', пожалуйста, установите его, чтобы продолжить</string>
|
||||
<string name="ContactAlreadyInGroup">Контакт уже находится в этой группе.</string>
|
||||
<string name="ForwardMessagesTo">Переслать выбранные сообщения в <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>?</string>
|
||||
<string name="SendMessagesTo">Отправить сообщения в <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>?</string>
|
||||
<string name="AreYouSureDeleteThisChat">Удалить этот чат? Чат больше не будет отображаться в списке чата, сообщения останутся на сервере.</string>
|
||||
<string name="AreYouSureBlockContact">Вы действительно хотите заблокировать этот контакт?</string>
|
||||
@@ -208,10 +208,10 @@
|
||||
<string name="PermissionOpenSettings">Адаптировать настройки</string>
|
||||
<!--Intro view-->
|
||||
<string name="Intro1Headline">Delta Chat</string>
|
||||
<string name="Intro1Message">Мессенджер с <![CDATA[<b>самым большим диапазоном охвата</b>]]> в мире. <![CDATA[<br/><b>Бесплатно</b>]]> и <![CDATA[<b>безопасно</b>]]>.</string>
|
||||
<string name="Intro1Message">Мессенджер с <![CDATA[<b>самым большим диапазоном охвата</b>]]> в мире. <![CDATA[<br/><b>Бесплатный</b>]]> и <![CDATA[<b>безопасный</b>]]>.</string>
|
||||
|
||||
<string name="Intro2Headline">Независимый</string>
|
||||
<string name="Intro2Message"><![CDATA[<b>Независимость</b>]]> от иностранных компьютеров или служб. Приложение использует только ваш почтовый сервер.</string>
|
||||
<string name="Intro2Message"><![CDATA[<b>Независимость</b>]]> от иностранных компьютеров или сервисов. Приложение использует только ваш почтовый сервер.</string>
|
||||
|
||||
<string name="Intro3Headline">Быстрый</string>
|
||||
<string name="Intro3Message"><![CDATA[<b>Push-сообщения</b>]]> за секунды.<![CDATA[<br/>]]>Быстрый интерфейс.</string>
|
||||
@@ -231,7 +231,7 @@
|
||||
<!--plural-->
|
||||
<plurals name="Members">
|
||||
<item quantity="one">%d участник</item>
|
||||
<item quantity="few">%d участников</item>
|
||||
<item quantity="few">%d участники</item>
|
||||
<item quantity="many">%d участники</item>
|
||||
<item quantity="other">%d участники</item>
|
||||
</plurals>
|
||||
@@ -255,20 +255,17 @@
|
||||
</plurals>
|
||||
<plurals name="messages">
|
||||
<item quantity="one">%d сообщение</item>
|
||||
<item quantity="few">%d сообщений</item>
|
||||
<item quantity="few">%d сообщения</item>
|
||||
<item quantity="many">%d сообщения</item>
|
||||
<item quantity="other">%d сообщения</item>
|
||||
</plurals>
|
||||
<plurals name="AreYouSureDeleteMessages">
|
||||
<item quantity="one">Удалить %d сообщение? Сообщение также будет удалено с сервера.</item>
|
||||
<item quantity="few">Удалить %d сообщений? Сообщения также будут удалены с сервера</item>
|
||||
<item quantity="few">Удалить %d сообщения? Сообщения также будут удалены с сервера.</item>
|
||||
<item quantity="many">Удалить %d сообщения? Сообщения также будут удалены с сервера.</item>
|
||||
<item quantity="other">Удалить %d сообщения? Сообщения также будут удалены с сервера.</item>
|
||||
</plurals>
|
||||
<plurals name="NewMessagesInChats">
|
||||
<!-- Translators: the first string placeholder "%s" gets replaced with the
|
||||
text "%d new messages", so the complete sentence would be e.g.
|
||||
"4 new messages in 2 chats". -->
|
||||
<item quantity="one">%1$s в %2$d чате</item>
|
||||
<item quantity="few">%1$s в %2$d чатах</item>
|
||||
<item quantity="many">%1$s в %2$d чатах</item>
|
||||
@@ -311,9 +308,6 @@
|
||||
<item quantity="other">%d месяцев</item>
|
||||
</plurals>
|
||||
<plurals name="MaxNotifications">
|
||||
<!-- Translators: the second string placeholder "%s" gets replaced with the
|
||||
text "%d minutes", so the complete sentence would be e.g.
|
||||
"At most 8 notifications within 3 minutes". -->
|
||||
<item quantity="one">Не более %1$d сообщения в течении %2$s</item>
|
||||
<item quantity="few">Не более %1$d сообщений в течении %2$s</item>
|
||||
<item quantity="many">Не более %1$d сообщений в течении %2$s</item>
|
||||
@@ -332,7 +326,7 @@
|
||||
<string name="AccountSettings">Настройки аккаунта</string>
|
||||
<string name="MyAccount">Мой аккаунт</string>
|
||||
<string name="MyName">Моё имя</string>
|
||||
<string name="MyNameExplain">Ваше имя, при просмотре получателями.\n\nЕсли вы не введёте имя здесь, получатели получат только ваш адрес электронной почты.</string>
|
||||
<string name="MyNameExplain">Ваше имя, будут видеть все участники переписки. Если вы не введёте своё имя, участники переписки увидят только адрес вашей эл.почты.</string>
|
||||
<string name="Password">Пароль</string>
|
||||
<string name="SmtpPassword">SMTP пароль</string>
|
||||
<string name="FromAbove">Сверху</string>
|
||||
@@ -346,7 +340,7 @@
|
||||
<string name="InboxHeadline">Входящие</string>
|
||||
<string name="OutboxHeadline">Исходящие</string>
|
||||
<string name="MyAccountExplain">Для известных поставщиков электронной почты дополнительные настройки определяются автоматически.</string>
|
||||
<string name="MyAccountExplain2" >Иногда, <![CDATA[<b>]]>IMAP должен быть включен<![CDATA[</b>]]> в веб-интерфейсе электронной почты.\n\nВ случае затруднений, обратитесь к своему поставщику электронной почты или компентентным друзьям.</string>
|
||||
<string name="MyAccountExplain2" >Иногда, <![CDATA[<b>]]>IMAP должен быть включен<![CDATA[</b>]]> в веб-интерфейсе электронной почты.\n\nВ случае затруднений, обратитесь к своему поставщику электронной почты или компетентным друзьям.</string>
|
||||
<string name="AccountNotConfigured">Аккаунт не настроен</string>
|
||||
<string name="AboutThisProgram">Delta Chat (Дельта Чат)</string>
|
||||
<string name="NotSet">Не задано</string>
|
||||
@@ -357,10 +351,10 @@
|
||||
<string name="AskStartChatWith">Начать чат с <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>?</string>
|
||||
<string name="DeaddropHint">Чтобы начать чат, нажмите стрелку ответа.</string>
|
||||
<string name="NotYetImplemented">Эта функция недоступна или в разработке.</string>
|
||||
<string name="DefaultStatusText">Отправлено из Delta Chat Messenger</string>
|
||||
<string name="DefaultStatusText">Отправлено с помощью Delta Chat Messenger. Простите за краткость.</string>
|
||||
<string name="Name" >Имя</string>
|
||||
<string name="EmailAddress" >Адрес электронной почты</string>
|
||||
<string name="CannotDeleteContact">Невозможно удалить контакты во время использования, вместо этого, заблокируйте контакт.</string>
|
||||
<string name="EmailAddress">Адрес электронной почты</string>
|
||||
<string name="CannotDeleteContact">Невозможно удалить контакты во время использования, сперва заблокируйте его.</string>
|
||||
<string name="BadEmailAddress">Неверный адрес электронной почты.</string>
|
||||
<string name="ContactCreated">Контакт создан.</string>
|
||||
<string name="ViewProfile">Посмотреть профиль</string>
|
||||
@@ -386,11 +380,10 @@
|
||||
<string name="ErrSelfNotInGroup">Чтобы выполнить это действие, вы должны быть участником группы.</string>
|
||||
<string name="MsgGroupLeft">Группа оставлена.</string>
|
||||
<string name="NoMessagesHint">Отправить сообщение <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>:\n\n• Это нормально если <![CDATA[<b>]]>%2$s<![CDATA[</b>]]> не используют Delta Chat.\n\n• Доставка первого сообщения может занять некоторое время.</string>
|
||||
<string name="SendNRcvReadReceipts">Получение и отправка уведомлений о прочтении</string>
|
||||
<string name="E2EEncryption">Сквозное шифрование</string>
|
||||
<string name="SendNRcvReadReceipts">Получение и отправка уведомлений о доставке</string>
|
||||
<string name="PreferE2EEncryption">Предпочтение сквозному шифрованию</string>
|
||||
<string name="E2EManagePrivateKeys">Управление закрытыми ключами</string>
|
||||
<string name="E2ECompareKeys">Сравнение ключей</string>
|
||||
<string name="ResetContactsKey">Сброс ключа контакта</string>
|
||||
<string name="ForwardToTitle">Переслать в …</string>
|
||||
<string name="SelectContact">Выберите контакт</string>
|
||||
<string name="DoneHint">Готово.</string>
|
||||
@@ -405,7 +398,23 @@
|
||||
<string name="AutoplayGifs">Автозапуск GIF</string>
|
||||
<string name="HelpUrl">https://delta.chat/en/help</string>
|
||||
<string name="EncryptedMessage">Зашифрованное сообщение</string>
|
||||
<string name="ImportPrivateKeys">Импортировать из \"Загрузки\"</string>
|
||||
<string name="ExportPrivateKeys">Экспортировать в \"Загрузки\"</string>
|
||||
<string name="ImportPrivateKeysAsk">Импортировать приватный ключи из \"Загрузки\"?\n\n• Существующие ключи не удалены\n\n• Последний ключ будет использован как новый по умолчанию\n\nПродолжить?</string>
|
||||
</resources>
|
||||
<string name="ImportFromDownloads">Импорт из \"Загрузки\"</string>
|
||||
<string name="ExportToDownloads">Экспорт из \"Загрузки\"</string>
|
||||
<string name="ImportPrivateKeysAsk">Импортировать приватные ключи из \"Загрузки\"?\n\n• Существующие ключи не удалены\n\n• Последний ключ будет использован как новый по умолчанию\n\nПродолжить?</string>
|
||||
<string name="Encryption">Шифрование</string>
|
||||
<string name="EncrinfoE2E">Включено сквозное шифрование.</string>
|
||||
<string name="EncrinfoE2EExplain">Если все отпечатки пальцев совпадают на другом устройстве, соединение безопасно.</string>
|
||||
<string name="EncrinfoTransport">Защищённая передача данных между узлами в сети по крайней мере до моего сервера.</string>
|
||||
<string name="EncrinfoNone">Нет шифрования до моего сервера.</string>
|
||||
<string name="EncrinfoNoE2EExplain">Сквозное шифрование включится автоматически, как только контакт начнёт использовать Delta Chat или другое приложение с поддержкой Autocrypt.</string>
|
||||
<string name="EncrinfoFingerprints">Отпечатки пальцев</string>
|
||||
<string name="Backup">Резервное копирование</string>
|
||||
<string name="ImportBackupExplain">Чтобы импортировать резервную копию, скопируйте ее в каталог «Загрузки» и переустановите приложение.</string>
|
||||
<string name="ReadReceiptMailBody">Это уведомление о получении сообщения \"%1$s\".\n\nОно подтверждает что сообщение было отображено на устройстве адресата. Однако это не означает что получатель прочитал его содержимое.</string>
|
||||
<string name="ReadReceipt">Уведомление о получении</string>
|
||||
<string name="NameAndStatus">Имя и статус</string>
|
||||
<string name="MyStatus">Мой статус</string>
|
||||
<string name="MyStatusExplain">Статус указан в вашем профиле и нижнем колонтитуле эл.почты.</string>
|
||||
<string name="MsgGroupImageDeleted">Изображение группы удалено.</string>
|
||||
<string name="AskDeleteGroupImage">Вы действительно хотите удалить изображение группы?\n\nИзменение вступит в силу на всех устройствах участников группы.</string>
|
||||
</resources>
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
|
||||
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<string name="AppName">డెల్టా చాట్</string>
|
||||
<!--chats view-->
|
||||
<string name="Settings">సెట్టింగులు</string>
|
||||
<string name="NewGroup">కొత్త సమూహము</string>
|
||||
<string name="NoResult">ఫలితాలు లేవు</string>
|
||||
<string name="NoChats">ఏ చాట్లు లేవు</string>
|
||||
<string name="DeleteChat">చాట్ తొలగించు</string>
|
||||
<string name="SelectChat">చాట్ ను ఎంచుకో</string>
|
||||
<string name="Search">వెతుకు</string>
|
||||
<string name="MuteNotifications">నోటిఫికేషన్ల ను నిలిపివేయి</string>
|
||||
<string name="MuteFor">నిలిపివేయు సమయం %1$s</string>
|
||||
<string name="UnmuteNotifications">తిరిగి నొటిఫికేషన్లను ప్రారంభించు</string>
|
||||
<string name="Draft">డ్రాఫ్ట్</string>
|
||||
<!--audio view-->
|
||||
<string name="NoAudio">ఫైళ్లను ఇక్కడ చూడాలంటే వాటిని మీ పరికరంలోని మ్యూజిక్ ప్లేయర్ కు జతచేయండి.</string>
|
||||
<string name="AttachMusic">సంగీతం</string>
|
||||
<!--documents view-->
|
||||
<string name="SelectFile">ఫైల్ ను ఎంచుకో</string>
|
||||
<string name="FreeOfTotal">మిగులు %1$s యొక్క %2$s</string>
|
||||
<string name="ErrorHint">ఫైల్ ను ఎంచుకో</string>
|
||||
<string name="AccessError">యాక్సెస్ సమస్య</string>
|
||||
<string name="NoFiles">ఇంకా ఏ ఫైళ్ళూ లేవు...</string>
|
||||
<string name="NotMounted">నిల్వ ఇంకా మౌన్ట్ అవ్వలేదు</string>
|
||||
<string name="UsbActive">USB బదిలీ యాక్టివ్</string>
|
||||
<string name="InternalStorage">అంతర్గత నిల్వ</string>
|
||||
<string name="ExternalStorage">బాహ్య నిల్వ</string>
|
||||
<string name="SystemRoot">సిస్టం రూట్</string>
|
||||
<string name="SdCard">SD కార్డు</string>
|
||||
<string name="Folder">ఫోల్డర్</string>
|
||||
<string name="GalleryInfo">చిత్రాలను కుదించకుండా పంపడానికి</string>
|
||||
<!--chat view-->
|
||||
<string name="ChatGallery">గ్యాలరీ</string>
|
||||
<string name="ChatCamera">కెమేరా</string>
|
||||
<string name="NoMessages">సందేశాలు లేవు</string>
|
||||
<string name="ForwardedMessage">ఫార్వర్డ్ చేయబడిన సందేసం </string>
|
||||
<string name="From">నుండీ</string>
|
||||
<string name="NoRecent">ఇటీవల లేవు</string>
|
||||
<string name="TypeMessage">సందేశం</string>
|
||||
<string name="SlideToCancel">రద్దు చేయడానికి స్లైడ్ చేయి</string>
|
||||
<string name="SaveToDownloads">డౌన్లోడ్స్ కు సేవ్ చేయి</string>
|
||||
<string name="SaveToMusic">సంగీతానికి సేవ్ చేయి</string>
|
||||
<string name="Share">పంచుకో</string>
|
||||
<string name="SendItems">పంపు %1$s</string>
|
||||
<string name="ClearRecentEmoji">ఇటీవల ఎమోజిని క్లియర్ చేయాలా?</string>
|
||||
<string name="AddShortcut">హొం స్క్రీన్ కు విడ్జెట్ జత చేయి</string>
|
||||
<string name="ShortcutAdded">హోం స్క్రీన్ కు విడ్జెట్ జత చేయబడింది</string>
|
||||
<!--notification-->
|
||||
<string name="Reply">జవాబు</string>
|
||||
<string name="ReplyToGroup">%1$s కు జవాబు ఇవ్వు</string>
|
||||
<string name="ReplyToContact">%1$s కు జవాబు ఇవ్వు</string>
|
||||
<!--contacts view-->
|
||||
<string name="NoContacts">ఇంకా ఏ పరిచయాలూ లేవు.</string>
|
||||
<!--group create view-->
|
||||
<string name="SendMessageTo">సందేశం పంపు </string>
|
||||
<string name="EnterGroupNamePlaceholder">సమూహం పేరు నమోదు చేయి</string>
|
||||
<!--group info view-->
|
||||
<string name="AddMember">సభ్యుడిని జత చేయి</string>
|
||||
<string name="Notifications">నోటిఫికేషన్లు</string>
|
||||
<string name="RemoveMember">సభ్యుడిని తీసివేయి</string>
|
||||
<!--contact info view-->
|
||||
<string name="NewContactTitle">కొత్త పరిచయం</string>
|
||||
<string name="BlockContact">పరిచయాన్ని నిరోధించు</string>
|
||||
<string name="DeleteContact">పరిచయాన్ని తొలగించు</string>
|
||||
<string name="Info">సమాచారం</string>
|
||||
<!--settings view-->
|
||||
<string name="TextSize">సందేశం పరిమాణం</string>
|
||||
<string name="UnblockContact">పరిచయం నిరోధాన్ని నిలిపివేయి</string>
|
||||
<string name="NoBlocked">undefined</string>
|
||||
<string name="DefaultForNormalMessages">సాధారణ సందేశాలు</string>
|
||||
<string name="MessagePreview">సందేశం ప్రివ్యూ</string>
|
||||
<string name="DefaultForGroupMessages">సమూహ సందేశాలు</string>
|
||||
<string name="Sound">శబ్ధం</string>
|
||||
<string name="InAppNotifications">యాప్-లోపల నోటిఫికేషన్లు</string>
|
||||
<string name="Vibrate">వైబ్రేషన్</string>
|
||||
<string name="ResetAllNotifications">నోటిఫికేషన్లన్నిటినీ రద్దు చేయి</string>
|
||||
<string name="NotificationsAndSounds">undefined</string>
|
||||
<string name="BlockedContacts">నిరోధించిన పరిచయాలు</string>
|
||||
<string name="Default">డీఫాల్ట్</string>
|
||||
<string name="OnlyIfSilent">నిశబ్దంగా ఉంటేనే</string>
|
||||
<string name="ChatBackground">చాట్ నేపధ్యం</string>
|
||||
<string name="SendByEnter">\"\"ఎంటర్\" నొక్కితే పంపు</string>
|
||||
<string name="Help">సహాయం</string>
|
||||
<string name="Enabled">ఆన్</string>
|
||||
<string name="Disabled">ఆఫ్</string>
|
||||
<string name="LedColor">LED రంగు</string>
|
||||
<string name="BadgeNumber">ఐకాన్ పై లెక్క వీలైతే చూపించు</string>
|
||||
<string name="Short">పొట్టి</string>
|
||||
<string name="Long">పొడువు</string>
|
||||
<string name="RaiseToSpeak">మాట్లాడుటకు ఫోన్ ఎత్తు</string>
|
||||
<string name="EditName">పేరును మార్చు</string>
|
||||
<string name="NotificationsPriority">చూడు</string>
|
||||
<string name="NotificationsPriorityDefault">సాధారణ ప్రాఢాన్యం</string>
|
||||
<string name="NotificationsPriorityHigh">ఎక్కువ ప్రాధాన్యం</string>
|
||||
<string name="NotificationsPriorityMax">విశేష ప్రాధాన్యం</string>
|
||||
<string name="RepeatNotifications">నోటిఫికేషన్లను పునరావృతం చేయి</string>
|
||||
<string name="NotificationsOther">ఇతర</string>
|
||||
<string name="InChatSound">చాట్-లో శబ్ధాలు</string>
|
||||
<string name="SmartNotifications">నోటిఫికేషన్ల పరిమితి</string>
|
||||
<string name="SmartNotificationsSoundAtMost">చాలా శబ్ధం</string>
|
||||
<string name="SmartNotificationsTimes">సమయాలు</string>
|
||||
<string name="SmartNotificationsWithin">లోపల</string>
|
||||
<string name="SmartNotificationsMinutes">నిమిషాలు</string>
|
||||
<string name="DirectShare">నేరుగా పంచుకో</string>
|
||||
<string name="DirectShareInfo">పంచుకొనే పట్టికలో ఇటీవలి చాట్లను చూపించు</string>
|
||||
<!--cache view-->
|
||||
<string name="CacheSettings">నిల్వ</string>
|
||||
<string name="KeepMedia">మీడియా ఉంచు</string>
|
||||
<string name="KeepMediaForever">ఎల్లప్పటికీ</string>
|
||||
<!--passcode view-->
|
||||
<string name="Passcode">పాస్ కోడ్ తాళం</string>
|
||||
<string name="ChangePasscode">పాస్ కోడ్ ను మార్చు</string>
|
||||
<string name="PasscodePIN">పిన్</string>
|
||||
<string name="PasscodePassword">పాస్వర్డ్</string>
|
||||
<string name="EnterCurrentPasscode">మీ ప్రస్తుత పాస్వర్డ్ను నమోదు చేయండి</string>
|
||||
<string name="EnterNewFirstPasscode">ఒక పాస్ కోడ్ ను నమోదు చేయి</string>
|
||||
<string name="EnterNewPasscode">మీ కొత్త పాస్ కోడ్ ను నమోదు చేయి</string>
|
||||
<string name="EnterYourPasscode">మీ పాస్ కోడ్ ను నమోదు చేయండి</string>
|
||||
<string name="ReEnterYourPasscode">మీ పాస్ కోడ్ ను తిరిగి నమోదు చేయండి</string>
|
||||
<string name="PasscodeDoNotMatch">పాస్ కోడ్ లు సరిపోలటంలేదు</string>
|
||||
<string name="AutoLock">స్వియ తాళం</string>
|
||||
<string name="AutoLockInfo">కొంత సమయం గడిస్తే పాస్ కోడ్ అవసరం</string>
|
||||
<string name="UnlockFingerprint">వేలిముద్రతో తాళం తీయి</string>
|
||||
<string name="FingerprintInfo">కొనసాగడానికి వేలిముద్రను నిర్ధారించండి</string>
|
||||
<string name="FingerprintNotRecognized">వేలిముద్ర గుర్తింపబడలేదు. తిరిగి ప్రయత్నించండి</string>
|
||||
<!--photo gallery view-->
|
||||
<string name="SaveToGallery">గ్యాలరీకి భద్రపరచండి</string>
|
||||
<string name="Of">%1$d యొక్క %2$d</string>
|
||||
<string name="Gallery">గ్యాలరీ</string>
|
||||
<string name="AllPhotos">అన్ని చిత్రాలు</string>
|
||||
<string name="AllVideo">అన్ని వీడియోలు</string>
|
||||
<string name="NoPhotos">చిత్రాలు లేవు</string>
|
||||
<string name="NoVideo">వీడియోలు లేవ్</string>
|
||||
<string name="CropImage">చిత్రన్ని కత్తిరించు</string>
|
||||
<string name="EditImage">చిత్రన్ని సవరించు</string>
|
||||
<string name="Enhance">మెరుగుపరుచు</string>
|
||||
<string name="Highlights">ముఖ్యాంశాలు</string>
|
||||
<string name="Contrast">కాంట్రాస్ట్</string>
|
||||
<string name="Exposure">ఎక్స్పోజర్</string>
|
||||
<string name="Warmth">వార్మ్త్</string>
|
||||
<string name="Saturation">స్యాట్యురేషన్</string>
|
||||
<string name="Vignette">విగ్నెట్</string>
|
||||
<string name="Shadows">షాడొస్</string>
|
||||
<string name="Grain">గ్రేయిన్</string>
|
||||
<string name="Sharpen">షార్పెన్</string>
|
||||
<string name="Fade">ఫేడ్</string>
|
||||
<string name="Tint">టింట్</string>
|
||||
<string name="TintShadows">షాడొస్</string>
|
||||
<string name="TintHighlights">హైలైట్స్</string>
|
||||
<string name="Curves">కర్వ్స్</string>
|
||||
<string name="CurvesAll">అన్నీ</string>
|
||||
<string name="CurvesRed">ఎరుపు</string>
|
||||
<string name="CurvesGreen">ఆకుపచ్చ</string>
|
||||
<string name="CurvesBlue">నీలం</string>
|
||||
<string name="Blur">బ్లర్</string>
|
||||
<string name="BlurOff">ఆఫ్</string>
|
||||
<string name="BlurLinear">లినియర్</string>
|
||||
<string name="BlurRadial">రేడియల్</string>
|
||||
<string name="DiscardChanges">మార్పులు తొలగించాలా?</string>
|
||||
<string name="ClearButton">క్లియర్</string>
|
||||
<string name="PickerPhotos">చిత్రాలు</string>
|
||||
<string name="PickerVideo">వీడియో</string>
|
||||
<!--privacy settings-->
|
||||
<string name="PrivacySettings">గోప్యత మరియు భద్రత</string>
|
||||
<string name="SecurityTitle">భద్రత</string>
|
||||
<!--edit video view-->
|
||||
<string name="SendVideo">వీడియో పంపు</string>
|
||||
<!--button titles-->
|
||||
<string name="Done">పూర్తయింది</string>
|
||||
<string name="Open">తెరువు</string>
|
||||
<string name="Cancel">రద్దు</string>
|
||||
<string name="Edit">మార్చు</string>
|
||||
<string name="Send">పంపు</string>
|
||||
<string name="CopyToClipboard">క్లిప్బోర్డ్ కు కాపీ చేయి</string>
|
||||
<string name="Delete">తొలగించు</string>
|
||||
<string name="Forward">ఫార్వర్డ్</string>
|
||||
<string name="FromCamera">కెమెరా నుండి</string>
|
||||
<string name="FromGalley">గ్యాలరీ నుండి</string>
|
||||
<string name="Set">సెట్</string>
|
||||
<string name="OK">సరే</string>
|
||||
<string name="Crop">కత్తెర</string>
|
||||
<!--messages-->
|
||||
<string name="AttachPhoto">చిత్రం</string>
|
||||
<string name="AttachVideo">వీడియో</string>
|
||||
<string name="AttachGif">జిఫ్</string>
|
||||
<string name="AttachContact">పరిచయం</string>
|
||||
<string name="AttachDocument">ఫైల్</string>
|
||||
<string name="AttachVoiceMessage">మాట సందేశం</string>
|
||||
<string name="FromSelf">నేను</string>
|
||||
<!--Alert messages-->
|
||||
<string name="NoHandleAppInstalled">మీ దగ్గర ఈ ఫైల్ \'%1$s\' రకాన్ని గుర్తించే అప్లికేషన్లు లేవు, దయచేసి గుర్తించేదాన్ని ఒకటి ఇంస్టాల్ చేసి కొనసాగండి </string>
|
||||
<string name="ContactAlreadyInGroup">ఈ పరిచయం ఇప్పటికే ఈ సమూహం లో ఉంది.</string>
|
||||
<string name="ForwardMessagesTo">సందేశాలు <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>ఫార్వర్డ్ చేయాలా?</string>
|
||||
<string name="SendMessagesTo">సందేశాలు <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>కు పంపాలా?</string>
|
||||
<string name="AreYouSureDeleteThisChat">ఈ చాట్ ను తొలగించాలా? ఈ చాట్ ఇకమీదట చాట్ లిస్ట్ లో చూపించబడదు, సందేశాలు మాత్రం సర్వర్ లో ఉంటాయి.</string>
|
||||
<string name="AreYouSureBlockContact">మీరు ఈ పరిచయాన్ని రద్దుచేయాలని నిర్ణయించుకున్నారా?</string>
|
||||
<string name="AreYouSureDeleteContact">మీరు ఈ పరిచయాన్ని తొలగించాలని నిర్ణయించుకున్నారా?</string>
|
||||
<!--permissions-->
|
||||
<string name="PermissionContacts">డెల్టా చాట్ మీ స్నేహితులతో ఎల్లప్పుడూ కనెక్ట్ అయి ఉండడానికి మీ పరిచాయాల యాక్సస్ కు అనుమతించాలి. </string>
|
||||
<string name="PermissionStorage">డెల్టా చాట్ లొ మీరు వీడియోలు, చిత్రాలు, సంగీతం, మరియు వేరే మీడియా పంపడానికి, భద్రపరుచుకోడానికి మీ డివైజ్ స్టొరేజ్ యాక్సస్ కావాలి.</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,406 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
|
||||
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<string name="AppName">Delta Chat</string>
|
||||
<!--chats view-->
|
||||
<string name="Settings">Налаштування</string>
|
||||
<string name="NewGroup">Нова спільнота</string>
|
||||
<string name="NoResult">Результати відсутні.</string>
|
||||
<string name="NoChats">Розмови відсутні</string>
|
||||
<string name="DeleteChat">Видалити розмову</string>
|
||||
<string name="SelectChat">Оберіть розмову...</string>
|
||||
<string name="Search">Шукати</string>
|
||||
<string name="MuteNotifications">Вимкнути сповіщення</string>
|
||||
<string name="MuteFor">Вимкнути на%1$s</string>
|
||||
<string name="UnmuteNotifications">Увімкнути сповіщення</string>
|
||||
<string name="Draft">Замальовка</string>
|
||||
<!--audio view-->
|
||||
<string name="NoAudio">Додайте файли до бібліотеки музики вашого пристрою, аби побачити їх тут.</string>
|
||||
<string name="AttachMusic">Музика</string>
|
||||
<!--documents view-->
|
||||
<string name="SelectFile">Обреріть файл</string>
|
||||
<string name="FreeOfTotal">Вільно %1$s зі %2$s</string>
|
||||
<string name="ErrorHint">Невідома хиба</string>
|
||||
<string name="AccessError">Хиба доступу</string>
|
||||
<string name="NoFiles">Файли відсутні...</string>
|
||||
<string name="NotMounted">Пам\'ять не замонтовано</string>
|
||||
<string name="UsbActive">Переправлення по USB активне</string>
|
||||
<string name="InternalStorage">Внутрішня пам\'ять</string>
|
||||
<string name="ExternalStorage">Зовнішня пам\'ять</string>
|
||||
<string name="SystemRoot">Системний каталог</string>
|
||||
<string name="SdCard">Карта SD</string>
|
||||
<string name="Folder">Тека</string>
|
||||
<string name="GalleryInfo">Надсилати нестиснені зображення</string>
|
||||
<!--chat view-->
|
||||
<string name="ChatGallery">Галерея</string>
|
||||
<string name="ChatCamera">Камера</string>
|
||||
<string name="NoMessages">Повідомлень не має.</string>
|
||||
<string name="ForwardedMessage">Переслане повідомлення</string>
|
||||
<string name="From">Від</string>
|
||||
<string name="NoRecent">Не має нових</string>
|
||||
<string name="TypeMessage">Повідомлення</string>
|
||||
<string name="SlideToCancel">КОВЗНІТЬ ДЛЯ СКАСУВАННЯ</string>
|
||||
<string name="SaveToDownloads">Зберегти до теки звантажень</string>
|
||||
<string name="SaveToMusic">Зберегти до теки музики</string>
|
||||
<string name="Share">Поширити</string>
|
||||
<string name="SendItems">Надіслати %1$s</string>
|
||||
<string name="ClearRecentEmoji">Вичистити остатні емоджі?</string>
|
||||
<string name="AddShortcut">Додати віджет до головного екрану</string>
|
||||
<string name="ShortcutAdded">Віджет був доданий до головного екрану</string>
|
||||
<!--notification-->
|
||||
<string name="Reply">Відповісти</string>
|
||||
<string name="ReplyToGroup">Відповісти групі %1$s</string>
|
||||
<string name="ReplyToContact">Відповісти контактові %1$s</string>
|
||||
<!--contacts view-->
|
||||
<string name="NoContacts">Контакти відсутні</string>
|
||||
<!--group create view-->
|
||||
<string name="SendMessageTo">Надіслати повідомлення до...</string>
|
||||
<string name="EnterGroupNamePlaceholder">Внесіть назву спільноти</string>
|
||||
<!--group info view-->
|
||||
<string name="AddMember">Додати учасника</string>
|
||||
<string name="Notifications">Сповіщення</string>
|
||||
<string name="RemoveMember">Усунути учасника</string>
|
||||
<!--contact info view-->
|
||||
<string name="NewContactTitle">Новий контакт</string>
|
||||
<string name="BlockContact">Заблокувати контакт</string>
|
||||
<string name="DeleteContact">Видалити контакт</string>
|
||||
<string name="Info">Інформація</string>
|
||||
<!--settings view-->
|
||||
<string name="TextSize">Розмір шрифту повідомлень</string>
|
||||
<string name="UnblockContact">Розблокувати контакт</string>
|
||||
<string name="NoBlocked">Заблоковані контакти відсутні</string>
|
||||
<string name="DefaultForNormalMessages">Звичайні повідомлення</string>
|
||||
<string name="MessagePreview">Передогляд повідомлення</string>
|
||||
<string name="DefaultForGroupMessages">Повідомлення спільноти</string>
|
||||
<string name="Sound">Звук</string>
|
||||
<string name="InAppNotifications">Сповіщення у застосунку</string>
|
||||
<string name="Vibrate">Дрижання</string>
|
||||
<string name="ResetAllNotifications">Скинути всі сповіщення</string>
|
||||
<string name="NotificationsAndSounds">Сповіщення та звуки</string>
|
||||
<string name="BlockedContacts">Заблоковані контакти</string>
|
||||
<string name="Default">Усталено</string>
|
||||
<string name="OnlyIfSilent">Тільки якщо приглушений</string>
|
||||
<string name="ChatBackground">Тло розмови</string>
|
||||
<string name="SendByEnter">Надсилати за натиском \"enter\"</string>
|
||||
<string name="Help">Поміч</string>
|
||||
<string name="Enabled">On</string>
|
||||
<string name="Disabled">Off</string>
|
||||
<string name="LedColor">Колір світлодіода</string>
|
||||
<string name="BadgeNumber">Показувати кількість на іконі, якщо це можливо</string>
|
||||
<string name="Short">Короткі</string>
|
||||
<string name="Long">Довгі</string>
|
||||
<string name="RaiseToSpeak">Піднесіть та кажіть</string>
|
||||
<string name="EditName">Корегувати назву</string>
|
||||
<string name="NotificationsPriority">Поглянути</string>
|
||||
<string name="NotificationsPriorityDefault">Звичайний пріоритет</string>
|
||||
<string name="NotificationsPriorityHigh">Високий пріоритет</string>
|
||||
<string name="NotificationsPriorityMax">Найвищий пріоритет</string>
|
||||
<string name="RepeatNotifications">Повторення сповіщень</string>
|
||||
<string name="NotificationsOther">Інші</string>
|
||||
<string name="InChatSound">Звуки у розмові</string>
|
||||
<string name="SmartNotifications">Обмеження сповіщень</string>
|
||||
<string name="SmartNotificationsSoundAtMost">Найвища гучність звуку</string>
|
||||
<string name="SmartNotificationsTimes">разів</string>
|
||||
<string name="SmartNotificationsWithin">у межах</string>
|
||||
<string name="SmartNotificationsMinutes">хвилин</string>
|
||||
<string name="DirectShare">Поширити безпосередньо</string>
|
||||
<string name="DirectShareInfo">Показ остатніх розмов у меню поширень</string>
|
||||
<!--cache view-->
|
||||
<string name="CacheSettings">Пам\'ять</string>
|
||||
<string name="KeepMedia">Зберігати мультимедії</string>
|
||||
<string name="KeepMediaInfo">Світлини, відео та інші файли з хмарних розмов, які ви маєте, <![CDATA[<b>не доступні</b>]]>. Протягом цього періоду вони будуть усунені з пристроя, аби заощадити місце на диску. </string>
|
||||
<string name="KeepMediaForever">Завше</string>
|
||||
<!--passcode view-->
|
||||
<string name="Passcode">Блокування кодом доступу</string>
|
||||
<string name="ChangePasscode">Змінити код доступу</string>
|
||||
<string name="ChangePasscodeInfo">По встановці додаткового коду доступу на сторінках розмов з\'явиться ікона блокування. Натисніть її, аби заблокувати/розблокувати застосунок.\n\nУвага: якщо ви забудете код доступу, ви муситимете видалити та перевстановити застосунок.</string>
|
||||
<string name="PasscodePIN">PIN</string>
|
||||
<string name="PasscodePassword">Гасло</string>
|
||||
<string name="EnterCurrentPasscode">Упишіть чинний код доступу</string>
|
||||
<string name="EnterNewFirstPasscode">Упишіть код доступу</string>
|
||||
<string name="EnterNewPasscode">Упишіть новий код доступу</string>
|
||||
<string name="EnterYourPasscode">Упишіть код доступу</string>
|
||||
<string name="ReEnterYourPasscode">Упишіть знов новий код доступу</string>
|
||||
<string name="PasscodeDoNotMatch">Коди доступу не збігаються</string>
|
||||
<string name="AutoLock">А́втоблокування</string>
|
||||
<string name="AutoLockInfo">Запитувати код блокування по спливу обмеження за часом.</string>
|
||||
<string name="UnlockFingerprint">Розблокувати відбитком пальця</string>
|
||||
<string name="FingerprintInfo">Підтвердьте відбитком пальця аби продовжити</string>
|
||||
<string name="FingerprintNotRecognized">Відбиток пальця не розпізнано. Спробуйте знов</string>
|
||||
<!--photo gallery view-->
|
||||
<string name="SaveToGallery">Зберегти до галереї</string>
|
||||
<string name="Of">%1$dз%2$d</string>
|
||||
<string name="Gallery">Галерея</string>
|
||||
<string name="AllPhotos">Усі світлини</string>
|
||||
<string name="AllVideo">Усі відео</string>
|
||||
<string name="NoPhotos">Світлини відсутні</string>
|
||||
<string name="NoVideo">Відео відсутні</string>
|
||||
<string name="CropImage">Обрізати зображення</string>
|
||||
<string name="EditImage">Корегувати зображення</string>
|
||||
<string name="Enhance">Поліпшити</string>
|
||||
<string name="Highlights">Підсвічування</string>
|
||||
<string name="Contrast">Контраст</string>
|
||||
<string name="Exposure">Експозиція</string>
|
||||
<string name="Warmth">Теплість</string>
|
||||
<string name="Saturation">Насичення</string>
|
||||
<string name="Vignette">Візерунок</string>
|
||||
<string name="Shadows">Тіні</string>
|
||||
<string name="Grain">Зерно</string>
|
||||
<string name="Sharpen">Вигострення</string>
|
||||
<string name="Fade">Потьмяніння</string>
|
||||
<string name="Tint">Відтінок</string>
|
||||
<string name="TintShadows">ТІНІ</string>
|
||||
<string name="TintHighlights">ПІДСВІЧУВАННЯ</string>
|
||||
<string name="Curves">Криві</string>
|
||||
<string name="CurvesAll">УСІ</string>
|
||||
<string name="CurvesRed">ЧЕРВОНІ</string>
|
||||
<string name="CurvesGreen">ЗЕЛЕНІ</string>
|
||||
<string name="CurvesBlue">БЛАКИТНІ</string>
|
||||
<string name="Blur">Розмиття</string>
|
||||
<string name="BlurOff">Off</string>
|
||||
<string name="BlurLinear">Лінійні</string>
|
||||
<string name="BlurRadial">Променеві</string>
|
||||
<string name="DiscardChanges">Відкинути зміни?</string>
|
||||
<string name="ClearButton">Очистити</string>
|
||||
<string name="PickerPhotos">Світлини</string>
|
||||
<string name="PickerVideo">Відео</string>
|
||||
<!--privacy settings-->
|
||||
<string name="PrivacySettings">Приватність і безпека</string>
|
||||
<string name="SecurityTitle">Безпека</string>
|
||||
<!--edit video view-->
|
||||
<string name="SendVideo">Надіслати відео</string>
|
||||
<!--button titles-->
|
||||
<string name="Done">Виконано</string>
|
||||
<string name="Open">Відкрити</string>
|
||||
<string name="Cancel">Скасувати</string>
|
||||
<string name="Edit">Корегувати</string>
|
||||
<string name="Send">Надіслати</string>
|
||||
<string name="CopyToClipboard">Копіювати до сховку</string>
|
||||
<string name="Delete">Видалити</string>
|
||||
<string name="Forward">Переслати</string>
|
||||
<string name="FromCamera">З камери</string>
|
||||
<string name="FromGalley">З галереї</string>
|
||||
<string name="Set">Установити</string>
|
||||
<string name="OK">ДОБРЕ</string>
|
||||
<string name="Crop">ОБРІЗАТИ</string>
|
||||
<!--messages-->
|
||||
<string name="AttachPhoto">Світлина</string>
|
||||
<string name="AttachVideo">Відео</string>
|
||||
<string name="AttachGif">GIF</string>
|
||||
<string name="AttachContact">Контакт</string>
|
||||
<string name="AttachDocument">Файл</string>
|
||||
<string name="AttachVoiceMessage">Голосове повідомлення</string>
|
||||
<string name="FromSelf">Я</string>
|
||||
<!--Alert messages-->
|
||||
<string name="NoHandleAppInstalled">Ви не маєте застосунку, який обслуговує файли типу \"%1$s\". Установіть його аби продовжити.</string>
|
||||
<string name="ContactAlreadyInGroup">Контакт уже в цій спільноті.</string>
|
||||
<string name="ForwardMessagesTo">Переправити обрані повідомлення до <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>?</string>
|
||||
<string name="SendMessagesTo">Надіслати повідомлення до <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>?</string>
|
||||
<string name="AreYouSureDeleteThisChat">Видалити цю розмову? Розмова не буде показуватись у спискові розмов, а повідомлення лишаться на сервері.</string>
|
||||
<string name="AreYouSureBlockContact">Чи ви певні що хочете заблокувати цей контакт?</string>
|
||||
<string name="AreYouSureDeleteContact">Чи ви певні що хочете видалити цей контакт?</string>
|
||||
<!--permissions-->
|
||||
<string name="PermissionContacts">Аби можна було зв\'язатися з друзями на усіх пристроях, Delta Chat мусить мати доступ списку контактів.</string>
|
||||
<string name="PermissionStorage">Аби надсилати та зберігати світлини, відео, музику та інші мультимедія, Delta Chat мусить мати доступ до пам\'яті.</string>
|
||||
<string name="PermissionNoAudio">Аби надсилати голосові повідомлення, Delta Chat мусить мати доступ до мікрофону.</string>
|
||||
<string name="PermissionOpenSettings">Пристосувати налаштування</string>
|
||||
<!--Intro view-->
|
||||
<string name="Intro1Headline">Delta Chat</string>
|
||||
<string name="Intro1Message">Оповісник з <![CDATA[<b>найбільшим діапазоном</b>]]> у світі.<![CDATA[<br/><b>Даровий</b>]]> та <![CDATA[<b>безпечний</b>]]>.</string>
|
||||
|
||||
<string name="Intro2Headline">Незалежний</string>
|
||||
<string name="Intro2Message"><![CDATA[<b>Незалежний</b>]]> від іноземних комп\'ютерів та послуг. Застосунок тільки використовує ваш email-сервер.</string>
|
||||
|
||||
<string name="Intro3Headline">Швидкий</string>
|
||||
<string name="Intro3Message"><![CDATA[<b>Push-повідомлення</b>]]> за секунди.<![CDATA[<br/>]]>Швидкий інтерфейс.</string>
|
||||
|
||||
<string name="Intro4Headline">Потужний</string>
|
||||
<string name="Intro4Message"><![CDATA[<b>Безмежні</b>]]> розмови, зображення, відео, звукових повідомлень та багато іншого. Підтримка не багатьох пристроях.</string>
|
||||
|
||||
<string name="Intro5Headline">Даровий</string>
|
||||
<string name="Intro5Message"><![CDATA[<b>Delta Chat</b>]]> даровий назавше.<![CDATA[<br/>]]>Open-source. Без реклам. Без передплат. Без залежності від поставників послуг.</string>
|
||||
|
||||
<string name="Intro6Headline">Безпечний</string>
|
||||
<string name="Intro6Message"><![CDATA[<b>Зашифровано</b>]]> всіма відомими алґоритмами. Повідомлення залишаються на ваших серверах.</string>
|
||||
|
||||
<string name="Intro7Headline">Заслуговує на довіру</string>
|
||||
|
||||
<string name="IntroStartMessaging">Почати листування</string>
|
||||
<!--plural-->
|
||||
<plurals name="Members">
|
||||
<item quantity="one">%dучасник</item>
|
||||
<item quantity="few">%dучасники</item>
|
||||
<item quantity="other">%dучасників</item>
|
||||
</plurals>
|
||||
<plurals name="Contacts">
|
||||
<item quantity="one">%dконтакт</item>
|
||||
<item quantity="few">%dконтакти</item>
|
||||
<item quantity="other">%dконтактів</item>
|
||||
</plurals>
|
||||
<plurals name="MeAndMembers">
|
||||
<item quantity="one">Я та %dучасник</item>
|
||||
<item quantity="few">Я та %dучасники</item>
|
||||
<item quantity="other">Я та %dучасників</item>
|
||||
</plurals>
|
||||
<plurals name="NewMessages">
|
||||
<item quantity="one">%dнове повідомлення</item>
|
||||
<item quantity="few">%dнових повідомення</item>
|
||||
<item quantity="other">%dнових повідомлень</item>
|
||||
</plurals>
|
||||
<plurals name="messages">
|
||||
<item quantity="one">%dповідомлення</item>
|
||||
<item quantity="few">%dповідомлення</item>
|
||||
<item quantity="other">%dповідомлень</item>
|
||||
</plurals>
|
||||
<plurals name="AreYouSureDeleteMessages">
|
||||
<item quantity="one">Видалити%dповідомлення? Повідомлення видалиться з серверу також.</item>
|
||||
<item quantity="few">Видалити%dповідомлення? Повідомлення видаляться з серверу також.</item>
|
||||
<item quantity="other">Видалити%dповідомлень? Повідомлення видаляться з серверу також.</item>
|
||||
</plurals>
|
||||
<plurals name="NewMessagesInChats">
|
||||
<item quantity="one">%1$sв%2$dрозмові</item>
|
||||
<item quantity="few">%1$sу %2$dрозмовах</item>
|
||||
<item quantity="other">%1$sу%2$dрозмовах</item>
|
||||
</plurals>
|
||||
<plurals name="Chats">
|
||||
<item quantity="one">%dрозмова</item>
|
||||
<item quantity="few">%dрозмови</item>
|
||||
<item quantity="other">%dрозмов</item>
|
||||
</plurals>
|
||||
<plurals name="Minutes">
|
||||
<item quantity="one">%dхвилина</item>
|
||||
<item quantity="few">%dхвилини</item>
|
||||
<item quantity="other">%dхвилин</item>
|
||||
</plurals>
|
||||
<plurals name="Hours">
|
||||
<item quantity="one">%dгодина</item>
|
||||
<item quantity="few">%dгодини</item>
|
||||
<item quantity="other">%dгодин</item>
|
||||
</plurals>
|
||||
<plurals name="Days">
|
||||
<item quantity="one">%dдень</item>
|
||||
<item quantity="few">%dдні</item>
|
||||
<item quantity="other">%dднів</item>
|
||||
</plurals>
|
||||
<plurals name="Weeks">
|
||||
<item quantity="one">%dтиждень</item>
|
||||
<item quantity="few">%dтижні</item>
|
||||
<item quantity="other">%dтижнів</item>
|
||||
</plurals>
|
||||
<plurals name="Months">
|
||||
<item quantity="one">%dмісяць</item>
|
||||
<item quantity="few">%dмісяці</item>
|
||||
<item quantity="other">%dмісяців</item>
|
||||
</plurals>
|
||||
<plurals name="MaxNotifications">
|
||||
<item quantity="one">Щобільш%1$dсповіщення за%2$s</item>
|
||||
<item quantity="few">Щобільш%1$dсповіщення за%2$s</item>
|
||||
<item quantity="other">Щобільш%1$dсповіщень за%2$s</item>
|
||||
</plurals>
|
||||
<!--date formatters-->
|
||||
<string name="formatterMonthYear">MMMM yyyy</string>
|
||||
<string name="formatterMonth">MMM dd</string>
|
||||
<string name="formatterYear">dd.MM.yyyy</string>
|
||||
<string name="chatDate">EEE, MMMM d</string>
|
||||
<string name="chatFullDate">EEE, MMMM d, yyyy</string>
|
||||
<string name="formatterWeek">EEE</string>
|
||||
<string name="formatterDay24H">HH:mm</string>
|
||||
<string name="formatterDay12H">h:mm a</string>
|
||||
<string name="formatDateAtTime">%1$sо%2$s</string>
|
||||
<string name="AccountSettings">Налаштування обліківки</string>
|
||||
<string name="MyAccount">Моя обліківка</string>
|
||||
<string name="MyName">Моя назва</string>
|
||||
<string name="MyNameExplain">Назва, яка показується отримувачам. Якщо ви не впишете назву, вони отримають лише вашу адресу email.</string>
|
||||
<string name="Password">Гасло</string>
|
||||
<string name="SmtpPassword">SMTP гасло</string>
|
||||
<string name="FromAbove">Згори</string>
|
||||
<string name="SmtpLoginname">SMTP назва користувача</string>
|
||||
<string name="SmtpPort">SMTP порт</string>
|
||||
<string name="Automatic">А́втоматично</string>
|
||||
<string name="ImapServer">IMAP сервер</string>
|
||||
<string name="ImapLoginname">IMAP назва користувача</string>
|
||||
<string name="SmtpServer">SMTP сервер</string>
|
||||
<string name="ImapPort">IMAP порт</string>
|
||||
<string name="InboxHeadline">Скринька для вхідних</string>
|
||||
<string name="OutboxHeadline">Скринька для вихідних</string>
|
||||
<string name="MyAccountExplain">Для відомих email-поставників, додаткові налаштування обираються автоматично.</string>
|
||||
<string name="MyAccountExplain2" >Інколи, <![CDATA[<b>]]>IMAP має бути увімкненим<![CDATA[</b>]]> у верстці email.\n\nУ разі виникнення проблем, спитайте поради у вашого email-поставника або друзів.</string>
|
||||
<string name="AccountNotConfigured">Обліківка не налаштована</string>
|
||||
<string name="AboutThisProgram">Про оповісник</string>
|
||||
<string name="NotSet">Не встановлено</string>
|
||||
<string name="NewChat">Нова розмова</string>
|
||||
<string name="Deaddrop">Поштова скринька</string>
|
||||
<string name="DeaddropInChatlist">Показувати поштову скриньку у списку розмов</string>
|
||||
<string name="MuteAlways">Завше вимкнено</string>
|
||||
<string name="AskStartChatWith">Почати розмову з <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>?</string>
|
||||
<string name="DeaddropHint">Аби почати розмову, клацніть на стрілки відповіді.</string>
|
||||
<string name="NotYetImplemented">Ця функція є недоступною або незавершеною.</string>
|
||||
<string name="DefaultStatusText">Надіслано за допомогою оповісника Delta Chat. Прошу вибачення за стислий текст.</string>
|
||||
<string name="Name" >Назва</string>
|
||||
<string name="EmailAddress">Адреса e-mail</string>
|
||||
<string name="CannotDeleteContact">Не можливо видалити уживані контакти, заблокуйте їх натомість.</string>
|
||||
<string name="BadEmailAddress">Хибна адреса e-mail</string>
|
||||
<string name="ContactCreated">Контакт створено.</string>
|
||||
<string name="ViewProfile">Переглянути профіль</string>
|
||||
<!-- Translators: please use a very short string here, it should not much longer than
|
||||
the string needed for video time+size (0:00, 12,3 Mib) -->
|
||||
<string name="OneMoment">Зачекайте...</string>
|
||||
<string name="NoChatsHelp">Почніть листування за натиском ґудзика нових розмов у верхньому правому кутку. Аби отримати більше можливостей, натисніть на ґудзик меню.</string>
|
||||
<string name="Intro7Message"><![CDATA[<b>Delta Chat]</b>]> безпечний для бізнесових застосувань, підлаштовний та відповідає всім стандартам.</string>
|
||||
<string name="InviteMenuEntry">Надіслати запрошення</string>
|
||||
<string name="InviteText">Я користаюся оповісником Delta Chat -%1$s- ви можети написати мені на%2$s</string>
|
||||
<string name="AdvancedSettings">Просунуті налаштування</string>
|
||||
<string name="AskResetNotifications" >Скинути всі налаштування оповіщень та звуки на цій сторінці, а також у контактах та групах?</string>
|
||||
<string name="AttachFiles">Долучити файли</string>
|
||||
<string name="ErrGroupNameEmpty">Упишіть назву спільноти</string>
|
||||
<string name="MsgNewGroupDraftHint">Напишіть перше повідомлення аби інші змогли відповідати у спільноті.\n\n• Нічого страшного, якщо не всі учасники користаються Delta Chatом.\n\n• Доставлення першого повідомлення відбере лише мить.</string>
|
||||
<string name="MsgNewGroupDraft">Вітаю, я тільки-но створив спільноту \"%1$s\" для нас.</string>
|
||||
<string name="MsgGroupNameChanged">Назва спільноти була змінена з \"%1$s\" на \"%2$s\".</string>
|
||||
<string name="MsgGroupImageChanged">Зображення спільноти було змінено.</string>
|
||||
<string name="MsgMemberAddedToGroup">Учасника %1$sбуло додано.</string>
|
||||
<string name="MsgMemberRemovedFromToGroup">Учасника%1$sбуло усунуто.</string>
|
||||
<string name="AskAddMemberToGroup">Додати контакт <![CDATA[]<b>]>%1$s<![CDATA[</b>]]> до спільноти?</string>
|
||||
<string name="AskRemoveMemberFromGroup">Усунути контакт <![CDATA[<b>]]>%1$s<![CDATA[</b>]]> зі спільноти?</string>
|
||||
<string name="ErrSelfNotInGroup">Щоби виконати дію, ви мусите бути учасником цієї спільноти.</string>
|
||||
<string name="MsgGroupLeft">Ви полишили спільноту.</string>
|
||||
<string name="NoMessagesHint">Надіслати повідомлення до <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>:\n\n• Нічого страшного, якщо <![CDATA[<b>]]>%2$s<![CDATA[</b>]]> не користується Delta Chatом.\n\n• Доставлення першого повідомлення відбере лише мить.</string>
|
||||
<string name="SendNRcvReadReceipts">Одержуйте та відправляйте звіти про доставлення</string>
|
||||
<string name="PreferE2EEncryption">Надати перевагу повному шифруванню</string>
|
||||
<string name="E2EManagePrivateKeys">Управління особистими ключами</string>
|
||||
<string name="E2ECompareKeys">Порівняти ключі</string>
|
||||
<string name="ForwardToTitle">Переслати до...</string>
|
||||
<string name="SelectContact">Оберіть контакт</string>
|
||||
<string name="DoneHint">Виконано.</string>
|
||||
<string name="FileNotFound">Файл%1$sне знайдено</string>
|
||||
<string name="Error">Хиба:%1$s</string>
|
||||
<string name="NoNetwork">Брак доступу до мережі.</string>
|
||||
<string name="Audio">Аудіо</string>
|
||||
<string name="PleaseCutVideoToMaxSize">Обріжте відео до макс. розміру.%1$s.</string>
|
||||
<string name="PermNotificationTitle">Під\'єднано до%1$s</string>
|
||||
<string name="PermNotificationText">Очікування на повідомлення...</string>
|
||||
<string name="SettingsFor">Налаштування для%1$s</string>
|
||||
<string name="AutoplayGifs">А́втопрогравання GIFів</string>
|
||||
<string name="HelpUrl">https://delta.chat/en/help</string>
|
||||
<string name="EncryptedMessage">Зашифроване повідомлення</string>
|
||||
<string name="ImportFromDownloads">Затягти з теки звантажень.</string>
|
||||
<string name="ExportToDownloads">Витягти з теки звантажень.</string>
|
||||
<string name="ImportPrivateKeysAsk">Затягти особисті ключі з теки завантажень?\n\n• Чинні особисті ключі не були видалені\n\n• Найостатніший затягнений ключ буде використовуватись як типовий\n\nПродовжити?</string>
|
||||
<string name="Encryption">Шифрування</string>
|
||||
<string name="EncrinfoE2E">Повне шифрування було ввімкнено.</string>
|
||||
<string name="EncrinfoE2EExplain">Якщо відбитки пальців збігаються на іншому пристрої, підключення є безпечним.</string>
|
||||
<string name="EncrinfoTransport">Супроводжувати шифрування даних принаймні до мого серверу.</string>
|
||||
<string name="EncrinfoNone">Без шифрування на моєму сервері.</string>
|
||||
<string name="EncrinfoNoE2EExplain">Шифрування стане повним відразу ж, як контакт почне користуватися Delta Chat або іншим автошифрувальним застосунком.</string>
|
||||
<string name="EncrinfoFingerprints">Відбитки пальців</string>
|
||||
<string name="Backup">Backup</string>
|
||||
<string name="ImportBackupExplain">Аби імпортувати backup, сколіть backup до теки звантажень та перевстановіть застосунок.</string>
|
||||
<string name="ReadReceiptMailBody">Це звіт про доставлення до повідомлення \"%1$s\".\n\nЦей звіт лиш інформує про те, що повідомлення було показано на пристрої отримувача. Не має ніяких гарантій того, що отримувач прочитав уміст.</string>
|
||||
<string name="ReadReceipt">Звіт про доставлення.</string>
|
||||
<string name="NameAndStatus">Назва та стан</string>
|
||||
<string name="MyStatus">Стан</string>
|
||||
<string name="MyStatusExplain">Стан висвітлюється у вашому профілю та у стовпці email.</string>
|
||||
<string name="MsgGroupImageDeleted">Зображення спільноти було видалено.</string>
|
||||
<string name="AskDeleteGroupImage">Чи ви певні, що хочете видалити зображення спільноти?\n\nЦе матиме вплив на пристрої усіх її учасників. </string>
|
||||
</resources>
|
||||
@@ -304,7 +304,7 @@
|
||||
<string name="AccountSettings">Account settings</string>
|
||||
<string name="MyAccount">My account</string>
|
||||
<string name="MyName">My name</string>
|
||||
<string name="MyNameExplain">Your name, as shown to the receivers.\n\nIf you do not enter a name here, the receivers will only get your email-address from the account settings.</string>
|
||||
<string name="MyNameExplain">Your name, as shown to the receivers. If you do not enter a name here, the receivers will only get your email-address.</string>
|
||||
<string name="Password">Password</string>
|
||||
<string name="SmtpPassword">SMTP password</string>
|
||||
<string name="FromAbove">From above</string>
|
||||
@@ -362,7 +362,6 @@
|
||||
<string name="PreferE2EEncryption">Prefer end-to-end encryption</string>
|
||||
<string name="E2EManagePrivateKeys">Manage private keys</string>
|
||||
<string name="E2ECompareKeys">Compare keys</string>
|
||||
<string name="ResetContactsKey">Reset contact\'s key</string>
|
||||
<string name="ForwardToTitle">Forward to …</string>
|
||||
<string name="SelectContact">Choose a contact</string>
|
||||
<string name="DoneHint">Done.</string>
|
||||
@@ -391,4 +390,9 @@
|
||||
<string name="ImportBackupExplain">To import a backup, copy to the backup to the \"Downloads\" directory and reinstall the app.</string>
|
||||
<string name="ReadReceiptMailBody">This is a return receipt for the message \"%1$s\".\n\nThis return receipt only acknowledges that the message was displayed on the recipient\'s device. There is no guarantee that the recipient has read the message contents.</string>
|
||||
<string name="ReadReceipt">Return receipt</string>
|
||||
<string name="NameAndStatus">Name and status</string>
|
||||
<string name="MyStatus">My status</string>
|
||||
<string name="MyStatusExplain">The status is shown in your profile and in email footers.</string>
|
||||
<string name="MsgGroupImageDeleted">Group image deleted.</string>
|
||||
<string name="AskDeleteGroupImage">Are you sure to delete the group image?\n\nThis will affect all devices of all group members.</string>
|
||||
</resources>
|
||||
|
||||
@@ -2,22 +2,26 @@ Delta Chat Android Client
|
||||
================================================================================
|
||||
|
||||
This is the android client for Delta Chat. For the core library and other common
|
||||
information, please refer to https://github.com/deltachat/deltachat-core and to
|
||||
https://delta.chat .
|
||||
information, please refer to [Delta Chat Core Library](https://github.com/deltachat/deltachat-core).
|
||||
For ready-to-use binaries, please go to https://delta.chat .
|
||||
|
||||

|
||||
|
||||
<a href="https://f-droid.org/packages/com.b44t.messenger/" target="_blank">
|
||||
<img src="https://f-droid.org/badge/get-it-on.png" alt="Get it on F-Droid" height="90"/></a>
|
||||
|
||||
Build
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Beside a build in Android Studio, you have to call `ndk-build` in the
|
||||
`MessengerProj` directory. Moreover, place a copy of your keyfile eg. to
|
||||
`MessengerProj/config/debug.keystore`.
|
||||
If the core library (https://github.com/deltachat/deltachat-core) is not checked
|
||||
out together with this deltachat-android, you must check out it manually using
|
||||
`git submodule update --init --recursive` for this purpose. There is no need to
|
||||
build the core library itself, deltachat-android just references them.
|
||||
|
||||

|
||||
After that, call `ndk-build` in the `MessengerProj` directory to build the C-part
|
||||
and run the project in Android Atudio.
|
||||
|
||||
The core library (https://github.com/deltachat/deltachat-core), is checked out
|
||||
automatically; there is no need to build the core library itself, the android
|
||||
client just references the needed files.
|
||||
With chance, that's it :)
|
||||
|
||||
---
|
||||
|
||||
|
||||