Thank you Jack But no change in the lay out. i tried to add using
table raw in a table layout dynamically. in that case i am getting
blank screen
On Jul 8, 8:59 pm, Jack Ha <[email protected]> wrote:
> Try changing:
>
> android:orientation="vertical"
>
> to
>
> android:orientation="horizontal"
>
> --
> Jack Ha
> Open Source Development Center
> ・T・ ・ ・Mobile・ stick together
>
> The views, opinions and statements in this email are those of
> the author solely in their individual capacity, and do not
> necessarily represent those of T-Mobile USA, Inc.
>
> On Jul 8, 7:01 am, Ani <[email protected]> wrote:
>
> > Hi ,
> > I am trying to load textView and CheckBox view dynamically to a
> > LinearLayout. i am getting some Orientation problem while doing the
> > same.I want these two view in a single row but i its coming as in
> > different raw. Below is may code
> > LinearLayout layout=(LinearLayout)
> > findViewById(R.id.jlayout);
> > TextView textView=new TextView(this);
> > textView.setLayoutParams(new LayoutParams(75,35));
> > textView.setText(exhibitData.getExhibitName());
> > textView.setTextColor(Color.BLACK);
> > textView.setBackgroundColor(Color.CYAN);
> > checkBox= new CheckBox(this);
> > checkBox.setLayoutParams(new LayoutParams(75,35));
> > checkBox.setId(exhibitData.getCheckBoxID());
> > tableRow.setOrientation(0);
> > tableRow.setBackgroundColor(Color.YELLOW);
> > layout.addView(textView,new
> > TableLayout.LayoutParams(
> > LayoutParams.WRAP_CONTENT,
> > LayoutParams.WRAP_CONTENT));
> > layout.addView(checkBox,new
> > TableLayout.LayoutParams(
> > LayoutParams.WRAP_CONTENT,
> > LayoutParams.WRAP_CONTENT));
>
> > layoutxml is
>
> > <ScrollView android:id="@+id/scroll"
> >
> > android:layout_width="fill_parent"
> >
> > android:layout_height="250px"
> > >
>
> > <LinearLayout android:id="@+id/jlayout"
> > android:layout_width="fill_parent"
> > android:layout_height="fill_parent"
> > android:layout_centerInParent="true"
> > android:orientation="vertical"
> > android:layout_gravity="center">
>
> > </LinearLayout>
> > </ScrollView>
>
> > Please help me to solve this
> > Thank you,
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---