Spoiled the processing((((

edited January 28 in Android Mode

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

  • edited January 28

    Dunno Android, but I can answer 1) & 2) I guess: :-\"

    1. Processing is supposed to work for Windows, Linux & Mac too. AFAIK, Fragment is Android only.
    2. Use runSketch() and pass another PApplet object as its last argument:
      https://Forum.Processing.org/two/discussions/tagged?Tag=papplet.runsketch()
  • edited January 29

    @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.

Sign In or Register to comment.