Android :: How Does TabActivity Successfully Switch Activities?

Feb 10, 2009

I'm trying to implement my own ActivityGroup to mimic TabActivity (without tabs) but I'm having trouble "closing" activities.My ActivityGroup has a ViewFlipper, each housing a separate activity's window.When I attempt to switch "activities" I call ViewFlipper.setDisplayedChild() on the view of choice.However, when I scroll up and down in the view of choice, the OTHER non-visible activities' views are responding to these actions, so it seems like I'm not successfully "switching" the activity fully.When I use a TabActivity to run this code, this doesn't happen; when I scroll up and down in one activity, I don't see any event firing from any of the other activities. I'm wondering what does TabActivity do to handle these activities as separate, individual entities?

Android :: How does TabActivity successfully switch activities?

Android :: Why Add Child Activities To TabActivity Instead Of Simply Using Views

Mar 17, 2010

I've been programming in Android for two years now and just joined an Android project where they are using a TabActivity to host multiple Activities. It's unclear why this is better than rewriting the TabActivity to simply use Views instead.

TabActivity extends ActivityGroup which means TabActivity can host both Activities and Views. But what's the use of this capability? I was under the impression that Activities should be treated as individual screens of an application.

In short, what is an example use case where it's recommended that TabActivity should host multiple Activities rather than multiple Views?

View 4 Replies View Related

Android :: Manage Multiples Activities Under A Single Tab Of TabActivity?

Jul 8, 2010

In my app, I have 5 tabs which contains activities. In each of them, I have to show differents screens. For example, the main activity of a tab is a listview, and when I click on one of its item, I want to display a second screen with an other listview, that will display an other screen when the user will select an item etc.

So I knew that activities in tabs are not easy to manage, but I really think that I needed this solution. Indeed, each screen must contain a back button, which will return to the previous screen, with the previous state (the same position in the list).

To start new activities inside the tabs, I used the technique described here

It works mostly well, but I encounter a problem to go back to the previous activities. My solution at the moment consists in starting the previous activity like it's described on this website, but without any flag.

So here are my two real problems:

When I try to go back to the first and main activity of the tab, it seems that a new instance is created, even if I use the flag Intent.FLAG_ACTIVITY_CLEAR_TOP. So when I do several roundtrips between this activity and the next one, i obtain a StackErrorOverFlow.

Because the activities are accessible from differents activities, I have to memorize the parents activities all the time, by giving them in the intents. It's really heavy when I have a succession of 5 or 6 screens, I have to memorize the grand grand parent if the activity... I really appreciate if I just could call the last Activity started by the localActivityManager.

View 3 Replies View Related

Android :: Updating Views Of Sub Activities Of TabActivity From Background Process

Jul 25, 2010

I am using a TabActivity (Main) with 3 TabSpecs

I am using Intents for the content of the 3 Tabs

TabA, TabB, TabC for example.

All these tab activities use common data that is stored in SharedPreferences

In the Main TabActivity I have an options menu which has a refresh option.


This refresh uses an AsyncTask (updateCommonDataFromWeb) to reload the common data from the web.

I need a way to tell the 3 tab activities to refresh their views and rebuild their content from the newly downloaded data.

When the tab activities are first created they load the data from SharedPreferences like so:


I thought about making a common method on each of the tab activities
like.... reloadViewData()

I thought maybe I could use the activity manager from the Main TabActivity to get the activity of the current tab like so:


Unfortunately i cant get this approach to work, whilst activity is the correct instance its an Activity instead of a TabA,TabB or TabC

Maybe i've completely taken the wrong approach to the whole thing.

I have also read alot about not using Activities for tab content instead using views.
However I dont know what view to use to replace my <RelativeLayout /> as i cant use my R.layout.* as views.

View 2 Replies View Related

HTC Hero : Successfully Switch From Googlemail To Gmail

May 8, 2010

Has anybody successfully made the switch from googlemail to gmail in the UK. I stupidly made the switch but my hero wouldn't play so I had to go back to googlemail.

I am considering trying again as I am about to change to a different rom but does anybody know if the market is clever enough to spot that @googlemail and @gmail are the same address or will I lose my paid apps?

View 6 Replies View Related

Android :: Android - Screen Orientation Change To Switch Between Activities

Nov 12, 2010

I'm new to Android development. I'm trying to use the orientation change to switch between two activities. My idea is to use three Activities one TabActivity and a normal Activity. Here is some pseudo code:

public class Main extends Activity{
// this is the entry point into my app
public void onCreate(...){
if(this.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE){
// Start Activity1
} else { //Start Activity2}..............

I'm taking a different approach. As i need a TabActivity, because i want to be able to start different activities in my tabs (I think i have to use a TabActivity in this case). I've edited the Manifest.xml and added android.configChanges="orientation" for the TabActivity and the second Activity. Then I've overridden the onConfigurationChanged() functions. With this approach I'm able to switch from landscape (this is the "normal" activity") to portrait (the TabActivity). The other way round does not work and i don't know why yet. I've exactly the same onConfigurationChanged functions (Copy & Pasted) and only changed the essential parts. Overriding the onConfigurationChanged of the Activities started in the tabs has no effect, too.

View 1 Replies View Related

Android :: Switching Activities / Passing Data Between Activities

Jun 30, 2010

how to call BarCodeScanner, and return the value to a now, i have a toast that says "successful scan" and then i want to pass the result to a new activity. when i comment out my intent, everything works (minus the passing of data/switching of screen, obviously) but when i run my project as is, it FC's no errors reported by eclipse in code or xml. any insights?

View 2 Replies View Related

Android :: Runnable Posted Successfully But Not Run / Fix It?

Nov 3, 2010

In an existing Android project I've encountered the following piece of code (where I inserted the debugging litter) code...

with not a trace of the messages from the Runnable. So appearantly the Runnable doesn't run(), although returns true. Pulling the ImageView in onCreate() and declaring it final doesn't help.

I'm clueless. Simply setting the bitmap directly, while blocking the UI thread, does fix things, but I want to get things right. Does anybody understand what's going on here?

(ps. this was all observed on an Android 1.6 phone and android-3 sdk)

View 2 Replies View Related

Android :: Know Data Successfully Saved On Server?

Aug 30, 2010

In my application I am sending data to server if I had not pressed back button when data is sending to server then data is successfully saved on server and new screen (one created in layout folder) is displayed which says data is stored. But at the time of sending data if i pressed back button then also data successfully saved on server but I can't see that new screen that data is stored on server. How to handle this situation?

View 5 Replies View Related

Android :: Simulator Launched Successfully / How To Integrate It With Eclipse?

Feb 24, 2009

I download android's codes and build it for simulator. The simulator can be launched successfully, but it always popup "SORRY! Application Messaging (in process", or similar popup information. Do u know how to resolve it? By the way, how can I integrate it with eclipse? When I use eclipse, it reports many errors as following:
Description Resource Path Location Type Project 'android' is missing required library:
'out/target/common/obj/ JAVA_LIBRARIES/framework_intermediates/classes-compiled.jar' android Build path Build Path Problem Project 'android' is missing required library:
'out/target/common/obj/ JAVA_LIBRARIES/framework_intermediates/classes.jar' android
Build path Build Path Problem Project 'android' is missing required library:
'out/target/common/obj/ JAVA_LIBRARIES/framework_intermediates/javalib.jar' android
Build path Build Path Problem Project 'android' is missing required source folder: 'development/ tools/activitycreator/src' android
Build path Build Path Problem Project 'android' is missing required source folder: 'out/target/ common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java' android
Build path Build Path Problem Project 'android' is missing required source folder:
'out/target/ common/obj/JAVA_LIBRARIES/framework_intermediates/src/im/java' android
Build path Build Path Problem Project 'android' is missing required source folder:
'out/target/ common/obj/JAVA_LIBRARIES/framework_intermediates/src/location/ java' android
Build path Build Path Problem Project 'android' is missing required source folder:
'out/target/ common/obj/JAVA_LIBRARIES/framework_intermediates/src/media/java' android
Build path Build Path Problem Project 'android' is missing required source folder:
'out/target/ common/obj/JAVA_LIBRARIES/framework_intermediates/src/telephony/ java' android
Build path Build Path Problem Project 'android' is missing required source folder:
'out/target/ common/obj/JAVA_LIBRARIES/framework_intermediates/src/wifi/java' android
Build path Build Path Problem

View 5 Replies View Related

Android :: SDK Compiled Successfully But With Eclipse It Doesn't Work / Fix It

Oct 11, 2010

I spent a full day to get my Android SDK sources in my setup and compiled it successfully by doing the File System for x86 and also the SDK, everything was fine but when I tried to use it in my environment (Eclipse) and tried to compile my application (which is working fine on Froyo 2.2), I'm seeing some errors, which seems that I did not get the entire SDK with all the base packages included.

Steps to reproduce:

# repo sync to android sources. # make # make sdk # make Eclipse to point to the new SDK, generated at: .../out/host/ linux-x86/sdk/android-sdk_eng.david_linux-x86/ # generate a new AVD # launch it and run the application

If I'm missing something else.

View 5 Replies View Related

Android :: How To Know Successfully Connected To My Outgoing Number In Droid

Apr 14, 2010

Need to know this so that i could send DTMF and that is going to be my second question!

View 1 Replies View Related

Android :: Successfully Add Account To Droid E-mail Database?

Mar 8, 2010

I am trying to add an account to E-mail database ,Below is the way i'm trying ...code...

This code compiles successfully but account will not be created.

View 1 Replies View Related

Android :: Ads In Apps - Successfully Generate A Larger Revenue?

Mar 15, 2010

I wanted to start a discussion about displaying ads on apps.

1. What agencies do you recommended?

2. Displaying ads from agency A on activity A and display ads from agency B on activity B. Is that a good idea using two ad agencies in one app?

3. How are you optimizing to make more money when publishing ads on your app?

View 1 Replies View Related

Android :: Native Code Called Successfully But Not Executed Properly

Sep 10, 2009

In Android , Native code is written as follows.
JNIEXPORT void JNICALL Java_com_android_Test_show(JNIEnv *env, jobject obj) {
printf("THIS IS TEST");

View 7 Replies View Related

Android :: How To Avoid XML Verification Failed Error And Upgrading To 2.x SDK Successfully?

Mar 18, 2010

I have setup for Android development with 1.5 SDK on Mac O.S X - Eclipse 3.5. I want to upgrade the SDK, so as i followed to choose Window->Android SDK and AVD Manager from Eclipse. But it throws error as follows: XML verification failed for cvc-elt.1: Cannot find the declaration of element 'sdk:sdk- repository'. Failed to fetch URL I tried "http" instead of https, but still getting the same error. I don't know why such crap error comes. If i see Android website, .com /intl/zh-CN/sdk/index.html its confusing.Could someone guide me easily to update Android SDK to 2.x or later without uninstalling my current setup environment.

View 1 Replies View Related

Android :: Can't Resister Device - Run Chrometophone In Droid 2.2 Emulator Successfully?

May 23, 2010

I found Chrometophone here:

I'm trying to setup this project in Android 2.2 Emulator, but i can't setup a Google Account in Emulator, so i can't Resister Device. anybody run this project in emulator successfully? Any instructions?

View 2 Replies View Related

Android :: Add Footer In TabActivity

Jun 15, 2009

I created a TabActivity with contains 3 tabs. Each tab's content sets different Intents.I would like to add a "footer" wich will appear on each tab. So I get TabActivity's FrameLayout and add it my footer view.Is it possbile to define where place the footer (with an attribute like AT_BOTTOM)? So contentTab dimensions are calculated according to this footer.

View 4 Replies View Related

Android :: AlertDialog Within TabActivity

Oct 12, 2010

I have a TabActivity with 3 tabs. Each tab contains its own Activity. When one of the contained Activities pops up an AlertDialog, there are actually 3 dialogs created. The dialog has a Dismiss button and it must be pressed 3 times to finally dismiss the 3rd dialog.

View 2 Replies View Related

Android :: Returning Value From TabActivity

Oct 1, 2009

How can I return a value from TabActivity? It seems that the return value from tab pages vanishes and the caller always receives RESULT_CANCELED instead of RESULT_OK.

View 3 Replies View Related

Android :: TabActivity Customization / How Is Possible

Aug 18, 2009

More of a TabWidget question I guess really...

I would've tried to send a screenshot for this query if I could, but i'll try and explain.

I have 3 Tabs, each showing a separate Activity. Underneath those tabs (and above the activity display), I want to display a header. This header would probably be a Layout of some sort with a TextView inside it and a background 9patch.

Is this possible, if so how?

View 2 Replies View Related

Android :: TabActivity And ListActivity?

Feb 2, 2010

I am having a problem.I want to explain in detail. 1)I am Having an TabActivity with 5 tabs. I loaded content as follows.


And the Problem is If i want to start activity which is not specified in tabhost in above Java code,it is going out of tabactivity. ie.,It is not coming in tabactivity.

2)But i want to have all the activities under tabActivity.

View 4 Replies View Related

Android :: AsynQueryHandler In TabActivity

Aug 12, 2010

I create a TabActivity from Several ListActivities.

The lists are created from a cursor load in a AsyncQueryHandler. I have got no problem to load the content of the list.

After that I run an insert in the AsyncQueryHandler, and I meet the following error. The insert is done by the listActivity.

If I run my listActivity individually and that I do my insert, everything is find. Do know why ?


View 3 Replies View Related

Android :: Getting The TabActivity To Work?

Mar 26, 2010

I'm having some difficulties getting the TabActivity to work.

Here's the implementation of the class:


The problem is that I call this class from my main activity (which is a MapActivity if it matters) and when I do the TabActivity doesn't show. It registers the click on the option menu and it even starts the intent but the screen doesn't just stays on the main activity and i see in the logs that the main activity gets resumed.

I call it like this:


Like I said...there are no errors (the classes called from the tabs exist of course), just no actions. I put some log commands into the onCreate function in the tabactivity (as you see) and they all get written into the log...I have no idea what I'm doing wrong here.

View 3 Replies View Related

Android :: TabActivity With Scroll?

Dec 7, 2009

I'm working on Android v1.5. I want to use a TabActivity with 6 or 7 or more tabs. However, I do not want to clutter my screen with so many tabs together. Hence, I'd like to be able to show, say, 3 tabs on the screen, and to be able to scroll to the other tabs. How may I achieve this? I could not find any example for this by Googling.

View 5 Replies View Related

Android :: TabActivity And StartAcitivtyForResult

Apr 13, 2010

Can I make TabActivity start it's childs activities for result? I need it because I can't make result code from a tab to propagate all the way up in the chain (it's reset in the TabActivity)

View 1 Replies View Related

Android :: TabActivity - Refreshing ?

Aug 18, 2009

I have a TabActivity based class which has 3 tabs. All are ListActivities (but that's not important for this problem)

I'm updating the TabHost's TabSpec's to change the text on the tabs. This works fine and the ListActivities display correctly.

Iater on the execution flow I need to update the Text on the tabs from "Current Text" to "Current Text (3)", for example. I update the TabSpec.setIndicator() with the new text, and attempt to call invalidate() on the TabWidget (and all it's children). But the tab text refuses to update!

View 5 Replies View Related

Android :: Simple App With TabActivity

Nov 17, 2010

I have been trying to reuse the tutorial on the Android developer website about developing a TabActivity App but, unfortunately, it never worked, even when I constructed it the exact same way as it is described...
Using the debugger it seemed the problem came from the main layout.

-> setContentView(R.layout.main); //After this line the app stops.

Here is my main.xml:


View 1 Replies View Related

Android :: Display Successfully Message When Posted Comment In Facebook's Wall?

Nov 13, 2010

I am developing an android application and i am using fbconnect android for connect face book,It is working fine for login and post comment in facebook's wall,but i want to display successful message, when i posted commented in facebook wall.How to do for that.

View 1 Replies View Related

HTC EVO 4G :: Successfully Rooted Via Un-revoked 3

Nov 26, 2010

I've done a NAND backup, and I downloaded the full pay version of titanium backup and have frozen the bloatware and backed up everything on TB as well. so, now wondering how to do the fun stuff.

1. Should I try a new rom? If so which one is a good place to start for a noob? I am just looking mainly for something cool, clean, hopefully increase speed, eliminate lag, and has some cool stuff built in so I dont have to figure out how to do that stuff myself.Also I would want a ROM that still allows 4g etc.. and all the good stock stuff

2. Now that I am rooted, how do I backup things to the SD card? Previously I used the appstosd app from the market, shoudl I just keep using that? Anything that I should NOT transfer to SD, or can I just move everythign that it allows me to?

View 4 Replies View Related

Copyrights 2005-15, All rights reserved