views:

71

answers:

2

Hi,

I'm creating a ListActivity. In each list item I have a View I've created which contains a RatingBar and an EditText. In the screenshot at the bottom, you can see the virtual keyboard contains a returnline key and no "Done" key. I would like to specify a different style of keyboard to use (and hopefully retain the spell checking bar). I would like my virtual keyboard to have a "Done" key instead of a return key. Can I set the style of virtual keyboard I'm wanting in the EditText's XML? If so, how?

Thanks for your help

alt text

+1  A: 

Try android:imeOptions or TextView#setImeOptions(). Check the docs.

benvd
This works better than my other solution (my other solution caused a bug).However, I do have two problems:1) When I click the EditText to bring up the keyboard, the EditText loses focus and I have to click it again.2) When I click "Done" on the virtual keyboard, the focus goes to my RatingBar. I do not want this to happen; so I've set the RatingBar's clickable and focusable attributes to false, but you can still focus on it :\I suspect both problems are related. Any ideas?
Andrew
A: 

It would appear

android:inputType="textImeMultiLine|textAutoCorrect"

does mostly what I want. It only allows me to have my EditText be 1 row, though.

Andrew