mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-31 06:05:12 +00:00
Make the rename box look slightly better
This commit is contained in:
@@ -250,11 +250,17 @@ public class MaterialActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void renameDevice() {
|
public void renameDevice() {
|
||||||
final TextView nameView = (TextView) mDrawerLayout.findViewById(R.id.device_name);
|
final TextView nameView = (TextView) mDrawerLayout.findViewById(R.id.device_name);
|
||||||
final EditText deviceNameEdit = new EditText(MaterialActivity.this);
|
final EditText deviceNameEdit = new EditText(MaterialActivity.this);
|
||||||
String deviceName = DeviceHelper.getDeviceName(MaterialActivity.this);
|
String deviceName = DeviceHelper.getDeviceName(MaterialActivity.this);
|
||||||
deviceNameEdit.setText(deviceName);
|
deviceNameEdit.setText(deviceName);
|
||||||
|
deviceNameEdit.setPadding(
|
||||||
|
((int) (18 * getResources().getDisplayMetrics().density)),
|
||||||
|
((int) (16 * getResources().getDisplayMetrics().density)),
|
||||||
|
((int) (18 * getResources().getDisplayMetrics().density)),
|
||||||
|
((int) (12 * getResources().getDisplayMetrics().density))
|
||||||
|
);
|
||||||
new AlertDialog.Builder(MaterialActivity.this)
|
new AlertDialog.Builder(MaterialActivity.this)
|
||||||
.setView(deviceNameEdit)
|
.setView(deviceNameEdit)
|
||||||
.setPositiveButton(R.string.device_rename_confirm, new DialogInterface.OnClickListener() {
|
.setPositiveButton(R.string.device_rename_confirm, new DialogInterface.OnClickListener() {
|
||||||
|
Reference in New Issue
Block a user