how to config android.widget.TabWidget in .xml file?

Put your problem here if it does not fit any of the other categories.

how to config android.widget.TabWidget in .xml file?

Postby sjtcool » Wed Dec 26, 2007 4:22 am

hi all,
Is there any related examples in the ApiDemo?
I want to set some pages to the TabWidget, each page has one ListView.
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <?xml version="1.0" encoding="utf-8"?>
  3.  
  4. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  5.  
  6.    android:orientation="vertical"
  7.  
  8.    android:layout_width="fill_parent"
  9.  
  10.    android:layout_height="fill_parent"
  11.  
  12.    >
  13.  
  14.  
  15.  
  16. <TabWidget
  17.  
  18.   android:layout_width="fill_parent"
  19.  
  20.    android:layout_height="wrap_content" >
  21.  
  22. <ListView  id="@+id/lvPageOne"
  23.  
  24.    android:layout_width="fill_parent"
  25.  
  26.    android:layout_height="wrap_content"
  27.  
  28.    />
  29.  
  30.    <!--how to set second page -->
  31.  
  32. </TabWidget>
  33.  
  34. </LinearLayout>
  35.  
  36.  
Parsed in 0.002 seconds, using GeSHi 1.0.8.4
sjtcool
Junior Developer
Junior Developer
 
Posts: 11
Joined: Wed Dec 19, 2007 3:18 am
Location: Nanjing

Top

Postby lordhong » Wed Dec 26, 2007 11:25 pm

TabWidget is deprecated... don't ask me why... ask Google... :roll:
lordhong
Developer
Developer
 
Posts: 42
Joined: Thu Nov 22, 2007 5:25 am
Location: New York

Postby plusminus » Wed Dec 26, 2007 11:32 pm

lordhong wrote:TabWidget is deprecated... don't ask me why... ask Google... :roll:


Hey Guys,

they are probably just renaming it to like "TabView" or sth :lol:

@sjtcool: Probably there is sth. like "TabRow", which is used in the "TableLayout"...

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby sjtcool » Thu Dec 27, 2007 4:09 am

thx all,

to lordhong, where to find TabWidget is deprecated, any web link? thx
lordhong wrote:TabWidget is deprecated... don't ask me why... ask Google... :roll:


to plusminus, is there any examples created by TabRow? can you show me some one, i have no idea to write the xml file, it seams so strange to me, hehe, thx.
plusminus wrote:
lordhong wrote:TabWidget is deprecated... don't ask me why... ask Google... :roll:


Hey Guys,

they are probably just renaming it to like "TabView" or sth :lol:

@sjtcool: Probably there is sth. like "TabRow", which is used in the "TableLayout"...

Regards,
plusminus
sjtcool
Junior Developer
Junior Developer
 
Posts: 11
Joined: Wed Dec 19, 2007 3:18 am
Location: Nanjing

Postby plusminus » Fri Dec 28, 2007 1:17 pm

Hello sjtcool,

I ment, that it seems logical to me that there is sth. like an equivalent to the following:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <TableLayout ...>
  2.  
  3.      <TableRow ...>
  4.  
  5.            <xyz>
  6.  
  7.      </TableRow>
  8.  
  9.      <TableRow ...>
  10.  
  11.            <xyz>
  12.  
  13.      </TableRow>
  14.  
  15.      <TableRow ...>
  16.  
  17.            <xyz>
  18.  
  19.      </TableRow>
  20.  
  21. </TableLayout>
Parsed in 0.001 seconds, using GeSHi 1.0.8.4


Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

TabWidget

Postby adnan1146 » Wed Jan 09, 2008 2:39 pm

though its deprecated then how can we implement tab behavior... ??
adnan1146
Freshman
Freshman
 
Posts: 4
Joined: Wed Jan 09, 2008 2:31 pm

Top

Postby plusminus » Wed Jan 09, 2008 5:41 pm

Hello adnan1146,

perhaps implement a kind of Toolbar, like lordhong did :src: here (contains code).

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google Feedfetcher and 19 guests