I've also tried changing it to just a normal activity and implementing the Hello, TabWidget example and doing nothing else other than return the widget configuration result. And I still get the same crash. Could it possibly have to do with using tabs in a widget configure activity. I'm not sure why that would make much of a difference.
On Dec 4, 11:50 am, ben <[email protected]> wrote: > I'm trying to create a tabbed view in my widget configure activity. > I'm using a tab activity as my activity type and I have the following > code. > > tabHost = getTabHost(); > tabHost.setup(); > > this.setTitle(getString(R.string.configure_widget)); > > tabHost.addTab(tabHost.newTabSpec("test") > .setIndicator("test") > .setContent(new Intent(this, > LocationListActivity.class)));*/ > TabHost.TabSpec locationTab = tabHost.newTabSpec(getString > (R.string.widget_location)); > > locationTab.setContent(new TabHost.TabContentFactory() > { > public View createTabContent(String tag) > { > createLocationTab(); > if( > !getIntent().getExtras().getBoolean( getString > ( R.string.intent_extra_configure ) ) ) > { > createWidgetCreateControl(); > } > return locationView; > } > > }); > locationTab.setIndicator(getString(R.string.widget_location)); > > tabHost.addTab(locationTab); > > createLocationTab is a simple function that creates a basic scroll > view with 1 text view and 1 button. Location view is a class member > variable that holds the view that createLocationTabs creates. When I > try to create a widget though it crashes periodically. > > The ddms log says it's a null pointer exception on line 292 of > TabHost.java. I checked the android source and it seems that current > view is null. Does anyone know what would cause this crash? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

