Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Overscan margin on Android TV

I'm modifying the existing application to work on Android TV with a ADT-1 Developer Kit.
The outside edge of the original application layout when installing on Android TV is clipped.
Then I followed this link and set the overscan for the root of the layout.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/base_layout"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical"
  android:layout_marginTop="27dp"
  android:layout_marginLeft="48dp"
  android:layout_marginRight="48dp"
  android:layout_marginBottom="27dp" >
  .....
</LinearLayout>

But the result is like below. The root of layout is margin so much, it doesn't fill the screen (the area in red rectangle).
What is the pixel of overscan margin for the root layout to fill exactly the screen? Thanks in advance. enter image description here

like image 655
Huy Duong Tu Avatar asked Oct 15 '25 13:10

Huy Duong Tu


1 Answers

If the TV does not provide overscan settings in system settings (just like mine sony android TV), you can fix it via shell:

adb connect 192.168.0.100
adb shell wm overscan reset

If the reset does not do what expected, use LEFT,TOP,RIGHT,BOTTOM values in pixels

adb shell wm overscan 0,0,0,0
adb shell wm overscan 10,20,30,40
like image 100
Yoz Avatar answered Oct 19 '25 10:10

Yoz