In some apps I see an EditText widget combined with a Button on the right side (e.g. the search field in the twitter app). How can I create a widget like that?
Regards, Marco
I finally found a solution. Here's how the google guys did it: search_bar.xml Thanks for your help!
Check out the TableLayout and the RelativeLayout in the Android developer center.
There are a few more official tutorials on layouts here.
If you use the TableLayout, you can put an EditText in the left column of a two column layout, and then put the button on the right. Or, probably a better way, would be to use a RelativeLayout, which gives you a little more flexibility.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With