Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6755399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:23:43+00:00 2026-05-26T13:23:43+00:00

I have a strange situation. I’m using NexPlayer to render streaming video in openGL

  • 0

I have a strange situation. I’m using NexPlayer to render streaming video in openGL mode. On top of the rendering area for the streaming video (a framelayout), I display a ProgressBar in indeterminate mode whenever the videoplayer is buffering – comparable to what the youtube app does.

This works fine up to the point where the player stops buffering and I try to remove the progressbar from the screen. The progressbar stops animating, but it remains on screen, as if it were a watermark on the video.
The way I try to remove it is by changing the visibility of the progressbar; I’ve tried both View.INVISIBLE and View.GONE but neither works.
I also tried wrapping the progressbar in another layout and changing the visibility of that container, but to no avail.

I did notice that when I rotate the device, the progressbar disappears.

Below is the xml layout for the player activity. The surfaceview in there is only used in case the device does not support OpenGL 2.0.

Does anyone have any idea on how to get rid of this ProgressBar?

Thanks in advance!

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

<FrameLayout
    android:id="@+id/gl_container"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerInParent="true" >
</FrameLayout>

<SurfaceView
    android:id="@+id/surface"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_centerInParent="true" >
</SurfaceView>

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/controlContainer"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:background="#aa000000"
    android:orientation="vertical"
    android:padding="10dp" >

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:orientation="horizontal" >

        <ToggleButton
            android:id="@+id/buttonPausePlay"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/selector_play_pause"
            android:textOff=""
            android:textOn="" />

        <ImageButton
            android:id="@+id/buttonStop"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="#00000000"
            android:src="@drawable/ic_media_stop" />
    </LinearLayout>

    <ProgressBar
        android:id="@+id/seekbar"
        style="@android:style/Widget.ProgressBar.Horizontal"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:enabled="false"
        android:indeterminate="false" />
</LinearLayout>

<LinearLayout
    android:id="@+id/loadingContainer"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerInParent="true"
    android:gravity="center"
    android:orientation="vertical" >

    <ProgressBar
        android:id="@+id/loading"
        style="@android:style/Widget.ProgressBar.Large.Inverse"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:indeterminate="true" />

</LinearLayout>

</RelativeLayout>

EDIT: the code that changes the visibility of the view:

@Override
public void onBuffering(int progress_in_percent) {
    Log.d(TAG, "Buffering " + progress_in_percent + " %");
}

@Override
public void onBufferingBegin() {
    Log.d(TAG, "Buffering begin");
     loadingContainer.setVisibility(View.VISIBLE);
}

@Override
public void onBufferingEnd() {
    Log.d(TAG, "Buffering end");
    loadingContainer.setVisibility(View.GONE);
}

These methods get called from within the NexPlayer framework. I’m sure they do get called since I get the output in the logs.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T13:23:43+00:00Added an answer on May 26, 2026 at 1:23 pm

    Right, I figured it out. The callback I was getting from the NexPlayer framework wasn’t on the UI thread. Oddly enough, this did not cause any stacktraces in the log so I didn’t notice this until I attached my debugger and added a breakpoint that suspends on any exception.

    I fixed this by creating runnables that do exactly the same thing as the code above and posting them to my handler.

    (It still does beat me why the ProgressBar showed up in the first place though, since it was also being made visible on the wrong thread :/)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a strange situation using asp ajax chart controls. I have an application
i have a strange situation: I'm using jpa/hibernate to get rows from a mySql
I have a strange situation where using @parent, or even explicit id-s dont work
I really have a strange situation. I'm making a Linux multi-threaded C application using
I have a very strange situation. I have a large set of records to
I have a strange issue: I am using SPContext.Current.Web in a .aspx page, but
I have this strange issue with my web app. You see, I'm using jQuery
I have a strange situation where i have added a reference to Microsoft.SqlServer.Smo Microsoft.SqlServer.ConnectionInfo
I have a strange situation. I have a fairly memory intense process (image processing)
i have a strange situation may its a easy fix or something i may

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.