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 7278315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:51:28+00:00 2026-05-28T22:51:28+00:00

I have a really strange behaviour with my tablet interface (Android > 3). When

  • 0

I have a really strange behaviour with my tablet interface (Android > 3).
When I launch it, it’s like a Android 2* interface with the title at the bottom.
And of course when I call the getActionBar() it returns a null.

My min-sdk & target-sdk are well set and I use the SDK Android 3.0 (11). Where am I wrong ?

public class MainScreenActivity extends Activity {

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.mainlayout);
    ActionBar bar = getActionBar();
    bar.setBackgroundDrawable(getResources().getDrawable(R.drawable.actionbar));

With the last line I get this error :

Caused by: java.lang.NullPointerException
E/AndroidRuntime( 9082):    at com.shoppingscanner.tablet.MainScreenActivity.onCreate(MainScreenActivity.java:21)
E/AndroidRuntime( 9082):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1050)
E/AndroidRuntime( 9082):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1782)
E/AndroidRuntime( 9082):    ... 11 more

My Manifest (Android 3.0 used) :

<uses-sdk
    android:minSdkVersion="5"
    android:targetSdkVersion="11" />

Even if the minSdk is 11, I have this behaviour.

Thanks !

  • 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-05-28T22:51:29+00:00Added an answer on May 28, 2026 at 10:51 pm

    You also need your Activity’s window to have the title visible. you can take help from
    here

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

Sidebar

Related Questions

I am experiencing some strange behaviour and I really don't have test date/ environments,
I have a really strange enum bug in Java. for(Answer ans : assessmentResult.getAnswersAsList()) {
I have a really strange issue. I am working on a Java SWING application
I'm experiencing something really strange! I have a div that I'm hiding with JS
I have a kind of strange thing that I really nead for my text
We have really strange and inconsistent behavior with Linq-to-SQL here. Our application is installed
I have noticed a strange piece of behaviour when using MessageDlg and attempting to
I have a really strange orientation issue. I have a sequence of view controllers
I have a really strange problem that I can't explain and fix, it is
I have a really strange issue relating to how I handle navigation in an

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.