This repository has been archived by the owner on Apr 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated new icon, removed round one
Replaced `compile` with `implementation` in gradle configs ExpandableTextView now extends from AppCompatTextView to support fonts Demo module updates with font usage
- Loading branch information
1 parent
c6bb65f
commit b4060a0
Showing
19 changed files
with
26 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 8 additions & 2 deletions
10
expandable-textview/src/main/java/tm/charlie/expandabletextview/Extensions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
package tm.charlie.expandabletextview | ||
|
||
import android.support.v7.widget.AppCompatTextView | ||
import android.view.ViewManager | ||
import android.widget.TextView | ||
import org.jetbrains.anko.AnkoViewDslMarker | ||
import org.jetbrains.anko.custom.ankoView | ||
|
||
inline fun ViewManager.expandableTextView(init: (@AnkoViewDslMarker ExpandableTextView).() -> Unit) = expandableTextView("", init) | ||
// Public extensions | ||
|
||
inline fun ViewManager.expandableTextView(init: (@AnkoViewDslMarker ExpandableTextView).() -> Unit) = expandableTextView("", init) | ||
inline fun ViewManager.expandableTextView(text: String = "", init: (@AnkoViewDslMarker ExpandableTextView).() -> Unit) | ||
= ankoView(::ExpandableTextView, 0) { setText(text); init() } | ||
|
||
inline val TextView.isEllipsized get() = layout.getEllipsisCount(lineCount - 1) > 0 | ||
// Internal extensions | ||
internal inline fun ViewManager.textViewCompat(text: CharSequence?, init: (@AnkoViewDslMarker AppCompatTextView).() -> Unit) | ||
= ankoView(::AppCompatTextView, 0, { setText(text); init() }) | ||
|
||
internal inline val TextView.isEllipsized get() = layout.getEllipsisCount(lineCount - 1) > 0 |