Log in or register to post comments

Android action bar and title bar

October 16, 2013 - 3:15am #1



I'm not sure this is the correct place to post this but I think it's the most relevant.

I'm using Vuforia for Unity to create a very simple project. I have exported this project to Unity and followed the step to subclass my main activity with QCARPlayerActivity :

public class MainActivity extends QCARPlayerActivity


My applicationcompiles and runs successfully, I have even be able to add topviews such as buttons and labels (next step is fragment).

The only thing missing here is an action bar.

When I try the get the action bar with GetActionBar() in my main activity, the method returns null.

I red somewhere that it was because I had no Title Bar.

I also tried to force the app not to be in fullscreen without any success :


I made sure to export with the statusBarHidden parameter set to false in the Unity parameters :

  <bool name="hide_status_bar">False</bool>

Before the splashscreen I see the title bar, but it's as if it is covered by the QCAR view, or removed by the QCARPlayerActivity.

So my question is : how do I get an action bar (and a title bar since it seems to be the same thing) with my activity subclassign from QCARPlayerActivity.



Android action bar and title bar

October 16, 2013 - 10:19am #5


Thank you very much for your support.

Unfortunately I can't even get the action bar, as getActionBar() will always return null.

It seems this behavior is 'normal' when the title bar has been removed, because title bar and action bar are the same thing.

I also tried to add a custom title bar, but it makes the app crash.

Thank you

Android action bar and title bar

October 16, 2013 - 10:14am #4

Have you tried enabling overlay mode on the Action Bar ?


and also you may want to call .show() after QCARView has been found.


Android action bar and title bar

October 16, 2013 - 6:43am #3


Thank you for the link, this is the tutorial I followed when I wanted to addsubviews.

I don't think this is an Android issue, since the title bar (and action bar) is here before launching my QCARPlayerActivity.

I forgot to mention that Ialready have changed my theme in the manifest to : @android:style/Theme.Holo.Light

Is there a way o have access to the cource code of QCARPlayerActivity ? Or at least to know how to start the QCAR player in the view of my choice, in a standart activity (not a QCARPlayerActivity) ?


Android action bar and title bar

October 16, 2013 - 4:07am #2

This article may help:


It does not cover the Title Bar specific issue (as this is more an Android issue), but it provides some hints on how to add custom views on top of the QCAR view.


Log in or register to post comments