Skip to content

Commit c2540bf

Browse files
committed
MarqueeTextViewCompat: revert broken layout navigation fix
1 parent 6f2a39a commit c2540bf

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

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

Lines changed: 8 additions & 6 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,7 +125,9 @@ private void init(@Nullable AttributeSet attrs) {
125125
mTextView.setTextAlignment(View.TEXT_ALIGNMENT_VIEW_START);
126126
mTextView.setEllipsize(TruncateAt.END);
127127

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

@@ -334,10 +336,10 @@ public void setMarqueeRepeatLimit(int marqueeLimit) {
334336
}
335337

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

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

0 commit comments

Comments
 (0)