@Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.nim_easy_alert_dialog_with_listview);
   LinearLayout root = (LinearLayout) findViewById(R.id.easy_alert_dialog_layout);
   ViewGroup.LayoutParams params = root.getLayoutParams();
   params.width = (int) ScreenUtil.getDialogWidth();
   root.setLayoutParams(params);
   titleView = findViewById(R.id.easy_dialog_title_view);
   if (titleView != null) {
     setTitleVisible(isTitleVisible);
   }
   titleTextView = (TextView) findViewById(R.id.easy_dialog_title_text_view);
   if (titleTextView != null) {
     setTitle(title);
   }
   titleBtn = (ImageButton) findViewById(R.id.easy_dialog_title_button);
   if (titleBtn != null) {
     setTitleBtnVisible(isTitleBtnVisible);
     setTitleBtnListener(titleListener);
   }
   listView = (ListView) findViewById(R.id.easy_dialog_list_view);
   if (itemSize > 0) {
     updateListView();
   }
 }
    @Override
    protected void onCreate(Bundle savedInstanceState) {
      setButton(BUTTON_NEGATIVE, getContext().getString(android.R.string.cancel), this);
      setButton(BUTTON_POSITIVE, getContext().getString(android.R.string.ok), this);
      setView(mPicker);

      // Install contents
      super.onCreate(savedInstanceState);
    }
示例#3
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.album_chose_dialog);

    bu_scan = (Button) findViewById(R.id.album_bu_scan);
    bu_scan.setOnClickListener(mOnClickListener);

    bu_login = (Button) findViewById(R.id.album_bu_login);
    bu_login.setOnClickListener(mOnClickListener);
  }
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   if (ProjectManager.getInstance().isCurrentProjectLandscape()) {
     setContentView(R.layout.dialog_formulaeditor_compute_landscape);
     computeTextView =
         (TextView) findViewById(R.id.formula_editor_compute_dialog_textview_landscape);
   } else {
     setContentView(R.layout.dialog_formulaeditor_compute);
     computeTextView = (TextView) findViewById(R.id.formula_editor_compute_dialog_textview);
   }
   showFormulaResult();
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.update_progress_dialog);
    mProgress = (ProgressBar) findViewById(R.id.progress);
    mProgressPercent = (TextView) findViewById(R.id.progress_percent);
    mProgressMessage = (TextView) findViewById(R.id.progress_message);
    //		LayoutInflater inflater = LayoutInflater.from(getContext());
    mViewUpdateHandler =
        new Handler() {

          @Override
          public void handleMessage(Message msg) {
            super.handleMessage(msg);
            int progress = mProgress.getProgress();
            int max = mProgress.getMax();
            double dProgress = (double) progress / (double) (1024 * 1024);
            double dMax = (double) max / (double) (1024 * 1024);
            if (mProgressNumberFormat != null) {
              String format = mProgressNumberFormat;
              //					mProgressNumber.setText(String.format(format, dProgress, dMax));
            } else {
              mProgressNumber.setText("");
            }
            if (mProgressPercentFormat != null) {
              double percent = (double) progress / (double) max;
              SpannableString tmp = new SpannableString(mProgressPercentFormat.format(percent));
              tmp.setSpan(
                  new StyleSpan(android.graphics.Typeface.BOLD),
                  0,
                  tmp.length(),
                  Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
              mProgressPercent.setText(tmp);
            } else {
              mProgressPercent.setText("");
            }
          }
        };
    onProgressChanged();
    if (mMessage != null) {
      setMessage(mMessage);
    }
    if (mMax > 0) {
      setMax(mMax);
    }
    if (mProgressVal > 0) {
      setProgress(mProgressVal);
    }
  }
  @Override
  protected void onCreate(Bundle state) {
    super.onCreate(state);
    if (state != null) {
      mIntent = state.getParcelable(STATE_INTENT);
    }

    mCreated = true;

    // If an intent is set make sure to load it now that it's safe
    if (mIntent != null) {
      loadIntent(mIntent);
    }
  }
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.stop);
   ImageButton stopbut = (ImageButton) findViewById(R.id.stopbut);
   stopbut.setOnClickListener(
       new View.OnClickListener() {
         @Override
         public void onClick(View arg0) {
           context.setPause(false);
           if (GameScene.getInstance() != null) {
             GameScene.getInstance().setPause(false);
           }
           context.removeDialog(BSActivity.PAUSE_DIALOG);
         }
       });
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    setTitle(R.string.font_pack_picker_dialog_title);
    final View view = View.inflate(getContext(), R.layout.file_path_dialog, null);
    setView(view);

    mInputLayout = ButterKnife.findById(view, R.id.input_layout);
    final EditText inputView = ButterKnife.findById(view, R.id.file_path_input);
    final Subscription textChanges =
        textChanges(inputView)
            .debounce(400, TimeUnit.MILLISECONDS)
            .map(CharSequence::toString)
            .map(FontPackage::validFontPackFolder)
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(
                pathIsValid -> {
                  if (pathIsValid) enableOkButton();
                  else showError();
                });

    setButton(
        BUTTON_POSITIVE,
        getContext().getString(R.string.ok),
        (dialog, which) -> {
          if (!mPathIsValid) return;
          textChanges.unsubscribe();
          mCallback.call(fontPackageFromEditText(inputView));
        });

    setButton(
        BUTTON_NEGATIVE,
        getContext().getString(R.string.cancel),
        (dialog, which) -> {
          textChanges.unsubscribe();
          dismiss();
        });

    super.onCreate(savedInstanceState);

    mPositiveButton = getButton(AlertDialog.BUTTON_POSITIVE);
    mPositiveButton.setEnabled(false);
  }
 protected void onCreate(Bundle bundle)
 {
     Object obj = LayoutInflater.from(getContext());
     m = new big(this);
     View view = ((LayoutInflater) (obj)).inflate(0x7f0300a5, null);
     g = view.findViewById(0x7f0d02ae);
     h = view.findViewById(0x7f0d02b1);
     b = (ProgressBar)view.findViewById(0x7f0d02b2);
     e = (TextView)view.findViewById(0x7f0d02b3);
     a = (ProgressBar)view.findViewById(0x7f0d01a6);
     a.setMax(100);
     c = (TextView)view.findViewById(0x7f0d02af);
     d = (TextView)view.findViewById(0x7f0d02b0);
     TextView textview = c;
     StringBuilder stringbuilder = (new StringBuilder()).append(o.format(0L)).append("/").append(o.format(0L));
     if (k == 1024)
     {
         obj = "K";
     } else
     {
         obj = "M";
     }
     textview.setText(stringbuilder.append(((String) (obj))).toString());
     d.setText(n.format(0L));
     if (f == MyProgressStyle.STYLE_MYPROGRESS)
     {
         g.setVisibility(0);
         h.setVisibility(4);
     } else
     {
         g.setVisibility(4);
         h.setVisibility(0);
     }
     setView(view);
     c();
     super.onCreate(bundle);
 }
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.optionlist);

    ImageView settingsview = (ImageView) findViewById(R.id.settingsview);
    ImageView removeview = (ImageView) findViewById(R.id.removeview);
    TextView removeviewtext = (TextView) findViewById(R.id.removeviewtext);
    ImageView checkview = (ImageView) findViewById(R.id.checkview);
    ImageView cancelview = (ImageView) findViewById(R.id.cancelview);

    if (curID == 0) {
      removeview.setAlpha(50);
      removeview.setEnabled(false);
      removeviewtext.setTextColor(Color.GRAY);
      removeviewtext.setEnabled(false);
    }

    settingsview.setOnClickListener(
        new View.OnClickListener() {

          public void onClick(View v) {
            // managing mode
            Intent i = new Intent(getContext(), ProjectActivity.class);
            i.putExtra("id", curID);
            i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
            dismiss();
            getContext().startActivity(i);
          }
        });
    removeview.setOnClickListener(
        new View.OnClickListener() {

          public void onClick(View v) {
            // remove the selected mode
            PlanDB db = new PlanDB(getContext());
            String name = db.getNameById(0);
            db.planDelete(curID);
            db.close();
            // change the current mode to manual
            SharedPreferences pref = getContext().getSharedPreferences("FANCY", 0);
            SharedPreferences.Editor prefTableEditor = pref.edit();
            prefTableEditor.putInt("current_mode_id", 0);
            prefTableEditor.putString("current_mode_name", name);
            prefTableEditor.commit();

            onBackPressed();
          }
        });
    checkview.setOnClickListener(
        new View.OnClickListener() {

          public void onClick(View v) {
            // choose the current mode

            PlanDB db = new PlanDB(getContext());
            String name = db.getNameById(curID);
            SharedPreferences preferences = getContext().getSharedPreferences("FANCY", 0);
            Editor edit = preferences.edit();
            edit.putString("current_mode_name", name);
            edit.putInt("current_mode_id", curID);
            edit.commit();
            db.close();
            onBackPressed();
          }
        });
    cancelview.setOnClickListener(
        new View.OnClickListener() {

          public void onClick(View v) {
            onBackPressed();
          }
        });
  }
示例#11
0
 protected final void onCreate(Bundle bundle) {
   super.onCreate(bundle);
   FrameLayout framelayout = new FrameLayout(getContext());
   framelayout.setBackgroundColor(0);
   setContentView(framelayout);
 }
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.dialog_progress);
 }