Android studio - Remove action bar

When I remove the action bar, only static images remain and updated images are not loaded and or updated in draw().

Any ideas?

@soet_za ===
can you explain better - Using P5 inside AS means that the default theme is without action bar (you can see that inside the values xml folder)… So what have you done exactly for removing the action bar… Put the code you are using for that

no I rebuilt a project I started working on in processing android mode in Android Studio since it crashed on launch I wanted to be able to debug better and use a different emulator than processing-phone. So I use
the default emulator now that comes with Android Studio pixel 3 or something. I created a new project in Android Studio and I then went to references and started copying the default code to firstly, run a sketch. After I got that to work, I started adding my code and assets to see when it crashes and get work-arounds for the crashes. It’s all ironed out now but then when I ported to my phone I noticed the action bar. A quick google search later and I was able to remove the action bar in the AndroidManifest.xml that Android studio creates. Then I relaunched my app and when I try to remove the action bar only static images load. I used this to get started ==== https://android.processing.org/tutorials/android_studio/index.html, then ported my code and assets over, I didn’t import a project. So basically it all works except when I remove the action bar ===== theme="@style/Theme.AppCompat.Light.NoActionBar" ==== then only static images load. It also happens when I remove the action bar in styles.xml

Edit the new project in Android Studio has an action bar

@soet_za ===
Now i understand: you have not imported the project, you have copied your initial code inside AS, creating a new AS project: that’s why you get an action bar from AS and have to remove it by xml; now firstly i would import the (corrected) project from P5… As for the images i dont understand what you called “static”, anyway it s probable that your xml modifs in the values.xml are not good and this problem will be solved if you import the project from P5…

I mean like I made a simple game to test out Android processing, the game has images that are in a class with a Vector pos, I update the pos.x and pos.y in draw() so the image gets moved each frame, so it is not static. I have a static image for the background, it’s position never changes and is therefore static. The only image that renders when I remove the action bar is the background and therefore I assume it is only static images that get loaded. I don’t want to import the project into Android Studio since the project I wrote in processing crashes on startup on phone and emulators and the code I have rewritten does not crash. I simply want to remove the action bar. Maybe it has something to do with code like this ---- ```
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FrameLayout frame = new FrameLayout(this);
frame.setId(CompatUtils.getUniqueViewId());
setContentView(frame, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT));

sketch = new Sketch();
PFragment fragment = new PFragment(sketch);
fragment.setView(frame, this);

}


this code comes from here - https://android.processing.org/tutorials/android_studio/index.html

EDIT: this line from the processing project's AndroidManifest.xml breaks the app android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

division by height in setup() led to an incorrect value - 0 to be exact;

Solution:
create a variable to get the height and then use that variable;

Example:

float getHeight = height;
float value = 1000 / getHeight;

@soet_za ===
the code you put has nothing to see with your problem: it s only the code from the MainActivity which creates a fragment inside a frameLayout and add the sketch to the fragment. As for the error i have told you that your xml values are probably wrong. That s why i was saying that the better way to avoid this kind of problem is to import the project fom P5; i can understand that the initial code crashes for some reason, but now you can easily modify it it seems…

I hear what you are saying but I think it’s better that I “played” around with the code in this manner since it gave me a good grasp of the foundations of android processing and I can now make sure that my programs
will work every time by simply coding in Android Studio itself while still using processing. But thanks for your
input it has been very informative!