0

我最近在亚马逊的 FireTV上安装并检查了我的应用程序,发现它有一些显示设置设置,用户可以从中调整屏幕或使用默认设置,这是设备的放大显示,导致应用程序视图无法正确显示并从边缘。

我基本上添加了这个片段,并在每个 Activity 中尝试将边距设置为布局:

public static boolean isFireTv() {
    return android.os.Build.MANUFACTURER.equalsIgnoreCase("Amazon")
            && (android.os.Build.MODEL.equalsIgnoreCase("AFTB") );
}

但是,这似乎不对,所以我想知道是否有更好的解决方案。XML 中的某些内容或通过代码执行此操作的更好方法


4

1 回答 1

2

Looks like there is a way to detect if the user has run the overscan wizard and accepted a setting (either no overscan or applied one). If you were to use this to prompt the user to adjust (and I can't find a way to launch the wizard directly) you might want to make it a one-time thing in case the user has run the wizard but decided as they didn't need to adjust anything they'd just cancel it (but at the end of the day that's down to your implementation)

String overscan = Secure.getString(this.getContentResolver(),"overscan_values");
Log.v("Overscan Setting","--"+overscan+"--");
if (overscan.equals("0.0 0.0 0.0 0.0")) {
    overscan = "Overscan never run";
} else if (overscan.equals("0.000000 0.000000 0.000000 0.000000")) {
    overscan = "No overscan modification";
} else {
    overscan = "Overscan modification:" + overscan + ".";
}
于 2014-06-15T02:34:09.527 回答