Android library that provides a better looking TextView to display details in a condensed way with an icon.
- Add JitPack repo to your
build.gradle
:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
- Add the dependency
dependencies {
implementation 'com.github.ropjov:InfoTextView:0.1'
}
This view has two modes: with title and without title (only one line)
- Replace the TextView tag from your .xml with InfoTextView:
<TextView
...
/>
for
<com.ropjov.infotextview.InfoTextView
app:icon="..."
app:text="..."
app:title="..."
...
/>
- Replace your
TextView
Java/Kotlin objects withInfoTextView
objects:
private lateinit var text: TextView
private lateinit var text: InfoTextView
The same as the previous example, but delete the app:title
attribute
For a complete example check the app module of this project
This is how the component will look in your project