Search in sources :

Example 1 with EditText

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);
}
Also used : ContentValues(android.content.ContentValues) AlertDialog(android.app.AlertDialog) EditText(android.widget.EditText)

Example 2 with EditText

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);
}
Also used : EditText(android.widget.EditText) ViewGroup(android.view.ViewGroup) View(android.view.View)

Example 3 with EditText

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());
}
Also used : EditText(android.widget.EditText)

Example 4 with EditText

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));
}
Also used : EditText(android.widget.EditText) MenuInflater(android.view.MenuInflater) TextView(android.widget.TextView) View(android.view.View) ListView(android.widget.ListView)

Example 5 with EditText

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);
}
Also used : EditText(android.widget.EditText) View(android.view.View)

Aggregations

EditText (android.widget.EditText)613 View (android.view.View)288 TextView (android.widget.TextView)204 DialogInterface (android.content.DialogInterface)131 Button (android.widget.Button)120 AlertDialog (android.app.AlertDialog)114 Intent (android.content.Intent)90 LinearLayout (android.widget.LinearLayout)74 ImageView (android.widget.ImageView)59 AlertDialog (android.support.v7.app.AlertDialog)48 ScrollView (android.widget.ScrollView)47 AdapterView (android.widget.AdapterView)44 ViewGroup (android.view.ViewGroup)42 LayoutInflater (android.view.LayoutInflater)41 Editable (android.text.Editable)39 ListView (android.widget.ListView)38 RecyclerView (android.support.v7.widget.RecyclerView)36 Context (android.content.Context)34 Bundle (android.os.Bundle)34 KeyEvent (android.view.KeyEvent)34