Commit 16150fe7 authored by DrKLO's avatar DrKLO

New documents design, bug fixes

parent 8bad6559
...@@ -80,7 +80,7 @@ android { ...@@ -80,7 +80,7 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 8 minSdkVersion 8
targetSdkVersion 19 targetSdkVersion 19
versionCode 312 versionCode 315
versionName "1.8.0" versionName "1.8.0"
} }
} }
...@@ -278,10 +278,7 @@ public class ImageLoader { ...@@ -278,10 +278,7 @@ public class ImageLoader {
} }
} }
} catch (Exception e) { } catch (Exception e) {
if (canDeleteFile && cacheFileFinal != null && cacheFileFinal.length() == 0) { //don't promt
cacheFileFinal.delete();
}
FileLog.e("tmessages", e);
} }
return image != null ? new BitmapDrawable(image) : null; return image != null ? new BitmapDrawable(image) : null;
} }
...@@ -641,7 +638,8 @@ public class ImageLoader { ...@@ -641,7 +638,8 @@ public class ImageLoader {
if (filter != null) { if (filter != null) {
key += "@" + filter; key += "@" + filter;
} }
if (imageReceiver != null) { BitmapDrawable bitmapDrawable = memCache.get(key);
if (bitmapDrawable != null && imageReceiver != null) {
Integer TAG = imageReceiver.getTag(); Integer TAG = imageReceiver.getTag();
if (TAG != null) { if (TAG != null) {
CacheImage alreadyLoadingImage = imageLoadingByTag.get(TAG); CacheImage alreadyLoadingImage = imageLoadingByTag.get(TAG);
...@@ -650,7 +648,7 @@ public class ImageLoader { ...@@ -650,7 +648,7 @@ public class ImageLoader {
} }
} }
} }
return memCache.get(key); return bitmapDrawable;
} }
public void replaceImageInCache(final String oldKey, final String newKey) { public void replaceImageInCache(final String oldKey, final String newKey) {
...@@ -744,7 +742,8 @@ public class ImageLoader { ...@@ -744,7 +742,8 @@ public class ImageLoader {
} }
img.addImageView(imageView); img.addImageView(imageView);
imageLoadingByKeys.put(key, img); imageLoadingByKeys.put(key, img);
cacheOutTasks.add(new CacheOutTask(img)); img.cacheTask = new CacheOutTask(img);
cacheOutTasks.add(img.cacheTask);
runCacheTasks(false); runCacheTasks(false);
} else { } else {
img.url = url; img.url = url;
......
...@@ -33,7 +33,6 @@ public class ImageReceiver { ...@@ -33,7 +33,6 @@ public class ImageReceiver {
private int imageX = 0, imageY = 0, imageW = 0, imageH = 0; private int imageX = 0, imageY = 0, imageW = 0, imageH = 0;
private Rect drawRegion = new Rect(); private Rect drawRegion = new Rect();
private boolean isVisible = true; private boolean isVisible = true;
private boolean selfSetting = false;
private boolean isAspectFit = false; private boolean isAspectFit = false;
public ImageReceiver() { public ImageReceiver() {
...@@ -106,12 +105,7 @@ public class ImageReceiver { ...@@ -106,12 +105,7 @@ public class ImageReceiver {
isPlaceholder = true; isPlaceholder = true;
ImageLoader.getInstance().loadImage(fileLocation, httpUrl, this, size); ImageLoader.getInstance().loadImage(fileLocation, httpUrl, this, size);
} else { } else {
selfSetting = true;
setImageBitmap(img, currentPath); setImageBitmap(img, currentPath);
selfSetting = false;
}
if (parentView != null) {
parentView.invalidate();
} }
} }
...@@ -122,7 +116,7 @@ public class ImageReceiver { ...@@ -122,7 +116,7 @@ public class ImageReceiver {
isPlaceholder = false; isPlaceholder = false;
ImageLoader.getInstance().incrementUseCount(currentPath); ImageLoader.getInstance().incrementUseCount(currentPath);
currentImage = bitmap; currentImage = bitmap;
if (!selfSetting && parentView != null) { if (parentView != null) {
parentView.invalidate(); parentView.invalidate();
} }
} }
...@@ -193,7 +187,7 @@ public class ImageReceiver { ...@@ -193,7 +187,7 @@ public class ImageReceiver {
} }
} }
public void draw(Canvas canvas, int x, int y, int w, int h) { public boolean draw(Canvas canvas, int x, int y, int w, int h) {
try { try {
Drawable bitmapDrawable = currentImage; Drawable bitmapDrawable = currentImage;
if (bitmapDrawable == null && last_placeholder != null && last_placeholder instanceof BitmapDrawable) { if (bitmapDrawable == null && last_placeholder != null && last_placeholder instanceof BitmapDrawable) {
...@@ -240,12 +234,14 @@ public class ImageReceiver { ...@@ -240,12 +234,14 @@ public class ImageReceiver {
} }
} }
} }
return true;
} else if (last_placeholder != null) { } else if (last_placeholder != null) {
drawRegion.set(x, y, x + w, y + h); drawRegion.set(x, y, x + w, y + h);
last_placeholder.setBounds(drawRegion); last_placeholder.setBounds(drawRegion);
if (isVisible) { if (isVisible) {
last_placeholder.draw(canvas); last_placeholder.draw(canvas);
} }
return true;
} }
} catch (Exception e) { } catch (Exception e) {
if (currentPath != null) { if (currentPath != null) {
...@@ -255,6 +251,7 @@ public class ImageReceiver { ...@@ -255,6 +251,7 @@ public class ImageReceiver {
setImage(last_path, last_httpUrl, last_filter, last_placeholder, last_size); setImage(last_path, last_httpUrl, last_filter, last_placeholder, last_size);
FileLog.e("tmessages", e); FileLog.e("tmessages", e);
} }
return false;
} }
public Bitmap getBitmap() { public Bitmap getBitmap() {
......
...@@ -279,24 +279,20 @@ public class MessageObject { ...@@ -279,24 +279,20 @@ public class MessageObject {
type = 3; type = 3;
} else if (message.media != null && message.media instanceof TLRPC.TL_messageMediaContact) { } else if (message.media != null && message.media instanceof TLRPC.TL_messageMediaContact) {
if (isFromMe()) { if (isFromMe()) {
contentType = 4; contentType = 3;
type = 12; type = 12;
} else { } else {
contentType = 5; contentType = 4;
type = 13; type = 13;
} }
} else if (message.media != null && message.media instanceof TLRPC.TL_messageMediaUnsupported) { } else if (message.media != null && message.media instanceof TLRPC.TL_messageMediaUnsupported) {
contentType = type = 0; contentType = type = 0;
} else if (message.media != null && message.media instanceof TLRPC.TL_messageMediaDocument) { } else if (message.media != null && message.media instanceof TLRPC.TL_messageMediaDocument) {
contentType = 1;
if (message.media.document.thumb != null && !(message.media.document.thumb instanceof TLRPC.TL_photoSizeEmpty) && message.media.document.mime_type != null && message.media.document.mime_type.equals("image/gif")) { if (message.media.document.thumb != null && !(message.media.document.thumb instanceof TLRPC.TL_photoSizeEmpty) && message.media.document.mime_type != null && message.media.document.mime_type.equals("image/gif")) {
contentType = 1;
type = 8; type = 8;
} else { } else {
if (isFromMe()) { type = 9;
contentType = type = 8;
} else {
contentType = type = 9;
}
} }
} else if (message.media != null && message.media instanceof TLRPC.TL_messageMediaAudio) { } else if (message.media != null && message.media instanceof TLRPC.TL_messageMediaAudio) {
contentType = type = 2; contentType = type = 2;
...@@ -305,9 +301,11 @@ public class MessageObject { ...@@ -305,9 +301,11 @@ public class MessageObject {
if (message.action instanceof TLRPC.TL_messageActionLoginUnknownLocation) { if (message.action instanceof TLRPC.TL_messageActionLoginUnknownLocation) {
contentType = type = 0; contentType = type = 0;
} else if (message.action instanceof TLRPC.TL_messageActionChatEditPhoto || message.action instanceof TLRPC.TL_messageActionUserUpdatedPhoto) { } else if (message.action instanceof TLRPC.TL_messageActionChatEditPhoto || message.action instanceof TLRPC.TL_messageActionUserUpdatedPhoto) {
contentType = type = 11; contentType = 8;
type = 11;
} else { } else {
contentType = type = 10; contentType = 7;
type = 10;
} }
} else if (message instanceof TLRPC.TL_messageForwarded) { } else if (message instanceof TLRPC.TL_messageForwarded) {
contentType = type = 0; contentType = type = 0;
...@@ -417,7 +415,7 @@ public class MessageObject { ...@@ -417,7 +415,7 @@ public class MessageObject {
} }
private void generateLayout() { private void generateLayout() {
if (type != 0 && type != 1 && type != 8 && type != 9 || messageOwner.to_id == null || messageText == null || messageText.length() == 0) { if (type != 0 || messageOwner.to_id == null || messageText == null || messageText.length() == 0) {
return; return;
} }
......
...@@ -170,6 +170,15 @@ public class MessagesController implements NotificationCenter.NotificationCenter ...@@ -170,6 +170,15 @@ public class MessagesController implements NotificationCenter.NotificationCenter
user.status = null; user.status = null;
user.photo = new TLRPC.TL_userProfilePhotoEmpty(); user.photo = new TLRPC.TL_userProfilePhotoEmpty();
putUser(user, true); putUser(user, true);
user = new TLRPC.TL_userForeign();
user.phone = "42777";
user.id = 777000;
user.first_name = "Telegram";
user.last_name = "Notifications";
user.status = null;
user.photo = new TLRPC.TL_userProfilePhotoEmpty();
putUser(user, true);
} }
public static TLRPC.InputUser getInputUser(TLRPC.User user) { public static TLRPC.InputUser getInputUser(TLRPC.User user) {
...@@ -2991,11 +3000,11 @@ public class MessagesController implements NotificationCenter.NotificationCenter ...@@ -2991,11 +3000,11 @@ public class MessagesController implements NotificationCenter.NotificationCenter
UserConfig.saveConfig(false); UserConfig.saveConfig(false);
newMessage.unread = true; newMessage.unread = true;
newMessage.date = update.date; newMessage.date = update.date;
newMessage.from_id = 333000; newMessage.from_id = 777000;
newMessage.to_id = new TLRPC.TL_peerUser(); newMessage.to_id = new TLRPC.TL_peerUser();
newMessage.to_id.user_id = UserConfig.getClientUserId(); newMessage.to_id.user_id = UserConfig.getClientUserId();
newMessage.out = false; newMessage.out = false;
newMessage.dialog_id = 333000; newMessage.dialog_id = 777000;
messagesArr.add(newMessage); messagesArr.add(newMessage);
MessageObject obj = new MessageObject(newMessage, usersDict); MessageObject obj = new MessageObject(newMessage, usersDict);
......
...@@ -31,6 +31,7 @@ import org.telegram.ui.ApplicationLoader; ...@@ -31,6 +31,7 @@ import org.telegram.ui.ApplicationLoader;
import java.io.File; import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
...@@ -170,7 +171,7 @@ public class MessagesStorage { ...@@ -170,7 +171,7 @@ public class MessagesStorage {
} catch (Exception e) { } catch (Exception e) {
FileLog.e("tmessages", e); FileLog.e("tmessages", e);
} }
loadUnreadMessages(false); loadUnreadMessages();
} }
public void updateDbToVersion3() { public void updateDbToVersion3() {
...@@ -352,7 +353,7 @@ public class MessagesStorage { ...@@ -352,7 +353,7 @@ public class MessagesStorage {
}); });
} }
public void loadUnreadMessages(final boolean onlyCount) { public void loadUnreadMessages() {
storageQueue.postRunnable(new Runnable() { storageQueue.postRunnable(new Runnable() {
@Override @Override
public void run() { public void run() {
...@@ -364,20 +365,18 @@ public class MessagesStorage { ...@@ -364,20 +365,18 @@ public class MessagesStorage {
long did = cursor.longValue(0); long did = cursor.longValue(0);
int count = cursor.intValue(1); int count = cursor.intValue(1);
pushDialogs.put(did, count); pushDialogs.put(did, count);
if (!onlyCount) { if (ids.length() != 0) {
if (ids.length() != 0) { ids += ",";
ids += ",";
}
ids += did;
} }
ids += did;
} }
cursor.dispose(); cursor.dispose();
final ArrayList<TLRPC.Message> messages = onlyCount ? null : new ArrayList<TLRPC.Message>(); final ArrayList<TLRPC.Message> messages = new ArrayList<TLRPC.Message>();
final ArrayList<TLRPC.User> users = onlyCount ? null : new ArrayList<TLRPC.User>(); final ArrayList<TLRPC.User> users = new ArrayList<TLRPC.User>();
final ArrayList<TLRPC.Chat> chats = onlyCount ? null : new ArrayList<TLRPC.Chat>(); final ArrayList<TLRPC.Chat> chats = new ArrayList<TLRPC.Chat>();
final ArrayList<TLRPC.EncryptedChat> encryptedChats = onlyCount ? null : new ArrayList<TLRPC.EncryptedChat>(); final ArrayList<TLRPC.EncryptedChat> encryptedChats = new ArrayList<TLRPC.EncryptedChat>();
if (messages != null && ids.length() > 0) { if (ids.length() > 0) {
ArrayList<Integer> userIds = new ArrayList<Integer>(); ArrayList<Integer> userIds = new ArrayList<Integer>();
ArrayList<Integer> chatIds = new ArrayList<Integer>(); ArrayList<Integer> chatIds = new ArrayList<Integer>();
ArrayList<Integer> encryptedChatIds = new ArrayList<Integer>(); ArrayList<Integer> encryptedChatIds = new ArrayList<Integer>();
...@@ -510,7 +509,7 @@ public class MessagesStorage { ...@@ -510,7 +509,7 @@ public class MessagesStorage {
cursor.dispose(); cursor.dispose();
} }
} }
Collections.reverse(messages);
AndroidUtilities.RunOnUIThread(new Runnable() { AndroidUtilities.RunOnUIThread(new Runnable() {
@Override @Override
public void run() { public void run() {
...@@ -3595,7 +3594,7 @@ public class MessagesStorage { ...@@ -3595,7 +3594,7 @@ public class MessagesStorage {
database.commitTransaction(); database.commitTransaction();
loadUnreadMessages(true); loadUnreadMessages();
} catch (Exception e) { } catch (Exception e) {
FileLog.e("tmessages", e); FileLog.e("tmessages", e);
} }
......
...@@ -373,6 +373,7 @@ public class NotificationsController { ...@@ -373,6 +373,7 @@ public class NotificationsController {
.setContentTitle(name) .setContentTitle(name)
.setSmallIcon(R.drawable.notification) .setSmallIcon(R.drawable.notification)
.setAutoCancel(true) .setAutoCancel(true)
.setNumber(total_unread_count)
.setContentIntent(contentIntent); .setContentIntent(contentIntent);
String lastMessage = null; String lastMessage = null;
...@@ -577,6 +578,7 @@ public class NotificationsController { ...@@ -577,6 +578,7 @@ public class NotificationsController {
} }
pushMessagesDict.put(messageObject.messageOwner.id, messageObject); pushMessagesDict.put(messageObject.messageOwner.id, messageObject);
pushMessages.add(0, messageObject); pushMessages.add(0, messageObject);
FileLog.e("tmessages", "processNewMessages add dialog = " + dialog_id);
} }
} }
...@@ -607,6 +609,7 @@ public class NotificationsController { ...@@ -607,6 +609,7 @@ public class NotificationsController {
Integer currentCount = pushDialogs.get(dialog_id); Integer currentCount = pushDialogs.get(dialog_id);
Integer newCount = entry.getValue(); Integer newCount = entry.getValue();
FileLog.e("tmessages", "processDialogsUpdateRead dialog = " + dialog_id + " newCount = " + newCount + " oldCount = " + currentCount);
if (newCount < 0) { if (newCount < 0) {
if (currentCount == null) { if (currentCount == null) {
continue; continue;
...@@ -646,6 +649,17 @@ public class NotificationsController { ...@@ -646,6 +649,17 @@ public class NotificationsController {
MessagesController.getInstance().putChats(chats, true); MessagesController.getInstance().putChats(chats, true);
MessagesController.getInstance().putEncryptedChats(encryptedChats, true); MessagesController.getInstance().putEncryptedChats(encryptedChats, true);
pushDialogs.clear();
pushMessages.clear();
pushMessagesDict.clear();
total_unread_count = 0;
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Context.MODE_PRIVATE);
for (HashMap.Entry<Long, Integer> entry : dialogs.entrySet()) {
pushDialogs.put(entry.getKey(), entry.getValue());
total_unread_count += entry.getValue();
FileLog.e("tmessages", "processLoadedUnreadMessages dialog = " + entry.getKey() + " count = " + entry.getValue());
}
FileLog.e("tmessages", "processLoadedUnreadMessages total = " + total_unread_count + " messages = " + messages.size());
if (messages != null) { if (messages != null) {
for (TLRPC.Message message : messages) { for (TLRPC.Message message : messages) {
if (pushMessagesDict.containsKey(message.id)) { if (pushMessagesDict.containsKey(message.id)) {
...@@ -660,21 +674,12 @@ public class NotificationsController { ...@@ -660,21 +674,12 @@ public class NotificationsController {
pushMessages.add(0, messageObject); pushMessages.add(0, messageObject);
} }
} }
pushDialogs.clear();
total_unread_count = 0;
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Context.MODE_PRIVATE);
for (HashMap.Entry<Long, Integer> entry : dialogs.entrySet()) {
pushDialogs.put(entry.getKey(), entry.getValue());
total_unread_count += entry.getValue();
}
if (total_unread_count == 0) { if (total_unread_count == 0) {
pushMessages.clear();
pushMessagesDict.clear();
popupMessages.clear(); popupMessages.clear();
showOrUpdateNotification(false); showOrUpdateNotification(false);
NotificationCenter.getInstance().postNotificationName(NotificationCenter.pushMessagesUpdated); NotificationCenter.getInstance().postNotificationName(NotificationCenter.pushMessagesUpdated);
} }
if (preferences.getBoolean("badgeNumber", true)) { if (preferences.getBoolean("badgeNumber", true)) {
setBadge(ApplicationLoader.applicationContext, total_unread_count); setBadge(ApplicationLoader.applicationContext, total_unread_count);
} }
......
...@@ -547,7 +547,7 @@ public class Utilities { ...@@ -547,7 +547,7 @@ public class Utilities {
} }
public static int getUserAvatarForId(int id) { public static int getUserAvatarForId(int id) {
if (id / 1000 == 333) { if (id / 1000 == 333 || id / 1000 == 777) {
return R.drawable.telegram_avatar; return R.drawable.telegram_avatar;
} }
return arrUsersAvatars[getColorIndex(id)]; return arrUsersAvatars[getColorIndex(id)];
......
...@@ -60,7 +60,7 @@ public class ChatAudioCell extends ChatBaseCell implements SeekBar.SeekBarDelega ...@@ -60,7 +60,7 @@ public class ChatAudioCell extends ChatBaseCell implements SeekBar.SeekBarDelega
private String currentNameString; private String currentNameString;
public ChatAudioCell(Context context) { public ChatAudioCell(Context context) {
super(context, false); super(context);
TAG = MediaController.getInstance().generateObserverTag(); TAG = MediaController.getInstance().generateObserverTag();
avatarImage = new ImageReceiver(this); avatarImage = new ImageReceiver(this);
......
...@@ -146,10 +146,9 @@ public class ChatBaseCell extends BaseCell { ...@@ -146,10 +146,9 @@ public class ChatBaseCell extends BaseCell {
} }
} }
public ChatBaseCell(Context context, boolean isMedia) { public ChatBaseCell(Context context) {
super(context); super(context);
init(); init();
media = isMedia;
avatarImage = new ImageReceiver(this); avatarImage = new ImageReceiver(this);
} }
......
...@@ -29,7 +29,7 @@ public class ChatMessageCell extends ChatBaseCell { ...@@ -29,7 +29,7 @@ public class ChatMessageCell extends ChatBaseCell {
private int totalVisibleBlocksCount = 0; private int totalVisibleBlocksCount = 0;
public ChatMessageCell(Context context) { public ChatMessageCell(Context context) {
super(context, false); super(context);
drawForwardedName = true; drawForwardedName = true;
} }
......
...@@ -405,6 +405,7 @@ public class ChatOrUserCell extends BaseCell { ...@@ -405,6 +405,7 @@ public class ChatOrUserCell extends BaseCell {
} }
avatarImage.setImageCoords(avatarLeft, avatarTop, AndroidUtilities.dp(50), AndroidUtilities.dp(50)); avatarImage.setImageCoords(avatarLeft, avatarTop, AndroidUtilities.dp(50), AndroidUtilities.dp(50));
double widthpx = 0; double widthpx = 0;
float left = 0; float left = 0;
if (LocaleController.isRTL) { if (LocaleController.isRTL) {
......
...@@ -26,7 +26,6 @@ import org.telegram.android.SendMessagesHelper; ...@@ -26,7 +26,6 @@ import org.telegram.android.SendMessagesHelper;
import org.telegram.messenger.ConnectionsManager; import org.telegram.messenger.ConnectionsManager;
import org.telegram.messenger.FileLog; import org.telegram.messenger.FileLog;
import org.telegram.android.LocaleController; import org.telegram.android.LocaleController;
import org.telegram.android.MessagesController;
import org.telegram.android.NotificationCenter; import org.telegram.android.NotificationCenter;
import org.telegram.messenger.R; import org.telegram.messenger.R;
import org.telegram.messenger.TLRPC; import org.telegram.messenger.TLRPC;
...@@ -362,23 +361,14 @@ public class LaunchActivity extends ActionBarActivity implements NotificationCen ...@@ -362,23 +361,14 @@ public class LaunchActivity extends ActionBarActivity implements NotificationCen
int userId = intent.getIntExtra("userId", 0); int userId = intent.getIntExtra("userId", 0);
int encId = intent.getIntExtra("encId", 0); int encId = intent.getIntExtra("encId", 0);
if (chatId != 0) { if (chatId != 0) {
TLRPC.Chat chat = MessagesController.getInstance().getChat(chatId); NotificationCenter.getInstance().postNotificationName(NotificationCenter.closeChats);
if (chat != null) { push_chat_id = chatId;
NotificationCenter.getInstance().postNotificationName(NotificationCenter.closeChats);
push_chat_id = chatId;
}
} else if (userId != 0) { } else if (userId != 0) {
TLRPC.User user = MessagesController.getInstance().getUser(userId); NotificationCenter.getInstance().postNotificationName(NotificationCenter.closeChats);
if (user != null) { push_user_id = userId;
NotificationCenter.getInstance().postNotificationName(NotificationCenter.closeChats);
push_user_id = userId;
}
} else if (encId != 0) { } else if (encId != 0) {
TLRPC.EncryptedChat chat = MessagesController.getInstance().getEncryptedChat(encId); NotificationCenter.getInstance().postNotificationName(NotificationCenter.closeChats);
if (chat != null) { push_enc_id = encId;
NotificationCenter.getInstance().postNotificationName(NotificationCenter.closeChats);
push_enc_id = encId;
}
} else { } else {
showDialogsList = true; showDialogsList = true;
} }
...@@ -425,6 +415,9 @@ public class LaunchActivity extends ActionBarActivity implements NotificationCen ...@@ -425,6 +415,9 @@ public class LaunchActivity extends ActionBarActivity implements NotificationCen
fragment.setDelegate(this); fragment.setDelegate(this);
presentFragment(fragment, false, true); presentFragment(fragment, false, true);
pushOpened = true; pushOpened = true;
if (PhotoViewer.getInstance().isVisible()) {
PhotoViewer.getInstance().closePhoto(true);
}
} }
if (open_settings != 0) { if (open_settings != 0) {
presentFragment(new SettingsActivity(), false, true); presentFragment(new SettingsActivity(), false, true);
......
...@@ -489,7 +489,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat ...@@ -489,7 +489,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
windowLayoutParams.format = PixelFormat.TRANSLUCENT; windowLayoutParams.format = PixelFormat.TRANSLUCENT;
windowLayoutParams.width = WindowManager.LayoutParams.MATCH_PARENT; windowLayoutParams.width = WindowManager.LayoutParams.MATCH_PARENT;
windowLayoutParams.gravity = Gravity.TOP; windowLayoutParams.gravity = Gravity.TOP;
windowLayoutParams.type = WindowManager.LayoutParams.TYPE_APPLICATION; windowLayoutParams.type = WindowManager.LayoutParams.LAST_APPLICATION_WINDOW;
windowLayoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; windowLayoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
actionBar = new ActionBar(activity); actionBar = new ActionBar(activity);
...@@ -1212,6 +1212,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat ...@@ -1212,6 +1212,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
int prevIndex = currentIndex; int prevIndex = currentIndex;
currentIndex = index; currentIndex = index;
currentFileName = getFileName(index, null); currentFileName = getFileName(index, null);
boolean sameImage = false;
if (!imagesArr.isEmpty()) { if (!imagesArr.isEmpty()) {
deleteButton.setVisibility(View.VISIBLE); deleteButton.setVisibility(View.VISIBLE);
...@@ -1240,7 +1241,11 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat ...@@ -1240,7 +1241,11 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
} else { } else {
deleteButton.setVisibility(View.GONE); deleteButton.setVisibility(View.GONE);
} }
TLRPC.FileLocation old = currentFileLocation;
currentFileLocation = imagesArrLocations.get(index); currentFileLocation = imagesArrLocations.get(index);
if (old != null && currentFileLocation != null && old.local_id == currentFileLocation.local_id && old.volume_id == currentFileLocation.volume_id) {
sameImage = true;
}
actionBarLayer.setTitle(LocaleController.formatString("Of", R.string.Of, currentIndex + 1, imagesArrLocations.size())); actionBarLayer.setTitle(LocaleController.formatString("Of", R.string.Of, currentIndex + 1, imagesArrLocations.size()));
} else if (!imagesArrLocals.isEmpty()) { } else if (!imagesArrLocals.isEmpty()) {
currentPathObject = imagesArrLocals.get(index).path; currentPathObject = imagesArrLocals.get(index).path;
...@@ -1270,33 +1275,35 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat ...@@ -1270,33 +1275,35 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
} }
} }
draggingDown = false; if (!sameImage) {
translationX = 0; draggingDown = false;
translationY = 0; translationX = 0;
scale = 1; translationY = 0;
animateToX = 0; scale = 1;
animateToY = 0; animateToX = 0;
animateToScale = 1; animateToY = 0;
animationDuration = 0; animateToScale = 1;
animationStartTime = 0; animationDuration = 0;
animationStartTime = 0;
pinchStartDistance = 0;
pinchStartScale = 1; pinchStartDistance = 0;
pinchCenterX = 0; pinchStartScale = 1;
pinchCenterY = 0; pinchCenterX = 0;
pinchStartX = 0; pinchCenterY = 0;
pinchStartY = 0; pinchStartX = 0;
moveStartX = 0; pinchStartY = 0;
moveStartY = 0; moveStartX = 0;
zooming = false; moveStartY = 0;
moving = false; zooming = false;
doubleTap = false; moving = false;
invalidCoords = false; doubleTap = false;
canDragDown = true; invalidCoords = false;
changingPage = false; canDragDown = true;
switchImageAfterAnimation = 0; changingPage = false;
canZoom = currentFileName == null || !currentFileName.endsWith("mp4"); switchImageAfterAnimation = 0;
updateMinMax(scale); canZoom = currentFileName == null || !currentFileName.endsWith("mp4");
updateMinMax(scale);
}
if (prevIndex == -1) { if (prevIndex == -1) {
setIndexToImage(centerImage, currentIndex); setIndexToImage(centerImage, currentIndex);
...@@ -1915,7 +1922,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat ...@@ -1915,7 +1922,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
draggingDown = true; draggingDown = true;
moving = false; moving = false;
dragY = ev.getY(); dragY = ev.getY();
if (isActionBarVisible) { if (isActionBarVisible && canShowBottom) {
toggleActionBar(false, true); toggleActionBar(false, true);
} }
return true; return true;
...@@ -2334,7 +2341,11 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat ...@@ -2334,7 +2341,11 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
@Override @Override
public boolean onSingleTapConfirmed(MotionEvent e) { public boolean onSingleTapConfirmed(MotionEvent e) {
toggleActionBar(!isActionBarVisible, true); if (canShowBottom) {
toggleActionBar(!isActionBarVisible, true);
} else {
checkImageView.callOnClick();
}
return true; return true;
} }
......
...@@ -177,18 +177,22 @@ public class SettingsWallpapersActivity extends BaseFragment implements Notifica ...@@ -177,18 +177,22 @@ public class SettingsWallpapersActivity extends BaseFragment implements Notifica
builder.setItems(items, new DialogInterface.OnClickListener() { builder.setItems(items, new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialogInterface, int i) { public void onClick(DialogInterface dialogInterface, int i) {
if (i == 0) { try {
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); if (i == 0) {
File image = Utilities.generatePicturePath(); Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
if (image != null) { File image = Utilities.generatePicturePath();
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(image)); if (image != null) {
currentPicturePath = image.getAbsolutePath(); takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(image));
currentPicturePath = image.getAbsolutePath();
}
getParentActivity().startActivityForResult(takePictureIntent, 10);
} else if (i == 1) {
Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
photoPickerIntent.setType("image/*");
getParentActivity().startActivityForResult(photoPickerIntent, 11);
} }
getParentActivity().startActivityForResult(takePictureIntent, 10); } catch (Exception e) {
} else if (i == 1) { FileLog.e("tmessages", e);
Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
photoPickerIntent.setType("image/*");
getParentActivity().startActivityForResult(photoPickerIntent, 11);
} }
} }
}); });
...@@ -521,7 +525,6 @@ public class SettingsWallpapersActivity extends BaseFragment implements Notifica ...@@ -521,7 +525,6 @@ public class SettingsWallpapersActivity extends BaseFragment implements Notifica
selection.setVisibility(View.INVISIBLE); selection.setVisibility(View.INVISIBLE);
} }
} }
} else if (type == 1) { } else if (type == 1) {
if (view == null) { if (view == null) {
LayoutInflater li = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); LayoutInflater li = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
......
...@@ -744,19 +744,11 @@ public class ActionBarActivity extends Activity { ...@@ -744,19 +744,11 @@ public class ActionBarActivity extends Activity {
} }
containerView.invalidate(); containerView.invalidate();
if (intent != null) { if (intent != null) {
try { super.startActivityForResult(intent, requestCode);
ActionBarActivity.super.startActivityForResult(intent, requestCode);
} catch (Exception e) {
FileLog.e("tmessages", e);
}
} }
} else { } else {
if (intent != null) { if (intent != null) {
try { super.startActivityForResult(intent, requestCode);
super.startActivityForResult(intent, requestCode);
} catch (Exception e) {
FileLog.e("tmessages", e);
}
} }
} }
} }
......
...@@ -24,10 +24,14 @@ public class RoundProgressView { ...@@ -24,10 +24,14 @@ public class RoundProgressView {
paint = new Paint(); paint = new Paint();
paint.setColor(0xffffffff); paint.setColor(0xffffffff);
paint.setStyle(Paint.Style.STROKE); paint.setStyle(Paint.Style.STROKE);
paint.setStrokeWidth(AndroidUtilities.dp(1)); paint.setStrokeWidth(AndroidUtilities.dp(2));
paint.setAntiAlias(true); paint.setAntiAlias(true);
} }
public void setColor(int color) {
paint.setColor(color);
}
public void setProgress(float progress) { public void setProgress(float progress) {
currentProgress = progress; currentProgress = progress;
if (currentProgress < 0) { if (currentProgress < 0) {
......
TMessagesProj/src/main/res/drawable-hdpi/doc_blue.png

869 Bytes | W: | H:

TMessagesProj/src/main/res/drawable-hdpi/doc_blue.png

2.55 KB | W: | H:

TMessagesProj/src/main/res/drawable-hdpi/doc_blue.png
TMessagesProj/src/main/res/drawable-hdpi/doc_blue.png
TMessagesProj/src/main/res/drawable-hdpi/doc_blue.png
TMessagesProj/src/main/res/drawable-hdpi/doc_blue.png
  • 2-up
  • Swipe
  • Onion skin
TMessagesProj/src/main/res/drawable-hdpi/doc_green.png

875 Bytes | W: | H:

TMessagesProj/src/main/res/drawable-hdpi/doc_green.png

2.45 KB | W: | H:

TMessagesProj/src/main/res/drawable-hdpi/doc_green.png
TMessagesProj/src/main/res/drawable-hdpi/doc_green.png
TMessagesProj/src/main/res/drawable-hdpi/doc_green.png
TMessagesProj/src/main/res/drawable-hdpi/doc_green.png
  • 2-up
  • Swipe
  • Onion skin
TMessagesProj/src/main/res/drawable-ldpi/doc_blue.png

500 Bytes | W: | H:

TMessagesProj/src/main/res/drawable-ldpi/doc_blue.png

1.66 KB | W: | H:

TMessagesProj/src/main/res/drawable-ldpi/doc_blue.png
TMessagesProj/src/main/res/drawable-ldpi/doc_blue.png
TMessagesProj/src/main/res/drawable-ldpi/doc_blue.png
TMessagesProj/src/main/res/drawable-ldpi/doc_blue.png
  • 2-up
  • Swipe
  • Onion skin
TMessagesProj/src/main/res/drawable-ldpi/doc_green.png

490 Bytes | W: | H:

TMessagesProj/src/main/res/drawable-ldpi/doc_green.png

1.58 KB | W: | H:

TMessagesProj/src/main/res/drawable-ldpi/doc_green.png
TMessagesProj/src/main/res/drawable-ldpi/doc_green.png
TMessagesProj/src/main/res/drawable-ldpi/doc_green.png
TMessagesProj/src/main/res/drawable-ldpi/doc_green.png
  • 2-up
  • Swipe
  • Onion skin
TMessagesProj/src/main/res/drawable-mdpi/doc_blue.png

589 Bytes | W: | H:

TMessagesProj/src/main/res/drawable-mdpi/doc_blue.png

1.99 KB | W: | H:

TMessagesProj/src/main/res/drawable-mdpi/doc_blue.png
TMessagesProj/src/main/res/drawable-mdpi/doc_blue.png
TMessagesProj/src/main/res/drawable-mdpi/doc_blue.png
TMessagesProj/src/main/res/drawable-mdpi/doc_blue.png
  • 2-up
  • Swipe
  • Onion skin
TMessagesProj/src/main/res/drawable-mdpi/doc_green.png

587 Bytes | W: | H:

TMessagesProj/src/main/res/drawable-mdpi/doc_green.png

1.9 KB | W: | H:

TMessagesProj/src/main/res/drawable-mdpi/doc_green.png
TMessagesProj/src/main/res/drawable-mdpi/doc_green.png
TMessagesProj/src/main/res/drawable-mdpi/doc_green.png
TMessagesProj/src/main/res/drawable-mdpi/doc_green.png
  • 2-up
  • Swipe
  • Onion skin
TMessagesProj/src/main/res/drawable-xhdpi/doc_blue.png

1.72 KB | W: | H:

TMessagesProj/src/main/res/drawable-xhdpi/doc_blue.png

3.22 KB | W: | H:

TMessagesProj/src/main/res/drawable-xhdpi/doc_blue.png
TMessagesProj/src/main/res/drawable-xhdpi/doc_blue.png
TMessagesProj/src/main/res/drawable-xhdpi/doc_blue.png
TMessagesProj/src/main/res/drawable-xhdpi/doc_blue.png
  • 2-up
  • Swipe
  • Onion skin
TMessagesProj/src/main/res/drawable-xhdpi/doc_green.png

1.72 KB | W: | H:

TMessagesProj/src/main/res/drawable-xhdpi/doc_green.png

3.12 KB | W: | H:

TMessagesProj/src/main/res/drawable-xhdpi/doc_green.png
TMessagesProj/src/main/res/drawable-xhdpi/doc_green.png
TMessagesProj/src/main/res/drawable-xhdpi/doc_green.png
TMessagesProj/src/main/res/drawable-xhdpi/doc_green.png
  • 2-up
  • Swipe
  • Onion skin
TMessagesProj/src/main/res/drawable-xxhdpi/doc_blue.png

1.56 KB | W: | H:

TMessagesProj/src/main/res/drawable-xxhdpi/doc_blue.png

5 KB | W: | H:

TMessagesProj/src/main/res/drawable-xxhdpi/doc_blue.png
TMessagesProj/src/main/res/drawable-xxhdpi/doc_blue.png
TMessagesProj/src/main/res/drawable-xxhdpi/doc_blue.png
TMessagesProj/src/main/res/drawable-xxhdpi/doc_blue.png
  • 2-up
  • Swipe
  • Onion skin
TMessagesProj/src/main/res/drawable-xxhdpi/doc_green.png

1.57 KB | W: | H:

TMessagesProj/src/main/res/drawable-xxhdpi/doc_green.png

5.01 KB | W: | H:

TMessagesProj/src/main/res/drawable-xxhdpi/doc_green.png
TMessagesProj/src/main/res/drawable-xxhdpi/doc_green.png
TMessagesProj/src/main/res/drawable-xxhdpi/doc_green.png
TMessagesProj/src/main/res/drawable-xxhdpi/doc_green.png
  • 2-up
  • Swipe
  • Onion skin
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="1dp"
android:paddingTop="1dp"
android:layout_gravity="top"
android:gravity="left">
<org.telegram.ui.Views.BackupImageView
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_marginLeft="6dp"
android:id="@+id/chat_group_avatar_image"
android:layout_marginBottom="2dp"
android:layout_marginRight="4dp"
android:layout_gravity="bottom"/>
<org.telegram.ui.Views.FrameLayoutFixed
android:orientation="horizontal"
android:layout_height="78dp"
android:layout_width="wrap_content"
android:paddingTop="9dp"
android:paddingLeft="18dp"
android:paddingRight="9dp"
android:layout_gravity="top|left"
android:id="@+id/chat_bubble_layout">
<org.telegram.ui.Views.FrameLayoutFixed
android:layout_height="69dp"
android:layout_width="wrap_content"
android:layout_gravity="top|right"
android:id="@+id/shared_layout">
<org.telegram.ui.Views.BackupImageView
android:layout_width="42dp"
android:layout_height="42dp"
android:background="#40b7c9d7"
android:id="@+id/contact_avatar"/>
<org.telegram.ui.Views.TightTextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginTop="3dp"
android:textSize="14dp"
android:lines="1"
android:singleLine="true"
android:layout_gravity="top"
android:ellipsize="end"
android:maxLines="1"
android:textColor="#000000"
android:layout_marginRight="2dp"
android:id="@+id/chat_user_group_name"
android:layout_marginLeft="50dp"/>
<org.telegram.ui.Views.TightTextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginLeft="50dp"
android:singleLine="true"
android:layout_marginTop="22dp"
android:layout_gravity="top"
android:layout_marginRight="2dp"
android:textSize="11dp"
android:maxLines="1"
android:textColor="#9daab8"
android:id="@+id/phone_text_view"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/chat_time_text"
android:textColor="#a1aab3"
android:textSize="12dp"
android:layout_marginBottom="5dp"
android:layout_gravity="bottom|right"/>
</org.telegram.ui.Views.FrameLayoutFixed>
</org.telegram.ui.Views.FrameLayoutFixed>
<org.telegram.ui.Views.FrameLayoutFixed
android:layout_height="wrap_content"
android:layout_width="140dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_gravity="center_vertical"
android:id="@+id/chat_view_action_layout"
android:visibility="gone">
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:scaleType="centerInside"
android:layout_marginRight="4dp"
android:layout_gravity="right|center"
android:id="@+id/chat_view_action_cancel_button"
android:src="@drawable/ic_msg_btn_cross_custom"
android:clickable="true"/>
<ProgressBar
android:layout_width="fill_parent"
android:layout_height="3dp"
android:layout_gravity="left|center_vertical"
android:progressDrawable="@drawable/progress_chat"
style="?android:attr/progressBarStyleHorizontal"
android:progress="50"
android:layout_marginLeft="12dp"
android:layout_marginRight="36dp"
android:id="@+id/chat_view_action_progress"
android:max="100"/>
</org.telegram.ui.Views.FrameLayoutFixed>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#54759e"
android:background="@drawable/chat_incoming_media_states"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:id="@+id/chat_view_action_button"
android:textSize="14dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:descendantFocusability="blocksDescendants"
android:clickable="true"
android:gravity="center|left"
android:visibility="gone"
android:textStyle="bold"
android:layout_gravity="center_vertical|left"/>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="1dp"
android:paddingTop="1dp"
android:layout_gravity="top">
<org.telegram.ui.Views.BackupImageView
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_marginLeft="6dp"
android:id="@+id/chat_group_avatar_image"
android:layout_marginBottom="2dp"
android:layout_gravity="bottom"/>
<org.telegram.ui.Views.FrameLayoutFixed
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="13dp"
android:layout_gravity="top"
android:id="@+id/chat_bubble_layout"
android:addStatesFromChildren="true">
<org.telegram.ui.Views.BackupImageView
android:layout_height="100dp"
android:layout_width="100dp"
android:layout_margin="6dp"
android:layout_gravity="top"
android:id="@+id/chat_photo_image"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="16dp"
android:id="@+id/chat_time_layout"
android:paddingLeft="3dp"
android:paddingRight="3dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="8dp"
android:layout_gravity="right|bottom"
android:background="@drawable/phototime">
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textColor="#ffffff"
android:textSize="12dp"
android:layout_gravity="bottom"
android:layout_marginBottom="1dp"
android:id="@+id/chat_time_text"/>
</LinearLayout>
</org.telegram.ui.Views.FrameLayoutFixed>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:textStyle="bold"
android:id="@+id/chat_view_action_button"
android:layout_gravity="center"
android:gravity="center"
android:textSize="14dp"
android:textColor="#54759e"
android:background="@drawable/chat_incoming_media_states"
android:descendantFocusability="blocksDescendants"
android:clickable="true"
android:layout_marginLeft="10dp"/>
</LinearLayout>
\ No newline at end of file
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="1dp"
android:paddingTop="1dp"
android:layout_gravity="top"
android:gravity="left">
<org.telegram.ui.Views.FrameLayoutFixed
android:orientation="horizontal"
android:layout_height="78dp"
android:layout_width="wrap_content"
android:paddingTop="9dp"
android:paddingLeft="18dp"
android:paddingRight="9dp"
android:layout_gravity="top|left"
android:id="@+id/chat_bubble_layout">
<org.telegram.ui.Views.FrameLayoutFixed
android:layout_height="69dp"
android:layout_width="wrap_content"
android:layout_gravity="top|right"
android:id="@+id/shared_layout">
<org.telegram.ui.Views.BackupImageView
android:layout_width="42dp"
android:layout_height="42dp"
android:background="#40b7c9d7"
android:src="@drawable/doc_blue"
android:id="@+id/contact_avatar"/>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:scrollHorizontally="true"
android:layout_marginTop="3dp"
android:textSize="14dp"
android:lines="1"
android:singleLine="true"
android:layout_marginRight="2dp"
android:layout_gravity="top"
android:ellipsize="end"
android:textColor="#000000"
android:id="@+id/chat_user_group_name"
android:maxLines="1"
android:layout_marginLeft="50dp"/>
<TextView android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginTop="22dp"
android:layout_gravity="top"
android:layout_marginRight="2dp"
android:textSize="11dp"
android:maxLines="1"
android:singleLine="true"
android:textColor="#9daab8"
android:id="@+id/phone_text_view"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/chat_time_text"
android:textColor="#a1aab3"
android:textSize="12dp"
android:layout_gravity="bottom|right"
android:layout_marginBottom="5dp"/>
</org.telegram.ui.Views.FrameLayoutFixed>
</org.telegram.ui.Views.FrameLayoutFixed>
<org.telegram.ui.Views.FrameLayoutFixed
android:layout_height="wrap_content"
android:layout_width="140dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_gravity="center_vertical"
android:id="@+id/chat_view_action_layout"
android:visibility="gone">
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:scaleType="centerInside"
android:layout_marginRight="4dp"
android:layout_gravity="right|center"
android:id="@+id/chat_view_action_cancel_button"
android:src="@drawable/ic_msg_btn_cross_custom"
android:clickable="true"/>
<ProgressBar
android:layout_width="fill_parent"
android:layout_height="3dp"
android:layout_gravity="left|center_vertical"
android:progressDrawable="@drawable/progress_chat"
style="?android:attr/progressBarStyleHorizontal"
android:progress="50"
android:layout_marginLeft="12dp"
android:layout_marginRight="36dp"
android:id="@+id/chat_view_action_progress"
android:max="100"/>
</org.telegram.ui.Views.FrameLayoutFixed>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#54759e"
android:background="@drawable/chat_incoming_media_states"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:id="@+id/chat_view_action_button"
android:textSize="14dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:descendantFocusability="blocksDescendants"
android:clickable="true"
android:gravity="center"
android:visibility="gone"
android:textStyle="bold"
android:layout_gravity="center_vertical"/>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="1dp"
android:paddingTop="1dp"
android:layout_gravity="top">
<org.telegram.ui.Views.FrameLayoutFixed
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="9dp"
android:id="@+id/chat_bubble_layout"
android:layout_gravity="top"
android:addStatesFromChildren="true">
<org.telegram.ui.Views.BackupImageView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_margin="6dp"
android:layout_gravity="top"
android:minHeight="100dp"
android:minWidth="100dp"
android:id="@+id/chat_photo_image"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="16dp"
android:id="@+id/chat_time_layout"
android:paddingLeft="3dp"
android:paddingRight="3dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="8dp"
android:layout_gravity="right|bottom"
android:background="@drawable/phototime">
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textColor="#ffffff"
android:textSize="12dp"
android:layout_gravity="bottom"
android:layout_marginBottom="1dp"
android:id="@+id/chat_time_text"/>
</LinearLayout>
</org.telegram.ui.Views.FrameLayoutFixed>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#54759e"
android:background="@drawable/chat_incoming_media_states"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:layout_gravity="center"
android:gravity="center"
android:textStyle="bold"
android:id="@+id/chat_view_action_button"
android:textSize="14dp"
android:layout_marginLeft="10dp"
android:descendantFocusability="blocksDescendants"
android:clickable="true"/>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="1dp"
android:paddingTop="1dp"
android:layout_gravity="top"
android:gravity="right">
<org.telegram.ui.Views.FrameLayoutFixed
android:layout_height="wrap_content"
android:layout_width="140dp"
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:id="@+id/chat_view_action_layout"
android:layout_gravity="center"
android:visibility="gone">
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:scaleType="centerInside"
android:layout_marginLeft="4dp"
android:id="@+id/chat_view_action_cancel_button"
android:src="@drawable/ic_msg_btn_cross_custom"
android:layout_gravity="left|center"
android:clickable="true"/>
<ProgressBar
android:layout_width="fill_parent"
android:layout_height="3dp"
style="?android:attr/progressBarStyleHorizontal"
android:progress="50"
android:layout_marginLeft="36dp"
android:layout_marginRight="12dp"
android:layout_gravity="right|center_vertical"
android:progressDrawable="@drawable/progress_chat"
android:id="@+id/chat_view_action_progress"
android:max="100"/>
</org.telegram.ui.Views.FrameLayoutFixed>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#54759e"
android:background="@drawable/chat_incoming_media_states"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:id="@+id/chat_view_action_button"
android:textSize="14dp"
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:descendantFocusability="blocksDescendants"
android:clickable="true"
android:gravity="center"
android:visibility="gone"
android:textStyle="bold"
android:layout_gravity="center"/>
<org.telegram.ui.Views.FrameLayoutFixed
android:layout_height="78dp"
android:layout_width="wrap_content"
android:paddingTop="9dp"
android:paddingLeft="9dp"
android:paddingRight="18dp"
android:layout_gravity="top|right"
android:id="@+id/chat_bubble_layout">
<org.telegram.ui.Views.FrameLayoutFixed
android:layout_height="69dp"
android:layout_width="wrap_content"
android:layout_gravity="top|right"
android:id="@+id/shared_layout">
<org.telegram.ui.Views.BackupImageView
android:layout_width="42dp"
android:layout_height="42dp"
android:background="#408ed057"
android:id="@+id/contact_avatar"/>
<org.telegram.ui.Views.TightTextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:scrollHorizontally="true"
android:layout_marginTop="3dp"
android:textSize="14dp"
android:lines="1"
android:singleLine="true"
android:layout_marginRight="2dp"
android:layout_gravity="top"
android:ellipsize="end"
android:textColor="#000000"
android:id="@+id/chat_user_group_name"
android:layout_marginLeft="50dp"/>
<org.telegram.ui.Views.TightTextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginTop="22dp"
android:layout_gravity="top"
android:layout_marginRight="2dp"
android:textSize="11dp"
android:maxLines="1"
android:textColor="#75b166"
android:id="@+id/phone_text_view"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/chat_time_layout"
android:layout_gravity="bottom|right"
android:layout_marginBottom="5dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/chat_time_text"
android:textColor="#70b15c"
android:textSize="12dp"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/msg_check"
android:layout_marginTop="2dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="-8dp"
android:id="@+id/chat_row_check"
android:visibility="visible"
android:layout_gravity="top"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/msg_halfcheck"
android:layout_marginTop="2dp"
android:id="@+id/chat_row_halfcheck"
android:visibility="visible"
android:layout_gravity="top"/>
</LinearLayout>
</org.telegram.ui.Views.FrameLayoutFixed>
</org.telegram.ui.Views.FrameLayoutFixed>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:paddingBottom="1dp"
android:paddingTop="1dp"
android:layout_gravity="top">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#54759e"
android:background="@drawable/chat_incoming_media_states"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:id="@+id/chat_view_action_button"
android:textSize="14dp"
android:layout_marginRight="10dp"
android:textStyle="bold"
android:descendantFocusability="blocksDescendants"
android:clickable="true"
android:gravity="center"
android:layout_gravity="center"/>
<org.telegram.ui.Views.FrameLayoutFixed
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="9dp"
android:id="@+id/chat_bubble_layout"
android:layout_gravity="top"
android:addStatesFromChildren="true">
<org.telegram.ui.Views.BackupImageView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_margin="6dp"
android:layout_gravity="top"
android:minHeight="100dp"
android:minWidth="100dp"
android:id="@+id/chat_photo_image"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="16dp"
android:id="@+id/chat_time_layout"
android:paddingLeft="3dp"
android:paddingRight="3dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="8dp"
android:layout_gravity="right|bottom"
android:background="@drawable/phototime">
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textColor="#ffffff"
android:textSize="12dp"
android:layout_gravity="bottom"
android:layout_marginBottom="1dp"
android:id="@+id/chat_time_text"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/msg_check_w"
android:layout_marginTop="1dp"
android:layout_marginLeft="3dp"
android:layout_marginRight="-8dp"
android:id="@+id/chat_row_check"
android:visibility="visible"
android:layout_gravity="top"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="1dp"
android:id="@+id/chat_row_halfcheck"
android:visibility="visible"
android:src="@drawable/msg_halfcheck_w"
android:layout_gravity="top"/>
</LinearLayout>
</org.telegram.ui.Views.FrameLayoutFixed>
</LinearLayout>
\ No newline at end of file
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
<string name="NotificationContactJoined">%1$s heeft nu Telegram!</string> <string name="NotificationContactJoined">%1$s heeft nu Telegram!</string>
<string name="NotificationUnrecognizedDevice">%1$s,\nEr is op je account ingelogd vanaf een nieuw apparaat op %2$s\n\nApparaat: %3$s\nLocatie: %4$s\n\nAls jij dit niet was, kun je alle sessies beëindigen via Instellingen – Beëindig alle andere sessies.\n\nBedankt,\nHet Telegram-team</string> <string name="NotificationUnrecognizedDevice">%1$s,\nEr is op je account ingelogd vanaf een nieuw apparaat op %2$s\n\nApparaat: %3$s\nLocatie: %4$s\n\nAls jij dit niet was, kun je alle sessies beëindigen via Instellingen – Beëindig alle andere sessies.\n\nBedankt,\nHet Telegram-team</string>
<string name="NotificationContactNewPhoto">%1$s heeft zijn/haar profielfoto gewijzigd</string> <string name="NotificationContactNewPhoto">%1$s heeft zijn/haar profielfoto gewijzigd</string>
<string name="Reply">Reply</string> <string name="Reply">Antwoord</string>
<!--contacts view--> <!--contacts view-->
<string name="SelectContact">Kies een contact</string> <string name="SelectContact">Kies een contact</string>
...@@ -259,7 +259,7 @@ ...@@ -259,7 +259,7 @@
<string name="ContactJoined">Contact lid geworden van Telegram</string> <string name="ContactJoined">Contact lid geworden van Telegram</string>
<string name="Pebble">PEBBLE</string> <string name="Pebble">PEBBLE</string>
<string name="Language">Taal</string> <string name="Language">Taal</string>
<string name="AskAQuestionInfo">Houd er rekening mee dat de ondersteuning van Telegram door vrijwilligers wordt gedaan. We doen ons best om zo snel mogelijk te antwoorden, maar het kan even even duren.<![CDATA[<br><br>]]>Bekijk ook de <![CDATA[<a href="http://telegram.org/faq#general">veelgestelde vragen</a>]]>: hier staan de antwoorden op de meeste vragen en belangrijke tips voor <![CDATA[<a href="http://telegram.org/faq#troubleshooting">het oplossen van problemen</a>]]>.</string> <string name="AskAQuestionInfo">Houd er rekening mee dat de ondersteuning van Telegram door vrijwilligers wordt gedaan. We doen ons best om zo snel mogelijk te antwoorden, maar het kan even even duren.<![CDATA[<br><br>]]>Bekijk ook de <![CDATA[<a href=\"http://telegram.org/faq#general\">veelgestelde vragen</a>]]>: hier staan de antwoorden op de meeste vragen en belangrijke tips voor <![CDATA[<a href=\"http://telegram.org/faq#troubleshooting\">het oplossen van problemen</a>]]>.</string>
<string name="AskButton">Vraag een vrijwilliger</string> <string name="AskButton">Vraag een vrijwilliger</string>
<string name="TelegramFaq">Veelgestelde vragen</string> <string name="TelegramFaq">Veelgestelde vragen</string>
<string name="TelegramFaqUrl">https://telegram.org/faq</string> <string name="TelegramFaqUrl">https://telegram.org/faq</string>
...@@ -281,15 +281,15 @@ ...@@ -281,15 +281,15 @@
<string name="OnlyWhenScreenOff">Alleen wanneer scherm \"uit\" staat</string> <string name="OnlyWhenScreenOff">Alleen wanneer scherm \"uit\" staat</string>
<string name="AlwaysShowPopup">Altijd popup tonen</string> <string name="AlwaysShowPopup">Altijd popup tonen</string>
<string name="BadgeNumber">Badgenummer</string> <string name="BadgeNumber">Badgenummer</string>
<string name="Short">Short</string> <string name="Short">Kort</string>
<string name="Long">Long</string> <string name="Long">Lang</string>
<string name="SystemDefault">System default</string> <string name="SystemDefault">Standaardinstelling</string>
<string name="SettingsDefault">Settings default</string> <string name="SettingsDefault">Standaardinstelling</string>
<string name="AutomaticMediaDownload">AUTOMATIC MEDIA DOWNLOAD</string> <string name="AutomaticMediaDownload">AUTOMATISCH MEDIA OPHALEN</string>
<string name="WhenUsingMobileData">When using mobile data</string> <string name="WhenUsingMobileData">Bij mobiel datagebruik</string>
<string name="WhenConnectedOnWiFi">When connected on Wi-Fi</string> <string name="WhenConnectedOnWiFi">Bij Wi-Fi verbinding</string>
<string name="WhenRoaming">When roaming</string> <string name="WhenRoaming">Bij roamen</string>
<string name="NoMediaAutoDownload">No media</string> <string name="NoMediaAutoDownload">Geen media</string>
<!--media view--> <!--media view-->
<string name="NoMedia">Nog geen media gedeeld</string> <string name="NoMedia">Nog geen media gedeeld</string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment