Пример #1
0
 protected void onDialogClosed(boolean positiveResult) {
   if (positiveResult == true) {
     super.onDialogClosed(positiveResult);
     mPickInteger.onClick(null);
     mValue = mPickInteger.getCurrent();
     if (shouldPersist()) {
       persistInt(mValue);
     }
   }
 }
Пример #2
0
 protected android.view.View onCreateDialogView() {
   android.widget.TableLayout.LayoutParams params;
   android.widget.TableLayout layout = new android.widget.TableLayout(mContext);
   layout.setPadding(6, 6, 6, 6);
   mSplashText = new android.widget.TextView(mContext);
   if (mDialogMessage != null) {
     mSplashText.setText(mDialogMessage);
   }
   android.widget.TableRow row_header = new android.widget.TableRow(mContext);
   row_header.addView(mSplashText);
   mPickInteger = new net.mandaria.tippytipper.widgets.NumberPicker(mContext);
   mPickInteger.setRange(mMin, mMax);
   android.widget.TextView suffix = new android.widget.TextView(mContext);
   suffix.setText(mSuffix);
   suffix.setTextSize(32);
   android.widget.TableRow row_one = new android.widget.TableRow(mContext);
   row_one.setGravity(Gravity.CENTER);
   row_one.addView(mPickInteger);
   row_one.addView(suffix);
   layout.addView(row_header);
   android.widget.TableLayout table_main = new android.widget.TableLayout(mContext);
   table_main.addView(row_one);
   android.widget.TableRow row_main = new android.widget.TableRow(mContext);
   row_main.setGravity(Gravity.CENTER_HORIZONTAL);
   row_main.addView(table_main);
   layout.addView(row_main);
   if (shouldPersist()) {
     mValue = getPersistedInt(mDefault);
   }
   bindData();
   return layout;
 }
Пример #3
0
 private void bindData() {
   try {
     mPickInteger.setCurrent(mValue);
   } catch (java.lang.Exception ex) {
   }
 }