mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Fix widget device choice dialog behaviour
This commit is contained in:
committed by
Arjan Schrijver
parent
d46ed71a46
commit
ee4f3fabcf
+2
-16
@@ -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();
|
||||
}
|
||||
|
||||
+2
-15
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user