We are about to switch to a new forum software. Until then we have removed the registration on this forum.
all the good day.
1) why PApplet does not inherit from Fragment ???.
2) how to create PApplet in a new thread ???.
3) I want that at me PApplet it was displayed in View element and in a new flow in half of the screen earlier I could simply make it now neznaju how it to make ???.
Answers
Dunno Android, but I can answer 1) & 2) I guess: :-\"
https://Forum.Processing.org/two/discussions/tagged?Tag=papplet.runsketch()
@Myrad===
android-processing starts (like all android apps) by an activity (which extends appCompatActivity but that is not the problem) which is the launcher; this activity creates (by code) a fragment which extends Papplet and add your processing PApplet to this fragment: so PApplet does not at all inherit from fragment, it is exactly the contrary... I dont think that the GotoLoop solution (which works for standard processing java mode and that i have never tested with the android mode) can be used in this case; for what you seem to want (i am not sure to understand because you are talking about a new thread and about a view) you can either create another fragment and use it for coding (android code) or add a view to the layout created by the launcher removing or not removing the initial frameLayout.