- Sometimes if TextView's text is too long, we want collapse text
- It looks like facebook's feature
ReadMoreTextView
is super easy TextView with 'Read More'
Sample | Review list | Profile |
---|---|---|
dependencies {
implementation 'kr.co.prnd:readmore-textview:x.x.x'
//implementation 'kr.co.prnd:readmore-textview:1.0.0'
}
If you think this library is useful, please press star button at upside.
<kr.co.prnd.readmore.ReadMoreTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/long_text"
app:readMoreColor="@color/colorPrimary"
app:readMoreMaxLine="4"
app:readMoreText="…더보기" />
toggle()
,expand()
,collapse()
: Change expand/collapse state dynamicallyisExpanded
,isCollased
,state
: Get state- ChangeListener: Observe state change using listener
Copyright 2020 PRNDcompany
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.