Commit 5c04fc56 authored by Geoffrey Métais's avatar Geoffrey Métais

TV: Fix browser behavior

parent c8bebce5
......@@ -14,8 +14,7 @@
<FrameLayout
android:id="@+id/fragment_placeholder"
android:layout_width="match_parent"
android:layout_height="match_parent"
vlc:layout_behavior="@string/appbar_scrolling_view_behavior" />
android:layout_height="match_parent" />
<android.support.v7.widget.ViewStubCompat
android:id="@+id/scan_viewstub"
......
......@@ -25,9 +25,12 @@ package org.videolan.vlc.gui;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.AppBarLayout;
import android.support.design.widget.CoordinatorLayout;
import android.support.design.widget.Snackbar;
import android.support.v4.app.Fragment;
import android.view.MenuItem;
import android.view.View;
import org.videolan.medialibrary.Medialibrary;
import org.videolan.vlc.MediaParsingService;
......@@ -59,6 +62,16 @@ public class SecondaryActivity extends ContentActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.secondary);
if (VLCApplication.showTvUi()) {
TvUtil.applyOverscanMargin(this);
} else {
final View fph = findViewById(R.id.fragment_placeholder);
final CoordinatorLayout.LayoutParams params =
(CoordinatorLayout.LayoutParams) fph.getLayoutParams();
params.setBehavior(new AppBarLayout.ScrollingViewBehavior());
fph.requestLayout();
}
initAudioPlayerContainerActivity();
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
......@@ -75,9 +88,6 @@ public class SecondaryActivity extends ContentActivity {
if (VLCApplication.showTvUi() && STORAGE_BROWSER.equals(fragmentId))
Snackbar.make(getWindow().getDecorView(), R.string.tv_settings_hint, Snackbar.LENGTH_LONG).show();
}
if (VLCApplication.showTvUi())
TvUtil.applyOverscanMargin(this);
}
@Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment