use of android.widget.EditText in project cw-omnibus by commonsguy.
the class ConstantsFragment method onClick.
public void onClick(DialogInterface di, int whichButton) {
ContentValues values = new ContentValues(2);
AlertDialog dlg = (AlertDialog) di;
EditText title = (EditText) dlg.findViewById(R.id.title);
EditText value = (EditText) dlg.findViewById(R.id.value);
values.put(DatabaseHelper.TITLE, title.getText().toString());
values.put(DatabaseHelper.VALUE, value.getText().toString());
task = new InsertTask().execute(values);
}
use of android.widget.EditText in project cw-omnibus by commonsguy.
the class EditorFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
int position = getArguments().getInt(KEY_POSITION, -1);
View result;
if (position == 2) {
ViewGroup doctorNo = new NoAssistFrameLayout(getActivity());
inflater.inflate(R.layout.editor, doctorNo);
result = doctorNo;
} else {
result = inflater.inflate(R.layout.editor, container, false);
}
EditText editor = (EditText) result.findViewById(R.id.editor);
editor.setHint(getTitle(getActivity(), position));
if (position == 1) {
editor.setTransformationMethod(PasswordTransformationMethod.getInstance());
}
return (result);
}
use of android.widget.EditText in project UltimateAndroid by cymcsg.
the class MaterialEditTextActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.material_edittext_activity_main);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowTitleEnabled(false);
EditText singleLineEllipsisEt = (EditText) findViewById(R.id.singleLineEllipsisEt);
singleLineEllipsisEt.setSelection(singleLineEllipsisEt.getText().length());
}
use of android.widget.EditText in project cw-advandroid by commonsguy.
the class ActionModeDemo method onCreateOptionsMenu.
@Override
public boolean onCreateOptionsMenu(Menu menu) {
new MenuInflater(this).inflate(R.menu.option, menu);
EditText add = null;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
View v = menu.findItem(R.id.add).getActionView();
if (v != null) {
add = (EditText) v.findViewById(R.id.title);
}
}
if (add != null) {
add.setOnEditorActionListener(onSearch);
}
return (super.onCreateOptionsMenu(menu));
}
use of android.widget.EditText in project cw-omnibus by commonsguy.
the class EditorFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View result = inflater.inflate(R.layout.editor, container, false);
EditText editor = (EditText) result.findViewById(R.id.editor);
int position = getArguments().getInt(KEY_POSITION, -1);
editor.setHint(String.format(getString(R.string.hint), position + 1));
return (result);
}
Aggregations