mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-29 13:26:50 +01:00
Fix widget device choice dialog behaviour
This commit is contained in:
parent
d46ed71a46
commit
ee4f3fabcf
@ -83,12 +83,6 @@ public class SleepAlarmWidgetConfigurationActivity extends Activity implements G
|
|||||||
String[] allDevicesString = list.toArray(new String[0]);
|
String[] allDevicesString = list.toArray(new String[0]);
|
||||||
|
|
||||||
builder.setSingleChoiceItems(allDevicesString, 0, new DialogInterface.OnClickListener() {
|
builder.setSingleChoiceItems(allDevicesString, 0, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
ListView lw = ((AlertDialog) dialog).getListView();
|
ListView lw = ((AlertDialog) dialog).getListView();
|
||||||
@ -106,16 +100,8 @@ public class SleepAlarmWidgetConfigurationActivity extends Activity implements G
|
|||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
|
builder.setCancelable(false);
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
Intent resultValue;
|
|
||||||
resultValue = new Intent();
|
|
||||||
resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, mAppWidgetId);
|
|
||||||
setResult(RESULT_CANCELED, resultValue);
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
AlertDialog dialog = builder.create();
|
AlertDialog dialog = builder.create();
|
||||||
dialog.show();
|
dialog.show();
|
||||||
}
|
}
|
||||||
|
@ -77,12 +77,6 @@ public class WidgetConfigurationActivity extends Activity implements GBActivity
|
|||||||
String[] allDevicesString = list.toArray(new String[0]);
|
String[] allDevicesString = list.toArray(new String[0]);
|
||||||
|
|
||||||
builder.setSingleChoiceItems(allDevicesString, 0, new DialogInterface.OnClickListener() {
|
builder.setSingleChoiceItems(allDevicesString, 0, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
ListView lw = ((AlertDialog) dialog).getListView();
|
ListView lw = ((AlertDialog) dialog).getListView();
|
||||||
@ -100,15 +94,8 @@ public class WidgetConfigurationActivity extends Activity implements GBActivity
|
|||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
|
builder.setCancelable(false);
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
Intent resultValue; resultValue = new Intent();
|
|
||||||
resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, mAppWidgetId);
|
|
||||||
setResult(RESULT_CANCELED, resultValue);
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
AlertDialog dialog = builder.create();
|
AlertDialog dialog = builder.create();
|
||||||
dialog.show();
|
dialog.show();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user