Remove help dialog.

(cherry picked from commit b1ef8e1)
This commit is contained in:
Johannes Mockenhaupt 2018-04-12 20:52:07 +02:00
parent 5ef2502b4f
commit a075d87da1
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
2 changed files with 5 additions and 28 deletions

View file

@ -16,7 +16,6 @@ import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RadioButton;
@ -39,8 +38,6 @@ import info.nightscout.androidaps.db.Source;
import info.nightscout.androidaps.db.TempTarget;
import info.nightscout.androidaps.interfaces.Constraint;
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.Loop.APSResult;
import info.nightscout.androidaps.plugins.OpenAPSSMB.DetermineBasalResultSMB;
import info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin;
import info.nightscout.androidaps.queue.Callback;
import info.nightscout.utils.DateUtil;
@ -53,8 +50,6 @@ import info.nightscout.utils.ToastUtils;
public class NewCarbsDialog extends DialogFragment implements OnClickListener, CompoundButton.OnCheckedChangeListener {
private static Logger log = LoggerFactory.getLogger(NewCarbsDialog.class);
private ImageView helpView;
private Button fav1Button;
private Button fav2Button;
private Button fav3Button;
@ -127,9 +122,6 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, C
getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);
getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
helpView = view.findViewById(R.id.newcarbs_help);
helpView.setOnClickListener(this);
maxCarbs = MainApp.getConstraintChecker().getMaxCarbsAllowed().value();
editCarbs = view.findViewById(R.id.newcarb_carbsamount);
@ -147,6 +139,7 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, C
durationLayout = view.findViewById(R.id.newcarbs_duration_layout);
durationLayout.setVisibility(MainApp.engineeringMode ? View.VISIBLE : View.GONE);
editDuration = view.findViewById(R.id.new_carbs_duration);
editDuration.setParams(0d, 0d, 10d, 1d, new DecimalFormat("0"), false, textWatcher);
@ -180,17 +173,6 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, C
case R.id.cancel:
dismiss();
break;
case R.id.newcarbs_help:
AlertDialog.Builder builder = new AlertDialog.Builder(view.getContext());
builder.setTitle("Help");
builder.setMessage(Html.fromHtml("<b>Time</b>: relative offset to now<br/>" +
"<b>Duration</b>: splits carb up over entered time, one every 15m<br/>" +
"<br/>" +
"Did I ever tell you the story about the old tree and the wooden house? So " +
"anyway, there I was, in the middle of the forest with all my clothes gone.<br/>" +
"<br/>Also: blablabla"));
builder.show();
break;
case R.id.newcarbs_plus1:
editCarbs.setValue(Math.max(0, editCarbs.getValue()
+ SP.getInt(R.string.key_carbs_button_increment_1, FAV1_DEFAULT)));

View file

@ -36,20 +36,15 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:paddingBottom="10dp"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:paddingTop="10dp"
android:text="@string/carbs"
android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/colorCarbsButton" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:padding="5dp"
android:layout_gravity="center"
android:id="@+id/newcarbs_help"
android:src="@drawable/icon_cp_question" />
</LinearLayout>
<LinearLayout