Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Android™ Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Contributor
Posts: 18
Registered: ‎05-15-2013
My Device: 9700
My Carrier: vodafone

ActionBar android NullPointerException

i want to enable the android actionBar, however it doesnt work for me

here is my MainActivity:

 

public void onCreate(Bundle savedInstanceState) {

        this.requestWindowFeature(Window.FEATURE_NO_TITLE);


        super.onCreate(savedInstanceState);
        setContentView(R.layout.login);

        ActionBar actionBar = getActionBar();
        actionBar.show();

}

Contributor
Posts: 34
Registered: ‎05-02-2013
My Device: 9700
My Carrier: Idea

Re: ActionBar android NullPointerException

You Actionbar returns null because you don't have actionbar but you are requesting using getActionbar()

Make sure that you've window feature to show your actionbar, That is required for the actionbar to show. Check the below links for more details. ...check this question getActionBar returns null And also check this link for the more information on your problem http://blog.perpetumdesign.com/2011/08/strange-case-of-dr-action-and-mr-bar.html

other

remove

android:theme="@style/AppTheme"
Contributor
Posts: 18
Registered: ‎05-15-2013
My Device: 9700
My Carrier: vodafone

Re: ActionBar android NullPointerException

Thanks for ur reply
Contributor
Posts: 18
Registered: ‎05-15-2013
My Device: 9700
My Carrier: 919909743132

Re: ActionBar android NullPointerException

The Action Bar does not work with this...
this.requestWindowFeature(Window.FEATURE_NO_TITLE);

you have to use theme.holo.no_title for no title to display.....