Try: Drawable x = getResources().getDrawable(R.drawable.x); x.setBounds(0, 0, x.getIntrinsicWidth(), x.getIntrinsicHeight()); mEditText.setCompoundDrawables(null, null, x, null);
-- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 27, 7:20 am, mjc147 <westmead...@yahoo.co.uk> wrote: > I want to build a very simple view which looks exactly like the top > section of the Android Market search activity (i.e. search EditText > view and search button). Ideally I'd like it to look EXACTLY the same. > Maybe there is some layout XML and/or code I can reuse? > > Writing it fresh is also fine but I am not clear how to get the "X" > button (which appears inside the EditText view when the user enters > some text) functionality. That's there to allow the user to quickly > clear the text. > > Any tips? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---