[android-beginners] Re: center the tablelayout

2008-12-12 Thread Josh Dobbs
Can anyone anyone point me in the right direction?

On Thu, Dec 11, 2008 at 6:44 AM, Josh  wrote:

>
> my view is comprised of a tablelayout. How can I set the table in the
> center of the screen? by default it looks to be left alligned.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: center the tablelayout

2008-12-12 Thread Josh Dobbs
Nevermind :)
I fixed my problem by using android:stretchColumns

On Fri, Dec 12, 2008 at 10:09 PM, Josh Dobbs  wrote:

> Can anyone anyone point me in the right direction?
>
>
> On Thu, Dec 11, 2008 at 6:44 AM, Josh  wrote:
>
>>
>> my view is comprised of a tablelayout. How can I set the table in the
>> center of the screen? by default it looks to be left alligned.
>> >>
>>
>
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: center the tablelayout

2008-12-13 Thread Mark Murphy

Josh Dobbs wrote:
 > my view is comprised of a tablelayout. How can I set the table in the
 > center of the screen? by default it looks to be left alligned.

Have you tried adding android:layout_gravity="centerHorizontal" to your 
TableLayout, to center it in the parent container?

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: center the tablelayout

2008-12-13 Thread Josh Dobbs
I did try that and i get the following error at design time...
Description Resource Path Location Type
ERROR Error: String types not allowed (at 'layout_gravity' with value
'centerHorizontal'). main.xml  line 3 aapt Problem



On Sat, Dec 13, 2008 at 8:37 AM, Mark Murphy wrote:

>
> Josh Dobbs wrote:
>  > my view is comprised of a tablelayout. How can I set the table in
> the
>  > center of the screen? by default it looks to be left alligned.
>
> Have you tried adding android:layout_gravity="centerHorizontal" to your
> TableLayout, to center it in the parent container?
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com
>
> Android Training on the Ranch! -- Mar 16-20, 2009
> http://www.bignerdranch.com/schedule.shtml
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: center the tablelayout

2008-12-13 Thread Romain Guy

"center_horizontal" not "centerHorizontal" :)

On Sat, Dec 13, 2008 at 9:42 PM, Josh Dobbs  wrote:
> I did try that and i get the following error at design time...
> Description Resource Path Location Type
> ERROR Error: String types not allowed (at 'layout_gravity' with value
> 'centerHorizontal'). main.xml  line 3 aapt Problem
>
>
>
> On Sat, Dec 13, 2008 at 8:37 AM, Mark Murphy 
> wrote:
>>
>> Josh Dobbs wrote:
>>  > my view is comprised of a tablelayout. How can I set the table in
>> the
>>  > center of the screen? by default it looks to be left alligned.
>>
>> Have you tried adding android:layout_gravity="centerHorizontal" to your
>> TableLayout, to center it in the parent container?
>>
>> --
>> Mark Murphy (a Commons Guy)
>> http://commonsware.com
>>
>> Android Training on the Ranch! -- Mar 16-20, 2009
>> http://www.bignerdranch.com/schedule.shtml
>> >>
>



-- 
Romain Guy
www.curious-creature.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: center the tablelayout

2008-12-13 Thread Josh Dobbs
I tried that as well with no luck

On Sat, Dec 13, 2008 at 12:44 PM, Romain Guy  wrote:

>
> "center_horizontal" not "centerHorizontal" :)
>
> On Sat, Dec 13, 2008 at 9:42 PM, Josh Dobbs  wrote:
> > I did try that and i get the following error at design time...
> > Description Resource Path Location Type
> > ERROR Error: String types not allowed (at 'layout_gravity' with value
> > 'centerHorizontal'). main.xml  line 3 aapt Problem
> >
> >
> >
> > On Sat, Dec 13, 2008 at 8:37 AM, Mark Murphy 
> > wrote:
> >>
> >> Josh Dobbs wrote:
> >>  > my view is comprised of a tablelayout. How can I set the table in
> >> the
> >>  > center of the screen? by default it looks to be left alligned.
> >>
> >> Have you tried adding android:layout_gravity="centerHorizontal" to your
> >> TableLayout, to center it in the parent container?
> >>
> >> --
> >> Mark Murphy (a Commons Guy)
> >> http://commonsware.com
> >>
> >> Android Training on the Ranch! -- Mar 16-20, 2009
> >> http://www.bignerdranch.com/schedule.shtml
> >> >>
> >
>
>
>
> --
> Romain Guy
> www.curious-creature.org
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: center the tablelayout

2008-12-13 Thread Romain Guy

It will work only if your TableLayout has a width set to wrap_content,
otherwise it will occupy the entire screen.

On Sat, Dec 13, 2008 at 9:51 PM, Josh Dobbs  wrote:
> I tried that as well with no luck
>
> On Sat, Dec 13, 2008 at 12:44 PM, Romain Guy  wrote:
>>
>> "center_horizontal" not "centerHorizontal" :)
>>
>> On Sat, Dec 13, 2008 at 9:42 PM, Josh Dobbs  wrote:
>> > I did try that and i get the following error at design time...
>> > Description Resource Path Location Type
>> > ERROR Error: String types not allowed (at 'layout_gravity' with value
>> > 'centerHorizontal'). main.xml  line 3 aapt Problem
>> >
>> >
>> >
>> > On Sat, Dec 13, 2008 at 8:37 AM, Mark Murphy 
>> > wrote:
>> >>
>> >> Josh Dobbs wrote:
>> >>  > my view is comprised of a tablelayout. How can I set the table
>> >> in
>> >> the
>> >>  > center of the screen? by default it looks to be left alligned.
>> >>
>> >> Have you tried adding android:layout_gravity="centerHorizontal" to your
>> >> TableLayout, to center it in the parent container?
>> >>
>> >> --
>> >> Mark Murphy (a Commons Guy)
>> >> http://commonsware.com
>> >>
>> >> Android Training on the Ranch! -- Mar 16-20, 2009
>> >> http://www.bignerdranch.com/schedule.shtml
>> >> >>
>> >
>>
>>
>>
>> --
>> Romain Guy
>> www.curious-creature.org
>> >>
>



-- 
Romain Guy
www.curious-creature.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: center the tablelayout

2008-12-13 Thread Josh Dobbs
my mistake. i had tried "center_Horizantal". i just changed it to
"center_horizontal"  and although i don't get an error it doesnt center the
tablelayout in the middle of the display.


On Sat, Dec 13, 2008 at 12:44 PM, Romain Guy  wrote:

>
> "center_horizontal" not "centerHorizontal" :)
>
> On Sat, Dec 13, 2008 at 9:42 PM, Josh Dobbs  wrote:
> > I did try that and i get the following error at design time...
> > Description Resource Path Location Type
> > ERROR Error: String types not allowed (at 'layout_gravity' with value
> > 'centerHorizontal'). main.xml  line 3 aapt Problem
> >
> >
> >
> > On Sat, Dec 13, 2008 at 8:37 AM, Mark Murphy 
> > wrote:
> >>
> >> Josh Dobbs wrote:
> >>  > my view is comprised of a tablelayout. How can I set the table in
> >> the
> >>  > center of the screen? by default it looks to be left alligned.
> >>
> >> Have you tried adding android:layout_gravity="centerHorizontal" to your
> >> TableLayout, to center it in the parent container?
> >>
> >> --
> >> Mark Murphy (a Commons Guy)
> >> http://commonsware.com
> >>
> >> Android Training on the Ranch! -- Mar 16-20, 2009
> >> http://www.bignerdranch.com/schedule.shtml
> >> >>
> >
>
>
>
> --
> Romain Guy
> www.curious-creature.org
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: center the tablelayout

2008-12-13 Thread Josh Dobbs
ok. Thanks! I got it to work ith wrap_content.

On Sat, Dec 13, 2008 at 12:54 PM, Romain Guy  wrote:

>
> It will work only if your TableLayout has a width set to wrap_content,
> otherwise it will occupy the entire screen.
>
> On Sat, Dec 13, 2008 at 9:51 PM, Josh Dobbs  wrote:
> > I tried that as well with no luck
> >
> > On Sat, Dec 13, 2008 at 12:44 PM, Romain Guy 
> wrote:
> >>
> >> "center_horizontal" not "centerHorizontal" :)
> >>
> >> On Sat, Dec 13, 2008 at 9:42 PM, Josh Dobbs 
> wrote:
> >> > I did try that and i get the following error at design time...
> >> > Description Resource Path Location Type
> >> > ERROR Error: String types not allowed (at 'layout_gravity' with value
> >> > 'centerHorizontal'). main.xml  line 3 aapt Problem
> >> >
> >> >
> >> >
> >> > On Sat, Dec 13, 2008 at 8:37 AM, Mark Murphy  >
> >> > wrote:
> >> >>
> >> >> Josh Dobbs wrote:
> >> >>  > my view is comprised of a tablelayout. How can I set the table
> >> >> in
> >> >> the
> >> >>  > center of the screen? by default it looks to be left alligned.
> >> >>
> >> >> Have you tried adding android:layout_gravity="centerHorizontal" to
> your
> >> >> TableLayout, to center it in the parent container?
> >> >>
> >> >> --
> >> >> Mark Murphy (a Commons Guy)
> >> >> http://commonsware.com
> >> >>
> >> >> Android Training on the Ranch! -- Mar 16-20, 2009
> >> >> http://www.bignerdranch.com/schedule.shtml
> >> >> >>
> >> >
> >>
> >>
> >>
> >> --
> >> Romain Guy
> >> www.curious-creature.org
> >> >>
> >
>
>
>
> --
> Romain Guy
> www.curious-creature.org
>
> >
>


-- 
cell: 714-588-4077  - feel free to send me txt msgs at this number
email: joshdo...@gmail.com, joshdo...@hotmail.com
Yahoo Messenger: makef...@yahoo.com
AIM: JoshDFlexGuy
MSN: joshdo...@hotmail.com
Google Talk: joshdo...@gmail.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---