A TextView that can display more information and an icon (for native Android applications)

InfoTextView

Android library that provides a better looking TextView to display details in a condensed way with an icon.

Add to your project

  1. Add JitPack repo to your build.gradle:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}
  1. Add the dependency

dependencies {
    implementation 'com.github.ropjov:InfoTextView:0.1'
}

How to use it?

This view has two modes: with title and without title (only one line)

With title

  1. Replace the TextView tag from your .xml with InfoTextView:

<TextView
  ...
/>

for

<com.ropjov.infotextview.InfoTextView
  app:icon="..."
  app:text="..."
  app:title="..."
  ...
/>
  1. Replace your TextView Java/Kotlin objects with InfoTextView objects:
private lateinit var text: TextView
private lateinit var text: InfoTextView

Without title

The same as the previous example, but delete the app:title attribute

For a complete example check the app module of this project

Result

This is how the component will look in your project

With title

Without title

GitHub

View Github