[android-beginners] Re: How to build EditText view like that in Android Market where "X" button appears for clearing text?

2009-11-08 Thread westmeadboy
I've just been playing around with this solution and it works, sort of, but feels a little hacky. I was wondering if this alternative might work: 1. Use a LinearLayout and set the background to be the same StateListDrawable used by EditText - I can't get this to work, but then again I'm a newbie

[android-beginners] Re: Rounded corners for EditText

2009-11-02 Thread westmeadboy
On Nov 2, 9:18 pm, Mark Murphy wrote: > Create your own custom StateListDrawable to serve as the background. The > existing background should be in the Android source code -- clone that, > then modify the .9.png files as desired. Won't the existing background vary from one device to another? For

[android-beginners] Rounded corners for EditText

2009-11-02 Thread westmeadboy
I have an EditText view and would like to make the corners more rounded. How can this be done? -- 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

[android-beginners] Re: Best way to reposition contents of ListView at the top?

2009-10-08 Thread westmeadboy
empty? The docs don't specify. > > Yes. > > > 2. Is this better than just resetting the adapter? > > Much much much much much more efficient. > > > > > > > > > On Oct 9, 11:27 am, Romain Guy wrote: > >> setSelection(0) > > >

[android-beginners] Re: Best way to reposition contents of ListView at the top?

2009-10-08 Thread westmeadboy
Thanks. 1. Does this still work if the list is empty? The docs don't specify. 2. Is this better than just resetting the adapter? On Oct 9, 11:27 am, Romain Guy wrote: > setSelection(0) > > On Thu, Oct 8, 2009 at 8:14 PM, westmeadboy wrote: > > > I have a ListView which

[android-beginners] Best way to reposition contents of ListView at the top?

2009-10-08 Thread westmeadboy
I have a ListView which displays the results of some search. When the user makes a new search I repopulate the underlying Array of an ArrayAdapter and call notifyDataSetChanged(). However, if the user has previously scrolled down in the ListView then the scrolling is not then reset to the top - I

[android-beginners] Getting a reference to the View corresponding to the id passed to setContentView()

2009-06-01 Thread westmeadboy
I have one main.xml layout (top level is a LinearLayout) resource and I inflate this in the usual way within Activity.onCreate(): setContentView(R.layout.main); Now, I want to get a reference to the corresponding LinearLayout, but how? At the moment I have to add an id attribute to the LinearLa