Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Go To ( http://adf.ly/20PrE )-)-) [android-developers] Design question for tabs with multiple views, correct?
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
 
Firewalker  
View profile  
 More options Feb 20 2012, 1:11 pm
From: Firewalker <ara...@gmail.com>
Date: Mon, 20 Feb 2012 10:11:05 -0800 (PST)
Local: Mon, Feb 20 2012 1:11 pm
Subject: Go To ( http://adf.ly/20PrE )-)-) [android-developers] Design question for tabs with multiple views, correct?
Hello all,
I need your help with my application design. I am designing an
application with 4 tabs (using tabhost ..etc). The 4 tabs will be
identical in terms of layout (text views, buttons..etc) Except that
the texts and color are different from a tab to another. Tab 1 feeds
info to Tab2 and so on. How do you suggest I go about it? I will tell
you what I am thinking of doing and PLEASE correct me before  I start
as I am sure you guys are way more experienced than me :)

-Create layout.xml that has the layout design such as text views,
buttons ..etc
-In Java, I would create ONE activity for the whole thing and set the
the xml file as the content for each tab meaning that I would do
something like that
                th.setup();
                for(int i = 1; i<5; i++){
                        TabSpec specs = th.newTabSpec("Tab"+i);
                        specs.setContent(R.id.layout);
                        specs.setIndicator("Tab"+i);
                        th.addTab(specs);
                }

- I have a static variable (hash table or array) that contains the
values of all the tabs so that everytime a tab is clicked, I load it
layout with the correct text values and I set the background
appropriately.

Does this sound right?

Ideally, I wouldve preferred if I can set the content of each tab and
then be able to get access to each tab and updates the values there.
So that when the tab is requested the values are there but I don't
think there is a way I can do especially with the fact I am using the
same layout (meaning same IDs for its elements) for all the tabs

Any recommendations?
Thanks

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
Go to Master Mind Home Base Income Website   :-
           http://adf.ly/20PrE
            http://adf.ly/20PrE
Unsubscribe All Group Post :-   http://j.gs/624707/unsubscribe
                                              http://q.gs/624707/unsubscribe
Subscribe All Group Post :-       http://j.gs/624707/subscribe
                                                 http://q.gs/624707/subscribe
Join Now Today (Paid Income) :-
 http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/?id=624707
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE
http://adf.ly/20PrE


 
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.