Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8319941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:29:13+00:00 2026-06-08T22:29:13+00:00

After I started my second Activity, there isn’t the ActionBar. When I call GetSupportActivity,

  • 0

After I started my second Activity, there isn’t the ActionBar. When I call GetSupportActivity, it returns null. Why? I have minSdkVersion 10 and targetSdkVersion 15.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.test.myapp"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="10"
        android:targetSdkVersion="15"
        />
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/Theme.Sherlock.Light" 
        >
        <activity
            android:name=".MainActivity"
            android:label="@string/title_activity_main" 
            android:windowSoftInputMode="stateHidden"
            >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity 
            android:name=".ShowMusic2"
            android:label="Search Results">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
            </intent-filter>
        </activity>
    </application>

</manifest>

This is the OnCreate of my second activity (ShowMusic2). It is a ListActivity.

public class ShowMusic2 extends SherlockListActivity {
        @Override
        public void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);

        getSupportActionBar().setDisplayHomeAsUpEnabled(true);

        showMusic = getIntent();
        pkgName = getPackageName();
        html = (String)showMusic.getStringExtra(pkgName + ".html");     
        new populateListView().execute(songs.toArray(new Song[songs.size()]));
        adapter =new SongAdapter(this,R.layout.list_item1, songs.toArray(new Song[songs.size()]));
        setListAdapter(adapter);
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T22:29:14+00:00Added an answer on June 8, 2026 at 10:29 pm

    I havent played around with SherlockListActivity too much…but here’s a shot in the dark….try moving

       getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    

    into your onStart method override instead of the onCreate

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two for loops. which the second loop must be started after finishing
The purpose I aming for is, that 2 seconds after my activity was started
After the release of MVC 2, I have started to check and play with
How can an AsyncTask be started after a 3 second delay?
After having started a Drag & Drop operation by DragDrop.DoDragDrop(...) no more MouseMove Events
After following the RoR getting started tutorial, I added another model as: $ rails
Started learning Wicket after ASP.NET MVC and feel a little bit confused about managing
After a long investigation on how to use TFS 2010 I started with the
I recently started reading about ASP.net MVC and after getting excited about the concept,
I just started learning ASP.NET MVC4 today. After reading tutorials, downloading VS 2012, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.