Fix dialogs and remove extra CONFIRM. Fixes #1078
This commit is contained in:
parent
35ded822c9
commit
7ef8c35c33
4 changed files with 8 additions and 29 deletions
|
@ -522,7 +522,7 @@ public class ListenerService extends WearableListenerService implements GoogleAp
|
|||
intent.putExtras(params);
|
||||
startActivity(intent);
|
||||
} else {
|
||||
showConfirmationDialog(title, message, actionstring);
|
||||
showConfirmationDialog(message, actionstring);
|
||||
}
|
||||
|
||||
} else if (path.equals(NEW_STATUS_PATH)) {
|
||||
|
@ -680,12 +680,10 @@ public class ListenerService extends WearableListenerService implements GoogleAp
|
|||
notificationManager.createNotificationChannel(channel);
|
||||
}
|
||||
|
||||
private void showConfirmationDialog(String title, String message, String actionstring) {
|
||||
|
||||
private void showConfirmationDialog(String message, String actionstring) {
|
||||
Intent intent = new Intent(this, AcceptActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
Bundle params = new Bundle();
|
||||
params.putString("title", title);
|
||||
params.putString("message", message);
|
||||
params.putString("actionstring", actionstring);
|
||||
intent.putExtras(params);
|
||||
|
|
|
@ -21,7 +21,6 @@ import info.nightscout.androidaps.data.ListenerService;
|
|||
|
||||
public class AcceptActivity extends ViewSelectorActivity {
|
||||
|
||||
String title = "";
|
||||
String message = "";
|
||||
String actionstring = "";
|
||||
private DismissThread dismissThread;
|
||||
|
@ -34,7 +33,6 @@ public class AcceptActivity extends ViewSelectorActivity {
|
|||
dismissThread.start();
|
||||
|
||||
Bundle extras = getIntent().getExtras();
|
||||
title = extras.getString("title", "");
|
||||
message = extras.getString("message", "");
|
||||
actionstring = extras.getString("actionstring", "");
|
||||
|
||||
|
@ -43,7 +41,6 @@ public class AcceptActivity extends ViewSelectorActivity {
|
|||
return;
|
||||
}
|
||||
|
||||
setContentView(R.layout.grid_layout);
|
||||
setAdapter(new MyGridViewPagerAdapter());
|
||||
|
||||
Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
|
@ -73,8 +70,6 @@ public class AcceptActivity extends ViewSelectorActivity {
|
|||
|
||||
if (col == 0) {
|
||||
final View view = LayoutInflater.from(getApplicationContext()).inflate(R.layout.action_confirm_text, container, false);
|
||||
final TextView headingView = view.findViewById(R.id.title);
|
||||
headingView.setText(title);
|
||||
final TextView textView = view.findViewById(R.id.message);
|
||||
textView.setText(message);
|
||||
container.addView(view);
|
||||
|
|
|
@ -86,7 +86,7 @@ public class WizardActivity extends ViewSelectorActivity {
|
|||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
//check if it can happen that the fagment is never created that hold data?
|
||||
// check if it can happen that the fragment is never created that hold data?
|
||||
// (you have to swipe past them anyways - but still)
|
||||
|
||||
int percentage = 100;
|
||||
|
|
|
@ -13,27 +13,13 @@
|
|||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:id="@+id/message"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="title"
|
||||
android:textAppearance="@style/TextAppearance.Wearable.Medium"
|
||||
android:textColor="@color/white" />
|
||||
<TextView
|
||||
android:id="@+id/message"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="message"
|
||||
android:textAppearance="@style/TextAppearance.Wearable.Small"
|
||||
android:textColor="@color/white" />
|
||||
</LinearLayout>
|
||||
|
||||
android:text="message"
|
||||
android:textAppearance="@style/TextAppearance.Wearable.Small"
|
||||
android:textColor="@color/white" />
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</FrameLayout>
|
||||
|
|
Loading…
Reference in a new issue