mirror of
https://github.com/DrKLO/Telegram.git
synced 2024-12-22 06:25:14 +01:00
Fixed Alert EditText background on 2.x
This commit is contained in:
parent
1122ab85d1
commit
1a9632e042
3 changed files with 16 additions and 2 deletions
|
@ -83,7 +83,7 @@ android {
|
|||
defaultConfig {
|
||||
minSdkVersion 8
|
||||
targetSdkVersion 19
|
||||
versionCode 278
|
||||
versionCode 279
|
||||
versionName "1.6.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -946,8 +946,14 @@ public class FileLoader {
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
boolean isLocalFile = false;
|
||||
if (httpUrl != null && !httpUrl.startsWith("http")) {
|
||||
isLocalFile = true;
|
||||
}
|
||||
|
||||
img.loadOperation = loadOperation;
|
||||
if (runningOperation.size() < maxConcurentLoadingOpertaionsCount) {
|
||||
if (runningOperation.size() < maxConcurentLoadingOpertaionsCount || isLocalFile) {
|
||||
loadOperation.start();
|
||||
runningOperation.add(loadOperation);
|
||||
} else {
|
||||
|
|
|
@ -24,6 +24,7 @@ import android.view.inputmethod.EditorInfo;
|
|||
import android.widget.AbsListView;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.EditText;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.telegram.android.AndroidUtilities;
|
||||
|
@ -350,6 +351,9 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
|
|||
builder.setTitle(LocaleController.getString("AppName", R.string.AppName));
|
||||
builder.setMessage(LocaleController.formatStringSimple(selectAlertString, Utilities.formatName(user.first_name, user.last_name)));
|
||||
final EditText editText = new EditText(getParentActivity());
|
||||
if (android.os.Build.VERSION.SDK_INT < 11) {
|
||||
editText.setBackgroundResource(android.R.drawable.editbox_background_normal);
|
||||
}
|
||||
editText.setTextSize(18);
|
||||
editText.setText("50");
|
||||
editText.setGravity(Gravity.CENTER);
|
||||
|
@ -366,9 +370,13 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
|
|||
showAlertDialog(builder);
|
||||
ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams)editText.getLayoutParams();
|
||||
if (layoutParams != null) {
|
||||
if (layoutParams instanceof FrameLayout.LayoutParams) {
|
||||
((FrameLayout.LayoutParams)layoutParams).gravity = Gravity.CENTER_HORIZONTAL;
|
||||
}
|
||||
layoutParams.rightMargin = layoutParams.leftMargin = AndroidUtilities.dp(10);
|
||||
editText.setLayoutParams(layoutParams);
|
||||
}
|
||||
editText.setSelection(editText.getText().length());
|
||||
} else {
|
||||
if (delegate != null) {
|
||||
delegate.didSelectContact(user, param);
|
||||
|
|
Loading…
Reference in a new issue