How to make this layout?

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

How to make this layout?

Postby setrio » Tue Jan 19, 2010 5:27 pm

Hello guys.

I have a layout with a header (fixed in the screen) and then de body. The body has for example 3 buttons that would change screens, but each screen has to be loaded in the body.

What i have done is making a custom component for the header and then one new activity that contains the header and the screen. But i think there is a better way to do this. I try the viewflipper but does not works as spected. Any other idea? Using multiple layouts in the same activity could be a good aproach but can't get the fade in/out that i need (like the activity switch).
setrio
Junior Developer
Junior Developer
 
Posts: 17
Joined: Tue Jan 19, 2010 5:20 pm
Location: Uruguay

Top

Postby Skeniver » Thu Jan 21, 2010 2:47 pm

This may not be the proper/best solution, but you could have different layouts in the view. And then change their visibility depending on which button is pushed...

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <TextView
  3.  
  4.         HEADER TEXTVIEW/>
  5.  
  6. <LinearLayout
  7.  
  8.         android:layout_width="fill_parent"
  9.  
  10.         android:layout_height="wrap_content"
  11.  
  12.         <TextView
  13.  
  14.                 TextView stuff/>
  15.  
  16. </LinearLayout>
  17.  
  18. <LinearLayout
  19.  
  20.         android:visibility="Gone"
  21.  
  22.         <TextView
  23.  
  24.                 TextView stuff/>
  25.  
  26. </LinearLayout>
  27.  
  28. <LinearLayout
  29.  
  30.         android:visibility="Gone"
  31.  
  32.         <TextView
  33.  
  34.                 TextView stuff/>
  35.  
  36. </LinearLayout>
  37.  
  38.  
Parsed in 0.002 seconds, using GeSHi 1.0.8.4


Hope this makes sense...
Follow me on twitter -> http://twitter.com/Skeniver
Apps & blog -> http://www.formidableapps.co.uk
User avatar
Skeniver
Senior Developer
Senior Developer
 
Posts: 106
Joined: Tue Feb 03, 2009 3:51 pm
Location: Canterbury, UK

Postby setrio » Thu Jan 21, 2010 2:55 pm

yes, thats an option but for complex screens get a bit ugly. Thanks for the reply!
setrio
Junior Developer
Junior Developer
 
Posts: 17
Joined: Tue Jan 19, 2010 5:20 pm
Location: Uruguay

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 3 guests