Wear improve menu navigation
This commit is contained in:
parent
e8e0aa75e2
commit
d7caa39ff3
8 changed files with 8 additions and 15 deletions
|
@ -99,7 +99,7 @@ public class AcceptActivity extends ViewSelectorActivity {
|
|||
@Override
|
||||
public void onClick(View v) {
|
||||
ListenerService.confirmAction(AcceptActivity.this, actionstring);
|
||||
finish();
|
||||
finishAffinity();
|
||||
}
|
||||
});
|
||||
container.addView(view);
|
||||
|
|
|
@ -113,7 +113,7 @@ public class BolusActivity extends ViewSelectorActivity {
|
|||
String actionstring = "bolus " + SafeParse.stringToDouble(editInsulin.editText.getText().toString())
|
||||
+ " " + SafeParse.stringToInt(editCarbs.editText.getText().toString());
|
||||
ListenerService.initiateAction(BolusActivity.this, actionstring);
|
||||
finish();
|
||||
finishAffinity();
|
||||
}
|
||||
});
|
||||
container.addView(view);
|
||||
|
|
|
@ -129,7 +129,7 @@ public class CPPActivity extends ViewSelectorActivity {
|
|||
String actionstring = "cppset " + SafeParse.stringToInt(editTimeshift.editText.getText().toString())
|
||||
+ " " + SafeParse.stringToInt(editPercentage.editText.getText().toString());
|
||||
ListenerService.initiateAction(CPPActivity.this, actionstring);
|
||||
finish();
|
||||
finishAffinity();
|
||||
}
|
||||
});
|
||||
container.addView(view);
|
||||
|
|
|
@ -127,7 +127,7 @@ public class ECarbActivity extends ViewSelectorActivity {
|
|||
+ " " + SafeParse.stringToInt(editStartTime.editText.getText().toString())
|
||||
+ " " + SafeParse.stringToInt(editDuration.editText.getText().toString());
|
||||
ListenerService.initiateAction(ECarbActivity.this, actionstring);
|
||||
finish();
|
||||
finishAffinity();
|
||||
}
|
||||
});
|
||||
container.addView(view);
|
||||
|
|
|
@ -85,7 +85,7 @@ public class FillActivity extends ViewSelectorActivity {
|
|||
|
||||
String actionstring = "fill " + SafeParse.stringToDouble(editInsulin.editText.getText().toString());
|
||||
ListenerService.initiateAction(FillActivity.this, actionstring);
|
||||
finish();
|
||||
finishAffinity();
|
||||
}
|
||||
});
|
||||
container.addView(view);
|
||||
|
|
|
@ -162,7 +162,7 @@ public class TempTargetActivity extends ViewSelectorActivity {
|
|||
+ " " + (isSingleTarget ? SafeParse.stringToDouble(lowRange.editText.getText().toString()) : SafeParse.stringToDouble(highRange.editText.getText().toString()));
|
||||
|
||||
ListenerService.initiateAction(TempTargetActivity.this, actionstring);
|
||||
finish();
|
||||
finishAffinity();
|
||||
}
|
||||
});
|
||||
container.addView(view);
|
||||
|
|
|
@ -129,7 +129,7 @@ public class WizardActivity extends ViewSelectorActivity {
|
|||
String actionstring = "wizard2 " + SafeParse.stringToInt(editCarbs.editText.getText().toString())
|
||||
+ " " + percentage;
|
||||
ListenerService.initiateAction(WizardActivity.this, actionstring);
|
||||
finish();
|
||||
finishAffinity();
|
||||
}
|
||||
});
|
||||
container.addView(view);
|
||||
|
|
|
@ -28,12 +28,6 @@ public abstract class MenuListActivity extends Activity
|
|||
|
||||
protected abstract void doAction(String position);
|
||||
|
||||
@Override
|
||||
protected void onPause(){
|
||||
super.onPause();
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
@ -56,8 +50,7 @@ public abstract class MenuListActivity extends Activity
|
|||
public void onClick(WearableListView.ViewHolder v) {
|
||||
String tag = (String) v.itemView.getTag();
|
||||
doAction(tag);
|
||||
//ActionsDefinitions.doAction(v.getAdapterPosition(), this);
|
||||
finish();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue