Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I am currently working on tab hosts as well, and I have yet to diagnose your specific issue. However, I do have one bit of what I hope is helpful advice. You have set up your code to hide your action/title bar programmatically. There is another way to do this, that I would suggest is cleaner. With the way you are doing it, the first time you launch this app on your emulator, you will see the bar pop up for a moment and then disappear. The second time you open the app, it won't appear. Beyond that, as you switch activities, sometimes it will reappear before that particular line of code executes. So, the better way to get the result of no action/title bar is via the AndroidManifest.xml document:</p> <pre><code>&lt;application android:icon="@drawable/ic_launcher" android:label="@string/app_name" &gt; &lt;activity android:theme="@android:style/Theme.Holo.NoActionBar" android:name=".Polling" android:label="@string/app_name" &gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;activity </code></pre> <p>As you can see, the fifth (5) line of this code is what I just mentioned. I suppose you could call this a design philosophy or best practice, but it looks much better on the screen when you add the line in the XML rather than the code. Doing it this way prevents the times where the action/title bar does appear - it will always be gone.</p> <p>My final note would be about your tab question. I encourage you to take a look at this page: <a href="http://developer.android.com/guide/topics/ui/actionbar.html" rel="nofollow">http://developer.android.com/guide/topics/ui/actionbar.html</a> and scroll/Ctrl+f to the portion about Adding Navigation Tabs. These are how some newer Google applications are accomplishing the role tabs will play in your application. Unfortunately, it's fairly more complex than TabHost. I was in the exact same boat as you a couple days ago: making an app where I got rid of my action bar. Then I discovered this action bar tab system (after having seen it on my own android phone and liking it) and decided I wanted to employ it instead of a tab host. But... like I said, it's a bit over my head still, so I'm going to have to learn a few precursors first.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload