Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
PageTurner, TabHost, or similar example?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  10 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ian  
View profile  
 More options Jan 25 2008, 11:54 am
From: Ian <heads...@gmail.com>
Date: Fri, 25 Jan 2008 08:54:24 -0800 (PST)
Local: Fri, Jan 25 2008 11:54 am
Subject: PageTurner, TabHost, or similar example?
Has anyone got PageTurner, TabHost, or anything similar working?  I'm
trying to develop a view with multiple "pages" and I'd love to see
some code that works, if anyone has something handy.

Yeah, I know TabHost is deprecated -- what's the replacement?

Cheers,

Ian


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Romain Guy  
View profile  
 More options Jan 25 2008, 1:18 pm
From: "Romain Guy" <romain...@google.com>
Date: Fri, 25 Jan 2008 10:18:22 -0800
Local: Fri, Jan 25 2008 1:18 pm
Subject: Re: [android-developers] PageTurner, TabHost, or similar example?

Hi,

The next version of the SDK will not provide PageTurner as part of the
default set of View. However, tabs will be back.

On Jan 25, 2008 8:54 AM, Ian <heads...@gmail.com> wrote:

> Has anyone got PageTurner, TabHost, or anything similar working?  I'm
> trying to develop a view with multiple "pages" and I'd love to see
> some code that works, if anyone has something handy.

> Yeah, I know TabHost is deprecated -- what's the replacement?

> Cheers,

> Ian

--
Romain Guy
www.curious-creature.org

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeffrey Sharkey  
View profile  
 More options Feb 7 2008, 11:20 pm
From: Jeffrey Sharkey <Jeffrey.Shar...@gmail.com>
Date: Thu, 7 Feb 2008 20:20:10 -0800 (PST)
Local: Thurs, Feb 7 2008 11:20 pm
Subject: Re: PageTurner, TabHost, or similar example?
I couldn't find any examples either, so I brute forced my way through
getting a TabHost working.  If anyone is interested, I wrote up a
quick example with screenshots:

http://www.jsharkey.org/blog/2008/02/07/using-android-tabhost/

I'd be interested in a working PageTurner example if anyone has
whipped one up.  The diagrams on the documentation page look nice.

j

On Jan 25, 9:54 am, Ian <heads...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Romain Guy  
View profile  
 More options Feb 7 2008, 11:36 pm
From: "Romain Guy" <romain...@google.com>
Date: Thu, 7 Feb 2008 20:36:36 -0800
Local: Thurs, Feb 7 2008 11:36 pm
Subject: Re: [android-developers] Re: PageTurner, TabHost, or similar example?

PageTurner will not be available in the next SDK, do not use it :)

On Feb 7, 2008 8:20 PM, Jeffrey Sharkey <Jeffrey.Shar...@gmail.com> wrote:

--
Romain Guy
www.curious-creature.org

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
plusminus  
View profile  
 More options Feb 15 2008, 10:31 am
From: plusminus <stoeps...@gmx.de>
Date: Fri, 15 Feb 2008 07:31:09 -0800 (PST)
Local: Fri, Feb 15 2008 10:31 am
Subject: Re: PageTurner, TabHost, or similar example?
Anyone got a working example on TabHost and TabWidget ?
Everything I try shows simply nothing. :(
####################
##  JAVA onCreate() ##
####################
        public void onCreate(Bundle icicle) {
                super.onCreate(icicle);
            setContentView(R.layout.set_menu);

            TabHost tabs =
(TabHost)this.findViewById(R.id.th_set_menu_tabhost);
            tabs.setup();

            TabSpec ts1 = tabs.newTabSpec("Page 1");
            ts1.setIndicator("pAGE ONE");
            ts1.setContent(R.id.content1);
            tabs.addTab(ts1);

            TabSpec ts2 = tabs.newTabSpec("Page 2");
            ts2.setIndicator("pAGE TWO");
            ts2.setContent(R.id.content2);
            tabs.addTab(ts2);
        }
###################
#####   XML   #######
###################
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/th_set_menu_tabhost"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <TabWidget
                android:id="@android:id/tabs"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"/>
        <FrameLayout
                android:id="@android:id/tabcontent"
                android:layout_width="fill_parent"
                android:layout_height="200px"
                android:paddingTop="30px">
            <LinearLayout
                    android:id="@+id/content1"
                    android:orientation="vertical"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent">

                    <TextView
                            android:layout_width="fill_parent"
                            android:layout_height="wrap_content"
                            android:text="OOOONNNNNEEEE" />
                </LinearLayout>
            <LinearLayout
                    android:id="@+id/content2"
                    android:orientation="vertical"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent">
                    <TextView
                            android:layout_width="fill_parent"
                            android:layout_height="wrap_content"
                            android:text="TTTTWWWWOOOO" />
                </LinearLayout>
        </FrameLayout>
</TabHost>
###################
Any suggestion is very welcome. !!

Regards, plusminus
http://anddev.org
#  Worlds largest Android Development Community / Tutorials

On Feb 8, 5:36 am, "Romain Guy" <romain...@google.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeffrey Sharkey  
View profile  
 More options Feb 15 2008, 10:38 am
From: Jeffrey Sharkey <Jeffrey.Shar...@gmail.com>
Date: Fri, 15 Feb 2008 07:38:23 -0800 (PST)
Local: Fri, Feb 15 2008 10:38 am
Subject: Re: PageTurner, TabHost, or similar example?
Yesterday I wrote up some quick changes to my original example to make
it work with the new M5 SDK.

http://www.jsharkey.org/blog/2008/02/14/android-tabhost-in-the-m5-sdk/

From your code, it looks like you need the TabWidget's layout_width to
be fill_parent.  Also the paddingTop should be about 65px so you can
see the tab text.  Hope this helps.  :)

j

On Feb 15, 8:31 am, plusminus <stoeps...@gmx.de> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
plusminus  
View profile  
 More options Feb 15 2008, 11:56 am
From: plusminus <stoeps...@gmx.de>
Date: Fri, 15 Feb 2008 08:56:27 -0800 (PST)
Local: Fri, Feb 15 2008 11:56 am
Subject: Re: PageTurner, TabHost, or similar example?
Hello Jeffrey,

thx, it was just:
############
        <TabWidget
                android:id="@android:id/tabs"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"/>
############
instead of
############
        <TabWidget
                android:id="@android:id/tabs"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"/>
############
:rolleyes:

Regards, plusminus
http://anddev.org
#  Worlds largest Android Development Community / Tutorials

On Feb 15, 4:38 pm, Jeffrey Sharkey <Jeffrey.Shar...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
plusminus  
View profile  
 More options Feb 16 2008, 9:30 am
From: plusminus <stoeps...@gmx.de>
Date: Sat, 16 Feb 2008 06:30:43 -0800 (PST)
Local: Sat, Feb 16 2008 9:30 am
Subject: Re: PageTurner, TabHost, or similar example?
Hello Jeffrey,

did you succeed in putting sth like a GridView instead of "Trivial
Views" into a tab ?
Following(end of post) xml-code works only if I delete the GridView.
Exception is:

"IllegalStateException: addView(View,Layoutparams) is not supported in
AdatperView."
But AdapetrView got that method:
"void    addView(View child, LayoutParams params)
        Adds a child view with the specified layout parameters."

Any idea ??

###########
                <LinearLayout
                        android:id="@+id/grid_set_menu_page2"
                        android:orientation="vertical"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent">
                    <GridView
                            android:orientation="vertical"
                            android:layout_width="fill_parent"
                            android:layout_height="fill_parent"
                            android:numColumns="3">
                                <ImageButton
                                        android:id="@+id/ibtn_set_menu_nightmode"
                                        android:layout_width="wrap_content"
                                        android:layout_height="wrap_content"
                                        android:src="@drawable/home_48"/>
                        </GridView>
                </LinearLayout>
###########

Regards, plusminus
http://anddev.org
#  Worlds largest Android Development Community / Tutorials

On Feb 15, 5:56 pm, plusminus <stoeps...@gmx.de> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
nipun  
View profile  
 More options Feb 18 2008, 12:13 am
From: nipun <nipungarg...@gmail.com>
Date: Sun, 17 Feb 2008 21:13:13 -0800 (PST)
Local: Mon, Feb 18 2008 12:13 am
Subject: Re: PageTurner, TabHost, or similar example?
hello sir,
I have a query, if i have 10 items in my TabHost, than how can i add
horizontal scroll in it,
if i restrict the size of TabWidget
android:layout_width="fill_parent", then it reduce the size of each
tab, so that it can fit the total width, and if i increase the size of
android:layout_width="900px", then the size of tabs is increased but
it will not scroll.
how can i scroll the tabs.

Thanks and regards
nipun


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
nipun  
View profile  
 More options Feb 18 2008, 6:06 am
From: nipun <nipungarg...@gmail.com>
Date: Mon, 18 Feb 2008 03:06:09 -0800 (PST)
Local: Mon, Feb 18 2008 6:06 am
Subject: Re: PageTurner, TabHost, or similar example?
Hello Sir,
I have a query, if i want to remove one of the tab's and its content
view how can i do it.

Thanks and Regards
Nipun


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »