java - Bug Running Android Tutorial HelloTabWidget under SDK 1.5: "setCurrentTag(getIntent())" -


does not compile actually: 1.5 also, this API, getIntent (), is already listed as excluded is.

Error message I'm getting that getIntent () does not return a string, but setCurrentTab () is expected of a string

If I think the line to read and Change:

"tabHost.setCurrentTab (1); // was set to getIntent ())",

then it compile, creates but does not run Does. I get the "unexpectedly closed" error message from the emulator. I can not even get log d for output, so it seems that it stops 'unexpectedly' long ago.

So the first and foremost question is "tabHost.setCurrentTab (getIntent)" in the last line of On-Crelet ()?

The second and the simplest question is whether I have been guessed to replace 'mTabHost' with the tabhost at one place in the right place?

There are problems and improvements here for this special tutorial:

Step 2: When creating your activities, if you do not make them through the manifest, you have to manually add them manually.

AndroidManifest.xml:

  and activity activity: Android: Android: Android: Android: Android: Android: Android: Android: label = "@ string / app_name" @Android: Style / Theme.NoTitleBar "& gt; & Lt; / Activity & gt; & Lt; Activity Android: Name = "Artists' Activity" Android: Label = "@ String / AppName" Android: Theme = "@ Android: Style / Theme No Title" & gt; & Lt; / Activity & gt; & Lt; Activity Android: name = "SongsActivity" android: label = "@ string / app_name" Android: Theme = "@Android: Style / Theme. No Titles Beer" & gt; & Lt; / Activity & gt;  

Step 3: You are instructed to create only the ic_tab_artists.xml file. You will also need to create one for ic_tab_songs.xml and ic_tab_albums.xml. You can just copy ic_tab_artists.xml (or change the HelloTabView.java tab app to use the artists.xml file for every tab).

Step 4: From the third to the last / race / layout / main line instead of the typo (a;)

  Android: Padding = "5dp" /> & Lt; / LinearLayout & gt; & Lt; / TabHost & gt;  

Step 6: is a typo that uses mTabHost calls instead of TabHost. Change it

As the getIntent () function on the previous line has already been cited, it is not suitable. I only call the tabs based on ID. Example:

  tabHost.setCurrentTabByTag ("Album");  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -