Examples of LayoutInflater


Examples of android.view.LayoutInflater

    client = new XMLRPCClient(uri);

    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

Examples of android.view.LayoutInflater

                showToast(R.string.error_reset_password);
              }
            }
          };

        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 Full Code Here

Examples of org.vaadin.teemu.clara.inflater.LayoutInflater

    public static Component create(InputStream xml, Object controller,
            AttributeFilter... attributeFilters) {
        Binder binder = new Binder();

        // Inflate the XML to a component (tree).
        LayoutInflater inflater = new LayoutInflater();
        if (attributeFilters != null) {
            for (AttributeFilter filter : attributeFilters) {
                inflater.addAttributeFilter(filter);
            }
        }
        Component result = inflater.inflate(xml,
                binder.getAlreadyAssignedFields(controller));

        // Bind to controller.
        binder.bind(result, controller);
        return result;
View Full Code Here

Examples of org.vaadin.teemu.clara.inflater.LayoutInflater

    private LayoutInflater inflater;

    @Before
    public void setUp() {
        inflater = new LayoutInflater();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.