The gravity should be set on the LinearLayout.LayoutParams instead.
Ahhh... yes, that fixed it. I misread the function and thought it applied to
the View / Widget it was being called on. My bad.
*Now* I'm in business - thanks!
--
You received this message because you are subscribed to the G
The gravity should be set on the LinearLayout.LayoutParams instead. You
could also set it on rootContainer. When you call
LinearLayout.setGravity(), gravity applies to the children of the
LinearLayout. If you set the gravity on the LayoutParams, gravity is
applied by the parent on the child the Lay
Could you use a LinearLayout and set the layout_weight of each custom view
to 1?
Hmmm... yes, good call, but there's a slight twist. It seems that gravity
doesn't work in LinearLayout. Consider the following code (in onCreate() ):
---
super.onCreate(savedInstanceState);
// Create the root co
Could you use a LinearLayout and set the layout_weight of each custom view
to 1?
-Erik
On Monday, April 30, 2012 4:10:33 AM UTC-7, JTeagle wrote:
>
> >This should work so long as Widget 1 and Widget 3 have knowable
> >heights (e.g., Button, not ListView) and there is still room on the
> >screen
On Mon, Apr 30, 2012 at 7:10 AM, JTeagle wrote:
> Consider the following revised example:
>
>
> Widget 1 - natural height
> Custom View A - largest height possible
> Widget 2 - natural height
> Custom View B - largest height possible
>
> Widget 3 - natural height
> Custom View C - largest height p
>This should work so long as Widget 1 and Widget 3 have knowable
>heights (e.g., Button, not ListView) and there is still room on the
>screen for Widget 2.
Thanks for this. I see where you're going with it, but unfortunately that
won't help my situation - and that's my fault for not making my exa
On Sun, Apr 29, 2012 at 5:42 AM, JTeagle wrote:
> I'm using RelativeLayout to create rows of controls and would like to
> achieve the following:
>
> Widget 1 - natural height
> Custom view - remaining space after Widgets 1 and 3
> Widget 3 - natural height
Widget 1 has android:alignPa
I'm using RelativeLayout to create rows of controls and would like to
achieve the following:
Widget 1 - natural height
Custom view - remaining space after Widgets 1 and 3
Widget 3 - natural height
If I add the view in the correct order and use FILL_PARENT, it uses the
remainin
8 matches
Mail list logo