mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-29 05:16:51 +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]);
|
||||
|
||||
builder.setSingleChoiceItems(allDevicesString, 0, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
}
|
||||
});
|
||||
|
||||
builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
ListView lw = ((AlertDialog) dialog).getListView();
|
||||
@ -106,16 +100,8 @@ public class SleepAlarmWidgetConfigurationActivity extends Activity implements G
|
||||
finish();
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
|
||||
@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();
|
||||
}
|
||||
});
|
||||
builder.setCancelable(false);
|
||||
|
||||
AlertDialog dialog = builder.create();
|
||||
dialog.show();
|
||||
}
|
||||
|
@ -77,12 +77,6 @@ public class WidgetConfigurationActivity extends Activity implements GBActivity
|
||||
String[] allDevicesString = list.toArray(new String[0]);
|
||||
|
||||
builder.setSingleChoiceItems(allDevicesString, 0, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
}
|
||||
});
|
||||
|
||||
builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
ListView lw = ((AlertDialog) dialog).getListView();
|
||||
@ -100,15 +94,8 @@ public class WidgetConfigurationActivity extends Activity implements GBActivity
|
||||
finish();
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
|
||||
@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();
|
||||
}
|
||||
});
|
||||
builder.setCancelable(false);
|
||||
|
||||
AlertDialog dialog = builder.create();
|
||||
dialog.show();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user