4 messages in com.googlegroups.android-developers[android-developers] Re: Setting Edit...
FromSent OnAttachments
kingkung25 Apr 2008 16:11 
kingkung25 Apr 2008 16:32 
Romain Guy25 Apr 2008 16:57 
kingkung25 Apr 2008 17:17 
Subject:[android-developers] Re: Setting EditText and Spinner at the same height level...
From:kingkung (king@gmail.com)
Date:04/25/2008 05:17:36 PM
List:com.googlegroups.android-developers

Thank you for the response.

I guess I'll just have to wait...

On Apr 25, 4:58 pm, "Romain Guy" <roma@google.com> wrote:

This is because, by default, TableRow aligns widgets on their text baseline. It is more important to have the texts aligned than the actual object boundaries. However, next SDKs have a different Spinner with the same height as EditText.

On Fri, Apr 25, 2008 at 4:11 PM, kingkung <king@gmail.com> wrote:

I have a table layout and I'm programatically adding an EditText object and a Spinner on one table row. Simple enough, right? You'd think, since it's a TableROW, that the two objects would be level. Instead, the Spinner is always slightly below the EditText object.

Is there a good way to fix this? I've tried setGravity(TOP) on the Spinner, but that only moves the text to the top edge of the Spinner. I can't manually adjust the height of the Spinner because this is a TableRow, and for whatever reason, setting LayoutParams on the Spinner gives me the "Invalid LayoutParam error". Anyway, I shouldn't have to adjust the height: I assume that there should be a simple way to keep the Spinner at the same height as the Spinner...

James