Android Question Adding Page Turn view to the second Activity

somed3v3loper

Well-Known Member
Licensed User
Longtime User
Hello

I asked a few questions on Page Turn View thread but got no answer so I decided to start a thread here.

The view is working great when adding it to main activity but if added to another activity it closes the application with "Unfortunately , app closed ..." message and shows
B4X:
maininitializeProcessGlobals (java line: 371)
java.lang.RuntimeException: java.lang.NullPointerException
on B4A IDE Logs tab

If I change the starting activity with this method
B4X:
SetActivityAttribute(Main, android:name, ".activity2")
SetActivityAttribute(Activity2, android:name, ".main")

The application works as expected.
Now I do not whats wrong , Did I miss something or is it a bug?
Is there any thing I can do?
Thanks in advance
 

somed3v3loper

Well-Known Member
Licensed User
Longtime User
Thanks but I tried that and then undone the changes because it did not fix the problem
And I believe those attributes are added by B4A
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
I just ran Klaus code it worked fine.. the fist page has only a button and when I clicked on it, the second page (activity)
with the book was shown.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
There are two things I don't understand:
Why do you want to change the starting activity in the code ?
Why can't you post a small project showing the problem.
Without seeing in a small project what you have done and how it's almost impossible to help.
 
Upvote 0

somed3v3loper

Well-Known Member
Licensed User
Longtime User
I am sorry for late reply .
Changing starting activity was just to check if pageturnview can only be added to the first activity.

And here is a small project that has the issue
 

Attachments

  • Test.zip
    427.1 KB · Views: 308
Upvote 0
Top