Bug fixes, locales update

https://github.com/DrKLO/Telegram/issues/451
This commit is contained in:
DrKLO 2014-06-12 19:53:20 +04:00
parent 55ccb7c9e2
commit 69f8bb4f40
47 changed files with 382 additions and 269 deletions

View File

@ -81,7 +81,7 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 8 minSdkVersion 8
targetSdkVersion 19 targetSdkVersion 19
versionCode 245 versionCode 247
versionName "1.5.0" versionName "1.5.0"
} }
} }

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.telegram.messenger"> package="org.telegram.messenger"
android:installLocation="auto">
<uses-feature android:name="android.hardware.location.gps" android:required="false" /> <uses-feature android:name="android.hardware.location.gps" android:required="false" />
<uses-feature android:name="android.hardware.location.network" android:required="false" /> <uses-feature android:name="android.hardware.location.network" android:required="false" />

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.telegram.messenger"> package="org.telegram.messenger"
android:installLocation="auto">
<application <application
android:allowBackup="false" android:allowBackup="false"

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.telegram.messenger"> package="org.telegram.messenger"
android:installLocation="auto">
<uses-feature android:name="android.hardware.location.gps" android:required="false" /> <uses-feature android:name="android.hardware.location.gps" android:required="false" />
<uses-feature android:name="android.hardware.location.network" android:required="false" /> <uses-feature android:name="android.hardware.location.network" android:required="false" />

View File

@ -148,15 +148,33 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.
if (datacenters != null) { if (datacenters != null) {
MessagesController.getInstance().updateTimerProc(); MessagesController.getInstance().updateTimerProc();
Datacenter datacenter = datacenterWithId(currentDatacenterId); Datacenter datacenter = datacenterWithId(currentDatacenterId);
if (datacenter != null && datacenter.authKey != null) { if (datacenter != null) {
if (lastPingTime < System.currentTimeMillis() - 19000) { if (datacenter.authKey != null) {
lastPingTime = System.currentTimeMillis(); if (lastPingTime < System.currentTimeMillis() - 19000) {
generatePing(); lastPingTime = System.currentTimeMillis();
generatePing();
}
if (!updatingDcSettings && lastDcUpdateTime < (int) (System.currentTimeMillis() / 1000) - DC_UPDATE_TIME) {
updateDcSettings(0);
}
processRequestQueue(0, 0);
} else {
boolean notFound = true;
for (Action actor : actionQueue) {
if (actor instanceof HandshakeAction) {
HandshakeAction eactor = (HandshakeAction)actor;
if (eactor.datacenter.datacenterId == datacenter.datacenterId) {
notFound = false;
break;
}
}
}
if (notFound) {
HandshakeAction actor = new HandshakeAction(datacenter);
actor.delegate = ConnectionsManager.this;
dequeueActor(actor, true);
}
} }
if (!updatingDcSettings && lastDcUpdateTime < (int)(System.currentTimeMillis() / 1000) - DC_UPDATE_TIME) {
updateDcSettings(0);
}
processRequestQueue(0, 0);
} }
} }

View File

@ -11,6 +11,9 @@ package org.telegram.messenger;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.BitmapFactory; import android.graphics.BitmapFactory;
import android.os.Build; import android.os.Build;
import android.provider.MediaStore;
import org.telegram.ui.ApplicationLoader;
import java.io.RandomAccessFile; import java.io.RandomAccessFile;
import java.net.URL; import java.net.URL;
@ -158,14 +161,24 @@ public class FileLoadOperation {
boolean ignoreCache = false; boolean ignoreCache = false;
boolean onlyCache = false; boolean onlyCache = false;
boolean isLocalFile = false; boolean isLocalFile = false;
Long mediaId = null;
String fileNameFinal = null; String fileNameFinal = null;
String fileNameTemp = null; String fileNameTemp = null;
String fileNameIv = null; String fileNameIv = null;
if (httpUrl != null) { if (httpUrl != null) {
if (!httpUrl.startsWith("http")) { if (!httpUrl.startsWith("http")) {
if (httpUrl.startsWith("thumb://")) {
int idx = httpUrl.indexOf(":", 8);
if (idx >= 0) {
String media = httpUrl.substring(8, idx);
mediaId = Long.parseLong(media);
fileNameFinal = httpUrl.substring(idx + 1);
}
} else {
fileNameFinal = httpUrl;
}
onlyCache = true; onlyCache = true;
isLocalFile = true; isLocalFile = true;
fileNameFinal = httpUrl;
} else { } else {
fileNameFinal = Utilities.MD5(httpUrl); fileNameFinal = Utilities.MD5(httpUrl);
fileNameTemp = fileNameFinal + "_temp.jpg"; fileNameTemp = fileNameFinal + "_temp.jpg";
@ -197,6 +210,7 @@ public class FileLoadOperation {
cacheFileFinal = new File(Utilities.getCacheDir(), fileNameFinal); cacheFileFinal = new File(Utilities.getCacheDir(), fileNameFinal);
} }
final boolean dontDelete = isLocalFile; final boolean dontDelete = isLocalFile;
final Long mediaIdFinal = mediaId;
if ((exist = cacheFileFinal.exists()) && !ignoreCache) { if ((exist = cacheFileFinal.exists()) && !ignoreCache) {
FileLoader.cacheOutQueue.postRunnable(new Runnable() { FileLoader.cacheOutQueue.postRunnable(new Runnable() {
@Override @Override
@ -206,15 +220,18 @@ public class FileLoadOperation {
if (FileLoader.getInstance().runtimeHack != null) { if (FileLoader.getInstance().runtimeHack != null) {
delay = 60; delay = 60;
} }
if (FileLoader.lastCacheOutTime != 0 && FileLoader.lastCacheOutTime > System.currentTimeMillis() - delay) { if (mediaIdFinal != null) {
delay = 0;
}
if (delay != 0 && FileLoader.lastCacheOutTime != 0 && FileLoader.lastCacheOutTime > System.currentTimeMillis() - delay) {
Thread.sleep(delay); Thread.sleep(delay);
} }
FileLoader.lastCacheOutTime = System.currentTimeMillis(); FileLoader.lastCacheOutTime = System.currentTimeMillis();
if (state != 1) { if (state != 1) {
return; return;
} }
if (needBitmapCreate) { if (needBitmapCreate) {
FileInputStream is = new FileInputStream(cacheFileFinal);
BitmapFactory.Options opts = new BitmapFactory.Options(); BitmapFactory.Options opts = new BitmapFactory.Options();
float w_filter = 0; float w_filter = 0;
@ -223,9 +240,14 @@ public class FileLoadOperation {
String args[] = filter.split("_"); String args[] = filter.split("_");
w_filter = Float.parseFloat(args[0]) * Utilities.density; w_filter = Float.parseFloat(args[0]) * Utilities.density;
h_filter = Float.parseFloat(args[1]) * Utilities.density; h_filter = Float.parseFloat(args[1]) * Utilities.density;
opts.inJustDecodeBounds = true; opts.inJustDecodeBounds = true;
BitmapFactory.decodeFile(cacheFileFinal.getAbsolutePath(), opts);
if (mediaIdFinal != null) {
MediaStore.Images.Thumbnails.getThumbnail(ApplicationLoader.applicationContext.getContentResolver(), mediaIdFinal, MediaStore.Images.Thumbnails.MINI_KIND, opts);
} else {
BitmapFactory.decodeFile(cacheFileFinal.getAbsolutePath(), opts);
}
float photoW = opts.outWidth; float photoW = opts.outWidth;
float photoH = opts.outHeight; float photoH = opts.outHeight;
float scaleFactor = Math.max(photoW / w_filter, photoH / h_filter); float scaleFactor = Math.max(photoW / w_filter, photoH / h_filter);
@ -242,8 +264,14 @@ public class FileLoadOperation {
opts.inPreferredConfig = Bitmap.Config.RGB_565; opts.inPreferredConfig = Bitmap.Config.RGB_565;
} }
opts.inDither = false; opts.inDither = false;
image = BitmapFactory.decodeStream(is, null, opts); if (mediaIdFinal != null) {
is.close(); image = MediaStore.Images.Thumbnails.getThumbnail(ApplicationLoader.applicationContext.getContentResolver(), mediaIdFinal, MediaStore.Images.Thumbnails.MINI_KIND, opts);
}
if (image == null) {
FileInputStream is = new FileInputStream(cacheFileFinal);
image = BitmapFactory.decodeStream(is, null, opts);
is.close();
}
if (image == null) { if (image == null) {
if (!dontDelete && (cacheFileFinal.length() == 0 || filter == null)) { if (!dontDelete && (cacheFileFinal.length() == 0 || filter == null)) {
cacheFileFinal.delete(); cacheFileFinal.delete();

View File

@ -81,30 +81,6 @@ public class TcpConnection extends ConnectionContext {
public void connect() { public void connect() {
if (!ConnectionsManager.isNetworkOnline()) { if (!ConnectionsManager.isNetworkOnline()) {
synchronized (timerSync) {
reconnectTimer = new Timer();
reconnectTimer.schedule(new TimerTask() {
@Override
public void run() {
selector.scheduleTask(new Runnable() {
@Override
public void run() {
try {
synchronized (timerSync) {
if (reconnectTimer != null) {
reconnectTimer.cancel();
reconnectTimer = null;
}
}
} catch (Exception e2) {
FileLog.e("tmessages", e2);
}
connect();
}
});
}
}, 500);
}
if (delegate != null) { if (delegate != null) {
final TcpConnectionDelegate finalDelegate = delegate; final TcpConnectionDelegate finalDelegate = delegate;
Utilities.stageQueue.postRunnable(new Runnable() { Utilities.stageQueue.postRunnable(new Runnable() {

View File

@ -418,6 +418,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
public View createView(LayoutInflater inflater, ViewGroup container) { public View createView(LayoutInflater inflater, ViewGroup container) {
if (fragmentView == null) { if (fragmentView == null) {
actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back); actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back);
actionBarLayer.setBackOverlay(R.layout.updating_state_layout);
actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() { actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() {
@Override @Override
public void onItemClick(int id) { public void onItemClick(int id) {
@ -551,6 +552,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
} }
} }
}); });
updateSubtitle(); updateSubtitle();
if (currentEncryptedChat != null) { if (currentEncryptedChat != null) {

View File

@ -145,6 +145,7 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
public View createView(LayoutInflater inflater, ViewGroup container) { public View createView(LayoutInflater inflater, ViewGroup container) {
if (fragmentView == null) { if (fragmentView == null) {
actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back); actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back);
actionBarLayer.setBackOverlay(R.layout.updating_state_layout);
actionBarLayer.setTitle(LocaleController.getString("GroupInfo", R.string.GroupInfo)); actionBarLayer.setTitle(LocaleController.getString("GroupInfo", R.string.GroupInfo));
actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() { actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() {
@Override @Override
@ -331,6 +332,7 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
@Override @Override
public void restoreSelfArgs(Bundle args) { public void restoreSelfArgs(Bundle args) {
MessagesController.getInstance().loadChatInfo(chat_id);
if (avatarUpdater != null) { if (avatarUpdater != null) {
avatarUpdater.currentPicturePath = args.getString("path"); avatarUpdater.currentPicturePath = args.getString("path");
} }

View File

@ -67,9 +67,9 @@ public class ChatProfileChangeNameActivity extends BaseFragment {
} }
}); });
cancelButton.setText(LocaleController.getString("Cancel", R.string.Cancel)); cancelButton.setText(LocaleController.getString("Cancel", R.string.Cancel).toUpperCase());
TextView textView = (TextView)doneButton.findViewById(R.id.done_button_text); TextView textView = (TextView)doneButton.findViewById(R.id.done_button_text);
textView.setText(LocaleController.getString("Done", R.string.Done)); textView.setText(LocaleController.getString("Done", R.string.Done).toUpperCase());
fragmentView = inflater.inflate(R.layout.chat_profile_change_name_layout, container, false); fragmentView = inflater.inflate(R.layout.chat_profile_change_name_layout, container, false);

View File

@ -87,9 +87,9 @@ public class ContactAddActivity extends BaseFragment implements NotificationCent
} }
}); });
cancelButton.setText(LocaleController.getString("Cancel", R.string.Cancel)); cancelButton.setText(LocaleController.getString("Cancel", R.string.Cancel).toUpperCase());
TextView textView = (TextView)doneButton.findViewById(R.id.done_button_text); TextView textView = (TextView)doneButton.findViewById(R.id.done_button_text);
textView.setText(LocaleController.getString("Done", R.string.Done)); textView.setText(LocaleController.getString("Done", R.string.Done).toUpperCase());
fragmentView = inflater.inflate(R.layout.contact_add_layout, container, false); fragmentView = inflater.inflate(R.layout.contact_add_layout, container, false);

View File

@ -116,6 +116,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
public View createView(LayoutInflater inflater, ViewGroup container) { public View createView(LayoutInflater inflater, ViewGroup container) {
if (fragmentView == null) { if (fragmentView == null) {
actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back); actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back);
actionBarLayer.setBackOverlay(R.layout.updating_state_layout);
if (destroyAfterSelect) { if (destroyAfterSelect) {
actionBarLayer.setTitle(LocaleController.getString("SelectContact", R.string.SelectContact)); actionBarLayer.setTitle(LocaleController.getString("SelectContact", R.string.SelectContact));
} else { } else {

View File

@ -119,6 +119,7 @@ public class CountrySelectActivity extends BaseFragment {
public View createView(LayoutInflater inflater, ViewGroup container) { public View createView(LayoutInflater inflater, ViewGroup container) {
if (fragmentView == null) { if (fragmentView == null) {
actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back); actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back);
actionBarLayer.setBackOverlay(R.layout.updating_state_layout);
actionBarLayer.setTitle(LocaleController.getString("ChooseCountry", R.string.ChooseCountry)); actionBarLayer.setTitle(LocaleController.getString("ChooseCountry", R.string.ChooseCountry));
actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() { actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() {

View File

@ -127,6 +127,7 @@ public class DocumentSelectActivity extends BaseFragment {
if (fragmentView == null) { if (fragmentView == null) {
actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back); actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back);
actionBarLayer.setBackOverlay(R.layout.updating_state_layout);
actionBarLayer.setTitle(LocaleController.getString("SelectFile", R.string.SelectFile)); actionBarLayer.setTitle(LocaleController.getString("SelectFile", R.string.SelectFile));
actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() { actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() {
@Override @Override

View File

@ -124,6 +124,7 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
public View createView(LayoutInflater inflater, ViewGroup container) { public View createView(LayoutInflater inflater, ViewGroup container) {
if (fragmentView == null) { if (fragmentView == null) {
actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back); actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back);
actionBarLayer.setBackOverlay(R.layout.updating_state_layout);
actionBarLayer.setTitle(LocaleController.getString("NewGroup", R.string.NewGroup)); actionBarLayer.setTitle(LocaleController.getString("NewGroup", R.string.NewGroup));
actionBarLayer.setSubtitle(String.format("%d/200 %s", selectedContacts.size(), LocaleController.getString("Members", R.string.Members))); actionBarLayer.setSubtitle(String.format("%d/200 %s", selectedContacts.size(), LocaleController.getString("Members", R.string.Members)));

View File

@ -119,6 +119,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
public View createView(LayoutInflater inflater, ViewGroup container) { public View createView(LayoutInflater inflater, ViewGroup container) {
if (fragmentView == null) { if (fragmentView == null) {
actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back); actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back);
actionBarLayer.setBackOverlay(R.layout.updating_state_layout);
actionBarLayer.setTitle(LocaleController.getString("NewGroup", R.string.NewGroup)); actionBarLayer.setTitle(LocaleController.getString("NewGroup", R.string.NewGroup));
actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() { actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() {
@ -167,7 +168,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
View doneItem = menu.addItemResource(done_button, R.layout.group_create_done_layout); View doneItem = menu.addItemResource(done_button, R.layout.group_create_done_layout);
TextView doneTextView = (TextView)doneItem.findViewById(R.id.done_button); TextView doneTextView = (TextView)doneItem.findViewById(R.id.done_button);
doneTextView.setText(LocaleController.getString("Done", R.string.Done)); doneTextView.setText(LocaleController.getString("Done", R.string.Done).toUpperCase());
fragmentView = inflater.inflate(R.layout.group_create_final_layout, container, false); fragmentView = inflater.inflate(R.layout.group_create_final_layout, container, false);

View File

@ -46,6 +46,7 @@ public class IdenticonActivity extends BaseFragment {
public View createView(LayoutInflater inflater, ViewGroup container) { public View createView(LayoutInflater inflater, ViewGroup container) {
if (fragmentView == null) { if (fragmentView == null) {
actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back); actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back);
actionBarLayer.setBackOverlay(R.layout.updating_state_layout);
actionBarLayer.setTitle(LocaleController.getString("EncryptionKey", R.string.EncryptionKey)); actionBarLayer.setTitle(LocaleController.getString("EncryptionKey", R.string.EncryptionKey));
actionBarLayer.setTitleIcon(R.drawable.ic_lock_white, Utilities.dp(4)); actionBarLayer.setTitleIcon(R.drawable.ic_lock_white, Utilities.dp(4));

View File

@ -17,6 +17,7 @@ import android.support.v4.view.ViewPager;
import android.text.Html; import android.text.Html;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.Window;
import android.view.animation.Animation; import android.view.animation.Animation;
import android.view.animation.AnimationUtils; import android.view.animation.AnimationUtils;
import android.widget.ImageView; import android.widget.ImageView;
@ -42,6 +43,7 @@ public class IntroActivity extends Activity {
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
setTheme(R.style.Theme_TMessages); setTheme(R.style.Theme_TMessages);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.intro_layout); setContentView(R.layout.intro_layout);

View File

@ -49,6 +49,7 @@ public class LanguageSelectActivity extends BaseFragment {
public View createView(LayoutInflater inflater, ViewGroup container) { public View createView(LayoutInflater inflater, ViewGroup container) {
if (fragmentView == null) { if (fragmentView == null) {
actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back); actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back);
actionBarLayer.setBackOverlay(R.layout.updating_state_layout);
actionBarLayer.setTitle(LocaleController.getString("Language", R.string.Language)); actionBarLayer.setTitle(LocaleController.getString("Language", R.string.Language));
actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() { actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() {

View File

@ -59,10 +59,6 @@ public class LaunchActivity extends ActionBarActivity implements NotificationCen
private ArrayList<String> documentsPathArray = null; private ArrayList<String> documentsPathArray = null;
private ArrayList<TLRPC.User> contactsToSend = null; private ArrayList<TLRPC.User> contactsToSend = null;
private int currentConnectionState; private int currentConnectionState;
private View statusView;
private View backStatusButton;
private View statusBackground;
private TextView statusText;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
@ -104,19 +100,6 @@ public class LaunchActivity extends ActionBarActivity implements NotificationCen
NotificationCenter.getInstance().addObserver(this, 702); NotificationCenter.getInstance().addObserver(this, 702);
NotificationCenter.getInstance().addObserver(this, 703); NotificationCenter.getInstance().addObserver(this, 703);
statusView = getLayoutInflater().inflate(R.layout.updating_state_layout, null);
statusBackground = statusView.findViewById(R.id.back_button_background);
backStatusButton = statusView.findViewById(R.id.back_button);
statusText = (TextView)statusView.findViewById(R.id.status_text);
statusBackground.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (fragmentsStack.size() > 1) {
onBackPressed();
}
}
});
if (fragmentsStack.isEmpty()) { if (fragmentsStack.isEmpty()) {
if (!UserConfig.clientActivated) { if (!UserConfig.clientActivated) {
addFragmentToStack(new LoginActivity()); addFragmentToStack(new LoginActivity());
@ -186,7 +169,7 @@ public class LaunchActivity extends ActionBarActivity implements NotificationCen
imagesPathArray = null; imagesPathArray = null;
documentsPathArray = null; documentsPathArray = null;
if ((getIntent().getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) == 0) { if ((intent.getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) == 0) {
if (intent != null && intent.getAction() != null && !restore) { if (intent != null && intent.getAction() != null && !restore) {
if (Intent.ACTION_SEND.equals(intent.getAction())) { if (Intent.ACTION_SEND.equals(intent.getAction())) {
@ -407,10 +390,10 @@ public class LaunchActivity extends ActionBarActivity implements NotificationCen
} }
} }
if (getIntent().getAction() != null && getIntent().getAction().startsWith("com.tmessages.openchat") && !restore) { if (intent.getAction() != null && intent.getAction().startsWith("com.tmessages.openchat") && !restore) {
int chatId = getIntent().getIntExtra("chatId", 0); int chatId = intent.getIntExtra("chatId", 0);
int userId = getIntent().getIntExtra("userId", 0); int userId = intent.getIntExtra("userId", 0);
int encId = getIntent().getIntExtra("encId", 0); int encId = intent.getIntExtra("encId", 0);
if (chatId != 0) { if (chatId != 0) {
TLRPC.Chat chat = MessagesController.getInstance().chats.get(chatId); TLRPC.Chat chat = MessagesController.getInstance().chats.get(chatId);
if (chat != null) { if (chat != null) {
@ -477,7 +460,7 @@ public class LaunchActivity extends ActionBarActivity implements NotificationCen
showLastFragment(); showLastFragment();
} }
getIntent().setAction(null); intent.setAction(null);
} }
@Override @Override
@ -579,7 +562,7 @@ public class LaunchActivity extends ActionBarActivity implements NotificationCen
Utilities.checkForCrashes(this); Utilities.checkForCrashes(this);
Utilities.checkForUpdates(this); Utilities.checkForUpdates(this);
ApplicationLoader.resetLastPauseTime(); ApplicationLoader.resetLastPauseTime();
updateActionBar(); actionBar.setBackOverlayVisible(currentConnectionState != 0);
try { try {
NotificationManager mNotificationManager = (NotificationManager)this.getSystemService(Context.NOTIFICATION_SERVICE); NotificationManager mNotificationManager = (NotificationManager)this.getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.cancel(1); mNotificationManager.cancel(1);
@ -678,39 +661,26 @@ public class LaunchActivity extends ActionBarActivity implements NotificationCen
if (currentConnectionState != state) { if (currentConnectionState != state) {
FileLog.e("tmessages", "switch to state " + state); FileLog.e("tmessages", "switch to state " + state);
currentConnectionState = state; currentConnectionState = state;
updateActionBar(); actionBar.setBackOverlayVisible(currentConnectionState != 0);
} }
} }
} }
public void updateActionBar() {
if (currentConnectionState != 0 && statusView != null) {
onShowFragment();
if (currentConnectionState == 1) {
statusText.setText(getString(R.string.WaitingForNetwork));
} else if (currentConnectionState == 2) {
statusText.setText(getString(R.string.Connecting));
} else if (currentConnectionState == 3) {
statusText.setText(getString(R.string.Updating));
}
statusText.measure(View.MeasureSpec.makeMeasureSpec(800, View.MeasureSpec.AT_MOST), View.MeasureSpec.makeMeasureSpec(100, View.MeasureSpec.AT_MOST));
actionBar.setBackOverlay(statusView, (statusText.getMeasuredWidth() + Utilities.dp(54)));
} else {
actionBar.setBackOverlay(null, 0);
}
}
@Override @Override
protected void onShowFragment() { public void onOverlayShow(View view, BaseFragment fragment) {
if (statusView != null) { if (view == null || fragment == null || fragmentsStack.isEmpty()) {
if (fragmentsStack.size() > 1) { return;
backStatusButton.setVisibility(View.VISIBLE); }
statusBackground.setEnabled(true); View backStatusButton = view.findViewById(R.id.back_button);
} else { TextView statusText = (TextView)view.findViewById(R.id.status_text);
backStatusButton.setVisibility(View.GONE); backStatusButton.setVisibility(fragmentsStack.get(0) == fragment ? View.GONE : View.VISIBLE);
statusBackground.setEnabled(false); view.setEnabled(fragmentsStack.get(0) != fragment);
} if (currentConnectionState == 1) {
statusText.setText(LocaleController.getString("WaitingForNetwork", R.string.WaitingForNetwork));
} else if (currentConnectionState == 2) {
statusText.setText(LocaleController.getString("Connecting", R.string.Connecting));
} else if (currentConnectionState == 3) {
statusText.setText(LocaleController.getString("Updating", R.string.Updating));
} }
} }
@ -732,6 +702,7 @@ public class LaunchActivity extends ActionBarActivity implements NotificationCen
} else if (lastFragment instanceof SettingsWallpapersActivity) { } else if (lastFragment instanceof SettingsWallpapersActivity) {
outState.putString("fragment", "wallpapers"); outState.putString("fragment", "wallpapers");
} else if (lastFragment instanceof ChatProfileActivity && args != null) { } else if (lastFragment instanceof ChatProfileActivity && args != null) {
outState.putBundle("args", args);
outState.putString("fragment", "chat_profile"); outState.putString("fragment", "chat_profile");
} }
lastFragment.saveSelfArgs(outState); lastFragment.saveSelfArgs(outState);

View File

@ -81,6 +81,7 @@ public class LocationActivity extends BaseFragment implements NotificationCenter
public View createView(LayoutInflater inflater, ViewGroup container) { public View createView(LayoutInflater inflater, ViewGroup container) {
if (fragmentView == null) { if (fragmentView == null) {
actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back); actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back);
actionBarLayer.setBackOverlay(R.layout.updating_state_layout);
if (messageObject != null) { if (messageObject != null) {
actionBarLayer.setTitle(LocaleController.getString("ChatLocation", R.string.ChatLocation)); actionBarLayer.setTitle(LocaleController.getString("ChatLocation", R.string.ChatLocation));
} else { } else {

View File

@ -56,7 +56,7 @@ public class LoginActivity extends BaseFragment implements SlideView.SlideViewDe
@Override @Override
public View createView(LayoutInflater inflater, ViewGroup container) { public View createView(LayoutInflater inflater, ViewGroup container) {
if (fragmentView == null) { if (fragmentView == null) {
actionBarLayer.setDisplayUseLogoEnabled(true, R.drawable.ic_ab_back); actionBarLayer.setDisplayUseLogoEnabled(true, R.drawable.ic_ab_logo);
actionBarLayer.setTitle(LocaleController.getString("AppName", R.string.AppName)); actionBarLayer.setTitle(LocaleController.getString("AppName", R.string.AppName));
actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() { actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() {
@ -71,7 +71,7 @@ public class LoginActivity extends BaseFragment implements SlideView.SlideViewDe
ActionBarMenu menu = actionBarLayer.createMenu(); ActionBarMenu menu = actionBarLayer.createMenu();
View doneItem = menu.addItemResource(done_button, R.layout.group_create_done_layout); View doneItem = menu.addItemResource(done_button, R.layout.group_create_done_layout);
TextView doneTextView = (TextView)doneItem.findViewById(R.id.done_button); TextView doneTextView = (TextView)doneItem.findViewById(R.id.done_button);
doneTextView.setText(LocaleController.getString("Done", R.string.Done)); doneTextView.setText(LocaleController.getString("Done", R.string.Done).toUpperCase());
fragmentView = inflater.inflate(R.layout.login_layout, container, false); fragmentView = inflater.inflate(R.layout.login_layout, container, false);

View File

@ -87,6 +87,7 @@ public class MediaActivity extends BaseFragment implements NotificationCenter.No
public View createView(LayoutInflater inflater, ViewGroup container) { public View createView(LayoutInflater inflater, ViewGroup container) {
if (fragmentView == null) { if (fragmentView == null) {
actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back); actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back);
actionBarLayer.setBackOverlay(R.layout.updating_state_layout);
actionBarLayer.setTitle(LocaleController.getString("SharedMedia", R.string.SharedMedia)); actionBarLayer.setTitle(LocaleController.getString("SharedMedia", R.string.SharedMedia));
actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() { actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() {
@Override @Override

View File

@ -176,6 +176,7 @@ public class MessagesActivity extends BaseFragment implements NotificationCenter
item.addSubItem(messages_list_menu_contacts, LocaleController.getString("Contacts", R.string.Contacts), 0); item.addSubItem(messages_list_menu_contacts, LocaleController.getString("Contacts", R.string.Contacts), 0);
item.addSubItem(messages_list_menu_settings, LocaleController.getString("Settings", R.string.Settings), 0); item.addSubItem(messages_list_menu_settings, LocaleController.getString("Settings", R.string.Settings), 0);
} }
actionBarLayer.setBackOverlay(R.layout.updating_state_layout);
actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() { actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() {
@Override @Override

View File

@ -353,9 +353,9 @@ public class PhotoCropActivity extends BaseFragment {
} }
}); });
cancelButton.setText(LocaleController.getString("Cancel", R.string.Cancel)); cancelButton.setText(LocaleController.getString("Cancel", R.string.Cancel).toUpperCase());
TextView textView = (TextView)doneButton.findViewById(R.id.done_button_text); TextView textView = (TextView)doneButton.findViewById(R.id.done_button_text);
textView.setText(LocaleController.getString("Done", R.string.Done)); textView.setText(LocaleController.getString("Done", R.string.Done).toUpperCase());
fragmentView = view = new PhotoCropView(getParentActivity()); fragmentView = view = new PhotoCropView(getParentActivity());
fragmentView.setLayoutParams(new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT)); fragmentView.setLayoutParams(new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT));

View File

@ -492,7 +492,7 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen
MediaController.AlbumEntry albumEntry = albumsSorted.get(i); MediaController.AlbumEntry albumEntry = albumsSorted.get(i);
BackupImageView imageView = (BackupImageView)view.findViewById(R.id.media_photo_image); BackupImageView imageView = (BackupImageView)view.findViewById(R.id.media_photo_image);
if (albumEntry.coverPhoto != null && albumEntry.coverPhoto.path != null) { if (albumEntry.coverPhoto != null && albumEntry.coverPhoto.path != null) {
imageView.setImage(albumEntry.coverPhoto.path, "150_150", R.drawable.nophotos); imageView.setImage("thumb://" + albumEntry.coverPhoto.imageId + ":" + albumEntry.coverPhoto.path, "150_150", R.drawable.nophotos);
} else { } else {
imageView.setImageResource(R.drawable.nophotos); imageView.setImageResource(R.drawable.nophotos);
} }
@ -534,7 +534,7 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen
imageView.setTag(i); imageView.setTag(i);
view.setTag(i); view.setTag(i);
if (photoEntry.path != null) { if (photoEntry.path != null) {
imageView.setImage(photoEntry.path, "100_100", R.drawable.nophotos); imageView.setImage("thumb://" + photoEntry.imageId + ":" + photoEntry.path, "100_100", R.drawable.nophotos);
} else { } else {
imageView.setImageResource(R.drawable.nophotos); imageView.setImageResource(R.drawable.nophotos);
} }

View File

@ -34,7 +34,10 @@ import android.view.ViewGroup;
import android.view.ViewTreeObserver; import android.view.ViewTreeObserver;
import android.view.WindowManager; import android.view.WindowManager;
import android.view.animation.AlphaAnimation; import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.AnimationSet;
import android.view.animation.DecelerateInterpolator; import android.view.animation.DecelerateInterpolator;
import android.view.animation.ScaleAnimation;
import android.widget.Button; import android.widget.Button;
import android.widget.FrameLayout; import android.widget.FrameLayout;
import android.widget.ImageView; import android.widget.ImageView;
@ -81,7 +84,8 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
private boolean isActionBarVisible = true; private boolean isActionBarVisible = true;
private WindowManager.LayoutParams windowLayoutParams; private WindowManager.LayoutParams windowLayoutParams;
private FrameLayoutTouchListener containerView; private FrameLayoutDrawer containerView;
private FrameLayoutTouchListener windowView;
private ClippingImageView animatingImageView; private ClippingImageView animatingImageView;
private FrameLayout bottomLayout; private FrameLayout bottomLayout;
private TextView nameTextView; private TextView nameTextView;
@ -97,7 +101,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
private boolean canShowBottom = true; private boolean canShowBottom = true;
private boolean overlayViewVisible = true; private boolean overlayViewVisible = true;
private boolean animationInProgress = false; private int animationInProgress = 0;
private boolean disableShowCheck = false; private boolean disableShowCheck = false;
private ImageReceiver leftImage = new ImageReceiver(); private ImageReceiver leftImage = new ImageReceiver();
@ -229,11 +233,6 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
return getInstance().onTouchEvent(event); return getInstance().onTouchEvent(event);
} }
@Override
protected void onDraw(Canvas canvas) {
getInstance().onDraw(canvas);
}
@Override @Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) { protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom); super.onLayout(changed, left, top, right, bottom);
@ -241,6 +240,18 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
} }
} }
private static class FrameLayoutDrawer extends FrameLayout {
public FrameLayoutDrawer(Context context) {
super(context);
setWillNotDraw(false);
}
@Override
protected void onDraw(Canvas canvas) {
getInstance().onDraw(canvas);
}
}
private static volatile PhotoViewer Instance = null; private static volatile PhotoViewer Instance = null;
public static PhotoViewer getInstance() { public static PhotoViewer getInstance() {
PhotoViewer localInstance = Instance; PhotoViewer localInstance = Instance;
@ -404,9 +415,21 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
public void setParentActivity(Activity activity) { public void setParentActivity(Activity activity) {
parentActivity = activity; parentActivity = activity;
containerView = new FrameLayoutTouchListener(activity); windowView = new FrameLayoutTouchListener(activity);
containerView.setBackgroundDrawable(backgroundDrawable); windowView.setBackgroundDrawable(backgroundDrawable);
windowView.setFocusable(false);
animatingImageView = new ClippingImageView(windowView.getContext());
windowView.addView(animatingImageView);
containerView = new FrameLayoutDrawer(activity);
containerView.setFocusable(false); containerView.setFocusable(false);
windowView.addView(containerView);
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams)containerView.getLayoutParams();
layoutParams.width = FrameLayout.LayoutParams.MATCH_PARENT;
layoutParams.height = FrameLayout.LayoutParams.MATCH_PARENT;
layoutParams.gravity = Gravity.TOP | Gravity.LEFT;
containerView.setLayoutParams(layoutParams);
windowLayoutParams = new WindowManager.LayoutParams(); windowLayoutParams = new WindowManager.LayoutParams();
windowLayoutParams.height = WindowManager.LayoutParams.MATCH_PARENT; windowLayoutParams.height = WindowManager.LayoutParams.MATCH_PARENT;
@ -416,13 +439,10 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
windowLayoutParams.type = WindowManager.LayoutParams.TYPE_APPLICATION; windowLayoutParams.type = WindowManager.LayoutParams.TYPE_APPLICATION;
windowLayoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; windowLayoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
animatingImageView = new ClippingImageView(containerView.getContext());
containerView.addView(animatingImageView);
actionBar = new ActionBar(activity); actionBar = new ActionBar(activity);
containerView.addView(actionBar); containerView.addView(actionBar);
actionBar.setBackgroundColor(0xdd000000); actionBar.setBackgroundColor(0x7F000000);
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams)actionBar.getLayoutParams(); layoutParams = (FrameLayout.LayoutParams)actionBar.getLayoutParams();
layoutParams.width = FrameLayout.LayoutParams.MATCH_PARENT; layoutParams.width = FrameLayout.LayoutParams.MATCH_PARENT;
actionBar.setLayoutParams(layoutParams); actionBar.setLayoutParams(layoutParams);
actionBarLayer = actionBar.createLayer(); actionBarLayer = actionBar.createLayer();
@ -510,7 +530,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
layoutParams.height = Utilities.dp(48); layoutParams.height = Utilities.dp(48);
layoutParams.gravity = Gravity.BOTTOM | Gravity.LEFT; layoutParams.gravity = Gravity.BOTTOM | Gravity.LEFT;
bottomLayout.setLayoutParams(layoutParams); bottomLayout.setLayoutParams(layoutParams);
bottomLayout.setBackgroundColor(0xdd000000); bottomLayout.setBackgroundColor(0x7F000000);
ImageView shareButton = new ImageView(containerView.getContext()); ImageView shareButton = new ImageView(containerView.getContext());
shareButton.setImageResource(R.drawable.ic_ab_share_white); shareButton.setImageResource(R.drawable.ic_ab_share_white);
@ -1111,13 +1131,13 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
} }
if (!init) { if (!init) {
if (currentPlaceObject != null) { if (android.os.Build.VERSION.SDK_INT >= 11 && currentPlaceObject != null) {
currentPlaceObject.imageReceiver.setVisible(true, true); currentPlaceObject.imageReceiver.setVisible(true, true);
} }
} }
currentPlaceObject = placeProvider.getPlaceForPhoto(currentMessageObject, currentFileLocation, currentIndex); currentPlaceObject = placeProvider.getPlaceForPhoto(currentMessageObject, currentFileLocation, currentIndex);
if (!init) { if (!init) {
if (currentPlaceObject != null) { if (android.os.Build.VERSION.SDK_INT >= 11 && currentPlaceObject != null) {
currentPlaceObject.imageReceiver.setVisible(false, true); currentPlaceObject.imageReceiver.setVisible(false, true);
} }
} }
@ -1253,15 +1273,15 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
} }
public boolean isShowingImage(MessageObject object) { public boolean isShowingImage(MessageObject object) {
return !disableShowCheck && object != null && currentMessageObject != null && currentMessageObject.messageOwner.id == object.messageOwner.id; return android.os.Build.VERSION.SDK_INT >= 11 && isVisible && !disableShowCheck && object != null && currentMessageObject != null && currentMessageObject.messageOwner.id == object.messageOwner.id;
} }
public boolean isShowingImage(TLRPC.FileLocation object) { public boolean isShowingImage(TLRPC.FileLocation object) {
return !disableShowCheck && object != null && currentFileLocation != null && object.local_id == currentFileLocation.local_id && object.volume_id == currentFileLocation.volume_id && object.dc_id == currentFileLocation.dc_id; return android.os.Build.VERSION.SDK_INT >= 11 && isVisible && !disableShowCheck && object != null && currentFileLocation != null && object.local_id == currentFileLocation.local_id && object.volume_id == currentFileLocation.volume_id && object.dc_id == currentFileLocation.dc_id;
} }
public boolean isShowingImage(String object) { public boolean isShowingImage(String object) {
return !disableShowCheck && object != null && currentPathObject != null && object.equals(currentPathObject); return android.os.Build.VERSION.SDK_INT >= 11 && isVisible && !disableShowCheck && object != null && currentPathObject != null && object.equals(currentPathObject);
} }
public void openPhoto(final MessageObject messageObject, final PhotoViewerProvider provider) { public void openPhoto(final MessageObject messageObject, final PhotoViewerProvider provider) {
@ -1281,7 +1301,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
} }
public void openPhoto(final MessageObject messageObject, final TLRPC.FileLocation fileLocation, final ArrayList<MessageObject> messages, final ArrayList<MediaController.PhotoEntry> photos, final int index, final PhotoViewerProvider provider) { public void openPhoto(final MessageObject messageObject, final TLRPC.FileLocation fileLocation, final ArrayList<MessageObject> messages, final ArrayList<MediaController.PhotoEntry> photos, final int index, final PhotoViewerProvider provider) {
if (parentActivity == null || isVisible || provider == null || animationInProgress || messageObject == null && fileLocation == null && messages == null && photos == null) { if (parentActivity == null || isVisible || provider == null || animationInProgress != 0 || messageObject == null && fileLocation == null && messages == null && photos == null) {
return; return;
} }
final PlaceProviderObject object = provider.getPlaceForPhoto(messageObject, fileLocation, index); final PlaceProviderObject object = provider.getPlaceForPhoto(messageObject, fileLocation, index);
@ -1299,7 +1319,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
placeProvider = provider; placeProvider = provider;
WindowManager wm = (WindowManager) parentActivity.getSystemService(Context.WINDOW_SERVICE); WindowManager wm = (WindowManager) parentActivity.getSystemService(Context.WINDOW_SERVICE);
wm.addView(containerView, windowLayoutParams); wm.addView(windowView, windowLayoutParams);
if (velocityTracker == null) { if (velocityTracker == null) {
velocityTracker = VelocityTracker.obtain(); velocityTracker = VelocityTracker.obtain();
@ -1315,7 +1335,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
if(android.os.Build.VERSION.SDK_INT >= 11) { if(android.os.Build.VERSION.SDK_INT >= 11) {
Utilities.lockOrientation(parentActivity); Utilities.lockOrientation(parentActivity);
animationInProgress = true; animationInProgress = 1;
animatingImageView.setVisibility(View.VISIBLE); animatingImageView.setVisibility(View.VISIBLE);
animatingImageView.setImageBitmap(object.thumb); animatingImageView.setImageBitmap(object.thumb);
@ -1370,18 +1390,16 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
ObjectAnimator.ofInt(animatingImageView, "clipHorizontal", clipHorizontal, 0), ObjectAnimator.ofInt(animatingImageView, "clipHorizontal", clipHorizontal, 0),
ObjectAnimator.ofInt(animatingImageView, "clipTop", clipTop, 0), ObjectAnimator.ofInt(animatingImageView, "clipTop", clipTop, 0),
ObjectAnimator.ofInt(animatingImageView, "clipBottom", clipBottom, 0), ObjectAnimator.ofInt(animatingImageView, "clipBottom", clipBottom, 0),
ObjectAnimator.ofFloat(actionBar, "alpha", 0.0f, 1.0f), ObjectAnimator.ofFloat(containerView, "alpha", 0.0f, 1.0f),
ObjectAnimator.ofFloat(bottomLayout, "alpha", 0.0f, 1.0f), ObjectAnimator.ofFloat(currentOverlay, "alpha", 1.0f)
ObjectAnimator.ofFloat(progressBar, "alpha", 0.0f, 1.0f),
ObjectAnimator.ofFloat(currentOverlay, "alpha", 0.0f, 1.0f),
ObjectAnimator.ofFloat(checkImageView, "alpha", 0.0f, 1.0f)
); );
animatorSet.setDuration(250); animatorSet.setDuration(250);
animatorSet.addListener(new AnimatorListenerAdapter() { animatorSet.addListener(new AnimatorListenerAdapter() {
@Override @Override
public void onAnimationEnd(Animator animation) { public void onAnimationEnd(Animator animation) {
animationInProgress = false; animationInProgress = 0;
containerView.invalidate();
animatingImageView.setVisibility(View.GONE); animatingImageView.setVisibility(View.GONE);
Utilities.unlockOrientation(parentActivity); Utilities.unlockOrientation(parentActivity);
} }
@ -1393,19 +1411,33 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
public void onDraw() { public void onDraw() {
disableShowCheck = false; disableShowCheck = false;
animatingImageView.setOnDrawListener(null); animatingImageView.setOnDrawListener(null);
object.imageReceiver.setVisible(false, true); if (android.os.Build.VERSION.SDK_INT >= 11) {
object.imageReceiver.setVisible(false, true);
}
} }
}); });
return true; return true;
} }
}); });
} else { } else {
containerView.invalidate();
AnimationSet animationSet = new AnimationSet(true);
AlphaAnimation animation = new AlphaAnimation(0.0f, 1.0f);
animation.setDuration(150);
animation.setFillAfter(false);
animationSet.addAnimation(animation);
ScaleAnimation scaleAnimation = new ScaleAnimation(0.9f, 1.0f, 0.9f, 1.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
scaleAnimation.setDuration(150);
scaleAnimation.setFillAfter(false);
animationSet.addAnimation(scaleAnimation);
animationSet.setDuration(150);
containerView.startAnimation(animationSet);
disableShowCheck = false; disableShowCheck = false;
} }
} }
public void closePhoto(boolean animated) { public void closePhoto(boolean animated) {
if (parentActivity == null || !isVisible || animationInProgress) { if (parentActivity == null || !isVisible || animationInProgress != 0) {
return; return;
} }
@ -1430,7 +1462,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
if(android.os.Build.VERSION.SDK_INT >= 11 && animated) { if(android.os.Build.VERSION.SDK_INT >= 11 && animated) {
Utilities.lockOrientation(parentActivity); Utilities.lockOrientation(parentActivity);
animationInProgress = true; animationInProgress = 1;
animatingImageView.setVisibility(View.VISIBLE); animatingImageView.setVisibility(View.VISIBLE);
AnimatorSet animatorSet = new AnimatorSet(); AnimatorSet animatorSet = new AnimatorSet();
@ -1460,7 +1492,9 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
animatingImageView.setScaleY(scale * scale2); animatingImageView.setScaleY(scale * scale2);
if (object != null) { if (object != null) {
object.imageReceiver.setVisible(false, true); if (android.os.Build.VERSION.SDK_INT >= 11) {
object.imageReceiver.setVisible(false, true);
}
int clipHorizontal = Math.abs(object.imageReceiver.drawRegion.left - object.imageReceiver.imageX); int clipHorizontal = Math.abs(object.imageReceiver.drawRegion.left - object.imageReceiver.imageX);
int clipVertical = Math.abs(object.imageReceiver.drawRegion.top - object.imageReceiver.imageY); int clipVertical = Math.abs(object.imageReceiver.drawRegion.top - object.imageReceiver.imageY);
@ -1487,22 +1521,14 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
ObjectAnimator.ofInt(animatingImageView, "clipHorizontal", clipHorizontal), ObjectAnimator.ofInt(animatingImageView, "clipHorizontal", clipHorizontal),
ObjectAnimator.ofInt(animatingImageView, "clipTop", clipTop), ObjectAnimator.ofInt(animatingImageView, "clipTop", clipTop),
ObjectAnimator.ofInt(animatingImageView, "clipBottom", clipBottom), ObjectAnimator.ofInt(animatingImageView, "clipBottom", clipBottom),
ObjectAnimator.ofFloat(actionBar, "alpha", 0.0f), ObjectAnimator.ofFloat(containerView, "alpha", 0.0f)
ObjectAnimator.ofFloat(bottomLayout, "alpha", 0.0f),
ObjectAnimator.ofFloat(progressBar, "alpha", 0.0f),
ObjectAnimator.ofFloat(currentOverlay, "alpha", 0.0f),
ObjectAnimator.ofFloat(checkImageView, "alpha", 0.0f)
); );
} else { } else {
animatorSet.playTogether( animatorSet.playTogether(
ObjectAnimator.ofInt(backgroundDrawable, "alpha", 0), ObjectAnimator.ofInt(backgroundDrawable, "alpha", 0),
ObjectAnimator.ofFloat(actionBar, "alpha", 0.0f),
ObjectAnimator.ofFloat(animatingImageView, "alpha", 0.0f), ObjectAnimator.ofFloat(animatingImageView, "alpha", 0.0f),
ObjectAnimator.ofFloat(bottomLayout, "alpha", 0.0f),
ObjectAnimator.ofFloat(progressBar, "alpha", 0.0f),
ObjectAnimator.ofFloat(animatingImageView, "translationY", translationY >= 0 ? Utilities.displaySize.y : -Utilities.displaySize.y), ObjectAnimator.ofFloat(animatingImageView, "translationY", translationY >= 0 ? Utilities.displaySize.y : -Utilities.displaySize.y),
ObjectAnimator.ofFloat(currentOverlay, "alpha", 0.0f), ObjectAnimator.ofFloat(containerView, "alpha", 0.0f)
ObjectAnimator.ofFloat(checkImageView, "alpha", 0.0f)
); );
} }
@ -1511,13 +1537,41 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
@Override @Override
public void onAnimationEnd(Animator animation) { public void onAnimationEnd(Animator animation) {
Utilities.unlockOrientation(parentActivity); Utilities.unlockOrientation(parentActivity);
animationInProgress = false; animationInProgress = 0;
onPhotoClosed(object); onPhotoClosed(object);
} }
}); });
animatorSet.start(); animatorSet.start();
} else { } else {
onPhotoClosed(object); AnimationSet animationSet = new AnimationSet(true);
AlphaAnimation animation = new AlphaAnimation(1.0f, 0.0f);
animation.setDuration(150);
animation.setFillAfter(false);
animationSet.addAnimation(animation);
ScaleAnimation scaleAnimation = new ScaleAnimation(1.0f, 0.9f, 1.0f, 0.9f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
scaleAnimation.setDuration(150);
scaleAnimation.setFillAfter(false);
animationSet.addAnimation(scaleAnimation);
animationSet.setDuration(150);
animationInProgress = 2;
animationSet.setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
}
@Override
public void onAnimationEnd(Animation animation) {
animationInProgress = 0;
onPhotoClosed(object);
}
@Override
public void onAnimationRepeat(Animation animation) {
}
});
containerView.startAnimation(animationSet);
} }
} }
@ -1530,15 +1584,21 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
centerImage.setImageBitmap((Bitmap)null); centerImage.setImageBitmap((Bitmap)null);
leftImage.setImageBitmap((Bitmap) null); leftImage.setImageBitmap((Bitmap) null);
rightImage.setImageBitmap((Bitmap)null); rightImage.setImageBitmap((Bitmap)null);
if (object != null) { if (android.os.Build.VERSION.SDK_INT >= 11 && object != null) {
object.imageReceiver.setVisible(true, true); object.imageReceiver.setVisible(true, true);
} }
containerView.post(new Runnable() { containerView.post(new Runnable() {
@Override @Override
public void run() { public void run() {
animatingImageView.setImageBitmap(null); animatingImageView.setImageBitmap(null);
WindowManager wm = (WindowManager) parentActivity.getSystemService(Context.WINDOW_SERVICE); try {
wm.removeView(containerView); WindowManager wm = (WindowManager) parentActivity.getSystemService(Context.WINDOW_SERVICE);
if (windowView.getParent() != null) {
wm.removeView(windowView);
}
} catch (Exception e) {
FileLog.e("tmessages", e);
}
} }
}); });
if (placeProvider != null) { if (placeProvider != null) {
@ -1570,7 +1630,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
} }
private boolean onTouchEvent(MotionEvent ev) { private boolean onTouchEvent(MotionEvent ev) {
if (animationInProgress || animationStartTime != 0) { if (animationInProgress != 0 || animationStartTime != 0) {
if (animationStartTime == 0) { if (animationStartTime == 0) {
Utilities.unlockOrientation(parentActivity); Utilities.unlockOrientation(parentActivity);
} }
@ -1798,7 +1858,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
} }
private void onDraw(Canvas canvas) { private void onDraw(Canvas canvas) {
if (animationInProgress || !isVisible) { if (animationInProgress == 1 || !isVisible && animationInProgress != 2) {
return; return;
} }

View File

@ -221,6 +221,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
public View createView(LayoutInflater inflater, ViewGroup container) { public View createView(LayoutInflater inflater, ViewGroup container) {
if (fragmentView == null) { if (fragmentView == null) {
actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back); actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back);
actionBarLayer.setBackOverlay(R.layout.updating_state_layout);
actionBarLayer.setTitle(LocaleController.getString("Settings", R.string.Settings)); actionBarLayer.setTitle(LocaleController.getString("Settings", R.string.Settings));
actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() { actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() {
@Override @Override

View File

@ -68,6 +68,7 @@ public class SettingsBlockedUsers extends BaseFragment implements NotificationCe
public View createView(LayoutInflater inflater, ViewGroup container) { public View createView(LayoutInflater inflater, ViewGroup container) {
if (fragmentView == null) { if (fragmentView == null) {
actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back); actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back);
actionBarLayer.setBackOverlay(R.layout.updating_state_layout);
actionBarLayer.setTitle(LocaleController.getString("BlockedUsers", R.string.BlockedUsers)); actionBarLayer.setTitle(LocaleController.getString("BlockedUsers", R.string.BlockedUsers));
actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() { actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() {
@Override @Override

View File

@ -59,9 +59,9 @@ public class SettingsChangeNameActivity extends BaseFragment {
} }
}); });
cancelButton.setText(LocaleController.getString("Cancel", R.string.Cancel)); cancelButton.setText(LocaleController.getString("Cancel", R.string.Cancel).toUpperCase());
TextView textView = (TextView)doneButton.findViewById(R.id.done_button_text); TextView textView = (TextView)doneButton.findViewById(R.id.done_button_text);
textView.setText(LocaleController.getString("Done", R.string.Done)); textView.setText(LocaleController.getString("Done", R.string.Done).toUpperCase());
fragmentView = inflater.inflate(R.layout.settings_change_name_layout, container, false); fragmentView = inflater.inflate(R.layout.settings_change_name_layout, container, false);

View File

@ -98,6 +98,7 @@ public class SettingsNotificationsActivity extends BaseFragment {
public View createView(LayoutInflater inflater, ViewGroup container) { public View createView(LayoutInflater inflater, ViewGroup container) {
if (fragmentView == null) { if (fragmentView == null) {
actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back); actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back);
actionBarLayer.setBackOverlay(R.layout.updating_state_layout);
actionBarLayer.setTitle(LocaleController.getString("NotificationsAndSounds", R.string.NotificationsAndSounds)); actionBarLayer.setTitle(LocaleController.getString("NotificationsAndSounds", R.string.NotificationsAndSounds));
actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() { actionBarLayer.setActionBarMenuOnItemClick(new ActionBarLayer.ActionBarMenuOnItemClick() {
@Override @Override

View File

@ -143,9 +143,9 @@ public class SettingsWallpapersActivity extends BaseFragment implements Notifica
} }
}); });
cancelButton.setText(LocaleController.getString("Cancel", R.string.Cancel)); cancelButton.setText(LocaleController.getString("Cancel", R.string.Cancel).toUpperCase());
TextView textView = (TextView)doneButton.findViewById(R.id.done_button_text); TextView textView = (TextView)doneButton.findViewById(R.id.done_button_text);
textView.setText(LocaleController.getString("Set", R.string.Set)); textView.setText(LocaleController.getString("Set", R.string.Set).toUpperCase());
fragmentView = inflater.inflate(R.layout.settings_wallpapers_layout, container, false); fragmentView = inflater.inflate(R.layout.settings_wallpapers_layout, container, false);
listAdapter = new ListAdapter(getParentActivity()); listAdapter = new ListAdapter(getParentActivity());

View File

@ -135,6 +135,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
public View createView(LayoutInflater inflater, ViewGroup container) { public View createView(LayoutInflater inflater, ViewGroup container) {
if (fragmentView == null) { if (fragmentView == null) {
actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back); actionBarLayer.setDisplayHomeAsUpEnabled(true, R.drawable.ic_ab_back);
actionBarLayer.setBackOverlay(R.layout.updating_state_layout);
if (dialog_id != 0) { if (dialog_id != 0) {
actionBarLayer.setTitle(LocaleController.getString("SecretTitle", R.string.SecretTitle)); actionBarLayer.setTitle(LocaleController.getString("SecretTitle", R.string.SecretTitle));
actionBarLayer.setTitleIcon(R.drawable.ic_lock_white, Utilities.dp(4)); actionBarLayer.setTitleIcon(R.drawable.ic_lock_white, Utilities.dp(4));

View File

@ -29,9 +29,8 @@ public class ActionBar extends FrameLayout {
private static Drawable logoDrawable; private static Drawable logoDrawable;
protected ActionBarLayer currentLayer = null; protected ActionBarLayer currentLayer = null;
private ActionBarLayer previousLayer = null; private ActionBarLayer previousLayer = null;
private View currentBackOverlay;
private View shadowView = null; private View shadowView = null;
private int currentBackOverlayWidth; private boolean isBackOverlayVisible;
public ActionBar(Context context) { public ActionBar(Context context) {
super(context); super(context);
@ -87,42 +86,19 @@ public class ActionBar extends FrameLayout {
layoutParams.height = LayoutParams.MATCH_PARENT; layoutParams.height = LayoutParams.MATCH_PARENT;
layoutParams.gravity = Gravity.TOP | Gravity.LEFT; layoutParams.gravity = Gravity.TOP | Gravity.LEFT;
layer.setLayoutParams(layoutParams); layer.setLayoutParams(layoutParams);
updateBackOverlay(MeasureSpec.makeMeasureSpec(getMeasuredWidth(), MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(getMeasuredHeight(), MeasureSpec.EXACTLY)); currentLayer.setBackOverlayVisible(isBackOverlayVisible);
if(android.os.Build.VERSION.SDK_INT >= 11) { if(android.os.Build.VERSION.SDK_INT >= 11) {
layer.setAlpha(1); layer.setAlpha(1);
} }
} }
public void setBackOverlay(View view, int width) { public void setBackOverlayVisible(boolean visible) {
if (currentBackOverlay != null) { isBackOverlayVisible = visible;
removeView(currentBackOverlay);
}
if (view != null) {
addView(view);
}
currentBackOverlayWidth = width;
currentBackOverlay = view;
updateBackOverlay(MeasureSpec.makeMeasureSpec(getMeasuredWidth(), MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(getMeasuredHeight(), MeasureSpec.EXACTLY));
}
private void updateBackOverlay(int widthMeasureSpec, int heightMeasureSpec) {
if (currentLayer != null) { if (currentLayer != null) {
currentLayer.setBackLayoutVisible(currentLayer.isSearchFieldVisible || currentBackOverlay == null ? VISIBLE : INVISIBLE); currentLayer.setBackOverlayVisible(visible);
} }
if (currentBackOverlay != null) { if (previousLayer != null) {
ViewGroup.LayoutParams layoutParams = currentBackOverlay.getLayoutParams(); previousLayer.setBackOverlayVisible(visible);
if (currentLayer != null) {
currentBackOverlay.setVisibility(currentLayer.isSearchFieldVisible ? GONE : VISIBLE);
currentLayer.measure(widthMeasureSpec, heightMeasureSpec);
layoutParams.width = Math.min(currentBackOverlayWidth, currentLayer.getBackLayoutWidth());
} else {
currentBackOverlay.setVisibility(VISIBLE);
layoutParams.width = LayoutParams.WRAP_CONTENT;
}
if (layoutParams.width != 0) {
layoutParams.height = LayoutParams.MATCH_PARENT;
currentBackOverlay.setLayoutParams(layoutParams);
}
} }
} }
@ -142,6 +118,7 @@ public class ActionBar extends FrameLayout {
layer.setLayoutParams(layoutParams); layer.setLayoutParams(layoutParams);
shadowView.setX(-Utilities.dp(2)); shadowView.setX(-Utilities.dp(2));
shadowView.setVisibility(VISIBLE); shadowView.setVisibility(VISIBLE);
previousLayer.setBackOverlayVisible(isBackOverlayVisible);
} }
public void stopMoving(boolean backAnimation) { public void stopMoving(boolean backAnimation) {
@ -153,6 +130,7 @@ public class ActionBar extends FrameLayout {
removeView(currentLayer); removeView(currentLayer);
currentLayer = previousLayer; currentLayer = previousLayer;
currentLayer.setAlpha(1); currentLayer.setAlpha(1);
previousLayer = null;
} else { } else {
removeView(previousLayer); removeView(previousLayer);
previousLayer = null; previousLayer = null;
@ -192,7 +170,6 @@ public class ActionBar extends FrameLayout {
@Override @Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
updateBackOverlay(widthMeasureSpec, heightMeasureSpec);
if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(Utilities.dp(40), MeasureSpec.EXACTLY)); super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(Utilities.dp(40), MeasureSpec.EXACTLY));
} else { } else {

View File

@ -13,6 +13,7 @@ import android.animation.AnimatorSet;
import android.animation.ObjectAnimator; import android.animation.ObjectAnimator;
import android.app.Activity; import android.app.Activity;
import android.content.Context; import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
@ -24,6 +25,7 @@ import android.view.VelocityTracker;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.ViewTreeObserver; import android.view.ViewTreeObserver;
import android.view.Window;
import android.view.WindowManager; import android.view.WindowManager;
import android.view.animation.Animation; import android.view.animation.Animation;
import android.view.animation.AnimationUtils; import android.view.animation.AnimationUtils;
@ -97,6 +99,7 @@ public class ActionBarActivity extends Activity {
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
try { try {
openAnimation = AnimationUtils.loadAnimation(this, R.anim.scale_in); openAnimation = AnimationUtils.loadAnimation(this, R.anim.scale_in);
@ -511,6 +514,7 @@ public class ActionBarActivity extends Activity {
transitionAnimationStartTime = 0; transitionAnimationStartTime = 0;
fragment.onOpenAnimationEnd(); fragment.onOpenAnimationEnd();
presentFragmentInternalRemoveOld(removeLast, currentFragment); presentFragmentInternalRemoveOld(removeLast, currentFragment);
listener = null;
} }
} }
@ -585,6 +589,7 @@ public class ActionBarActivity extends Activity {
transitionAnimationInProgress = false; transitionAnimationInProgress = false;
transitionAnimationStartTime = 0; transitionAnimationStartTime = 0;
closeLastFragmentInternalRemoveOld(currentFragment); closeLastFragmentInternalRemoveOld(currentFragment);
listener = null;
} }
} }
@ -653,6 +658,10 @@ public class ActionBarActivity extends Activity {
return super.onKeyUp(keyCode, event); return super.onKeyUp(keyCode, event);
} }
public void onOverlayShow(View view, BaseFragment fragment) {
}
@Override @Override
public void onActionModeStarted(ActionMode mode) { public void onActionModeStarted(ActionMode mode) {
super.onActionModeStarted(mode); super.onActionModeStarted(mode);
@ -670,4 +679,14 @@ public class ActionBarActivity extends Activity {
public boolean onPreIme() { public boolean onPreIme() {
return false; return false;
} }
@Override
public void startActivityForResult(Intent intent, int requestCode) {
if (transitionAnimationInProgress && listener != null) {
openAnimation.cancel();
closeAnimation.cancel();
listener.onAnimationEnd(null);
}
super.startActivityForResult(intent, requestCode);
}
} }

View File

@ -48,9 +48,11 @@ public class ActionBarLayer extends FrameLayout {
protected ActionBar parentActionBar; protected ActionBar parentActionBar;
private boolean oldUseLogo; private boolean oldUseLogo;
private boolean oldUseBack; private boolean oldUseBack;
private boolean isBackLayoutHidden = false; private View actionOverlay;
protected boolean isSearchFieldVisible; protected boolean isSearchFieldVisible;
protected int itemsBackgroundResourceId; protected int itemsBackgroundResourceId;
private boolean isBackOverlayVisible;
protected BaseFragment parentFragment;
public ActionBarMenuOnItemClick actionBarMenuOnItemClick; public ActionBarMenuOnItemClick actionBarMenuOnItemClick;
public ActionBarLayer(Context context, ActionBar actionBar) { public ActionBarLayer(Context context, ActionBar actionBar) {
@ -340,18 +342,6 @@ public class ActionBarLayer extends FrameLayout {
addView(view); addView(view);
} }
public void setBackLayoutVisible(int visibility) {
isBackLayoutHidden = visibility != VISIBLE;
backButtonFrameLayout.setVisibility(isSearchFieldVisible ? VISIBLE : visibility);
}
public int getBackLayoutWidth() {
if (menu != null) {
return getMeasuredWidth() - menu.getMeasuredWidth();
}
return getMeasuredWidth();
}
public ActionBarMenu createActionMode() { public ActionBarMenu createActionMode() {
if (actionMode != null) { if (actionMode != null) {
return actionMode; return actionMode;
@ -419,11 +409,7 @@ public class ActionBarLayer extends FrameLayout {
} else { } else {
setDisplayHomeAsUpEnabled(oldUseBack, backResourceId); setDisplayHomeAsUpEnabled(oldUseBack, backResourceId);
} }
if (visible) { positionBackOverlay(getMeasuredWidth(), getMeasuredHeight());
backButtonFrameLayout.setVisibility(VISIBLE);
} else {
backButtonFrameLayout.setVisibility(isBackLayoutHidden ? INVISIBLE : VISIBLE);
}
} }
public void closeSearchField() { public void closeSearchField() {
@ -439,6 +425,7 @@ public class ActionBarLayer extends FrameLayout {
positionBackImage(MeasureSpec.getSize(heightMeasureSpec)); positionBackImage(MeasureSpec.getSize(heightMeasureSpec));
positionMenu(MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.getSize(heightMeasureSpec)); positionMenu(MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.getSize(heightMeasureSpec));
positionTitle(MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.getSize(heightMeasureSpec)); positionTitle(MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.getSize(heightMeasureSpec));
positionBackOverlay(MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.getSize(heightMeasureSpec));
super.onMeasure(widthMeasureSpec, heightMeasureSpec); super.onMeasure(widthMeasureSpec, heightMeasureSpec);
} }
@ -464,6 +451,45 @@ public class ActionBarLayer extends FrameLayout {
} }
} }
public void setBackOverlay(int resourceId) {
LayoutInflater li = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
actionOverlay = li.inflate(resourceId, null);
addView(actionOverlay);
actionOverlay.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (actionBarMenuOnItemClick != null) {
actionBarMenuOnItemClick.onItemClick(-1);
}
}
});
}
public void setBackOverlayVisible(boolean visible) {
if (actionOverlay == null) {
return;
}
isBackOverlayVisible = visible;
positionBackOverlay(getMeasuredWidth(), getMeasuredHeight());
if (visible) {
((ActionBarActivity)getContext()).onOverlayShow(actionOverlay, parentFragment);
}
}
private void positionBackOverlay(int widthMeasureSpec, int heightMeasureSpec) {
if (actionOverlay == null) {
return;
}
backButtonFrameLayout.setVisibility(isSearchFieldVisible || actionOverlay == null || actionOverlay.getVisibility() == GONE ? VISIBLE : INVISIBLE);
actionOverlay.setVisibility(!isSearchFieldVisible && isBackOverlayVisible ? VISIBLE : GONE);
if (actionOverlay.getVisibility() == VISIBLE) {
ViewGroup.LayoutParams layoutParams = actionOverlay.getLayoutParams();
layoutParams.width = widthMeasureSpec - (menu != null ? menu.getMeasuredWidth() : 0);
layoutParams.height = LayoutParams.MATCH_PARENT;
actionOverlay.setLayoutParams(layoutParams);
}
}
public void setItemsBackground(int resourceId) { public void setItemsBackground(int resourceId) {
itemsBackgroundResourceId = resourceId; itemsBackgroundResourceId = resourceId;
backButtonFrameLayout.setBackgroundResource(itemsBackgroundResourceId); backButtonFrameLayout.setBackgroundResource(itemsBackgroundResourceId);

View File

@ -61,6 +61,7 @@ public class BaseFragment {
actionBarLayer.onDestroy(); actionBarLayer.onDestroy();
} }
actionBarLayer = parentActivity.getInternalActionBar().createLayer(); actionBarLayer = parentActivity.getInternalActionBar().createLayer();
actionBarLayer.parentFragment = this;
actionBarLayer.setBackgroundResource(R.color.header); actionBarLayer.setBackgroundResource(R.color.header);
actionBarLayer.setItemsBackground(R.drawable.bar_selector); actionBarLayer.setItemsBackground(R.drawable.bar_selector);
} }

View File

@ -16,6 +16,7 @@
android:numColumns="auto_fit" android:numColumns="auto_fit"
android:stretchMode="columnWidth" android:stretchMode="columnWidth"
android:gravity="center" android:gravity="center"
android:listSelector="@drawable/list_selector"
android:layout_gravity="top"/> android:layout_gravity="top"/>
<TextView android:layout_width="match_parent" <TextView android:layout_width="match_parent"

View File

@ -25,6 +25,7 @@
android:textColor="#ffffffff" android:textColor="#ffffffff"
android:layout_weight="1" android:layout_weight="1"
android:singleLine="true" android:singleLine="true"
android:ellipsize="end"
android:maxLines="1" android:maxLines="1"
android:layout_marginLeft="8dp"/> android:layout_marginLeft="8dp"/>

View File

@ -22,7 +22,8 @@
android:stretchMode="columnWidth" android:stretchMode="columnWidth"
android:gravity="center" android:gravity="center"
android:layout_gravity="top" android:layout_gravity="top"
android:scrollbars="none"/> android:scrollbars="none"
android:listSelector="@drawable/list_selector"/>
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@ -16,15 +16,17 @@
android:layout_gravity="center_vertical|left" android:layout_gravity="center_vertical|left"
android:layout_marginLeft="12dp"/> android:layout_marginLeft="12dp"/>
<ImageView android:layout_height="wrap_content" <ImageView
android:layout_height="wrap_content"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:src="@drawable/ic_ab_back" android:src="@drawable/ic_ab_back"
android:layout_gravity="center_vertical|left" android:layout_gravity="center_vertical|left"
android:layout_marginLeft="3dp" android:layout_marginLeft="3dp"
android:id="@+id/back_button"/> android:id="@+id/back_button"/>
<TextView android:layout_height="wrap_content" <TextView
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_marginLeft="52dp" android:layout_marginLeft="52dp"
android:textColor="#ffffff" android:textColor="#ffffff"
android:textSize="17dp" android:textSize="17dp"

View File

@ -109,7 +109,7 @@
<string name="YouWereKicked">لقد تم إخراجك من هذه المجموعة</string> <string name="YouWereKicked">لقد تم إخراجك من هذه المجموعة</string>
<string name="YouLeft">لقد قمت بمغادرة المجموعة</string> <string name="YouLeft">لقد قمت بمغادرة المجموعة</string>
<string name="DeleteThisGroup">حذف المجموعة</string> <string name="DeleteThisGroup">حذف المجموعة</string>
<string name="DeleteThisChat">Delete this chat</string> <string name="DeleteThisChat">حذف هذه الدردشة</string>
<string name="SlideToCancel">قم بالسحب للإلغاء</string> <string name="SlideToCancel">قم بالسحب للإلغاء</string>
<string name="SaveToDownloads">حفظ في الجهاز</string> <string name="SaveToDownloads">حفظ في الجهاز</string>
<string name="ApplyLocalizationFile">تطبيق ملف التعريب</string> <string name="ApplyLocalizationFile">تطبيق ملف التعريب</string>
@ -258,18 +258,20 @@
<string name="Pebble">PEBBLE</string> <string name="Pebble">PEBBLE</string>
<string name="Language">اللغة</string> <string name="Language">اللغة</string>
<string name="AskAQuestionInfo">نرجو الأخذ بالعلم أن الدعم الفني في تيليجرام يقوم به مجموعة من المتطوعين. نحاول الرد بسرعة قدر المستطاع، لكن ربما نستغرق القليل من الوقت.<![CDATA[<br><br>]]>يرجى الإطلاع على <![CDATA[<a href="http://telegram.org/faq/ar">صفحة الأسئلة الأكثر شيوعًا</a>]]>: يوجد بها حلول للمشاكل وإجابات لمعظم الأسئلة.</string> <string name="AskAQuestionInfo">نرجو الأخذ بالعلم أن الدعم الفني في تيليجرام يقوم به مجموعة من المتطوعين. نحاول الرد بسرعة قدر المستطاع، لكن ربما نستغرق القليل من الوقت.<![CDATA[<br><br>]]>يرجى الإطلاع على <![CDATA[<a href="http://telegram.org/faq/ar">صفحة الأسئلة الأكثر شيوعًا</a>]]>: يوجد بها حلول للمشاكل وإجابات لمعظم الأسئلة.</string>
<string name="AskButton">اسأل متطوع</string> <string name="AskButton">اسأل أحد المتطوعين</string>
<string name="TelegramFaq">Telegram FAQ</string> <string name="TelegramFaq">الأسئلة الشائعة عن تيليجرام</string>
<string name="TelegramFaqUrl">https://telegram.org/faq/ar</string> <string name="TelegramFaqUrl">https://telegram.org/faq/ar</string>
<string name="DeleteLocalization">Delete localization?</string> <string name="DeleteLocalization">حذف التعريب؟</string>
<string name="IncorrectLocalization">Incorrect localization file</string> <string name="IncorrectLocalization">ملف التعريب غير صحيح</string>
<string name="Enabled">Enabled</string> <string name="Enabled">تمكين</string>
<string name="Disabled">Disabled</string> <string name="Disabled">تعطيل</string>
<string name="NotificationsService">Notifications Service</string> <string name="NotificationsService">خدمة الإشعارات</string>
<string name="NotificationsServiceDisableInfo">If google play services are enough for you to receive notifications, you can disable Notifications Service. However we recommend you to leave it enabled to keep app running in background and receive instant notifications.</string> <string name="NotificationsServiceDisableInfo">إذا كانت خدمات Google play كافية بالنسبة لك لتلقي الإشعارات ، يمكنك تعطيل " خدمة الإشعارات " . ومع ذلك نحن نوصي بترك هذه الخدمة مفعلة للحفاظ على تشغيل التطبيق في الخلفية ، ولتلقي إشعارات الدردشة .</string>
<string name="SortBy">Sort By</string> <string name="SortBy">فرز حسب</string>
<string name="ImportContacts">Import Contacts</string> <string name="ImportContacts">استيراد جهات الاتصال</string>
<string name="WiFiOnly">via WiFi only</string> <string name="WiFiOnly">بواسطة WiFi فقط</string>
<string name="SortFirstName">الاسم الأول</string>
<string name="SortLastName">اسم العائلة</string>
<!--media view--> <!--media view-->
<string name="NoMedia">لا توجد وسائط بعد</string> <string name="NoMedia">لا توجد وسائط بعد</string>
@ -339,8 +341,8 @@
<string name="AttachDocument">مستند</string> <string name="AttachDocument">مستند</string>
<string name="AttachAudio">مقطع صوتي</string> <string name="AttachAudio">مقطع صوتي</string>
<string name="FromYou">أنت</string> <string name="FromYou">أنت</string>
<string name="ActionTakeScreenshootYou">You took a screenshot!</string> <string name="ActionTakeScreenshootYou">أنت أخذت لقطة للشاشة !</string>
<string name="ActionTakeScreenshoot">un1 took a screenshot!</string> <string name="ActionTakeScreenshoot">un1 أخذ لقطة للشاشة !</string>
<!--Alert messages--> <!--Alert messages-->
<string name="InvalidPhoneNumber">رقم الهاتف غير صحيح</string> <string name="InvalidPhoneNumber">رقم الهاتف غير صحيح</string>

View File

@ -109,7 +109,7 @@
<string name="YouWereKicked">Du wurdest aus der Gruppe entfernt</string> <string name="YouWereKicked">Du wurdest aus der Gruppe entfernt</string>
<string name="YouLeft">Du hast die Gruppe verlassen</string> <string name="YouLeft">Du hast die Gruppe verlassen</string>
<string name="DeleteThisGroup">Diese Gruppe löschen</string> <string name="DeleteThisGroup">Diese Gruppe löschen</string>
<string name="DeleteThisChat">Delete this chat</string> <string name="DeleteThisChat">Diesen Chat löschen</string>
<string name="SlideToCancel">WISCHEN UM ABZUBRECHEN</string> <string name="SlideToCancel">WISCHEN UM ABZUBRECHEN</string>
<string name="SaveToDownloads">In Ordner Downloads speichern</string> <string name="SaveToDownloads">In Ordner Downloads speichern</string>
<string name="ApplyLocalizationFile">Sprachdatei benutzen</string> <string name="ApplyLocalizationFile">Sprachdatei benutzen</string>
@ -263,13 +263,15 @@
<string name="TelegramFaqUrl">https://telegram.org/faq</string> <string name="TelegramFaqUrl">https://telegram.org/faq</string>
<string name="DeleteLocalization">Lokalisierung löschen?</string> <string name="DeleteLocalization">Lokalisierung löschen?</string>
<string name="IncorrectLocalization">Falsche Sprachdatei</string> <string name="IncorrectLocalization">Falsche Sprachdatei</string>
<string name="Enabled">Enabled</string> <string name="Enabled">Aktiviert</string>
<string name="Disabled">Disabled</string> <string name="Disabled">Deaktiviert</string>
<string name="NotificationsService">Notifications Service</string> <string name="NotificationsService">Benachrichtigungsdienst</string>
<string name="NotificationsServiceDisableInfo">If google play services are enough for you to receive notifications, you can disable Notifications Service. However we recommend you to leave it enabled to keep app running in background and receive instant notifications.</string> <string name="NotificationsServiceDisableInfo">Sofern Google Play Dienste ausreichend für deine Benachrichtigungen sind, kannst du unseren Benachrichtigungsdienst abschalten. Wir empfehlen allerdings, unseren Dienst dauerhaft aktiviert zu lassen um über neue Nachrichten in Echtzeit informiert zu werden.</string>
<string name="SortBy">Sort By</string> <string name="SortBy">sortiert nach</string>
<string name="ImportContacts">Import Contacts</string> <string name="ImportContacts">Kontakte importieren</string>
<string name="WiFiOnly">via WiFi only</string> <string name="WiFiOnly">nur über WLAN</string>
<string name="SortFirstName">Vorname</string>
<string name="SortLastName">Nachname</string>
<!--media view--> <!--media view-->
<string name="NoMedia">Noch keine geteilten Medien vorhanden</string> <string name="NoMedia">Noch keine geteilten Medien vorhanden</string>
@ -339,8 +341,8 @@
<string name="AttachDocument">Dokument</string> <string name="AttachDocument">Dokument</string>
<string name="AttachAudio">Audio</string> <string name="AttachAudio">Audio</string>
<string name="FromYou">Du</string> <string name="FromYou">Du</string>
<string name="ActionTakeScreenshootYou">You took a screenshot!</string> <string name="ActionTakeScreenshootYou">Du hast ein Bildschirmfoto gemacht!</string>
<string name="ActionTakeScreenshoot">un1 took a screenshot!</string> <string name="ActionTakeScreenshoot">un1 hat ein Bildschirmfoto gemacht!</string>
<!--Alert messages--> <!--Alert messages-->
<string name="InvalidPhoneNumber">Ungültige Telefonnummer</string> <string name="InvalidPhoneNumber">Ungültige Telefonnummer</string>

View File

@ -109,7 +109,7 @@
<string name="YouWereKicked">Has sido expulsado de este grupo</string> <string name="YouWereKicked">Has sido expulsado de este grupo</string>
<string name="YouLeft">Has abandonado este grupo</string> <string name="YouLeft">Has abandonado este grupo</string>
<string name="DeleteThisGroup">Eliminar este grupo</string> <string name="DeleteThisGroup">Eliminar este grupo</string>
<string name="DeleteThisChat">Delete this chat</string> <string name="DeleteThisChat">Eliminar esta conversación</string>
<string name="SlideToCancel">DESLIZA PARA CANCELAR</string> <string name="SlideToCancel">DESLIZA PARA CANCELAR</string>
<string name="SaveToDownloads">Guardar en descargas</string> <string name="SaveToDownloads">Guardar en descargas</string>
<string name="ApplyLocalizationFile">Aplicar fichero de localización</string> <string name="ApplyLocalizationFile">Aplicar fichero de localización</string>
@ -263,13 +263,15 @@
<string name="TelegramFaqUrl">https://telegram.org/faq/es</string> <string name="TelegramFaqUrl">https://telegram.org/faq/es</string>
<string name="DeleteLocalization">¿Eliminar localización?</string> <string name="DeleteLocalization">¿Eliminar localización?</string>
<string name="IncorrectLocalization">Fichero de localización incorrecto</string> <string name="IncorrectLocalization">Fichero de localización incorrecto</string>
<string name="Enabled">Enabled</string> <string name="Enabled">Activado</string>
<string name="Disabled">Disabled</string> <string name="Disabled">Desactivado</string>
<string name="NotificationsService">Notifications Service</string> <string name="NotificationsService">Servicio de notificaciones</string>
<string name="NotificationsServiceDisableInfo">If google play services are enough for you to receive notifications, you can disable Notifications Service. However we recommend you to leave it enabled to keep app running in background and receive instant notifications.</string> <string name="NotificationsServiceDisableInfo">Si los servicios de google play son suficientes para recibir notificaciones, puedes desactivar el \'Servicio de notificaciones\'. Sin embargo, te recomendamos activarlos para mantener la aplicación funcionando en segundo plano y recibir notificaciones de forma instantánea.</string>
<string name="SortBy">Sort By</string> <string name="SortBy">Ordenar por</string>
<string name="ImportContacts">Import Contacts</string> <string name="ImportContacts">Importar contactos</string>
<string name="WiFiOnly">via WiFi only</string> <string name="WiFiOnly">Sólo vía WiFi</string>
<string name="SortFirstName">Nombre</string>
<string name="SortLastName">Apellido</string>
<!--media view--> <!--media view-->
<string name="NoMedia">No hay fotos ni vídeos compartidos aún</string> <string name="NoMedia">No hay fotos ni vídeos compartidos aún</string>
@ -339,8 +341,8 @@
<string name="AttachDocument">Archivo</string> <string name="AttachDocument">Archivo</string>
<string name="AttachAudio">Audio</string> <string name="AttachAudio">Audio</string>
<string name="FromYou"></string> <string name="FromYou"></string>
<string name="ActionTakeScreenshootYou">You took a screenshot!</string> <string name="ActionTakeScreenshootYou">¡Hiciste una captura de pantalla!</string>
<string name="ActionTakeScreenshoot">un1 took a screenshot!</string> <string name="ActionTakeScreenshoot">¡un1 hizo una captura de pantalla!</string>
<!--Alert messages--> <!--Alert messages-->
<string name="InvalidPhoneNumber">Número de teléfono inválido</string> <string name="InvalidPhoneNumber">Número de teléfono inválido</string>

View File

@ -109,7 +109,7 @@
<string name="YouWereKicked">Sei stato espulso da questo gruppo</string> <string name="YouWereKicked">Sei stato espulso da questo gruppo</string>
<string name="YouLeft">Hai lasciato il gruppo</string> <string name="YouLeft">Hai lasciato il gruppo</string>
<string name="DeleteThisGroup">Elimina questo gruppo</string> <string name="DeleteThisGroup">Elimina questo gruppo</string>
<string name="DeleteThisChat">Delete this chat</string> <string name="DeleteThisChat">Elimina questa chat</string>
<string name="SlideToCancel">TRASCINA PER ANNULLARE</string> <string name="SlideToCancel">TRASCINA PER ANNULLARE</string>
<string name="SaveToDownloads">Salva in download</string> <string name="SaveToDownloads">Salva in download</string>
<string name="ApplyLocalizationFile">Applica file di localizzazione</string> <string name="ApplyLocalizationFile">Applica file di localizzazione</string>
@ -263,13 +263,15 @@
<string name="TelegramFaqUrl">https://telegram.org/faq</string> <string name="TelegramFaqUrl">https://telegram.org/faq</string>
<string name="DeleteLocalization">Eliminare la localizzazione?</string> <string name="DeleteLocalization">Eliminare la localizzazione?</string>
<string name="IncorrectLocalization">File della localizzazione non valido</string> <string name="IncorrectLocalization">File della localizzazione non valido</string>
<string name="Enabled">Enabled</string> <string name="Enabled">Abilitato</string>
<string name="Disabled">Disabled</string> <string name="Disabled">Disabilitato</string>
<string name="NotificationsService">Notifications Service</string> <string name="NotificationsService">Servizio notifiche</string>
<string name="NotificationsServiceDisableInfo">If google play services are enough for you to receive notifications, you can disable Notifications Service. However we recommend you to leave it enabled to keep app running in background and receive instant notifications.</string> <string name="NotificationsServiceDisableInfo">Se i servizi di Google Play ti bastano per ricevere le notifiche, puoi disabilitare il Servizio notifiche. Tuttavia sarebbe meglio lasciarlo abilitato al fine di mantenere l\'applicazione attiva in background e ricevere notifiche istantanee.</string>
<string name="SortBy">Sort By</string> <string name="SortBy">Ordina per</string>
<string name="ImportContacts">Import Contacts</string> <string name="ImportContacts">Importa contatti</string>
<string name="WiFiOnly">via WiFi only</string> <string name="WiFiOnly">solo tramite WiFi</string>
<string name="SortFirstName">Nome</string>
<string name="SortLastName">Cognome</string>
<!--media view--> <!--media view-->
<string name="NoMedia">Nessun media condiviso</string> <string name="NoMedia">Nessun media condiviso</string>
@ -339,8 +341,8 @@
<string name="AttachDocument">Documento</string> <string name="AttachDocument">Documento</string>
<string name="AttachAudio">Audio</string> <string name="AttachAudio">Audio</string>
<string name="FromYou">Tu</string> <string name="FromYou">Tu</string>
<string name="ActionTakeScreenshootYou">You took a screenshot!</string> <string name="ActionTakeScreenshootYou">Hai catturato la schermata!</string>
<string name="ActionTakeScreenshoot">un1 took a screenshot!</string> <string name="ActionTakeScreenshoot">un1 ha catturato la schermata!</string>
<!--Alert messages--> <!--Alert messages-->
<string name="InvalidPhoneNumber">Numero di telefono non valido</string> <string name="InvalidPhoneNumber">Numero di telefono non valido</string>

View File

@ -109,7 +109,7 @@
<string name="YouWereKicked">U bent verwijderd uit deze groep</string> <string name="YouWereKicked">U bent verwijderd uit deze groep</string>
<string name="YouLeft">U hebt deze groep verlaten</string> <string name="YouLeft">U hebt deze groep verlaten</string>
<string name="DeleteThisGroup">Deze groep verwijderen</string> <string name="DeleteThisGroup">Deze groep verwijderen</string>
<string name="DeleteThisChat">Delete this chat</string> <string name="DeleteThisChat">Verwijder dit gesprek</string>
<string name="SlideToCancel">SLEEP OM TE ANNULEREN</string> <string name="SlideToCancel">SLEEP OM TE ANNULEREN</string>
<string name="SaveToDownloads">Opslaan in Downloads</string> <string name="SaveToDownloads">Opslaan in Downloads</string>
<string name="ApplyLocalizationFile">Vertaling toepassen</string> <string name="ApplyLocalizationFile">Vertaling toepassen</string>
@ -263,13 +263,15 @@
<string name="TelegramFaqUrl">https://telegram.org/faq</string> <string name="TelegramFaqUrl">https://telegram.org/faq</string>
<string name="DeleteLocalization">Verwijder vertaling?</string> <string name="DeleteLocalization">Verwijder vertaling?</string>
<string name="IncorrectLocalization">Ongeldig vertalingsbestand</string> <string name="IncorrectLocalization">Ongeldig vertalingsbestand</string>
<string name="Enabled">Enabled</string> <string name="Enabled">Inschakelen</string>
<string name="Disabled">Disabled</string> <string name="Disabled">Uitschakelen</string>
<string name="NotificationsService">Notifications Service</string> <string name="NotificationsService">Meldingen service</string>
<string name="NotificationsServiceDisableInfo">If google play services are enough for you to receive notifications, you can disable Notifications Service. However we recommend you to leave it enabled to keep app running in background and receive instant notifications.</string> <string name="NotificationsServiceDisableInfo">Als Google Play services genoeg is om notificaties te ontvang, kan de meldingen service worden uitgeschakeld. Echter, we adviseren de service ingeschakeld te laten zodat de app in de achtergrond blijft draaien en meldingen direct worden ontvangen.</string>
<string name="SortBy">Sort By</string> <string name="SortBy">Sorteren op</string>
<string name="ImportContacts">Import Contacts</string> <string name="ImportContacts">Importeer contacten</string>
<string name="WiFiOnly">via WiFi only</string> <string name="WiFiOnly">alleen via WIFI</string>
<string name="SortFirstName">Voornaam</string>
<string name="SortLastName">Achternaam</string>
<!--media view--> <!--media view-->
<string name="NoMedia">Nog geen media gedeeld</string> <string name="NoMedia">Nog geen media gedeeld</string>
@ -339,8 +341,8 @@
<string name="AttachDocument">Document</string> <string name="AttachDocument">Document</string>
<string name="AttachAudio">Geluidsbestand</string> <string name="AttachAudio">Geluidsbestand</string>
<string name="FromYou">U</string> <string name="FromYou">U</string>
<string name="ActionTakeScreenshootYou">You took a screenshot!</string> <string name="ActionTakeScreenshootYou">U heeft een schermafbeelding gemaakt!</string>
<string name="ActionTakeScreenshoot">un1 took a screenshot!</string> <string name="ActionTakeScreenshoot">un1 maakte een schermafbeeling!</string>
<!--Alert messages--> <!--Alert messages-->
<string name="InvalidPhoneNumber">Ongeldig telefoonnummer</string> <string name="InvalidPhoneNumber">Ongeldig telefoonnummer</string>

View File

@ -8,7 +8,6 @@
<item name="android:colorBackground">@android:color/white</item> <item name="android:colorBackground">@android:color/white</item>
<item name="android:windowBackground">@android:color/white</item> <item name="android:windowBackground">@android:color/white</item>
<item name="android:windowContentOverlay">@drawable/shadow</item> <item name="android:windowContentOverlay">@drawable/shadow</item>
<item name="android:windowNoTitle">true</item>
</style> </style>
<style name="Theme.TMessages" parent="@android:style/Theme.Holo.Light"> <style name="Theme.TMessages" parent="@android:style/Theme.Holo.Light">