Lined LabelView

General

Category
Free
Tag
Views
License
MIT License
Min SDK
16 (Android 4.1 Jelly Bean)
Registered
Dec 14, 2017
Favorites
1
Link
https://github.com/ppetarr/Android-LabelView
See also
Pancakes
CounterView
ReView
ShapeOfView
ArcLayout

Additional

Language
Java
Version
v1.0.0 (Dec 12, 2017)
Created
Jul 6, 2017
Updated
Dec 14, 2017
Owner
ppetarr
Contributor
ppetarr
1
Activity
Badge
Generate
Download
Source code

Blurb

LabelView

LabelView allows you to create lined-labeled views.

LabelView will expand to fit the longest text.

Setup

Add "https:\\jitpack.io" as a maven url to your top-level (project) gradle file

allprojects {
 repositories {
    jcenter()
    maven { url "https://jitpack.io" }
 }
}

Add the dependency to your app gradle file

Pre-Android Studio 3.0

dependencies {
    compile 'com.github.ppetarr:Android-LabelView:v1.0.0'
}

Android Studio 3.0+

dependencies {
    implementation 'com.github.ppetarr:Android-LabelView:v1.0.0'
}

How-to

 <ca.moosebytes.labelview.LabelView
      android:layout_width="wrap_content"
      android:layout_height="match_parent"
      app:textValue="Hello"
      app:labelValue="Greeting"
      app:lineColour="@color/colorPrimary"
      app:lineThickness="6"
      app:textSize="22sp"
      app:labelSize="22sp"/>

Change the top text: app:textValue or lblGreeting.setTextValue(String value)

Change the label text: app:labelValue or lblGreeting.setLabelValue(String value)

Change line colour app:lineColour or lblGreeting.setLineColour(int colour)

Change line thickness app:lineThickness or lblGreeting.setLineThickness(float lineThickness)

ie

app:textSize="50sp"
app:labelSize="28sp"
app:lineColour="@color/colorBankAccount

will result in;