Example usage for android.text Editable getChars

List of usage examples for android.text Editable getChars

Introduction

In this page you can find the example usage for android.text Editable getChars.

Prototype

public void getChars(int start, int end, char[] dest, int destoff);

Source Link

Document

Exactly like String.getChars(): copy chars start through end - 1 from this CharSequence into dest beginning at offset destoff.

Usage

From source file:me.xingrz.finder.ZipFinderActivity.java

private void confirmFilePassword() {
    Editable password = ((EditText) passwordPrompt.findViewById(R.id.password)).getText();

    char[] chars = new char[password.length()];
    password.getChars(0, password.length(), chars, 0);

    extracting.setPassword(chars);/*  w  ww .ja  v a 2  s  .  c  om*/
    openFileInZip();
}