need: tablelayout with independent tablerows

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

need: tablelayout with independent tablerows

Postby darolla » Thu Jan 22, 2009 9:49 am

hi,

if I use tablelayout all tablerows belong together and are formatted equally.

I need a tablelayout with 2 different tablerows, the 1st one with 3 widgets, the 2nd with 2 widgets.

I try it using ascii :)

Code: Select all
---------------------------------------------------
| Widget1 |       long Widget 2      | Widget3 |
---------------------------------------------------
|                  Widget4 | Widget5                  |
---------------------------------------------------
| Widget1 |       long Widget 2      | Widget3 |
---------------------------------------------------
|                  Widget4 | Widget5                  |
---------------------------------------------------
| Widget1 |       long Widget 2      | Widget3 |
---------------------------------------------------
|                  Widget4 | Widget5                  |


but how?

greetings,
darolla
User avatar
darolla
Master Developer
Master Developer
 
Posts: 273
Joined: Thu Sep 25, 2008 5:16 pm
Location: Dortmund, Germany

Top

Postby darolla » Thu Jan 22, 2009 5:02 pm

well, it wasn't that hard. :lol:

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <LinearLayout>
  3.  
  4.         <ScrollView>
  5.  
  6.                 <TableLayout>
  7.  
  8.  
  9.  
  10.                         <LinearLayout>
  11.  
  12.                                 <LinearLayout>
  13.  
  14.                                         <ImageView/>
  15.  
  16.                                         <TextView/>
  17.  
  18.                                         <TextView/>
  19.  
  20.                                 </LinearLayout>
  21.  
  22.  
  23.  
  24.                                 <LinearLayout>
  25.  
  26.                                         <ToggleButton/>
  27.  
  28.                                         <Button/>
  29.  
  30.                                 </LinearLayout>                        
  31.  
  32.                         </LinearLayout>
  33.  
  34.  
  35.  
  36.                 </TableLayout>
  37.  
  38.         </ScrollView>
  39.  
  40. </LinearLayout>
  41.  
  42.  
Parsed in 0.002 seconds, using GeSHi 1.0.8.4


the tablelayout has a linearlayout as child (instead of a tablerow). this linearlayout consists of 2 linearlayouts, each for one row.

my list simulation has the ability to collapse: just setting the visiblility of the 2nd row to GONE.

who can help me on an animation for collapsing?

greetings,
darolla
Attachments
screenshot.png
second listitem is opened, the others are collapsed
screenshot.png (25.48 KiB) Viewed 143 times
User avatar
darolla
Master Developer
Master Developer
 
Posts: 273
Joined: Thu Sep 25, 2008 5:16 pm
Location: Dortmund, Germany

Postby Emmanuel7 » Fri Jan 23, 2009 1:59 pm

I don't know if it is really feasable like that...

You could try to change the size of your table Layout, but I'm not convince it would work.

One last ( but a little hardcode ) solution would be to take a screen of the screen, extract the rectangle for your tablelayout, display it on top of your layout, set visible to Gone on your layout, animate, swap the layout then restore it....

Hum...
Quite some work, don't you want another kind of effect ?
Emmanuel7
Senior Developer
Senior Developer
 
Posts: 164
Joined: Fri Dec 12, 2008 2:17 am
Location: Paris

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 5 guests