diff --git a/TMessagesProj/build.gradle b/TMessagesProj/build.gradle index 1f1941ed5..faff78e8a 100644 --- a/TMessagesProj/build.gradle +++ b/TMessagesProj/build.gradle @@ -82,7 +82,7 @@ android { defaultConfig { minSdkVersion 8 targetSdkVersion 19 - versionCode 208 - versionName "1.4.7" + versionCode 209 + versionName "1.4.8" } } diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/ConnectionsManager.java b/TMessagesProj/src/main/java/org/telegram/messenger/ConnectionsManager.java index 7e29e4974..9eac980fd 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/ConnectionsManager.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/ConnectionsManager.java @@ -479,7 +479,6 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection. processedMessageIdsSet.remove(sessionId); nextSeqNoInSession.remove(sessionId); processedSessionChanges.remove(sessionId); - pingIdToDate.remove(sessionId); if (sessionId == datacenter.authSessionId) { clearRequestsForRequestClass(RPCRequest.RPCRequestClassGeneric, datacenter); @@ -858,7 +857,7 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection. } } catch(Exception e) { FileLog.e("tmessages", e); - return false; + return true; } return status; } diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/ContactsController.java b/TMessagesProj/src/main/java/org/telegram/messenger/ContactsController.java index 37da471aa..65b334bdf 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/ContactsController.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/ContactsController.java @@ -592,9 +592,9 @@ public class ContactsController { if (!toImport.isEmpty()) { if (BuildVars.DEBUG_VERSION) { FileLog.e("tmessages", "start import contacts"); - for (TLRPC.TL_inputPhoneContact contact : toImport) { - FileLog.e("tmessages", "add contact " + contact.first_name + " " + contact.last_name + " " + contact.phone); - } +// for (TLRPC.TL_inputPhoneContact contact : toImport) { +// FileLog.e("tmessages", "add contact " + contact.first_name + " " + contact.last_name + " " + contact.phone); +// } } final int count = (int)Math.ceil(toImport.size() / 500.0f); for (int a = 0; a < count; a++) { @@ -614,9 +614,9 @@ public class ContactsController { } TLRPC.TL_contacts_importedContacts res = (TLRPC.TL_contacts_importedContacts)response; if (BuildVars.DEBUG_VERSION) { - for (TLRPC.User user : res.users) { - FileLog.e("tmessages", "received user " + user.first_name + " " + user.last_name + " " + user.phone); - } +// for (TLRPC.User user : res.users) { +// FileLog.e("tmessages", "received user " + user.first_name + " " + user.last_name + " " + user.phone); +// } } MessagesStorage.getInstance().putUsersAndChats(res.users, null, true, true); ArrayList cArr = new ArrayList(); @@ -776,9 +776,9 @@ public class ContactsController { if (user != null) { usersDict.put(user.id, user); - if (BuildVars.DEBUG_VERSION) { - FileLog.e("tmessages", "loaded user contact " + user.first_name + " " + user.last_name + " " + user.phone); - } +// if (BuildVars.DEBUG_VERSION) { +// FileLog.e("tmessages", "loaded user contact " + user.first_name + " " + user.last_name + " " + user.phone); +// } } } @@ -1398,9 +1398,9 @@ public class ContactsController { contactsParams.add(c); req.contacts = contactsParams; req.replace = false; - if (BuildVars.DEBUG_VERSION) { - FileLog.e("tmessages", "add contact " + user.first_name + " " + user.last_name + " " + user.phone); - } +// if (BuildVars.DEBUG_VERSION) { +// FileLog.e("tmessages", "add contact " + user.first_name + " " + user.last_name + " " + user.phone); +// } ConnectionsManager.getInstance().performRpc(req, new RPCRequest.RPCRequestDelegate() { @Override public void run(TLObject response, TLRPC.TL_error error) { @@ -1410,11 +1410,11 @@ public class ContactsController { final TLRPC.TL_contacts_importedContacts res = (TLRPC.TL_contacts_importedContacts)response; MessagesStorage.getInstance().putUsersAndChats(res.users, null, true, true); - if (BuildVars.DEBUG_VERSION) { - for (TLRPC.User user : res.users) { - FileLog.e("tmessages", "received user " + user.first_name + " " + user.last_name + " " + user.phone); - } - } +// if (BuildVars.DEBUG_VERSION) { +// for (TLRPC.User user : res.users) { +// FileLog.e("tmessages", "received user " + user.first_name + " " + user.last_name + " " + user.phone); +// } +// } for (final TLRPC.User u : res.users) { Utilities.globalQueue.postRunnable(new Runnable() { diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java b/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java index bf4f3c4cc..446e37ae9 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java @@ -63,7 +63,7 @@ public class MessagesStorage { public void openDatabase() { NativeLoader.initNativeLibs(ApplicationLoader.applicationContext); - + cacheFile = new File(ApplicationLoader.applicationContext.getFilesDir(), "cache4.db"); SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("dbconfig", Context.MODE_PRIVATE); diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/NativeLoader.java b/TMessagesProj/src/main/java/org/telegram/messenger/NativeLoader.java index e07bb6366..872d3e3db 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/NativeLoader.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/NativeLoader.java @@ -34,7 +34,6 @@ public class NativeLoader { if (nativeLoaded) { return; } - nativeLoaded = true; if (Build.VERSION.SDK_INT >= 9) { try { @@ -57,6 +56,7 @@ public class NativeLoader { libSize = sizes[3]; } else { System.loadLibrary("tmessages"); + nativeLoaded = true; Log.e("tmessages", "Unsupported arch: " + Build.CPU_ABI); return; } @@ -66,6 +66,7 @@ public class NativeLoader { Log.d("tmessages", "Load normal lib"); try { System.loadLibrary("tmessages"); + nativeLoaded = true; return; } catch (Exception e) { e.printStackTrace(); @@ -75,9 +76,14 @@ public class NativeLoader { File destLocalFile = new File(context.getFilesDir().getAbsolutePath() + "/libtmessages.so"); if (destLocalFile.exists()) { if (destLocalFile.length() == libSize) { - Log.d("tmessages", "Load local lib"); - System.load(destLocalFile.getAbsolutePath()); - return; + try { + Log.d("tmessages", "Load local lib"); + System.load(destLocalFile.getAbsolutePath()); + nativeLoaded = true; + return; + } catch (Exception e) { + e.printStackTrace(); + } } else { destLocalFile.delete(); } @@ -105,6 +111,7 @@ public class NativeLoader { out.close(); System.load(destLocalFile.getAbsolutePath()); + nativeLoaded = true; return; } catch (Exception e) { e.printStackTrace(); @@ -130,5 +137,6 @@ public class NativeLoader { } System.loadLibrary("tmessages"); + nativeLoaded = true; } } diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/TcpConnection.java b/TMessagesProj/src/main/java/org/telegram/messenger/TcpConnection.java index 65a414d53..c819424ce 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/TcpConnection.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/TcpConnection.java @@ -60,6 +60,7 @@ public class TcpConnection extends PyroClientAdapter { private boolean firstPacket; private Timer reconnectTimer; + private boolean tryWithNoNetworkAnyway = false; public TcpConnection(int did) { if (selector == null) { @@ -90,9 +91,13 @@ public class TcpConnection extends PyroClientAdapter { connectionState = TcpConnectionState.TcpConnectionStageConnecting; try { - if (!ConnectionsManager.isNetworkOnline()) { - handleConnectionError(null); - return; + if(android.os.Build.VERSION.SDK_INT < 11) { + if (!ConnectionsManager.isNetworkOnline() && !tryWithNoNetworkAnyway) { + handleConnectionError(null); + tryWithNoNetworkAnyway = true; + return; + } + tryWithNoNetworkAnyway = false; } try { synchronized (timerSync) { diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/Utilities.java b/TMessagesProj/src/main/java/org/telegram/messenger/Utilities.java index ae81c1602..96a902fcd 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/Utilities.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/Utilities.java @@ -941,7 +941,7 @@ public class Utilities { } else if (result.length() != 0 && lastName.length() != 0) { result += " " + lastName; } - return result; + return result.trim(); } public static String formatFileSize(long size) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Adapters/ContactsActivityAdapter.java b/TMessagesProj/src/main/java/org/telegram/ui/Adapters/ContactsActivityAdapter.java index d46c49827..f341e93af 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Adapters/ContactsActivityAdapter.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Adapters/ContactsActivityAdapter.java @@ -9,7 +9,6 @@ package org.telegram.ui.Adapters; import android.content.Context; -import android.text.Html; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -114,7 +113,6 @@ public class ContactsActivityAdapter extends SectionedBaseAdapter { if (user != null) { if (convertView == null) { convertView = new ChatOrUserCell(mContext); - ((ChatOrUserCell)convertView).useBoldFont = true; ((ChatOrUserCell)convertView).usePadding = false; } @@ -153,11 +151,11 @@ public class ContactsActivityAdapter extends SectionedBaseAdapter { } } if (contact.first_name != null && contact.last_name != null) { - textView.setText(Html.fromHtml(contact.first_name + " " + contact.last_name + "")); + textView.setText(contact.first_name + " " + contact.last_name); } else if (contact.first_name != null && contact.last_name == null) { - textView.setText(Html.fromHtml("" + contact.first_name + "")); + textView.setText(contact.first_name); } else { - textView.setText(Html.fromHtml("" + contact.last_name + "")); + textView.setText(contact.last_name); } return convertView; } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatOrUserCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatOrUserCell.java index bbab9c69e..48fa5664f 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatOrUserCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatOrUserCell.java @@ -12,7 +12,6 @@ import android.content.Context; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.drawable.Drawable; -import android.text.Html; import android.text.Layout; import android.text.StaticLayout; import android.text.TextPaint; @@ -55,7 +54,6 @@ public class ChatOrUserCell extends BaseCell { private TLRPC.FileLocation lastAvatar = null; public boolean usePadding = true; - public boolean useBoldFont = false; public boolean useSeparator = false; public float drawAlpha = 1; @@ -294,39 +292,30 @@ public class ChatOrUserCell extends BaseCell { if (currentName != null) { nameString = currentName; } else { - if (useBoldFont) { - if (user != null) { - if (user.first_name.length() != 0 && user.last_name.length() != 0) { - nameString = Html.fromHtml(user.first_name + " " + user.last_name + ""); - } else if (user.first_name.length() != 0) { - nameString = Html.fromHtml("" + user.first_name + ""); - } else { - nameString = Html.fromHtml("" + user.last_name + ""); - } - } - } else { - String nameString2 = ""; - if (chat != null) { - nameString2 = chat.title; - } else if (user != null) { - if (user.id / 1000 != 333 && ContactsController.getInstance().contactsDict.get(user.id) == null) { - if (ContactsController.getInstance().contactsDict.size() == 0 && ContactsController.getInstance().loadingContacts) { - nameString2 = Utilities.formatName(user.first_name, user.last_name); - } else { - if (user.phone != null && user.phone.length() != 0) { - nameString2 = PhoneFormat.getInstance().format("+" + user.phone); - } else { - nameString2 = Utilities.formatName(user.first_name, user.last_name); - } - } - } else { + String nameString2 = ""; + if (chat != null) { + nameString2 = chat.title; + } else if (user != null) { + if (user.id / 1000 != 333 && ContactsController.getInstance().contactsDict.get(user.id) == null) { + if (ContactsController.getInstance().contactsDict.size() == 0 && ContactsController.getInstance().loadingContacts) { nameString2 = Utilities.formatName(user.first_name, user.last_name); + } else { + if (user.phone != null && user.phone.length() != 0) { + nameString2 = PhoneFormat.getInstance().format("+" + user.phone); + } else { + nameString2 = Utilities.formatName(user.first_name, user.last_name); + } } + } else { + nameString2 = Utilities.formatName(user.first_name, user.last_name); } - nameString = nameString2.replace("\n", " "); } + nameString = nameString2.replace("\n", " "); } if (nameString.length() == 0) { + if (user.phone != null && user.phone.length() != 0) { + nameString = PhoneFormat.getInstance().format("+" + user.phone); + } nameString = LocaleController.getString("HiddenName", R.string.HiddenName); } if (encryptedChat != null) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatProfileActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatProfileActivity.java index 726a118c8..0d845f2b0 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatProfileActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatProfileActivity.java @@ -684,7 +684,6 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen if (view == null) { view = new ChatOrUserCell(mContext); - ((ChatOrUserCell)view).useBoldFont = true; ((ChatOrUserCell)view).usePadding = false; ((ChatOrUserCell)view).useSeparator = true; } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/GroupCreateActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/GroupCreateActivity.java index 3015e4ca2..42de51dec 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/GroupCreateActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/GroupCreateActivity.java @@ -18,7 +18,6 @@ import android.os.Bundle; import android.support.v4.internal.view.SupportMenuItem; import android.support.v7.app.ActionBar; import android.text.Editable; -import android.text.Html; import android.text.Spannable; import android.text.SpannableString; import android.text.SpannableStringBuilder; @@ -35,6 +34,7 @@ import android.widget.EditText; import android.widget.ImageView; import android.widget.TextView; +import org.telegram.PhoneFormat.PhoneFormat; import org.telegram.messenger.LocaleController; import org.telegram.messenger.TLRPC; import org.telegram.messenger.ConnectionsManager; @@ -60,9 +60,7 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen private SectionedBaseAdapter listViewAdapter; private PinnedHeaderListView listView; private TextView epmtyTextView; - private TextView doneTextView; private EditText userSelectEditText; - private TextView countTextView; private boolean ignoreChange = false; private HashMap selectedContacts = new HashMap(); @@ -117,7 +115,6 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen epmtyTextView.setText(LocaleController.getString("NoContacts", R.string.NoContacts)); userSelectEditText = (EditText)fragmentView.findViewById(R.id.bubble_input_text); userSelectEditText.setHint(LocaleController.getString("SendMessageTo", R.string.SendMessageTo)); - countTextView = (TextView)fragmentView.findViewById(R.id.bubble_counter_text); if (Build.VERSION.SDK_INT >= 11) { userSelectEditText.setTextIsSelectable(false); } @@ -159,12 +156,10 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen selectedContacts.remove(sp.uid); } } - if (selectedContacts.isEmpty()) { - doneTextView.setText(LocaleController.getString("Done", R.string.Done)); - } else { - doneTextView.setText(LocaleController.getString("Done", R.string.Done) + " (" + selectedContacts.size() + ")"); + if (parentActivity != null) { + ActionBar actionBar = parentActivity.getSupportActionBar(); + actionBar.setSubtitle(String.format("%d/200 %s", selectedContacts.size(), LocaleController.getString("Members", R.string.Members))); } - countTextView.setText(selectedContacts.size() + "/200"); listView.invalidateViews(); } else { search = true; @@ -230,12 +225,10 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen span.uid = user.id; ignoreChange = false; } - if (selectedContacts.isEmpty()) { - doneTextView.setText(LocaleController.getString("Done", R.string.Done)); - } else { - doneTextView.setText(LocaleController.getString("Done", R.string.Done) + " (" + selectedContacts.size() + ")"); + if (parentActivity != null) { + ActionBar actionBar = parentActivity.getSupportActionBar(); + actionBar.setSubtitle(String.format("%d/200 %s", selectedContacts.size(), LocaleController.getString("Members", R.string.Members))); } - countTextView.setText(selectedContacts.size() + "/200"); if (searching || searchWas) { searching = false; searchWas = false; @@ -279,6 +272,7 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen actionBar.setDisplayShowCustomEnabled(false); actionBar.setCustomView(null); actionBar.setTitle(LocaleController.getString("NewGroup", R.string.NewGroup)); + actionBar.setSubtitle(String.format("%d/200 %s", selectedContacts.size(), LocaleController.getString("Members", R.string.Members))); TextView title = (TextView)parentActivity.findViewById(R.id.action_bar_title); if (title == null) { @@ -305,7 +299,11 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen LayoutInflater lf = (LayoutInflater)parentActivity.getSystemService(Activity.LAYOUT_INFLATER_SERVICE); View textView = lf.inflate(R.layout.group_create_bubble, null); TextView text = (TextView)textView.findViewById(R.id.bubble_text_view); - text.setText(Utilities.formatName(user.first_name, user.last_name)); + String name = Utilities.formatName(user.first_name, user.last_name); + if (name.length() == 0 && user.phone != null && user.phone.length() != 0) { + name = PhoneFormat.getInstance().format("+" + user.phone); + } + text.setText(name + ", "); int spec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED); textView.measure(spec, spec); @@ -425,8 +423,8 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { inflater.inflate(R.menu.group_create_menu, menu); SupportMenuItem doneItem = (SupportMenuItem)menu.findItem(R.id.done_menu_item); - doneTextView = (TextView)doneItem.getActionView().findViewById(R.id.done_button); - doneTextView.setText(LocaleController.getString("Done", R.string.Done)); + TextView doneTextView = (TextView)doneItem.getActionView().findViewById(R.id.done_button); + doneTextView.setText(LocaleController.getString("Next", R.string.Next)); doneTextView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { @@ -525,9 +523,9 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen ImageView checkButton = (ImageView)convertView.findViewById(R.id.settings_row_check_button); if (selectedContacts.containsKey(user.id)) { - checkButton.setImageResource(R.drawable.btn_check_on_old); + checkButton.setImageResource(R.drawable.btn_check_on_holo_light); } else { - checkButton.setImageResource(R.drawable.btn_check_off_old); + checkButton.setImageResource(R.drawable.btn_check_off_holo_light); } View divider = convertView.findViewById(R.id.settings_row_divider); @@ -540,13 +538,15 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen if (searchWas && searching) { holder.nameTextView.setText(searchResultNames.get(position)); } else { - if (user.first_name.length() != 0 && user.last_name.length() != 0) { - holder.nameTextView.setText(Html.fromHtml(user.first_name + " " + user.last_name + "")); - } else if (user.first_name.length() != 0) { - holder.nameTextView.setText(Html.fromHtml("" + user.first_name + "")); - } else { - holder.nameTextView.setText(Html.fromHtml("" + user.last_name + "")); + String name = Utilities.formatName(user.first_name, user.last_name); + if (name.length() == 0) { + if (user.phone != null && user.phone.length() != 0) { + name = PhoneFormat.getInstance().format("+" + user.phone); + } else { + name = LocaleController.getString("HiddenName", R.string.HiddenName); + } } + holder.nameTextView.setText(name); } TLRPC.FileLocation photo = null; diff --git a/TMessagesProj/src/main/java/org/telegram/ui/GroupCreateFinalActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/GroupCreateFinalActivity.java index e01022b66..79438d064 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/GroupCreateFinalActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/GroupCreateFinalActivity.java @@ -148,6 +148,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati actionBar.setDisplayUseLogoEnabled(false); actionBar.setDisplayShowCustomEnabled(false); actionBar.setCustomView(null); + actionBar.setSubtitle(null); actionBar.setTitle(LocaleController.getString("NewGroup", R.string.NewGroup)); TextView title = (TextView)parentActivity.findViewById(R.id.action_bar_title); @@ -346,7 +347,6 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati if (convertView == null) { convertView = new ChatOrUserCell(mContext); - ((ChatOrUserCell)convertView).useBoldFont = true; ((ChatOrUserCell)convertView).usePadding = false; } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java index b7dc4a5d0..0b003f29d 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java @@ -86,7 +86,7 @@ public class LaunchActivity extends ActionBarActivity implements NotificationCen if (!UserConfig.clientActivated) { Intent intent = getIntent(); - if (intent != null && intent.getAction() != null && Intent.ACTION_SEND.equals(intent.getAction()) || intent.getAction().equals(Intent.ACTION_SEND_MULTIPLE)) { + if (intent != null && intent.getAction() != null && (Intent.ACTION_SEND.equals(intent.getAction()) || intent.getAction().equals(Intent.ACTION_SEND_MULTIPLE))) { finish(); return; } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/SettingsBlockedUsers.java b/TMessagesProj/src/main/java/org/telegram/ui/SettingsBlockedUsers.java index eb284c45c..237ef0280 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/SettingsBlockedUsers.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/SettingsBlockedUsers.java @@ -386,7 +386,6 @@ public class SettingsBlockedUsers extends BaseFragment implements NotificationCe if (type == 0) { if (view == null) { view = new ChatOrUserCell(mContext); - ((ChatOrUserCell)view).useBoldFont = true; ((ChatOrUserCell)view).usePadding = false; ((ChatOrUserCell)view).useSeparator = true; } diff --git a/TMessagesProj/src/main/res/color/chat_create_bubble_text_states.xml b/TMessagesProj/src/main/res/color/chat_create_bubble_text_states.xml deleted file mode 100644 index 36e36ca51..000000000 --- a/TMessagesProj/src/main/res/color/chat_create_bubble_text_states.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/TMessagesProj/src/main/res/drawable-hdpi/btn_check_off_pressed_holo_light.png b/TMessagesProj/src/main/res/drawable-hdpi/btn_check_off_pressed_holo_light.png deleted file mode 100644 index 0f54a35b1..000000000 Binary files a/TMessagesProj/src/main/res/drawable-hdpi/btn_check_off_pressed_holo_light.png and /dev/null differ diff --git a/TMessagesProj/src/main/res/drawable-hdpi/btn_check_on_pressed_holo_light.png b/TMessagesProj/src/main/res/drawable-hdpi/btn_check_on_pressed_holo_light.png deleted file mode 100644 index d4ce43712..000000000 Binary files a/TMessagesProj/src/main/res/drawable-hdpi/btn_check_on_pressed_holo_light.png and /dev/null differ diff --git a/TMessagesProj/src/main/res/drawable-hdpi/compose_bubble_down.9.png b/TMessagesProj/src/main/res/drawable-hdpi/compose_bubble_down.9.png deleted file mode 100644 index b298d4ccd..000000000 Binary files a/TMessagesProj/src/main/res/drawable-hdpi/compose_bubble_down.9.png and /dev/null differ diff --git a/TMessagesProj/src/main/res/drawable-hdpi/compose_bubble_up.9.png b/TMessagesProj/src/main/res/drawable-hdpi/compose_bubble_up.9.png deleted file mode 100644 index 5f65aa7e0..000000000 Binary files a/TMessagesProj/src/main/res/drawable-hdpi/compose_bubble_up.9.png and /dev/null differ diff --git a/TMessagesProj/src/main/res/drawable-mdpi/btn_check_off_pressed_holo_light.png b/TMessagesProj/src/main/res/drawable-mdpi/btn_check_off_pressed_holo_light.png deleted file mode 100644 index 4c358b6c7..000000000 Binary files a/TMessagesProj/src/main/res/drawable-mdpi/btn_check_off_pressed_holo_light.png and /dev/null differ diff --git a/TMessagesProj/src/main/res/drawable-mdpi/btn_check_on_pressed_holo_light.png b/TMessagesProj/src/main/res/drawable-mdpi/btn_check_on_pressed_holo_light.png deleted file mode 100644 index e9742a1f9..000000000 Binary files a/TMessagesProj/src/main/res/drawable-mdpi/btn_check_on_pressed_holo_light.png and /dev/null differ diff --git a/TMessagesProj/src/main/res/drawable-mdpi/compose_bubble_down.9.png b/TMessagesProj/src/main/res/drawable-mdpi/compose_bubble_down.9.png deleted file mode 100644 index 254a654fd..000000000 Binary files a/TMessagesProj/src/main/res/drawable-mdpi/compose_bubble_down.9.png and /dev/null differ diff --git a/TMessagesProj/src/main/res/drawable-mdpi/compose_bubble_up.9.png b/TMessagesProj/src/main/res/drawable-mdpi/compose_bubble_up.9.png deleted file mode 100644 index dd401ff34..000000000 Binary files a/TMessagesProj/src/main/res/drawable-mdpi/compose_bubble_up.9.png and /dev/null differ diff --git a/TMessagesProj/src/main/res/drawable-xhdpi/btn_check_off_pressed_holo_light.png b/TMessagesProj/src/main/res/drawable-xhdpi/btn_check_off_pressed_holo_light.png deleted file mode 100644 index 2e8dff7e2..000000000 Binary files a/TMessagesProj/src/main/res/drawable-xhdpi/btn_check_off_pressed_holo_light.png and /dev/null differ diff --git a/TMessagesProj/src/main/res/drawable-xhdpi/btn_check_on_pressed_holo_light.png b/TMessagesProj/src/main/res/drawable-xhdpi/btn_check_on_pressed_holo_light.png deleted file mode 100644 index c1d273a73..000000000 Binary files a/TMessagesProj/src/main/res/drawable-xhdpi/btn_check_on_pressed_holo_light.png and /dev/null differ diff --git a/TMessagesProj/src/main/res/drawable-xhdpi/compose_bubble_down.9.png b/TMessagesProj/src/main/res/drawable-xhdpi/compose_bubble_down.9.png deleted file mode 100644 index b1003163a..000000000 Binary files a/TMessagesProj/src/main/res/drawable-xhdpi/compose_bubble_down.9.png and /dev/null differ diff --git a/TMessagesProj/src/main/res/drawable-xhdpi/compose_bubble_up.9.png b/TMessagesProj/src/main/res/drawable-xhdpi/compose_bubble_up.9.png deleted file mode 100644 index ff521bb2d..000000000 Binary files a/TMessagesProj/src/main/res/drawable-xhdpi/compose_bubble_up.9.png and /dev/null differ diff --git a/TMessagesProj/src/main/res/drawable-xxhdpi/btn_check_off_pressed_holo_light.png b/TMessagesProj/src/main/res/drawable-xxhdpi/btn_check_off_pressed_holo_light.png deleted file mode 100644 index 98e8965fc..000000000 Binary files a/TMessagesProj/src/main/res/drawable-xxhdpi/btn_check_off_pressed_holo_light.png and /dev/null differ diff --git a/TMessagesProj/src/main/res/drawable-xxhdpi/btn_check_on_pressed_holo_light.png b/TMessagesProj/src/main/res/drawable-xxhdpi/btn_check_on_pressed_holo_light.png deleted file mode 100644 index fef30cc1d..000000000 Binary files a/TMessagesProj/src/main/res/drawable-xxhdpi/btn_check_on_pressed_holo_light.png and /dev/null differ diff --git a/TMessagesProj/src/main/res/drawable-xxhdpi/compose_bubble_down.9.png b/TMessagesProj/src/main/res/drawable-xxhdpi/compose_bubble_down.9.png deleted file mode 100644 index ab413e179..000000000 Binary files a/TMessagesProj/src/main/res/drawable-xxhdpi/compose_bubble_down.9.png and /dev/null differ diff --git a/TMessagesProj/src/main/res/drawable-xxhdpi/compose_bubble_up.9.png b/TMessagesProj/src/main/res/drawable-xxhdpi/compose_bubble_up.9.png deleted file mode 100644 index 4202efa5e..000000000 Binary files a/TMessagesProj/src/main/res/drawable-xxhdpi/compose_bubble_up.9.png and /dev/null differ diff --git a/TMessagesProj/src/main/res/drawable/btn_check_off_old.xml b/TMessagesProj/src/main/res/drawable/btn_check_off_old.xml deleted file mode 100644 index fff9507ba..000000000 --- a/TMessagesProj/src/main/res/drawable/btn_check_off_old.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/TMessagesProj/src/main/res/drawable/btn_check_on_old.xml b/TMessagesProj/src/main/res/drawable/btn_check_on_old.xml deleted file mode 100644 index 3923693ad..000000000 --- a/TMessagesProj/src/main/res/drawable/btn_check_on_old.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/TMessagesProj/src/main/res/drawable/chat_create_bubble_states.xml b/TMessagesProj/src/main/res/drawable/chat_create_bubble_states.xml deleted file mode 100644 index bba9664be..000000000 --- a/TMessagesProj/src/main/res/drawable/chat_create_bubble_states.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/TMessagesProj/src/main/res/layout-ar/group_create_final_layout.xml b/TMessagesProj/src/main/res/layout-ar/group_create_final_layout.xml index 8567d67a9..bfc162130 100644 --- a/TMessagesProj/src/main/res/layout-ar/group_create_final_layout.xml +++ b/TMessagesProj/src/main/res/layout-ar/group_create_final_layout.xml @@ -1,30 +1,35 @@ - + - + - + + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:src="@drawable/group_blue"/> + + - - + + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:id="@+id/listView" + android:clipToPadding="false" + android:fadingEdge="none" + android:fadingEdgeLength="0dp" + android:paddingLeft="16dp" + android:paddingRight="16dp" + android:dividerHeight="0dp" + android:divider="@null" + android:paddingBottom="16dp" + android:scrollbars="none"/> + diff --git a/TMessagesProj/src/main/res/layout-ar/group_create_layout.xml b/TMessagesProj/src/main/res/layout-ar/group_create_layout.xml index f674d7df0..1de70d4f7 100644 --- a/TMessagesProj/src/main/res/layout-ar/group_create_layout.xml +++ b/TMessagesProj/src/main/res/layout-ar/group_create_layout.xml @@ -21,7 +21,7 @@ android:layout_marginRight="5dp" android:minHeight="52dp" android:gravity="right|center_vertical" - android:maxLines="3" + android:maxLines="2" android:paddingTop="3dp" android:layout_marginTop="0dp" android:inputType="textFilter|textNoSuggestions|textMultiLine" @@ -29,18 +29,6 @@ android:textCursorDrawable="@null" android:textColor="#000000"/> - - diff --git a/TMessagesProj/src/main/res/layout-ar/group_create_row_layout.xml b/TMessagesProj/src/main/res/layout-ar/group_create_row_layout.xml index 2662414f0..d2eaad58c 100644 --- a/TMessagesProj/src/main/res/layout-ar/group_create_row_layout.xml +++ b/TMessagesProj/src/main/res/layout-ar/group_create_row_layout.xml @@ -1,57 +1,61 @@ - + + android:layout_width="50dp" + android:layout_height="50dp" + android:id="@+id/messages_list_row_avatar" + android:contentDescription="" + android:layout_marginTop="8dp" + android:layout_gravity="top|right"/> + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/messages_list_row_name" + android:textSize="18dp" + android:layout_marginRight="61dp" + android:ellipsize="end" + android:layout_marginTop="10dp" + android:textColor="#000000" + android:maxLines="1" + android:layout_marginLeft="60dp" + android:layout_gravity="top|right" + android:gravity="right"/> + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/messages_list_row_message" + android:textSize="15dp" + android:maxLines="1" + android:ellipsize="end" + android:textColor="#808080" + android:layout_marginLeft="60dp" + android:layout_marginTop="34dp" + android:layout_marginRight="61dp" + android:layout_gravity="top|right" + android:gravity="right"/> - + + + - \ No newline at end of file diff --git a/TMessagesProj/src/main/res/layout/chat_profile_change_name_layout.xml b/TMessagesProj/src/main/res/layout/chat_profile_change_name_layout.xml index 8e19219ee..81e5e34ea 100644 --- a/TMessagesProj/src/main/res/layout/chat_profile_change_name_layout.xml +++ b/TMessagesProj/src/main/res/layout/chat_profile_change_name_layout.xml @@ -5,14 +5,16 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - - + - + + diff --git a/TMessagesProj/src/main/res/layout/group_create_done_layout.xml b/TMessagesProj/src/main/res/layout/group_create_done_layout.xml index 0edcbfa9a..8c61137ce 100644 --- a/TMessagesProj/src/main/res/layout/group_create_done_layout.xml +++ b/TMessagesProj/src/main/res/layout/group_create_done_layout.xml @@ -1,7 +1,7 @@ @@ -19,6 +19,7 @@ android:paddingRight="16dp" android:paddingLeft="16dp" android:background="@drawable/bar_selector" - android:minHeight="60dp"/> + android:minHeight="60dp" + android:textAllCaps="true"/> \ No newline at end of file diff --git a/TMessagesProj/src/main/res/layout/group_create_final_layout.xml b/TMessagesProj/src/main/res/layout/group_create_final_layout.xml index 58cabae65..2970282e3 100644 --- a/TMessagesProj/src/main/res/layout/group_create_final_layout.xml +++ b/TMessagesProj/src/main/res/layout/group_create_final_layout.xml @@ -1,30 +1,35 @@ - + - + - + + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:src="@drawable/group_blue"/> + + - - + + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:id="@+id/listView" + android:clipToPadding="false" + android:fadingEdge="none" + android:fadingEdgeLength="0dp" + android:paddingLeft="16dp" + android:paddingRight="16dp" + android:dividerHeight="0dp" + android:divider="@null" + android:paddingBottom="16dp" + android:scrollbars="none"/> + diff --git a/TMessagesProj/src/main/res/layout/group_create_layout.xml b/TMessagesProj/src/main/res/layout/group_create_layout.xml index 3a3205816..763c3ea26 100644 --- a/TMessagesProj/src/main/res/layout/group_create_layout.xml +++ b/TMessagesProj/src/main/res/layout/group_create_layout.xml @@ -14,14 +14,13 @@ android:textSize="16dp" android:textColorHint="#a6a6a6" android:id="@+id/bubble_input_text" - android:paddingRight="60dp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:minHeight="52dp" android:gravity="left|center_vertical" - android:maxLines="3" + android:maxLines="2" android:paddingTop="3dp" android:layout_marginTop="0dp" android:inputType="textFilter|textNoSuggestions|textMultiLine" @@ -29,18 +28,6 @@ android:textCursorDrawable="@null" android:textColor="#000000"/> - - - + + android:layout_width="50dp" + android:layout_height="50dp" + android:id="@+id/messages_list_row_avatar" + android:contentDescription="" + android:layout_marginTop="8dp" + android:layout_gravity="top"/> + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/messages_list_row_name" + android:textSize="18dp" + android:layout_marginLeft="61dp" + android:ellipsize="end" + android:layout_marginTop="10dp" + android:maxLines="1" + android:textColor="#000000" + android:layout_marginRight="60dp" + android:layout_gravity="top"/> + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/messages_list_row_message" + android:textSize="15dp" + android:maxLines="1" + android:ellipsize="end" + android:textColor="#808080" + android:layout_marginLeft="61dp" + android:layout_marginTop="34dp" + android:layout_marginRight="60dp" + android:layout_gravity="top"/> - + + + - \ No newline at end of file