Skip to content

Commit 99f4ca9

Browse files
committed
simplify if statement
1 parent 21340eb commit 99f4ca9

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

expandabletextview/src/main/java/at/blogc/android/views/ExpandableTextView.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,9 @@ public int getMaxLines()
108108
*/
109109
public boolean toggle()
110110
{
111-
if (this.expanded)
112-
{
113-
return this.collapse();
114-
}
115-
116-
return this.expand();
111+
return this.expanded
112+
? this.collapse()
113+
: this.expand();
117114
}
118115

119116
/**

0 commit comments

Comments
 (0)