package info.knacki.pass.ui.alertPrompt.views;

import android.content.Context;
import android.support.v7.widget.AppCompatEditText;
import android.text.Editable;

public class SimpleTextEdit extends AppCompatEditText {
    public SimpleTextEdit(Context c) {
        super(c);
    }

    public SimpleTextEdit setText(String str) {
        super.setText(str);
        super.setSelection(str.length());
        super.requestFocus();
        return this;
    }

    public String getStr() {
        Editable text = super.getText();
        return null == text ? "" : text.toString().trim();
    }
}
