I was planning on writing a full blown tutorial but since I can tell
you are anxious to see it... This is a 1.5 compatible version that
uses modified versions of the TabActivity, TabHost, and TabWidget (and
related resources) from Android 1.6. There are obvious things that
could be done better but the idea is there and should at least get you
headed in the "right" direction.

http://nexsoftware.net/Android/Tutorials/CustomTabActivity.zip

On Sep 18, 6:36 am, Wouter <[email protected]> wrote:
> Thank you so much!
>
> On Sep 18, 3:03 pm, "nEx.Software" <[email protected]>
> wrote:
>
> > Sure, I'll throw together a quick sample and post it in a bit.
>
> > On Sep 18, 12:11 am, Wouter <[email protected]> wrote:
>
> > > And can you post the source code from this and your other example
> > > please?
>
> > > On 17 sep, 23:50, "nEx.Software" <[email protected]> wrote:
>
> > > > It just worked for me...
>
> > > > That being said, I have also copied all of the relevant code from the
> > > > Android Open Source Project, added a replaceContent(Intent intent)
> > > > method, and done the same thing as before but without the switching to
> > > > a new tab first... Again, I am almost positive that this is not the
> > > > correct way to do this so I hesitate to recommend it. I can't say
> > > > exactly what happens to the Activity, to be honest. It may be hanging
> > > > out in limbo.
>
> > > > On Sep 17, 2:44 pm, Wouter <[email protected]> wrote:
>
> > > > > But i want to show this new activity in the same active tab. now it
> > > > > opens in a new activity without showing my 3 tabs..
>
> > > > > On 17 sep, 23:28, "nEx.Software" <[email protected]> wrote:
>
> > > > > > It seems you cannot change the Activity of the current tab using
> > > > > > setContent(); That being said... Doing something you really probably
> > > > > > should not do, you can get this to work: Programmatically switch to
> > > > > > another tab (something like getTabHost().setCurrentTab(1);), then do
> > > > > > MainTabActivity.projectTab.setContent(i);, then go back to the
> > > > > > original tab (something like getTabHost().setCurrentTab(0);). Like I
> > > > > > said though... this is probably not something you should do.
>
> > > > > > On Sep 17, 1:52 pm, Wouter <[email protected]> wrote:
>
> > > > > > > Does someone has found an easy solution for this? I have the same
> > > > > > > issue. I have 3 tabs and I want to show a new activity in one of 
> > > > > > > these
> > > > > > > tabs!
>
> > > > > > > Wouter
>
> > > > > > > On Aug 12, 3:47 pm, Sena <[email protected]> wrote:
>
> > > > > > > > Thanks for the pointers Mark.
> > > > > > > > S
>
> > > > > > > > On Aug 12, 3:16 pm, Mark Murphy <[email protected]> wrote:
>
> > > > > > > > > Sena Gbeckor-Kove wrote:
> > > > > > > > > > Thanks for the tip. Can you point me at what I need to be 
> > > > > > > > > > looking up to
> > > > > > > > > > find the documentation about changing the viewinsidetheTab?
>
> > > > > > > > > You don't change the Viewinsideof atab. You cause the 
> > > > > > > > > existing View
> > > > > > > > > to show something else (e.g., use FrameLayout and make one 
> > > > > > > > > layer VISIBLE
> > > > > > > > > and another layer GONE, or use ViewFlipper to swap between 
> > > > > > > > > contents).
>
> > > > > > > > > You *might* be able to get setContent() to replace the 
> > > > > > > > > current View by
> > > > > > > > > passing in another layout ID or TabContentFactory, but I'm 
> > > > > > > > > skeptical
> > > > > > > > > this will work.
>
> > > > > > > > > Thetabwidget framework in Android is designed for simple 
> > > > > > > > > stuff. You
> > > > > > > > > may wish to grab the source code for the relevant classes out 
> > > > > > > > > of Android
> > > > > > > > > and make your own version that handles your own scenario.
>
> > > > > > > > > --
> > > > > > > > > Mark Murphy (a Commons 
> > > > > > > > > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > > > > > > > > Warescription: Three Android Books, Plus Updates, $35/Year
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to