It seems that I can not understand how to get the text code from layout.xml: My activity: EditText Pressing I want to use text from
EditText .
& Lt; EditText Android: id = "@ + id / edittext" Android: layout_width = "fill_parent" android: layout_height = "wrap_content" /> & Lt; / LinearLayout & gt;
extends the public square micro activity {public string txtCheckin = "???"; Private string txtDescription = "???"; Private popup window PW; @ Override Public Wide On Crate (Bundle Avalanche) {Super; Nectar; // Get an example of LayoutInflater LayoutInflater inflater = (LayoutInflater) MyClass.this.getSystemService (Reference.LEOUT_INFLATER_SERVICE); // related XML file final view layouts = inflater.inflate (R.layout.popuplayout, (ViewGroup), enlarging our view from UBID (R.id.popup_menu_root)); // Create a 100px width and 200px height popup window PW = new popup window (layout, 100, 200, true); Last edited test edittextDescription = (EditText) findViewById (R.id.edittext); // We set the set on button in our popup button button (= button) layout.findViewById (R.id.popup_menu_button); Click Button.setOnClickListener {@Override Public Zero (see VV) {if (edittextDescription.getText ()! = Null) {string newString = edittextDescription.getText (). ToString (); Transmit check ("MANUAL", TxtCheckin, "1", newString);} and {transmit check ("MANUAL", txtCheckin, "1", "???");} Finish ();}}); }
private editingText txtDescription = (EditText) layout.findViewById (R. Id.txtDescription) string string = txtDescription.getText (). ToString ();
Comments
Post a Comment