need a example for TabActivity,TabHost

by Rajab Ma » Fri, 09 May 2008 15:01:45 GMT


Sponsored Links
 I want to use TabActivity,but there's no demo or snippet can be
referenced.
Who can give me a example for this.
Thanks
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. General UI Questions

I just started trying to learn the Android SDK, and I've noticed that
it seems to lack a lot of documentation.

I was trying as a first exercise to add an "Every Day" option to the
alarm clock that would click the other items when it is checked. In
onPrepareDialogBuilder, I can check which index was clicked on, but I
don't know how to set the items to checked.

It seemed like I needed to use DialogPreference instead of
ListPreference in AlarmClock's RepeatPreference.java, but I don't
think I understand the relationship between DialogPreference,
ListPreference, and AlertDialog though.

If I change to a DialogPreference, I can add a LinearLayout in the
onCreate method, but it didn't make sense how I would add
CheckBoxPreferences to it. There's also a ToggleButton. Should I be
trying to add that instead? I can't find any examples of
DialogPreference being extended except in the Android code.

Thanks for any information

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

2. Indication of user activity from a service

I need to determine if a user has interacted with the screen,
keyboard, or trackball from a background service.  I don't need to
know coordinates, or actual keystrokes.  I just need to understand if
they have interacted with the phone in any way.  Anyone have any
creative ways to do this?

It would be great if the screen/keyboard/keys/trackball were available
in a manner similar to the other Sensors available on the phone, but
it seems that access to input devices is restricted in services as
part of Android security policies.

Based on my research, I'm not finding much of a possibility, so here's
what I'm considering:

- using information related to the current processes/activities via
ActivityManager to guess if an activity is being interacted with.
Possibly the amount of CPU time would increase more rapidly if the
user is typing or touching the screen?  Seems fairly unreliable...
- using one of the sensors to attempt to determine interaction with
the phone.  Acceleromter fluctuations, magnetic field fluctuations,
tricorder :).
- something else?

Thanks for any creative suggestions.

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

3. HTC Dream

4. android open database

5. interacting with phone

6. Start TTS from broadcast receiver

7. Use Android UI to let Wifi scan AP fail?