2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 13:47:41 +00:00

Make the rename box look slightly better

This commit is contained in:
Albert Vaca
2015-11-12 08:14:24 -08:00
parent f4db8e6160
commit c0ae2c9c08

View File

@@ -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 EditText deviceNameEdit = new EditText(MaterialActivity.this);
String deviceName = DeviceHelper.getDeviceName(MaterialActivity.this);
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)
.setView(deviceNameEdit)
.setPositiveButton(R.string.device_rename_confirm, new DialogInterface.OnClickListener() {