Skip to content

Commit 136f2f1

Browse files
committed
disable previous UI tweaks
1 parent ce402b5 commit 136f2f1

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

leanback-1.0.0/src/main/java/androidx/leanback/widget/FocusHighlightHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ public static void setupHeaderItemFocusHighlight(VerticalGridView gridView,
245245
*/
246246
public static void setupHeaderItemFocusHighlight(ItemBridgeAdapter adapter) {
247247
// MOD: disable focus zoom of the sidebar headers
248-
//setupHeaderItemFocusHighlight(adapter, true);
249-
setupHeaderItemFocusHighlight(adapter, false);
248+
setupHeaderItemFocusHighlight(adapter, true);
249+
//setupHeaderItemFocusHighlight(adapter, false);
250250
}
251251

252252
/**

smarttubetv/src/main/java/com/liskovsoft/smartyoutubetv2/tv/util/ViewUtil.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ public class ViewUtil {
3232
/**
3333
* Focused card zoom factor
3434
*/
35-
//public static final int FOCUS_ZOOM_FACTOR = FocusHighlight.ZOOM_FACTOR_SMALL;
36-
public static final int FOCUS_ZOOM_FACTOR = FocusHighlight.ZOOM_FACTOR_NONE;
35+
public static final int FOCUS_ZOOM_FACTOR = FocusHighlight.ZOOM_FACTOR_SMALL;
36+
//public static final int FOCUS_ZOOM_FACTOR = FocusHighlight.ZOOM_FACTOR_NONE;
3737
/**
3838
* Dim focused card?
3939
*/
@@ -68,7 +68,7 @@ public static boolean isTruncated(TextView textView) {
6868
}
6969

7070
public static void disableMarquee(TextView... textViews) {
71-
if (VERSION.SDK_INT <= 19 || textViews == null || textViews.length == 0) { // Android 4: Broken grid layout fix
71+
if (VERSION.SDK_INT <= 19 || textViews == null) { // Android 4: Broken grid layout fix
7272
return;
7373
}
7474

@@ -85,7 +85,7 @@ public static void disableMarquee(TextView... textViews) {
8585
* <a href="https://stackoverflow.com/questions/3332924/textview-marquee-not-working">More info</a>
8686
*/
8787
public static void enableMarquee(TextView... textViews) {
88-
if (VERSION.SDK_INT <= 19 || textViews == null || textViews.length == 0) { // Android 4: Broken grid layout fix
88+
if (VERSION.SDK_INT <= 19 || textViews == null) { // Android 4: Broken grid layout fix
8989
return;
9090
}
9191

@@ -167,7 +167,7 @@ public static boolean isListRowEmpty(Object obj) {
167167
if (obj instanceof ListRow) {
168168
ListRow row = (ListRow) obj;
169169
VideoGroupObjectAdapter adapter = (VideoGroupObjectAdapter) row.getAdapter();
170-
return adapter == null || adapter.size() == 0;
170+
return adapter == null || adapter.isEmpty();
171171
}
172172

173173
return true;

smarttubetv/src/main/res/values/dimens.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<dimen name="lb_browse_title_height">50dp</dimen>
7373

7474
<!--
75-
MOD: Making card's corner rounded. More info:
75+
MOD: Make card's corner rounded. More info:
7676
https://stackoverflow.com/questions/42623677/android-tv-verticalgridfragment-shadow-dimension-and-color
7777
https://developer.android.com/reference/androidx/leanback/widget/ShadowOverlayHelper
7878
https://developer.android.com/reference/kotlin/androidx/leanback/widget/ListRowPresenter#arechildroundedcornersenabled
@@ -81,8 +81,11 @@
8181
-->
8282
<dimen name="lb_rounded_rect_corner_radius">12dp</dimen>
8383

84-
<!-- MOD: don't zoom SearchOrbView -->
85-
<!--<item name="lb_search_orb_focused_zoom" type="fraction">100%</item>-->
84+
<!-- MOD: Zoom factor of focused button (SearchOrbView, default: 120%) -->
85+
<!--<item name="lb_search_orb_focused_zoom" type="fraction">120%</item>-->
86+
87+
<!-- MOD: Zoom factor of focused sidebar header (default: 1.2) -->
88+
<!--<item format="float" name="lb_browse_header_select_scale" type="dimen">1.2</item>-->
8689

8790
<!--
8891
Space between cards. Origin: 8dp More info:

0 commit comments

Comments
 (0)