Examples of SeekBar


Examples of android.widget.SeekBar

        String msg = MessageFormat.format(template, importedFile.getName());
        alert.setMessage(msg);
        break;
      }
      case DIALOG_CHANGE_PASSWORD: {
        SeekBar bar = (SeekBar) dialog.findViewById(R.id.cipher_strength);
        int rounds = SecurityUtils.getRounds();
        bar.setProgress(rounds - PROGRESS_ROUNDS_OFFSET);
        setCipherStrengthLabel(dialog, rounds);
        TextView password1 = (TextView) dialog.findViewById(
            R.id.password);
        password1.setText("");
        TextView password2 = (TextView) dialog.findViewById(
View Full Code Here

Examples of android.widget.SeekBar

              if (!password.equals(p2) || password.length() == 0) {
                showToast(R.string.invalid_password);
                return;
              }

              SeekBar bar = (SeekBar) dialog.findViewById(R.id.cipher_strength);
              byte[] salt = SecurityUtils.getSalt();
              int rounds = bar.getProgress() + PROGRESS_ROUNDS_OFFSET;

              SecurityUtils.CipherInfo info = SecurityUtils.createCiphers(
                  password, salt, rounds);
              if (null != info) {
                SecurityUtils.saveCiphers(info);
                showToast(R.string.password_changed);
              } else {
                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);
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.