TabHost in 1.5 problem

by EvgenyV » Wed, 29 Apr 2009 02:03:05 GMT


Sponsored Links
 i!

I have the problem since updated to 1.5. Some activity can be started
as independent activity.
In addition it can be hosted in TabHost.
tabHost.addTab(tabHost.newTabSpec("tabSettings")
.setIndicator(res.getString
(R.string.tab_settings_title),
res.getDrawable(R.drawable.settings_tab_40))
.setContent(new Intent(this, ViewSettings.class)));

When ViewSettings is starting as separate activity from some
CurrentActivity everything is OK.
Intent i = new IntentCurrentActivity ,
ConverterViewSettings.class);
CurrentActivity.startActivity(i);

But when the ViewSettings activity is starting on tab activation I got
StackOverflow exception.
The same code was OK in 1.1

There are stack trace:
04-28 17:30:26.954: ERROR/AndroidRuntime(12851): Uncaught handler:
thread main exiting due to uncaught exception
04-28 17:30:27.014: ERROR/AndroidRuntime(12851):
java.lang.StackOverflowError
04-28 17:30:27.014: ERROR/AndroidRuntime(12851): at
java.util.concurrent.locks.ReentrantLock$NonfairSync.lock
(ReentrantLock.java:177)
04-28 17:30:27.014: ERROR/AndroidRuntime(12851): at
java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:252)
04-28 17:30:27.014: ERROR/AndroidRuntime(12851): at
java.util.concurrent.CopyOnWriteArrayList.remove
(CopyOnWriteArrayList.java:384)
04-28 17:30:27.014: ERROR/AndroidRuntime(12851): at
android.view.ViewTreeObserver.removeOnPreDrawListener
(ViewTreeObserver.java:377)
04-28 17:30:27.014: ERROR/AndroidRuntime(12851): at
android.widget.TextView.onDraw(TextView.java:3745)
04-28 17:30:27.014: ERROR/AndroidRuntime(12851): at
android.view.View.draw(View.java:5838)
04-28 17:30:27.014: ERROR/AndroidRuntime(12851): at
android.view.ViewGroup.drawChild(ViewGroup.java:1486)
04-28 17:30:27.014: ERROR/AndroidRuntime(12851): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
04-28 17:30:27.014: ERROR/AndroidRuntime(12851): at
android.view.ViewGroup.drawChild(ViewGroup.java:1484)
04-28 17:30:27.014: ERROR/AndroidRuntime(12851): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
04-28 17:30:27.014: ERROR/AndroidRuntime(12851): at
android.view.View.draw(View.java:5841)
04-28 17:30:27.014: ERROR/AndroidRuntime(12851): at
android.view.ViewGroup.drawChild(ViewGroup.java:1486)
04-28 17:30:27.014: ERROR/AndroidRuntime(12851): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
04-28 17:30:27.014: ERROR/AndroidRuntime(12851): at
android.view.View.draw(View.java:5841)
04-28 17:30:27.014: ERROR/AndroidRuntime(12851): at
android.view.ViewGroup.drawChild(ViewGroup.java:1486)
04-28 17:30:27.014: ERROR/AndroidRuntime(12851): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
04-28 17:30:27.014: ERROR/AndroidRuntime(12851): at
android.view.View.draw(View.java:5841)
04-28 17:30:27.014: ERROR/AndroidRuntime(12851): at
android.view.ViewGroup.drawChild(ViewGroup.java:1486)
04-28 17:30:27.014: ERROR/AndroidRuntime(12851): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
04-28 17:30:27.014: ERROR/AndroidRuntime(12851): at
android.view.View.draw(View.java:5944)
04-28 17:30:27.014: ERROR/AndroidRuntime(12851): at
android.widget.FrameLayout.draw(FrameLayout.java:352)
04-28 17:30:27.014: ERROR/AndroidRuntime(12851): at
android.view.ViewG



Other Threads

1. java.lang.reflect.InvocationTargetException during calling a function of another application at runtime

Mark,

The application will be residing in the /sdcard/ and I am loading it
dynamically using PathClassLoader API.
and using Method.invoke() function I am invoking the method residing
in that class.

Yes it may violate the model but I need it in my application


  both are different application and I think both have different user
IDs. Is there any way to run both application as the same userID and
in the same process.???

Regards,

Asif


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

2. Frequent loss of data connections.

Hi,
I frequently see dropouts in my data connection on my G1? This can
happen on 3G or GPRS or wifi. My guess is  that it happens when the
phone transitions between the different data modes, it usually
manifests itself in a web page that fails to load or an email which
takes an hour
to send, it seems to back off and off to the point where I have to resend it.

I have not noticed this problem on handsets using other operating
systems in the same locale.

Am I alone in with this annoyance?

thanks

Mike

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

3. Java is to get a new owne

4. 3D UI

5. Should external/* depend on bionic-specifics ?

6. Java is to get a new owner

7. Using NetworkInfo for gathering info on a port?