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. (WTA) Aplikasi GPS di Android

Friends,

Mohon infonya, kalo di Android, aplikasi GPS yang berjalan dan petanya
lengkap apa ya? Saya pake Garmin XT di windows mobile. Sekarang pake
Magic 32a, sebaiknya pake aplikasi apa?

Thanks

-- 
Best Regards,

David Haryanto
david.harya...@gmail.com
HP: 0817834155
YM: d4vid_ehue

-- 
"Indonesian Android Community [id-android]" 

2. (wta)gimana supaya N1 lebih maksimal?

mo nanya nih..suhu2 yg disini..N1 sy msh {*filter*}..kalo mau d  
maksimalkan diapain yah? msh nubi nih soalnya 
blum tau istilah2 dlm dunia androidThanks banget

Robot ijo On nexus

--
"Indonesian Android Community [id-android]" Join: http://www.***.com/ Moderator: id.andr...@gmail.com Unsubscribe: id-android+unsubscr...@googlegroups.com id android Developer: http://www.***.com/ id android on FB: http://www.***.com/

3. Whats the intent ?

4. weather info on map depending on the lat and long

5. RelativeLayout added using LayoutInflater and addView doesn't obey fill_parent?

6. Searchify: Expand your search bar functionalit

7. (Repost) WTB: Nexus One BNIB (Sudah Dapat)