Help Needed With Some Layout - UI Problems

by MobDev » Mon, 08 Feb 2010 22:56:47 GMT


Sponsored Links
 Hi,
I'd like to create an UI existing out of the following elements :

<LinearLayout>
    <TableLayout>
        <TableRow>
           <ImageButton>
           <TextView>
        </TableRow>
   </TableLayout>
   <ScrollView>
      <TableLayout>
         <TableRow>
            <ImageButton>
            <ImageButton>
         </TableRow>
          <TableRow>
            <ImageButton>
            <ImageButton>
         </TableRow>
          <TableRow>
            <ImageButton>
            <ImageButton>
         </TableRow>
      </TableLayout>
    </ScrollView>

So in short :
A vertical LinearLayout, which contains first a TableLayout with just
one TableRow, and afterwards a Scrollable Table...

If I try it like above I actually will only see the first TableLayout,
the ScrollView (with it's tabel and tablerows) won't show at all...
I read that within a ScrollView there should be a LinearLayout and in
there the TableLayout...
So I did that and it works but ONLY if I completely remove the first
TableLayout, which I actually want to keep..

So is this some kind of know bug, or how could I possibly solve this ?
Is it possible for a ScrollView to co-exist with another TableLayout
(on the same XML "level") ? Or can it onky exits if it's the only
child of the base-layout ?

--



Help Needed With Some Layout - UI Problems

by TreKing » Tue, 09 Feb 2010 02:39:12 GMT


 



What's the point of having a TableLayout with just one row? Why not just use
a horizontal LinearLayout?

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
 http://sites.google.com/site/rezmobileapps/treking 

--


Sponsored Links


Help Needed With Some Layout - UI Problems

by Sekhar » Tue, 09 Feb 2010 03:12:59 GMT


 It will work, make sure you have the orientation set to vertical for
the LinearLayout.




--



Help Needed With Some Layout - UI Problems

by MobDev » Tue, 09 Feb 2010 16:38:57 GMT


 well the idea of a tablelayout with just one row is that I want to
place two items, one on the left side of the screen and one centered
within the screen...
so if you have any idea how to achieve this ? Or will a horizontal
linearlayout fix that ?
I am having a lot of trouble, I love the fact that it's all so
customizable but it's somewhat TOO customizable.. I mena if I place a
Widget onscreen afterwards I got like 40 fields with options to set...
Some are completely criptic, many have a Gravity AND a
Layout_Gravity.. what's up with that ? If I place the gravity on
horizontal_centered it won't work but if I set the property "layout
center horizontal" to true it will... So I got 3 options, who all seem
to do the same but some will work the others won't and God help us
there is no good explanation/documentation about it... Anyone up to
finding the needle in the haystack ? ;)






--



Other Threads

1. write XML Document to File

This should be trivial, but for whatever reason I can't find any easy way to
do this.  Coming from C# where this is a 1 line call, I don't understand why
Java makes this so complicated, and on top of that android leaves even that
out of its libraries.

Anyway all I want to do is write an

org.w3c.dom.Document

that I have populated to a xml file.  It should be as easy as opening a
stream and writing document.toString().  But that doesn't work.

My hope is I'm just missing something.  Can some one help me out here?

thanks

-- 

2. TabHost text color

Hello

How could I change a text color in my tabs? I tried with custom theme

        <style name="MyTheme" parent="@android:style/Theme.Light.NoTitleBar">
                <item name="android:windowBackground">@color/beige</item>
                <item name="android:tabWidgetStyle">@style/VacationTab</item>
        </style>

        <style name="VacationTab" parent="@android:style/Widget.TabWidget">
                <item name="android:textAppearance">@style/
VacationTabTextApperance</item>
        </style>

        <style name="VacationTabTextApperance" parent="@android:style/
TextAppearance.Widget.TabWidget">
               <item name="android:textSize">15dip</item>
               <item name="android:textStyle">bold</item>
               <item name="android:textColor">#FF0000</item>
        </style>

But nothing changes.. what should I do? Text size and style are
applied, but color not.. why?

-- 

3. Getting the ID of an image in the MediaStore

4. Get more free softwares

5. Issue in streaming and playing video using videoview on Motorola milestone

6. Getting problem in keypad

7. Music