Works now.
Thanks
public class BBB extends Activity
{
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.bbb);
LinearLayout layout = (LinearLayout)findViewById(R.id.layoutInputs2);
*LinearLayout*.LayoutParams params = new *LinearLayout*.LayoutParams(*
LinearLayout*.LayoutParams.FILL_PARENT, *LinearLayout*
.LayoutParams.FILL_PARENT);
layout.setLayoutParams(params);
}
}
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/layoutInputs1"
>
<LinearLayout android:layout_width="fill_parent"
android:orientation="horizontal"
android:id="@+id/layoutInputs2"
android:layout_height="wrap_content">
</LinearLayout>
</LinearLayout>
On Sun, Jan 11, 2009 at 5:16 AM, Romain Guy <[email protected]> wrote:
> In this case you to use FrameLayout.LayoutParams. Note that having a
> FrameLayout as the parent of your content view is not guaranteed and could
> very well change across implementations and/or versions.
>
> On Jan 10, 2009 5:49 PM, "hmmm" <[email protected]> wrote:
>
>
> I've tried but the same result. Now in DDMS log I have:
>
> java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams
>
> ----- Original Message ----- From: "Peli" <[email protected]> To:
> "Android Developers" <an...
>
> Sent: Sunday, January 11, 2009 3:39 AM Subject: [android-developers] Re:
> Change linear layout progra...
>
> There's this suspicious line: java.lang.ClassCastException:
> android.view.ViewGroup$LayoutParams Hav...
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---