2017-02-07 4 views
0

У меня есть ViewPager, который находится во фрагменте, этот фрагмент имеет actionBar и tabLayout, внутри его вкладки у меня есть видеоплеер, когда я fullScreen видео, панель действий и макет вкладки не скрываются, как я могу получить полноэкранное видео с панелью действий и скрытой компоновкой вкладок?Как скрыть панель действий и вкладку Layout, когда видеоплеер находится в полноэкранном режиме внутри вкладки?

<LinearLayout 
android:id="@+id/main_layout" 
xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:app="http://schemas.android.com/apk/res-auto" 
xmlns:tools="http://schemas.android.com/tools" 
android:orientation="vertical" 
android:layout_width="match_parent" 
android:layout_height="match_parent"> 


<include 
    android:id="@+id/app_bar" 
    layout="@layout/app_bar" /> 


<android.support.design.widget.TabLayout 
    android:id="@+id/tab_layout" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_below="@+id/app_bar" 
    android:background="?attr/colorPrimary" 
    android:elevation="6dp" 
    android:minHeight="?attr/actionBarSize" 
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/> 

<android.support.v4.widget.DrawerLayout       
android:id="@+id/drawer_layout" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:layoutDirection="rtl"> 

<android.support.v4.view.ViewPager 
android:id="@+id/pager" 
android:layout_width="match_parent" 
android:layout_height="fill_parent" 
android:layout_below="@id/tab_layout"/> 

<fragment 
android:id="@+id/navigationDrawerFragment" 
android:layout_width="280dp" 
android:layout_height="match_parent" 
android:layout_gravity="start" 

tools:layout="@layout/fragment_navigation_drawer"/> 
</android.support.v4.widget.DrawerLayout> 



</LinearLayout> 


<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:app="http://schemas.android.com/apk/res-auto" 
android:orientation="vertical" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:paddingTop="7dp"> 

<include 
layout="@layout/giraffe_player" 
android:layout_width="match_parent" 
android:layout_height="210dp" /> 


<com.jude.easyrecyclerview.EasyRecyclerView 
android:id="@+id/recyclerView" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
app:layout_empty="@layout/view_empty" 
app:layout_progress="@layout/view_progress" 
app:scrollbarStyle="insideOverlay" 
android:layout_marginTop="7dp" /> 

</LinearLayout> 

ответ

0

когда видеопроигрыватель находится на полном экране вы можете установить

findViewById(R.id.tab_layout).setVisibility(View.GONE); 

при установке выхода из полноэкранного режима

findViewById(R.id.tab_layout).setVisibility(View.VISIBLE); 
+0

Что о панели действий – DavidOli

Смежные вопросы