Question about TabHost implementation

by Meryl Silverburgh » Sat, 14 Mar 2009 01:52:13 GMT


Sponsored Links
 I have looked at TabHost code and I have a question.

Why it expects TabContent to be a FrameLayout? I see it casts
mTabContent to be FrameLayout.
Why TabContent can't be an instance of ViewGroup, but a FrameLayout?

Thank you.

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. gallery displaying RelativeLayout?

I'm trying to have my gallery display RelativeLayouts instead of
ImageViews, using the code from:
http://code.google.com/android/samples/ApiDemos/src/com/google/android/samples/view/Gallery1.html


My getView code looks like this, but I get null pointers and nothing
works:
 public View getView(int position, View convertView, ViewGroup parent)
{
        RelativeLayout i = (RelativeLayout) findViewById(R.id.ae);

                switch(position) {
            case 1:             i = (RelativeLayout) findViewById(R.id.am);
            case 2:             i = (RelativeLayout)
findViewById(R.id.ap);
                }
                // i.setImageResource(mImageIds[position]);
                // i.setScaleType(ImageView.ScaleType.FIT_XY);
                //i.setLayoutParams(new Gallery.LayoutParams(100, 65));
                return i;
            }
--~--~---------~--~----~------------~-------~--~----~

2. Service starts on Alarm

I want the program to allow a user to define a specific time and
date.. and a message should appear when the schedule is triggered.
Like if I set the time and date to 12 am, April 14, 2008, a message
should appear on that time. How do you suggest me to do that? Thanks..
--~--~---------~--~----~------------~-------~--~----~

3. emulator of m5-rc15 problem

4. Failed to open database file

5. Launch Aborted

6. XferMode

7. Confusing Problem about VideoView