EditText editText = (EditText) findViewById(R.id.EditText01);
editText.setText("");BR, Adrian Vintu http://adrianvintu.com On Wed, Mar 10, 2010 at 8:09 PM, johne5s <[email protected]> wrote: > In my app I have two edittext boxes and two buttons. > If you type something in ether edittext and then press the cancel > button. I need the data cleared out of the edittext > > > (Main Layout doc) > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ > android" > android:orientation="vertical" > android:layout_width="fill_parent" > android:fitsSystemWindows="true" > android:layout_height="fill_parent" > android:background="@drawable/adti_300px" > android:fadingEdge="none"> > > > <EditText android:id="@+id/skymsg" > android:layout_width="fill_parent" > android:background="@android:drawable/ > editbox_background" > android:layout_below="@id/label" > android:width="100px" > android:layout_height="40px" > android:layout_gravity="center"/> > > > <EditText android:id="@+id/skyid" > android:background="@android:drawable/ > editbox_background" > android:layout_below="@id/label" > android:layout_width="wrap_content" > android:width="100px" > android:layout_height="40px" > android:layout_gravity="left"/> > > <Button android:id="@+id/ok" > android:layout_below="@id/skymsg" > android:text="OK" > android:layout_height="50px" > android:layout_width="100px" > android:onClick="ClickedOKButton" > android:layout_gravity="right" > android:layout_marginTop="-50px"/> > > <Button android:id="@+id/cancel" > android:layout_below="@id/ok" > android:text="Cancel" > android:layout_height="50px" > android:layout_width="100px" > android:layout_gravity="right" > android:onClick="ClickedCancelButton" /> > > </LinearLayout> > > > (my java file) - it's empty because i don't know what to do. > > /** Run When the Cancel button is clicked **/ > public void ClickedCancelButton(View v) > { > > } > /** End Run When the OK button is clicked **/ > > -- > You received this message because you are subscribed to the Google > Groups "Android Beginners" group. > > NEW! Try asking and tagging your question on Stack Overflow at > http://stackoverflow.com/questions/tagged/android > > To unsubscribe from this group, send email to > [email protected]<android-beginners%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en

