danylovolokh / VideoPlayerManager

This is a project designed to help controlling Android MediaPlayer class. It makes it easier to use MediaPlayer ListView and RecyclerView. Also it tracks the most visible item in scrolling list. When new item in the list become the most visible, this library gives an API to track it.
3.15k stars 747 forks source link

Unable to set Visibility in XML. #70

Open AxeemHaider opened 7 years ago

AxeemHaider commented 7 years ago

I try to set the visibility of view in XML file but when I run application it give error

InflateException: Binary XML file line #79: Error inflating class com.volokh.danylo.video_player_manager.ui.VideoPlayerView

Here is my XML code

<com.volokh.danylo.video_player_manager.ui.VideoPlayerView android:id="@+id/vvFeedVideo" android:layout_width="match_parent" android:layout_height="match_parent" android:visibility="gone"/>

I try to set visibility in Java class there it's working fine.

vvFeedVideo.setVisibility(View.GONE)

Stone305585 commented 6 years ago

You can use ViewGroup to wrap that videoview