Commit ea0b86d0 authored by DrKLO's avatar DrKLO

More Android L design

parent 4104a21f
......@@ -225,11 +225,13 @@ public class ImageReceiver {
if (bitmapDrawable != null) {
if (bitmapShader != null) {
drawRegion.set(imageX, imageY, imageX + imageW, imageY + imageH);
if (isVisible) {
roundRect.set(drawRegion);
shaderMatrix.reset();
shaderMatrix.setRectToRect(bitmapRect, roundRect, Matrix.ScaleToFit.FILL);
bitmapShader.setLocalMatrix(shaderMatrix);
canvas.drawRoundRect(roundRect, roundRadius, roundRadius, roundPaint);
}
} else {
int bitmapW = bitmapDrawable.getIntrinsicWidth();
int bitmapH = bitmapDrawable.getIntrinsicHeight();
......@@ -412,10 +414,12 @@ public class ImageReceiver {
public void setRoundRadius(int value) {
roundRadius = value;
if (roundRadius != 0) {
if (roundPaint == null) {
roundPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
roundRect = new RectF();
shaderMatrix = new Matrix();
bitmapRect = new RectF();
}
} else {
roundPaint = null;
roundRect = null;
......
......@@ -18,6 +18,7 @@ import org.telegram.messenger.TLRPC;
import org.telegram.android.ContactsController;
import org.telegram.android.MessagesController;
import org.telegram.messenger.R;
import org.telegram.ui.AnimationCompat.ViewProxy;
import org.telegram.ui.Cells.DividerCell;
import org.telegram.ui.Cells.GreySectionCell;
import org.telegram.ui.Cells.LetterSectionCell;
......@@ -28,6 +29,7 @@ import java.util.ArrayList;
import java.util.HashMap;
public class ContactsActivityAdapter extends BaseSectionsAdapter {
private Context mContext;
private boolean onlyUsers;
private boolean needPhonebook;
......@@ -203,18 +205,18 @@ public class ContactsActivityAdapter extends BaseSectionsAdapter {
}
} else if (type == 0) {
if (convertView == null) {
convertView = new UserCell(mContext);
convertView.setPadding(AndroidUtilities.dp(LocaleController.isRTL ? 16 : 54), 0, 0, 0);
convertView = new UserCell(mContext, 58);
((UserCell) convertView).setStatusColors(0xffa8a8a8, 0xff3b84c0);
}
ArrayList<TLRPC.TL_contact> arr = ContactsController.getInstance().usersSectionsDict.get(ContactsController.getInstance().sortedUsersSectionsArray.get(section - (onlyUsers ? 0 : 1)));
TLRPC.User user = MessagesController.getInstance().getUser(arr.get(position).user_id);
((UserCell)convertView).setData(user, null, null);
((UserCell)convertView).setData(user, null, null, 0);
if (ignoreUsers != null) {
if (ignoreUsers.containsKey(user.id)) {
((UserCell)convertView).drawAlpha = 0.5f;
ViewProxy.setAlpha(convertView, 0.5f);
} else {
((UserCell)convertView).drawAlpha = 1.0f;
ViewProxy.setAlpha(convertView, 1.0f);
}
}
}
......
......@@ -702,8 +702,6 @@ public class DialogCell extends BaseCell {
canvas.restore();
}
avatarImage.draw(canvas);
if (useSeparator) {
if (LocaleController.isRTL) {
canvas.drawLine(0, getMeasuredHeight() - 1, getMeasuredWidth() - AndroidUtilities.dp(72), getMeasuredHeight() - 1, linePaint);
......@@ -711,5 +709,7 @@ public class DialogCell extends BaseCell {
canvas.drawLine(AndroidUtilities.dp(72), getMeasuredHeight() - 1, getMeasuredWidth(), getMeasuredHeight() - 1, linePaint);
}
}
avatarImage.draw(canvas);
}
}
......@@ -17,11 +17,19 @@ public class EmptyCell extends FrameLayout {
int cellHeight;
public EmptyCell(Context context) {
this(context, 8);
}
public EmptyCell(Context context, int height) {
super(context);
cellHeight = height;
}
public void setHeight(int height) {
cellHeight = height;
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(cellHeight), MeasureSpec.EXACTLY));
......
......@@ -10,6 +10,7 @@ package org.telegram.ui.Cells;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
import android.util.TypedValue;
import android.view.Gravity;
import android.widget.FrameLayout;
......@@ -35,6 +36,7 @@ public class TextCell extends FrameLayout {
textView.setLines(1);
textView.setMaxLines(1);
textView.setSingleLine(true);
textView.setEllipsize(TextUtils.TruncateAt.END);
textView.setGravity((LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.CENTER_VERTICAL);
addView(textView);
LayoutParams layoutParams = (LayoutParams) textView.getLayoutParams();
......
......@@ -25,6 +25,7 @@ public class TextDetailSettingsCell extends FrameLayout {
private TextView valueTextView;
private static Paint paint;
private boolean needDivider;
private boolean multiline;
public TextDetailSettingsCell(Context context) {
super(context);
......@@ -73,7 +74,7 @@ public class TextDetailSettingsCell extends FrameLayout {
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
if (valueTextView.getMaxLines() == 1) {
if (!multiline) {
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(64) + (needDivider ? 1 : 0), MeasureSpec.EXACTLY));
} else {
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
......@@ -81,6 +82,7 @@ public class TextDetailSettingsCell extends FrameLayout {
}
public void setMultilineDetail(boolean value) {
multiline = value;
if (value) {
valueTextView.setLines(0);
valueTextView.setMaxLines(0);
......
......@@ -570,7 +570,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
}
Bundle args = new Bundle();
args.putInt("chat_id", currentChat.id);
ChatProfileActivity fragment = new ChatProfileActivity(args);
ProfileActivity fragment = new ProfileActivity(args);
fragment.setChatInfo(info);
presentFragment(fragment);
}
......@@ -1196,9 +1196,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
checkAndUpdateAvatar();
}
private void updateOnlineCount() {
private int updateOnlineCount() {
if (info == null) {
return;
return 0;
}
onlineCount = 0;
int currentTime = ConnectionsManager.getInstance().getCurrentTime();
......@@ -1208,6 +1208,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
onlineCount++;
}
}
return onlineCount;
}
private int getMessageType(MessageObject messageObject) {
......@@ -1865,15 +1866,15 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
updateTitle();
}
boolean updateSubtitle = false;
if ((updateMask & MessagesController.UPDATE_MASK_CHAT_MEMBERS) != 0) {
if ((updateMask & MessagesController.UPDATE_MASK_CHAT_MEMBERS) != 0 || (updateMask & MessagesController.UPDATE_MASK_STATUS) != 0) {
if (currentChat != null) {
int lastCount = onlineCount;
if (lastCount != updateOnlineCount()) {
updateSubtitle = true;
updateOnlineCount();
}
if ((updateMask & MessagesController.UPDATE_MASK_STATUS) != 0) {
} else {
updateSubtitle = true;
}
if (updateSubtitle) {
updateSubtitle();
}
if ((updateMask & MessagesController.UPDATE_MASK_AVATAR) != 0 || (updateMask & MessagesController.UPDATE_MASK_CHAT_AVATAR) != 0 || (updateMask & MessagesController.UPDATE_MASK_NAME) != 0) {
checkAndUpdateAvatar();
......@@ -1882,9 +1883,12 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
if ((updateMask & MessagesController.UPDATE_MASK_USER_PRINT) != 0) {
CharSequence printString = MessagesController.getInstance().printingStrings.get(dialog_id);
if (lastPrintString != null && printString == null || lastPrintString == null && printString != null || lastPrintString != null && printString != null && !lastPrintString.equals(printString)) {
updateSubtitle();
updateSubtitle = true;
}
}
if (updateSubtitle) {
updateSubtitle();
}
if ((updateMask & MessagesController.UPDATE_MASK_USER_PHONE) != 0) {
updateContactStatus();
}
......
......@@ -119,11 +119,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
actionBar.setBackButtonImage(R.drawable.ic_ab_back);
actionBar.setBackOverlay(R.layout.updating_state_layout);
if (destroyAfterSelect) {
actionBar.setTitle(LocaleController.getString("SelectContact", R.string.SelectContact));
} else {
actionBar.setTitle(LocaleController.getString("Contacts", R.string.Contacts));
}
actionBar.setTitle(destroyAfterSelect ? LocaleController.getString("SelectContact", R.string.SelectContact) : LocaleController.getString("Contacts", R.string.Contacts));
actionBar.setActionBarMenuOnItemClick(new ActionBar.ActionBarMenuOnItemClick() {
@Override
......
......@@ -389,14 +389,10 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
@Override
public View getItemView(int section, int position, View convertView, ViewGroup parent) {
TLRPC.User user = MessagesController.getInstance().getUser(selectedContacts.get(position));
if (convertView == null) {
convertView = new UserCell(mContext);
convertView = new UserCell(mContext, 1);
}
((UserCell)convertView).setData(user, null, null);
((UserCell) convertView).useSeparator = position != selectedContacts.size() - 1;
((UserCell) convertView).setData(user, null, null, 0);
return convertView;
}
......
......@@ -355,7 +355,7 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
}
} else if (fragmentName.equals("chat_profile")) {
if (args != null) {
ChatProfileActivity profile = new ChatProfileActivity(args);
ProfileActivity profile = new ProfileActivity(args);
if (actionBarLayout.addFragmentToStack(profile)) {
profile.restoreSelfArgs(savedInstanceState);
}
......@@ -1009,7 +1009,7 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
outState.putString("fragment", "group");
} else if (lastFragment instanceof SettingsWallpapersActivity) {
outState.putString("fragment", "wallpapers");
} else if (lastFragment instanceof ChatProfileActivity && args != null) {
} else if (lastFragment instanceof ProfileActivity && ((ProfileActivity) lastFragment).isChat() && args != null) {
outState.putBundle("args", args);
outState.putString("fragment", "chat_profile");
}
......
......@@ -11,13 +11,17 @@ package org.telegram.ui;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Build;
import android.os.Bundle;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.FrameLayout;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.TextView;
import org.telegram.PhoneFormat.PhoneFormat;
......@@ -27,6 +31,7 @@ import org.telegram.android.MessagesController;
import org.telegram.android.NotificationCenter;
import org.telegram.messenger.R;
import org.telegram.ui.Adapters.BaseFragmentAdapter;
import org.telegram.ui.Cells.TextInfoCell;
import org.telegram.ui.Cells.UserCell;
import org.telegram.ui.Views.ActionBar.ActionBar;
import org.telegram.ui.Views.ActionBar.ActionBarMenu;
......@@ -35,8 +40,8 @@ import org.telegram.ui.Views.ActionBar.BaseFragment;
public class SettingsBlockedUsersActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate, ContactsActivity.ContactsActivityDelegate {
private ListView listView;
private ListAdapter listViewAdapter;
private View progressView;
private TextView emptyView;
private FrameLayout progressView;
private TextView emptyTextView;
private int selectedUserId;
private final static int block_user = 1;
......@@ -83,27 +88,58 @@ public class SettingsBlockedUsersActivity extends BaseFragment implements Notifi
ActionBarMenu menu = actionBar.createMenu();
menu.addItem(block_user, R.drawable.plus);
fragmentView = inflater.inflate(R.layout.settings_blocked_users_layout, container, false);
listViewAdapter = new ListAdapter(getParentActivity());
listView = (ListView)fragmentView.findViewById(R.id.listView);
progressView = fragmentView.findViewById(R.id.progressLayout);
emptyView = (TextView)fragmentView.findViewById(R.id.searchEmptyView);
emptyView.setOnTouchListener(new View.OnTouchListener() {
fragmentView = new FrameLayout(getParentActivity());
FrameLayout frameLayout = (FrameLayout) fragmentView;
emptyTextView = new TextView(getParentActivity());
emptyTextView.setTextColor(0xff808080);
emptyTextView.setTextSize(24);
emptyTextView.setGravity(Gravity.CENTER);
emptyTextView.setVisibility(View.INVISIBLE);
emptyTextView.setText(LocaleController.getString("NoBlocked", R.string.NoBlocked));
frameLayout.addView(emptyTextView);
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) emptyTextView.getLayoutParams();
layoutParams.width = FrameLayout.LayoutParams.MATCH_PARENT;
layoutParams.height = FrameLayout.LayoutParams.MATCH_PARENT;
layoutParams.gravity = Gravity.TOP;
emptyTextView.setLayoutParams(layoutParams);
emptyTextView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
return true;
}
});
emptyView.setText(LocaleController.getString("NoBlocked", R.string.NoBlocked));
if (MessagesController.getInstance().loadingBlockedUsers) {
progressView.setVisibility(View.VISIBLE);
emptyView.setVisibility(View.GONE);
listView.setEmptyView(null);
} else {
progressView.setVisibility(View.GONE);
listView.setEmptyView(emptyView);
}
listView.setAdapter(listViewAdapter);
progressView = new FrameLayout(getParentActivity());
frameLayout.addView(progressView);
layoutParams = (FrameLayout.LayoutParams) progressView.getLayoutParams();
layoutParams.width = FrameLayout.LayoutParams.MATCH_PARENT;
layoutParams.height = FrameLayout.LayoutParams.MATCH_PARENT;
progressView.setLayoutParams(layoutParams);
ProgressBar progressBar = new ProgressBar(getParentActivity());
progressView.addView(progressBar);
layoutParams = (FrameLayout.LayoutParams) progressView.getLayoutParams();
layoutParams.width = FrameLayout.LayoutParams.WRAP_CONTENT;
layoutParams.height = FrameLayout.LayoutParams.WRAP_CONTENT;
layoutParams.gravity = Gravity.CENTER;
progressView.setLayoutParams(layoutParams);
listView = new ListView(getParentActivity());
listView.setEmptyView(emptyTextView);
listView.setVerticalScrollBarEnabled(false);
listView.setDivider(null);
listView.setDividerHeight(0);
listView.setAdapter(listViewAdapter = new ListAdapter(getParentActivity()));
if (Build.VERSION.SDK_INT >= 11) {
listView.setVerticalScrollbarPosition(LocaleController.isRTL ? ListView.SCROLLBAR_POSITION_LEFT : ListView.SCROLLBAR_POSITION_RIGHT);
}
frameLayout.addView(listView);
layoutParams = (FrameLayout.LayoutParams) listView.getLayoutParams();
layoutParams.width = FrameLayout.LayoutParams.MATCH_PARENT;
layoutParams.height = FrameLayout.LayoutParams.MATCH_PARENT;
listView.setLayoutParams(layoutParams);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
......@@ -140,6 +176,15 @@ public class SettingsBlockedUsersActivity extends BaseFragment implements Notifi
return true;
}
});
if (MessagesController.getInstance().loadingBlockedUsers) {
progressView.setVisibility(View.VISIBLE);
emptyTextView.setVisibility(View.GONE);
listView.setEmptyView(null);
} else {
progressView.setVisibility(View.GONE);
listView.setEmptyView(emptyTextView);
}
} else {
ViewGroup parent = (ViewGroup)fragmentView.getParent();
if (parent != null) {
......@@ -161,7 +206,7 @@ public class SettingsBlockedUsersActivity extends BaseFragment implements Notifi
progressView.setVisibility(View.GONE);
}
if (listView != null && listView.getEmptyView() == null) {
listView.setEmptyView(emptyView);
listView.setEmptyView(emptyTextView);
}
if (listViewAdapter != null) {
listViewAdapter.notifyDataSetChanged();
......@@ -243,17 +288,14 @@ public class SettingsBlockedUsersActivity extends BaseFragment implements Notifi
int type = getItemViewType(i);
if (type == 0) {
if (view == null) {
view = new UserCell(mContext);
((UserCell)view).useSeparator = true;
view = new UserCell(mContext, 1);
}
TLRPC.User user = MessagesController.getInstance().getUser(MessagesController.getInstance().blockedUsers.get(i));
((UserCell)view).setData(user, null, user.phone != null && user.phone.length() != 0 ? PhoneFormat.getInstance().format("+" + user.phone) : LocaleController.getString("NumberUnknown", R.string.NumberUnknown));
((UserCell)view).setData(user, null, user.phone != null && user.phone.length() != 0 ? PhoneFormat.getInstance().format("+" + user.phone) : LocaleController.getString("NumberUnknown", R.string.NumberUnknown), 0);
} else if (type == 1) {
if (view == null) {
LayoutInflater li = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = li.inflate(R.layout.settings_unblock_info_row_layout, viewGroup, false);
TextView textView = (TextView)view.findViewById(R.id.info_text_view);
textView.setText(LocaleController.getString("UnblockText", R.string.UnblockText));
view = new TextInfoCell(mContext);
((TextInfoCell) view).setText(LocaleController.getString("UnblockText", R.string.UnblockText));
}
}
return view;
......
......@@ -452,8 +452,15 @@ public class ActionBar extends FrameLayout {
positionBackOverlay(getMeasuredWidth(), getMeasuredHeight());
}
public void setExtraHeight(int value) {
public void setExtraHeight(int value, boolean layout) {
extraHeight = value;
if (layout) {
requestLayout();
}
}
public int getExtraHeight() {
return extraHeight;
}
private void positionBackOverlay(int widthMeasureSpec, int heightMeasureSpec) {
......
......@@ -31,7 +31,6 @@ import android.widget.TextView;
import org.telegram.android.AndroidUtilities;
import org.telegram.android.LocaleController;
import org.telegram.messenger.FileLog;
import org.telegram.messenger.R;
import java.lang.reflect.Field;
......@@ -186,7 +185,7 @@ public class ActionBarMenuItem extends ImageView {
if (LocaleController.isRTL) {
layoutParams.gravity = Gravity.RIGHT;
}
layoutParams.width = LinearLayout.LayoutParams.WRAP_CONTENT;
layoutParams.width = LinearLayout.LayoutParams.MATCH_PARENT;
layoutParams.height = AndroidUtilities.dp(48);
textView.setLayoutParams(layoutParams);
textView.setOnClickListener(new OnClickListener() {
......@@ -389,7 +388,6 @@ public class ActionBarMenuItem extends ImageView {
if (popupWindow != null && popupWindow.isShowing()) {
int x = parentMenu.parentActionBar.getMeasuredWidth() - popupLayout.getMeasuredWidth() - getLeft() - parentMenu.getLeft();
int y = -getMeasuredHeight();
FileLog.e("tmessages", "x = " + x + " y = " + y);
popupWindow.update(this, parentMenu.parentActionBar.getMeasuredWidth() - popupLayout.getMeasuredWidth() - getLeft() - parentMenu.getLeft(), -getMeasuredHeight(), -1, -1);
}
}
......
......@@ -21,6 +21,7 @@ import org.telegram.android.AndroidUtilities;
import org.telegram.messenger.FileLog;
import org.telegram.messenger.R;
import org.telegram.messenger.TLRPC;
import org.telegram.ui.ApplicationLoader;
public class AvatarDrawable extends Drawable {
......@@ -33,11 +34,14 @@ public class AvatarDrawable extends Drawable {
private static int[] arrColorsButtons = {R.drawable.bar_selector_red, R.drawable.bar_selector_orange, R.drawable.bar_selector_yellow,
R.drawable.bar_selector_green, R.drawable.bar_selector_cyan, R.drawable.bar_selector_blue, R.drawable.bar_selector_violet, R.drawable.bar_selector_pink};
private static Drawable broadcastDrawable;
private int color;
private StaticLayout textLayout;
private float textWidth;
private float textHeight;
private boolean isProfile;
private boolean drawBrodcast;
public AvatarDrawable() {
super();
......@@ -46,6 +50,8 @@ public class AvatarDrawable extends Drawable {
namePaint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
namePaint.setColor(0xffffffff);
namePaint.setTextSize(AndroidUtilities.dp(20));
broadcastDrawable = ApplicationLoader.applicationContext.getResources().getDrawable(R.drawable.broadcast_w);
}
}
......@@ -116,6 +122,8 @@ public class AvatarDrawable extends Drawable {
color = arrColors[Math.abs(id) % arrColors.length];
}
drawBrodcast = isBroadcast;
String text = "";
if (firstName != null && firstName.length() > 0) {
text += firstName.substring(0, 1);
......@@ -145,17 +153,23 @@ public class AvatarDrawable extends Drawable {
if (bounds == null) {
return;
}
int size = bounds.right - bounds.left;
int size = bounds.width();
paint.setColor(color);
canvas.save();
canvas.translate(bounds.left, bounds.top);
canvas.drawCircle(size / 2, size / 2, size / 2, paint);
if (drawBrodcast && broadcastDrawable != null) {
int x = (size - broadcastDrawable.getIntrinsicWidth()) / 2;
int y = (size - broadcastDrawable.getIntrinsicHeight()) / 2;
broadcastDrawable.setBounds(x, y, x + broadcastDrawable.getIntrinsicWidth(), y + broadcastDrawable.getIntrinsicHeight());
broadcastDrawable.draw(canvas);
} else {
if (textLayout != null) {
canvas.translate((size - textWidth) / 2, (size - textHeight) / 2);
textLayout.draw(canvas);
}
}
canvas.restore();
}
......
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="66dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/messages_list_row_avatar"
android:contentDescription=""
android:layout_marginRight="24dp"
android:src="@drawable/addmember"
android:scaleType="center"
android:layout_gravity="center_vertical|right"/>
<TextView
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:gravity="right"
android:textColor="#000000"
android:maxLines="1"
android:layout_gravity="center_vertical|right"/>
<View android:background="@color/divider"
android:layout_width="fill_parent"
android:layout_height="1px"
android:layout_gravity="bottom"
android:id="@+id/settings_row_divider"/>
</FrameLayout>
\ No newline at end of file
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:gravity="center_vertical|right"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="13dp"
android:paddingBottom="12dp">
<ImageButton
android:id="@+id/settings_edit_name"
android:background="@drawable/list_selector"
android:clickable="true"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/ic_edit"/>
<View
android:background="#e8e8e8"
android:layout_width="1dp"
android:layout_height="48dp"/>
<LinearLayout
android:layout_gravity="center_vertical"
android:orientation="vertical"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginRight="13dp"
android:layout_marginBottom="1dp"
android:layout_weight="1">
<TextView
android:textSize="21dp"
android:textColor="#333333"
android:id="@+id/settings_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:lines="1"
android:ellipsize="end"
android:singleLine="true"
android:layout_gravity="right"
android:gravity="right"/>
<TextView
android:textSize="14dp"
android:textColor="#999999"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:maxLines="1"
android:lines="1"
android:ellipsize="end"
android:id="@+id/settings_online"
android:layout_gravity="right"
android:gravity="right"/>
</LinearLayout>
<FrameLayout
android:layout_width="64dp"
android:layout_height="64dp">
<org.telegram.ui.Views.BackupImageView
android:id="@+id/settings_avatar_image"
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>
</LinearLayout>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/top_layout"
android:layout_gravity="top">
<EditText
android:textSize="16dp"
android:textColorHint="#a6a6a6"
android:id="@+id/bubble_input_text"
android:paddingLeft="60dp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:minHeight="52dp"
android:gravity="right|center_vertical"
android:maxLines="2"
android:paddingTop="3dp"
android:layout_marginTop="0dp"
android:inputType="textFilter|textNoSuggestions|textMultiLine"
android:imeOptions="flagNoExtractUi"
android:textCursorDrawable="@null"
android:textColor="#000000"/>
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<org.telegram.ui.Views.PinnedHeaderListView
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="30dp"
android:paddingRight="16dp"
android:dividerHeight="0dp"
android:divider="@null"
android:paddingBottom="16dp"
android:fastScrollEnabled="true"
android:fastScrollAlwaysVisible="true"
android:scrollbarStyle="outsideOverlay"
android:verticalScrollbarPosition="left"/>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textColor="#808080"
android:gravity="center"
android:textSize="24dp"
android:id="@+id/searchEmptyView"
android:visibility="invisible"/>
</FrameLayout>
</LinearLayout>
<!--
~ This is the source code of Telegram for Android v. 1.7.x.
~ It is licensed under GNU GPL v. 2 or later.
~ You should have received a copy of the license in this archive (see LICENSE).
~
~ Copyright Nikolai Kudashov, 2013-2014.
-->
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
......
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_gravity="top">
<TextView
android:textSize="18dp"
android:textColor="#333333"
android:id="@+id/settings_row_text"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:gravity="center_vertical"
android:layout_gravity="top|right"/>
<TextView
android:textSize="18dp"
android:textColor="#316f9f"
android:id="@+id/settings_row_text_detail"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:gravity="center_vertical"/>
<View
android:background="@color/divider"
android:layout_width="fill_parent"
android:layout_height="1px"
android:layout_gravity="bottom"
android:id="@+id/settings_row_divider"/>
</FrameLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="66dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/messages_list_row_avatar"
android:contentDescription=""
android:src="@drawable/addmember"
android:scaleType="center"
android:layout_gravity="center_vertical"
android:layout_marginLeft="24dp"/>
<TextView
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:textColor="#000000"
android:maxLines="1"
android:layout_gravity="center_vertical"/>
<View android:background="@color/divider"
android:layout_width="fill_parent"
android:layout_height="1px"
android:layout_gravity="bottom"
android:id="@+id/settings_row_divider"/>
</FrameLayout>
\ No newline at end of file
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:gravity="center_vertical"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="13dp"
android:paddingBottom="12dp">
<FrameLayout
android:layout_width="64dp"
android:layout_height="64dp">
<org.telegram.ui.Views.BackupImageView
android:id="@+id/settings_avatar_image"
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>
<LinearLayout
android:layout_gravity="center_vertical"
android:orientation="vertical"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="13dp"
android:layout_marginRight="4dp"
android:layout_marginBottom="1dp"
android:layout_weight="1">
<TextView
android:textSize="21dp"
android:textColor="#333333"
android:id="@+id/settings_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:lines="1"
android:ellipsize="end"
android:singleLine="true"/>
<TextView
android:textSize="14dp"
android:textColor="#999999"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:maxLines="1"
android:lines="1"
android:ellipsize="end"
android:id="@+id/settings_online"/>
</LinearLayout>
<View
android:background="#e8e8e8"
android:layout_width="1dp"
android:layout_height="48dp"/>
<ImageButton
android:id="@+id/settings_edit_name"
android:background="@drawable/list_selector"
android:clickable="true"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/ic_edit"/>
</LinearLayout>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/top_layout"
android:layout_gravity="top">
<EditText
android:textSize="16dp"
android:textColorHint="#a6a6a6"
android:id="@+id/bubble_input_text"
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="2"
android:paddingTop="3dp"
android:layout_marginTop="0dp"
android:inputType="textFilter|textNoSuggestions|textMultiLine"
android:imeOptions="flagNoExtractUi"
android:textCursorDrawable="@null"
android:textColor="#000000"/>
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<org.telegram.ui.Views.PinnedHeaderListView
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="30dp"
android:dividerHeight="0dp"
android:divider="@null"
android:paddingBottom="16dp"
android:fastScrollEnabled="true"
android:fastScrollAlwaysVisible="true"
android:scrollbarStyle="outsideOverlay"/>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textColor="#808080"
android:gravity="center"
android:textSize="24dp"
android:id="@+id/searchEmptyView"
android:visibility="invisible"/>
</FrameLayout>
</LinearLayout>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/listView"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:clipToPadding="false"
android:fadingEdge="none"
android:fadingEdgeLength="0dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:dividerHeight="0dp"
android:divider="@null"
android:scrollbars="none"
android:paddingBottom="16dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textColor="#808080"
android:gravity="center"
android:textSize="24dp"
android:id="@+id/searchEmptyView"/>
<LinearLayout
android:id="@+id/progressLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:orientation="vertical">
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</RelativeLayout>
<!--
~ This is the source code of Telegram for Android v. 1.7.x.
~ It is licensed under GNU GPL v. 2 or later.
~ You should have received a copy of the license in this archive (see LICENSE).
~
~ Copyright Nikolai Kudashov, 2013-2014.
-->
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="56dp"
android:paddingTop="8dp">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/logout_button_states"
android:gravity="center"
android:textSize="17dp"
android:textColor="#000000"
android:id="@+id/settings_row_text"/>
</FrameLayout>
\ No newline at end of file
<!--
~ This is the source code of Telegram for Android v. 1.7.x.
~ It is licensed under GNU GPL v. 2 or later.
~ You should have received a copy of the license in this archive (see LICENSE).
~
~ Copyright Nikolai Kudashov, 2013-2014.
-->
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
......
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="48dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="#9a9a9a"
android:textSize="15dp"
android:id="@+id/info_text_view"/>
</FrameLayout>
\ No newline at end of file
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_gravity="top">
<TextView
android:textSize="18dp"
android:textColor="#333333"
android:id="@+id/settings_row_text"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:gravity="center_vertical"
android:layout_gravity="top"/>
<TextView
android:textSize="18dp"
android:textColor="#316f9f"
android:id="@+id/settings_row_text_detail"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:gravity="center_vertical"
android:layout_gravity="right"/>
<View
android:background="@color/divider"
android:layout_width="fill_parent"
android:layout_height="1px"
android:layout_gravity="bottom"
android:id="@+id/settings_row_divider"/>
</FrameLayout>
\ No newline at end of file
......@@ -60,7 +60,7 @@
<string name="NewBroadcastList">New Broadcast List</string>
<string name="EnterListName">Enter list name</string>
<string name="YouCreatedBroadcastList">You created a broadcast list</string>
<string name="AddRecipient">Add Recipient</string>
<string name="AddRecipient">Add recipient</string>
<string name="KickFromBroadcast">Remove from broadcast list</string>
<!--documents view-->
<string name="SelectFile">Select File</string>
......@@ -240,7 +240,7 @@
<string name="NotificationsAndSounds">Notifications and Sounds</string>
<string name="BlockedUsers">Blocked Users</string>
<string name="SaveIncomingPhotos">Save Incoming Photos</string>
<string name="LogOut">Log Out</string>
<string name="LogOut">Log out</string>
<string name="YourFirstNameAndLastName">YOUR FIRST AND LAST NAME</string>
<string name="NoSound">No sound</string>
<string name="Default">Default</string>
......@@ -285,7 +285,7 @@
<string name="WhenRoaming">When roaming</string>
<string name="NoMediaAutoDownload">No media</string>
<string name="SaveToGallerySettings">Save to gallery</string>
<string name="EditName">Edit Name</string>
<string name="EditName">Edit name</string>
<!--media view-->
<string name="NoMedia">No shared media yet</string>
<string name="CancelDownload">Cancel Download</string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment