Update group chat creation interface

This commit is contained in:
DrKLO 2014-03-25 01:10:35 +04:00
parent 585ba77ea7
commit 9523311674
43 changed files with 289 additions and 323 deletions

View file

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

View file

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

View file

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

View file

@ -34,7 +34,6 @@ public class NativeLoader {
if (nativeLoaded) { if (nativeLoaded) {
return; return;
} }
nativeLoaded = true;
if (Build.VERSION.SDK_INT >= 9) { if (Build.VERSION.SDK_INT >= 9) {
try { try {
@ -57,6 +56,7 @@ public class NativeLoader {
libSize = sizes[3]; libSize = sizes[3];
} else { } else {
System.loadLibrary("tmessages"); System.loadLibrary("tmessages");
nativeLoaded = true;
Log.e("tmessages", "Unsupported arch: " + Build.CPU_ABI); Log.e("tmessages", "Unsupported arch: " + Build.CPU_ABI);
return; return;
} }
@ -66,6 +66,7 @@ public class NativeLoader {
Log.d("tmessages", "Load normal lib"); Log.d("tmessages", "Load normal lib");
try { try {
System.loadLibrary("tmessages"); System.loadLibrary("tmessages");
nativeLoaded = true;
return; return;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
@ -75,9 +76,14 @@ public class NativeLoader {
File destLocalFile = new File(context.getFilesDir().getAbsolutePath() + "/libtmessages.so"); File destLocalFile = new File(context.getFilesDir().getAbsolutePath() + "/libtmessages.so");
if (destLocalFile.exists()) { if (destLocalFile.exists()) {
if (destLocalFile.length() == libSize) { if (destLocalFile.length() == libSize) {
Log.d("tmessages", "Load local lib"); try {
System.load(destLocalFile.getAbsolutePath()); Log.d("tmessages", "Load local lib");
return; System.load(destLocalFile.getAbsolutePath());
nativeLoaded = true;
return;
} catch (Exception e) {
e.printStackTrace();
}
} else { } else {
destLocalFile.delete(); destLocalFile.delete();
} }
@ -105,6 +111,7 @@ public class NativeLoader {
out.close(); out.close();
System.load(destLocalFile.getAbsolutePath()); System.load(destLocalFile.getAbsolutePath());
nativeLoaded = true;
return; return;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
@ -130,5 +137,6 @@ public class NativeLoader {
} }
System.loadLibrary("tmessages"); System.loadLibrary("tmessages");
nativeLoaded = true;
} }
} }

View file

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

View file

@ -941,7 +941,7 @@ public class Utilities {
} else if (result.length() != 0 && lastName.length() != 0) { } else if (result.length() != 0 && lastName.length() != 0) {
result += " " + lastName; result += " " + lastName;
} }
return result; return result.trim();
} }
public static String formatFileSize(long size) { public static String formatFileSize(long size) {

View file

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

View file

@ -12,7 +12,6 @@ import android.content.Context;
import android.graphics.Canvas; import android.graphics.Canvas;
import android.graphics.Paint; import android.graphics.Paint;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.text.Html;
import android.text.Layout; import android.text.Layout;
import android.text.StaticLayout; import android.text.StaticLayout;
import android.text.TextPaint; import android.text.TextPaint;
@ -55,7 +54,6 @@ public class ChatOrUserCell extends BaseCell {
private TLRPC.FileLocation lastAvatar = null; private TLRPC.FileLocation lastAvatar = null;
public boolean usePadding = true; public boolean usePadding = true;
public boolean useBoldFont = false;
public boolean useSeparator = false; public boolean useSeparator = false;
public float drawAlpha = 1; public float drawAlpha = 1;
@ -294,39 +292,30 @@ public class ChatOrUserCell extends BaseCell {
if (currentName != null) { if (currentName != null) {
nameString = currentName; nameString = currentName;
} else { } else {
if (useBoldFont) { String nameString2 = "";
if (user != null) { if (chat != null) {
if (user.first_name.length() != 0 && user.last_name.length() != 0) { nameString2 = chat.title;
nameString = Html.fromHtml(user.first_name + " <b>" + user.last_name + "</b>"); } else if (user != null) {
} else if (user.first_name.length() != 0) { if (user.id / 1000 != 333 && ContactsController.getInstance().contactsDict.get(user.id) == null) {
nameString = Html.fromHtml("<b>" + user.first_name + "</b>"); if (ContactsController.getInstance().contactsDict.size() == 0 && ContactsController.getInstance().loadingContacts) {
} else {
nameString = Html.fromHtml("<b>" + user.last_name + "</b>");
}
}
} 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); 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 (nameString.length() == 0) {
if (user.phone != null && user.phone.length() != 0) {
nameString = PhoneFormat.getInstance().format("+" + user.phone);
}
nameString = LocaleController.getString("HiddenName", R.string.HiddenName); nameString = LocaleController.getString("HiddenName", R.string.HiddenName);
} }
if (encryptedChat != null) { if (encryptedChat != null) {

View file

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

View file

@ -18,7 +18,6 @@ import android.os.Bundle;
import android.support.v4.internal.view.SupportMenuItem; import android.support.v4.internal.view.SupportMenuItem;
import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBar;
import android.text.Editable; import android.text.Editable;
import android.text.Html;
import android.text.Spannable; import android.text.Spannable;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.SpannableStringBuilder; import android.text.SpannableStringBuilder;
@ -35,6 +34,7 @@ import android.widget.EditText;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import org.telegram.PhoneFormat.PhoneFormat;
import org.telegram.messenger.LocaleController; import org.telegram.messenger.LocaleController;
import org.telegram.messenger.TLRPC; import org.telegram.messenger.TLRPC;
import org.telegram.messenger.ConnectionsManager; import org.telegram.messenger.ConnectionsManager;
@ -60,9 +60,7 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
private SectionedBaseAdapter listViewAdapter; private SectionedBaseAdapter listViewAdapter;
private PinnedHeaderListView listView; private PinnedHeaderListView listView;
private TextView epmtyTextView; private TextView epmtyTextView;
private TextView doneTextView;
private EditText userSelectEditText; private EditText userSelectEditText;
private TextView countTextView;
private boolean ignoreChange = false; private boolean ignoreChange = false;
private HashMap<Integer, Emoji.XImageSpan> selectedContacts = new HashMap<Integer, Emoji.XImageSpan>(); private HashMap<Integer, Emoji.XImageSpan> selectedContacts = new HashMap<Integer, Emoji.XImageSpan>();
@ -117,7 +115,6 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
epmtyTextView.setText(LocaleController.getString("NoContacts", R.string.NoContacts)); epmtyTextView.setText(LocaleController.getString("NoContacts", R.string.NoContacts));
userSelectEditText = (EditText)fragmentView.findViewById(R.id.bubble_input_text); userSelectEditText = (EditText)fragmentView.findViewById(R.id.bubble_input_text);
userSelectEditText.setHint(LocaleController.getString("SendMessageTo", R.string.SendMessageTo)); userSelectEditText.setHint(LocaleController.getString("SendMessageTo", R.string.SendMessageTo));
countTextView = (TextView)fragmentView.findViewById(R.id.bubble_counter_text);
if (Build.VERSION.SDK_INT >= 11) { if (Build.VERSION.SDK_INT >= 11) {
userSelectEditText.setTextIsSelectable(false); userSelectEditText.setTextIsSelectable(false);
} }
@ -159,12 +156,10 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
selectedContacts.remove(sp.uid); selectedContacts.remove(sp.uid);
} }
} }
if (selectedContacts.isEmpty()) { if (parentActivity != null) {
doneTextView.setText(LocaleController.getString("Done", R.string.Done)); ActionBar actionBar = parentActivity.getSupportActionBar();
} else { actionBar.setSubtitle(String.format("%d/200 %s", selectedContacts.size(), LocaleController.getString("Members", R.string.Members)));
doneTextView.setText(LocaleController.getString("Done", R.string.Done) + " (" + selectedContacts.size() + ")");
} }
countTextView.setText(selectedContacts.size() + "/200");
listView.invalidateViews(); listView.invalidateViews();
} else { } else {
search = true; search = true;
@ -230,12 +225,10 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
span.uid = user.id; span.uid = user.id;
ignoreChange = false; ignoreChange = false;
} }
if (selectedContacts.isEmpty()) { if (parentActivity != null) {
doneTextView.setText(LocaleController.getString("Done", R.string.Done)); ActionBar actionBar = parentActivity.getSupportActionBar();
} else { actionBar.setSubtitle(String.format("%d/200 %s", selectedContacts.size(), LocaleController.getString("Members", R.string.Members)));
doneTextView.setText(LocaleController.getString("Done", R.string.Done) + " (" + selectedContacts.size() + ")");
} }
countTextView.setText(selectedContacts.size() + "/200");
if (searching || searchWas) { if (searching || searchWas) {
searching = false; searching = false;
searchWas = false; searchWas = false;
@ -279,6 +272,7 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
actionBar.setDisplayShowCustomEnabled(false); actionBar.setDisplayShowCustomEnabled(false);
actionBar.setCustomView(null); actionBar.setCustomView(null);
actionBar.setTitle(LocaleController.getString("NewGroup", R.string.NewGroup)); actionBar.setTitle(LocaleController.getString("NewGroup", R.string.NewGroup));
actionBar.setSubtitle(String.format("%d/200 %s", selectedContacts.size(), LocaleController.getString("Members", R.string.Members)));
TextView title = (TextView)parentActivity.findViewById(R.id.action_bar_title); TextView title = (TextView)parentActivity.findViewById(R.id.action_bar_title);
if (title == null) { if (title == null) {
@ -305,7 +299,11 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
LayoutInflater lf = (LayoutInflater)parentActivity.getSystemService(Activity.LAYOUT_INFLATER_SERVICE); LayoutInflater lf = (LayoutInflater)parentActivity.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
View textView = lf.inflate(R.layout.group_create_bubble, null); View textView = lf.inflate(R.layout.group_create_bubble, null);
TextView text = (TextView)textView.findViewById(R.id.bubble_text_view); TextView text = (TextView)textView.findViewById(R.id.bubble_text_view);
text.setText(Utilities.formatName(user.first_name, user.last_name)); String name = Utilities.formatName(user.first_name, user.last_name);
if (name.length() == 0 && user.phone != null && user.phone.length() != 0) {
name = PhoneFormat.getInstance().format("+" + user.phone);
}
text.setText(name + ", ");
int spec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED); int spec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
textView.measure(spec, spec); textView.measure(spec, spec);
@ -425,8 +423,8 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
inflater.inflate(R.menu.group_create_menu, menu); inflater.inflate(R.menu.group_create_menu, menu);
SupportMenuItem doneItem = (SupportMenuItem)menu.findItem(R.id.done_menu_item); SupportMenuItem doneItem = (SupportMenuItem)menu.findItem(R.id.done_menu_item);
doneTextView = (TextView)doneItem.getActionView().findViewById(R.id.done_button); TextView doneTextView = (TextView)doneItem.getActionView().findViewById(R.id.done_button);
doneTextView.setText(LocaleController.getString("Done", R.string.Done)); doneTextView.setText(LocaleController.getString("Next", R.string.Next));
doneTextView.setOnClickListener(new View.OnClickListener() { doneTextView.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
@ -525,9 +523,9 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
ImageView checkButton = (ImageView)convertView.findViewById(R.id.settings_row_check_button); ImageView checkButton = (ImageView)convertView.findViewById(R.id.settings_row_check_button);
if (selectedContacts.containsKey(user.id)) { if (selectedContacts.containsKey(user.id)) {
checkButton.setImageResource(R.drawable.btn_check_on_old); checkButton.setImageResource(R.drawable.btn_check_on_holo_light);
} else { } else {
checkButton.setImageResource(R.drawable.btn_check_off_old); checkButton.setImageResource(R.drawable.btn_check_off_holo_light);
} }
View divider = convertView.findViewById(R.id.settings_row_divider); View divider = convertView.findViewById(R.id.settings_row_divider);
@ -540,13 +538,15 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
if (searchWas && searching) { if (searchWas && searching) {
holder.nameTextView.setText(searchResultNames.get(position)); holder.nameTextView.setText(searchResultNames.get(position));
} else { } else {
if (user.first_name.length() != 0 && user.last_name.length() != 0) { String name = Utilities.formatName(user.first_name, user.last_name);
holder.nameTextView.setText(Html.fromHtml(user.first_name + " <b>" + user.last_name + "</b>")); if (name.length() == 0) {
} else if (user.first_name.length() != 0) { if (user.phone != null && user.phone.length() != 0) {
holder.nameTextView.setText(Html.fromHtml("<b>" + user.first_name + "</b>")); name = PhoneFormat.getInstance().format("+" + user.phone);
} else { } else {
holder.nameTextView.setText(Html.fromHtml("<b>" + user.last_name + "</b>")); name = LocaleController.getString("HiddenName", R.string.HiddenName);
}
} }
holder.nameTextView.setText(name);
} }
TLRPC.FileLocation photo = null; TLRPC.FileLocation photo = null;

View file

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

View file

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

View file

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

View file

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 B

View file

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

View file

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

View file

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

View file

@ -1,30 +1,35 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout
android:layout_width="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent" android:layout_width="fill_parent"
android:orientation="vertical"> android:layout_height="fill_parent"
android:orientation="vertical">
<FrameLayout android:layout_width="fill_parent" <FrameLayout
android:layout_height="wrap_content" android:layout_width="fill_parent"
android:id="@+id/top_layout" android:layout_height="wrap_content"
android:layout_gravity="top"> android:id="@+id/top_layout"
android:layout_gravity="top">
<FrameLayout android:layout_width="64dp" <FrameLayout
android:layout_height="64dp" android:layout_width="64dp"
android:layout_marginTop="12dp" android:layout_height="64dp"
android:layout_marginBottom="12dp" android:layout_marginTop="12dp"
android:layout_marginRight="16dp" android:layout_marginBottom="12dp"
android:layout_gravity="top|right"> android:layout_marginRight="16dp"
android:layout_gravity="top|right">
<org.telegram.ui.Views.BackupImageView <org.telegram.ui.Views.BackupImageView
android:id="@+id/settings_avatar_image" android:id="@+id/settings_avatar_image"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:src="@drawable/group_blue"/> android:src="@drawable/group_blue"/>
<ImageButton
android:id="@+id/settings_change_avatar_button"
android:background="@drawable/photo_spinner"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
<ImageButton android:id="@+id/settings_change_avatar_button"
android:background="@drawable/photo_spinner"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</FrameLayout> </FrameLayout>
<EditText <EditText
@ -47,22 +52,24 @@
</FrameLayout> </FrameLayout>
<FrameLayout android:layout_width="match_parent" <FrameLayout
android:layout_height="match_parent"> android:layout_width="match_parent"
android:layout_height="match_parent">
<org.telegram.ui.Views.PinnedHeaderListView <org.telegram.ui.Views.PinnedHeaderListView
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:id="@+id/listView" android:id="@+id/listView"
android:clipToPadding="false" android:clipToPadding="false"
android:fadingEdge="none" android:fadingEdge="none"
android:fadingEdgeLength="0dp" android:fadingEdgeLength="0dp"
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:paddingRight="16dp" android:paddingRight="16dp"
android:dividerHeight="0dp" android:dividerHeight="0dp"
android:divider="@null" android:divider="@null"
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:scrollbars="none"/> android:scrollbars="none"/>
</FrameLayout> </FrameLayout>
</LinearLayout> </LinearLayout>

View file

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

View file

@ -1,57 +1,61 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout
android:layout_width="match_parent" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="66dp" android:layout_width="match_parent"
android:layout_gravity="top"> android:layout_height="66dp"
android:layout_gravity="top">
<org.telegram.ui.Views.BackupImageView <org.telegram.ui.Views.BackupImageView
android:layout_width="50dp" android:layout_width="50dp"
android:layout_height="50dp" android:layout_height="50dp"
android:id="@+id/messages_list_row_avatar" android:id="@+id/messages_list_row_avatar"
android:contentDescription="" android:contentDescription=""
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_gravity="top|right"/> android:layout_gravity="top|right"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/messages_list_row_name" android:id="@+id/messages_list_row_name"
android:textSize="18dp" android:textSize="18dp"
android:layout_marginRight="61dp" android:layout_marginRight="61dp"
android:ellipsize="end" android:ellipsize="end"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:textColor="#000000" android:textColor="#000000"
android:maxLines="1" android:maxLines="1"
android:layout_marginLeft="60dp" android:layout_marginLeft="60dp"
android:layout_gravity="top|right" android:layout_gravity="top|right"
android:gravity="right"/> android:gravity="right"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/messages_list_row_message" android:id="@+id/messages_list_row_message"
android:textSize="15dp" android:textSize="15dp"
android:maxLines="1" android:maxLines="1"
android:ellipsize="end" android:ellipsize="end"
android:textColor="#808080" android:textColor="#808080"
android:layout_marginLeft="60dp" android:layout_marginLeft="60dp"
android:layout_marginTop="34dp" android:layout_marginTop="34dp"
android:layout_marginRight="61dp" android:layout_marginRight="61dp"
android:layout_gravity="top|right" android:layout_gravity="top|right"
android:gravity="right"/> android:gravity="right"/>
<ImageView android:layout_gravity="center_vertical|left" <ImageView
android:id="@+id/settings_row_check_button" android:layout_gravity="center_vertical|left"
android:layout_width="wrap_content" android:id="@+id/settings_row_check_button"
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:layout_marginLeft="14dp" android:layout_height="wrap_content"
android:src="@drawable/btn_check_off_old"/> android:layout_marginLeft="14dp"
android:src="@drawable/btn_check_off_holo_light"/>
<View
android:background="@color/divider"
android:layout_width="fill_parent"
android:layout_height="1px"
android:layout_gravity="bottom"
android:id="@+id/settings_row_divider"
android:visibility="gone"/>
<View android:background="@color/divider"
android:layout_width="fill_parent"
android:layout_height="1px"
android:layout_gravity="bottom"
android:id="@+id/settings_row_divider"
android:visibility="gone"/>
</FrameLayout> </FrameLayout>

View file

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

View file

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

View file

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

View file

@ -1,30 +1,35 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout
android:layout_width="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent" android:layout_width="fill_parent"
android:orientation="vertical"> android:layout_height="fill_parent"
android:orientation="vertical">
<FrameLayout android:layout_width="fill_parent" <FrameLayout
android:layout_height="wrap_content" android:layout_width="fill_parent"
android:id="@+id/top_layout" android:layout_height="wrap_content"
android:layout_gravity="top"> android:id="@+id/top_layout"
android:layout_gravity="top">
<FrameLayout android:layout_width="64dp" <FrameLayout
android:layout_height="64dp" android:layout_width="64dp"
android:layout_marginTop="12dp" android:layout_height="64dp"
android:layout_marginBottom="12dp" android:layout_marginTop="12dp"
android:layout_marginLeft="16dp" android:layout_marginBottom="12dp"
android:layout_gravity="top"> android:layout_marginLeft="16dp"
android:layout_gravity="top">
<org.telegram.ui.Views.BackupImageView <org.telegram.ui.Views.BackupImageView
android:id="@+id/settings_avatar_image" android:id="@+id/settings_avatar_image"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:src="@drawable/group_blue"/> android:src="@drawable/group_blue"/>
<ImageButton
android:id="@+id/settings_change_avatar_button"
android:background="@drawable/photo_spinner"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
<ImageButton android:id="@+id/settings_change_avatar_button"
android:background="@drawable/photo_spinner"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</FrameLayout> </FrameLayout>
<EditText <EditText
@ -48,22 +53,24 @@
</FrameLayout> </FrameLayout>
<FrameLayout android:layout_width="match_parent" <FrameLayout
android:layout_height="match_parent"> android:layout_width="match_parent"
android:layout_height="match_parent">
<org.telegram.ui.Views.PinnedHeaderListView <org.telegram.ui.Views.PinnedHeaderListView
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:id="@+id/listView" android:id="@+id/listView"
android:clipToPadding="false" android:clipToPadding="false"
android:fadingEdge="none" android:fadingEdge="none"
android:fadingEdgeLength="0dp" android:fadingEdgeLength="0dp"
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:paddingRight="16dp" android:paddingRight="16dp"
android:dividerHeight="0dp" android:dividerHeight="0dp"
android:divider="@null" android:divider="@null"
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:scrollbars="none"/> android:scrollbars="none"/>
</FrameLayout> </FrameLayout>
</LinearLayout> </LinearLayout>

View file

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

View file

@ -1,55 +1,59 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout
android:layout_width="match_parent" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="66dp" android:layout_width="match_parent"
android:layout_gravity="top"> android:layout_height="66dp"
android:layout_gravity="top">
<org.telegram.ui.Views.BackupImageView <org.telegram.ui.Views.BackupImageView
android:layout_width="50dp" android:layout_width="50dp"
android:layout_height="50dp" android:layout_height="50dp"
android:id="@+id/messages_list_row_avatar" android:id="@+id/messages_list_row_avatar"
android:contentDescription="" android:contentDescription=""
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_gravity="top"/> android:layout_gravity="top"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/messages_list_row_name" android:id="@+id/messages_list_row_name"
android:textSize="18dp" android:textSize="18dp"
android:layout_marginLeft="61dp" android:layout_marginLeft="61dp"
android:ellipsize="end" android:ellipsize="end"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:maxLines="1" android:maxLines="1"
android:textColor="#000000" android:textColor="#000000"
android:layout_marginRight="60dp" android:layout_marginRight="60dp"
android:layout_gravity="top"/> android:layout_gravity="top"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/messages_list_row_message" android:id="@+id/messages_list_row_message"
android:textSize="15dp" android:textSize="15dp"
android:maxLines="1" android:maxLines="1"
android:ellipsize="end" android:ellipsize="end"
android:textColor="#808080" android:textColor="#808080"
android:layout_marginLeft="61dp" android:layout_marginLeft="61dp"
android:layout_marginTop="34dp" android:layout_marginTop="34dp"
android:layout_marginRight="60dp" android:layout_marginRight="60dp"
android:layout_gravity="top"/> android:layout_gravity="top"/>
<ImageView android:layout_gravity="center_vertical|right" <ImageView
android:id="@+id/settings_row_check_button" android:layout_gravity="center_vertical|right"
android:layout_width="wrap_content" android:id="@+id/settings_row_check_button"
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:layout_marginRight="14dp" android:layout_height="wrap_content"
android:src="@drawable/btn_check_off_old"/> android:layout_marginRight="14dp"
android:src="@drawable/btn_check_off_holo_light"/>
<View
android:background="@color/divider"
android:layout_width="fill_parent"
android:layout_height="1px"
android:layout_gravity="bottom"
android:id="@+id/settings_row_divider"
android:visibility="gone"/>
<View android:background="@color/divider"
android:layout_width="fill_parent"
android:layout_height="1px"
android:layout_gravity="bottom"
android:id="@+id/settings_row_divider"
android:visibility="gone"/>
</FrameLayout> </FrameLayout>