Hi all.
I have developed OSCRemote for Android 7 (API 24) with JUCE and I want to hide navigation bar but don’t know how to do it. I don’t have a MainActivity file in my project where I could put this code:
JUCE is creating a main activity already. If you wanted a permanent solution (something at start-up and remains that way for your app, as opposed to dynamically hiding this during runtime), I recommend using the styles.xml approach. (Check out the Android Styles and Themes page for details.)
You would create this file under a very specific set of folders: res/values/styles.xml.
In that file, you would then set its data to:
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<!-- Note that this might not be necessary... I suggest testing without this. -->
<item name="windowNoTitle">true</item>
</style>
</resources>
Then, in the Projucer set the theme and assets up accordingly (unfortunately I can’t help with Cmake/JUCE):
Hello.
Today I had a little time to study this topic.
I tweaked the styles a bit. It turned out like this:
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<style name="AppTheme.NoActionBar" parent="@style/AppTheme.NoActionBar">
<item name="android:windowActionBar">false</item>
<!-- Note that this might not be necessary... I suggest testing without this. -->
<item name="android:windowNoTitle">true</item>
</style>
</resources>
As a result, this file itself registered in the manifest. Unfortunately, the ActionBar is still not removed.
Can anyone suggest what other options there might be?
Hello jrlanglois.
Everything is just like that. I tried everything, but the ActionBar is not removed. Apparently this is due to my old device, which is API 24. Everything works since API 30. But thanks for the help. This is my first Android app. I got a good lesson.
I tried to paste this code:
to JuceApp.java, but the getWindow() symbol is not found. Might need to redefine Java libraries to include. But so far I don’t understand how to do it.