Android Question SeekBar loses bar

warwound

Expert
Licensed User
Longtime User
We have a problem in our application that we have just added the Google VR library to and i'm hoping someone can suggest where to start debugging the issue...

We find that after displaying a VrVideoView, our SeekBars (and a ListView though i didn't mention that in the title) are corrupt and do not display as they displayed before the VrVideoView was used.

An activity displays a ListView listview_before.jpg , i choose my debug option and another activity uses a VrVideoView to display a video vrvideoview_first_play.jpg .
The ListView has no visible seprators between it's items, and the SeekBars in the video activity corerctly show a blue bar.
All is well!

I return to the ListView activity and my ListView shows what appears to be black separators beween it's items listview_before.jpg.
However a click on an item turns the item all black, so i suspect i am not seeing seprators but the background of the ListView item - it's lost it's foreground?
I proceed on to my activity with video and now my SeekBars have no bar vrvideoview_first_play.jpg.

Our application runs on a custom made android tablet that runs android API 19 (4.4.2).
Prior to using Google VR we always compiled using API 19 in the b4a IDE, now we are forced to use API 21.

I've tried all sorts of changes in our code - mainly thinking that the VrVideoView was getting and keeping a reference to something that then causes the corrupt ListView and SeekBars but am 100% sure that our code correcty calls the VrVideoView's Shutdown method when the activity is destoyed.
The example code in this post shows how we use inline java to ensure the Shutdown method is called.

I can't upload our application source, but am looking for some pointers of where to look - where to start debugging.
What has caused these native android views to display incorrectly?

Has anyone got any ideas?
 

JordiCP

Expert
Licensed User
Longtime User
Is it possible that images 3 and 4 in the post are the same than 1 and 2? I cannot see the differences

Perhaps I am saying a big nonsense, but it seems as if some of the properties in the listview and the seekbars are somehow set to context defaults and one activity changes it.
Does it happen the same if for instance you set the theme of the first activity to a custom one?
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
Thanks for the ideas - and sorry for posting the wrong images!

Finishing the activity does not help.
After the Google VR library has been used the only way to restore the SeekBar and ListView is to kill the process.

As a temporary solution we moved the Google VR activity into it's own separate application - like a 360 video player application - and called the new application from within our original application.
This also did not work - the Views remained corrupted.
Starting an application from within another application results in the second application running in the same process (or JVM?) as the first application i believe?
So within that same process the problem persists.

As an emergency solution we then added some code to execute a command line to kill the 360 video player application when the 360 video player application is finished, and this does work.

It's not a solution but a workaround and i'll continue to debug the problem when i have more time.
 
Upvote 0
Top