File tree Expand file tree Collapse file tree
src/main/java/com/webtoonscorp/android/readmore Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ package com.webtoonscorp.android.readmore {
99 method public boolean isExpanded();
1010 method public void setExpanded(boolean expanded);
1111 method public void setOnStateChangeListener(com.webtoonscorp.android.readmore.ReadMoreTextView.OnStateChangeListener listener);
12+ method public void setReadMoreMaxLines(int maxLines);
1213 method public void toggle();
1314 field public static final int OVERFLOW_CLIP = 1; // 0x1
1415 field public static final int OVERFLOW_ELLIPSIS = 2; // 0x2
Original file line number Diff line number Diff line change @@ -166,6 +166,16 @@ public class ReadMoreTextView @JvmOverloads constructor(
166166 )
167167 }
168168
169+ fun setReadMoreMaxLines (maxLines : Int ) {
170+ if (this .readMoreMaxLines != maxLines) {
171+ this .readMoreMaxLines = maxLines
172+
173+ originalText?.let { originalText ->
174+ updateText(originalText, width)
175+ }
176+ }
177+ }
178+
169179 public fun toggle () {
170180 setExpanded(! expanded)
171181 }
You can’t perform that action at this time.
0 commit comments