Package android.view

Examples of android.view.View


    setContentView(R.layout.main);
        testResult = (TextSwitcher) findViewById(R.id.text_result);
       
        LayoutInflater inflater = LayoutInflater.from(this);
        View v0 = inflater.inflate(R.layout.text_view, null);
        View v1 = inflater.inflate(R.layout.text_view, null);
        LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT);
        testResult.addView(v0, 0, layoutParams);
        testResult.addView(v1, 1, layoutParams);
        testResult.setText("WARNING, before calling any test make sure server.py is running !!!");
View Full Code Here


      this.layoutId = layoutId;
      layouter = LayoutInflater.from(Test.this);
    }
    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
      View view = layouter.inflate(layoutId, null);
      TextView title = (TextView) view.findViewById(R.id.title);
      TextView params = (TextView) view.findViewById(R.id.params);
      String string = getItem(position);
      String[] arr = string.split(";");
      title.setText(arr[0]);
      if (arr.length == 2) {
        params.setText(arr[1]);
View Full Code Here

          android.content.ComponentName.class);
      Object si = m.invoke(sm, activity.getComponentName());

      MenuItem item = menu.findItem(R.id.list_search);
      m = item.getClass().getMethod("getActionView");
      View widget = (View) m.invoke(item);

      m = widget.getClass().getMethod("setSearchableInfo", si.getClass());
      m.invoke(widget, si);

      m = widget.getClass().getMethod("setIconifiedByDefault", boolean.class);
      m.invoke(widget, false);

      m = widget.getClass().getMethod("setSubmitButtonEnabled", boolean.class);
      m.invoke(widget, true);
    } catch (Exception ex) {
      Log.e(LOG_TAG, "configureSearchView", ex);
    }
  }
View Full Code Here

              }
            }
          };

        LayoutInflater inflater = getLayoutInflater();
        View view = inflater.inflate(R.layout.change_password, getListView(),
                                     false);

        dialog = new AlertDialog.Builder(this)
            .setTitle(R.string.list_menu_change_password)
            .setIcon(android.R.drawable.ic_dialog_info)
            .setView(view)
            .setPositiveButton(R.string.list_menu_change_password, listener)
            .create();
        final Dialog dialogFinal = dialog;
       
        SeekBar bar = (SeekBar) view.findViewById(R.id.cipher_strength);
        bar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
          @Override
          public void onProgressChanged(SeekBar seekBar, int progress,
              boolean fromUser) {
            setCipherStrengthLabel(dialogFinal, progress +
                                   PROGRESS_ROUNDS_OFFSET);
          }
          @Override
          public void onStartTrackingTouch(SeekBar seekBar) {
          }
          @Override
          public void onStopTrackingTouch(SeekBar seekBar) {
          }});
        break;
      }
      case DIALOG_ENTER_RESTORE_PASSWORD: {
        DialogInterface.OnClickListener listener =
          new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialogi, int which) {
              AlertDialog dialog = (AlertDialog) dialogi;
              TextView password1 = (TextView) dialog.findViewById(
                  R.id.password);

              String password = password1.getText().toString();
              FileUtils.SaltAndRounds saltAndRounds =
                  FileUtils.getSaltAndRounds(null, restorePoint);
             
              SecurityUtils.CipherInfo info =  SecurityUtils.createCiphers(
                  password, saltAndRounds.salt, saltAndRounds.rounds);
              if (restoreSecrets(restorePoint, info)) {
                SecurityUtils.clearCiphers();
                SecurityUtils.saveCiphers(info);

                String message = getText(R.string.password_changed).toString();
                message += '\n';
                message += getText(R.string.restore_succeeded).toString();
                showToast(message);
              } else {
                showToast(R.string.restore_failed);
              }
            }
          };

        LayoutInflater inflater = getLayoutInflater();
        View view = inflater.inflate(R.layout.change_password, getListView(),
                                     false);

        // For this dialog, we don't want to show the seek bar nor the
        // confirmation password field.
        view.findViewById(R.id.cipher_strength).setVisibility(View.GONE);
        view.findViewById(R.id.cipher_strength_label).setVisibility(View.GONE);
        view.findViewById(R.id.password_validation).setVisibility(View.GONE);
            view.findViewById(R.id.password_validation_label)
            .setVisibility(View.GONE);

        dialog = new AlertDialog.Builder(this)
            .setTitle(R.string.login_enter_password)
            .setIcon(android.R.drawable.ic_dialog_info)
View Full Code Here

      toast.cancel();

    OS.hideSoftKeyboard(this, getListView());
    OS.invalidateOptionsMenu(this);

    View list = getListView();
    int cx = root.getWidth() / 2;
    int cy = root.getHeight() / 2;
    Animation animation = new Flip3dAnimation(list, edit, cx, cy, true);
    animation.setAnimationListener(new AnimationListener() {
      @Override
View Full Code Here

    isEditing = false;

    OS.hideSoftKeyboard(this, getListView());
    OS.invalidateOptionsMenu(this);

    View list = getListView();
    int cx = root.getWidth() / 2;
    int cy = root.getHeight() / 2;
    Animation animation = new Flip3dAnimation(list, edit, cx, cy, false);
    animation.setAnimationListener(new AnimationListener() {
      @Override
View Full Code Here

TOP

Related Classes of android.view.View

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.