Skip to content

Commit 069575b

Browse files
committed
MarqueeTextViewCompat: broken layout navigation fix?
1 parent 08cbea3 commit 069575b

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

smarttubetv/src/main/java/com/liskovsoft/smartyoutubetv2/tv/ui/widgets/marqueetextviewcompat/MarqueeTextViewCompat.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public MarqueeTextViewCompat(Context context, @Nullable AttributeSet attrs, int
9494

9595
private void init(@Nullable AttributeSet attrs) {
9696
if (Build.VERSION.SDK_INT <= 19) {
97-
super.setHorizontallyScrolling(true); // Android 4: Broken grid layout fix
97+
//super.setHorizontallyScrolling(true); // Android 4: Broken grid layout fix
9898
super.setEllipsize(TruncateAt.END);
9999
return;
100100
}
@@ -125,9 +125,7 @@ private void init(@Nullable AttributeSet attrs) {
125125
mTextView.setTextAlignment(View.TEXT_ALIGNMENT_VIEW_START);
126126
mTextView.setEllipsize(TruncateAt.END);
127127

128-
if (getEllipsize() != null) {
129-
mIsMarqueeEnabled = getEllipsize() == TruncateAt.MARQUEE;
130-
}
128+
mIsMarqueeEnabled = getEllipsize() == TruncateAt.MARQUEE;
131129
super.setEllipsize(TruncateAt.END); // Important: disable marquee on the container view
132130
}
133131

@@ -335,10 +333,11 @@ public void setMarqueeRepeatLimit(int marqueeLimit) {
335333
// NOP
336334
}
337335

338-
@Override
339-
public void setHorizontallyScrolling(boolean whether) {
340-
// NOP
341-
}
336+
// Don't uncomment. Android 4: Broken grid layout fix
337+
//@Override
338+
//public void setHorizontallyScrolling(boolean whether) {
339+
// // NOP
340+
//}
342341

343342
public void setMarqueeSpeedFactor(float factor) {
344343
mSpeed = dpToPx(ORIGINAL_SPEED * factor, getContext());

0 commit comments

Comments
 (0)