Skip to content

pavel163/FilledView

Repository files navigation

FilledView

Showcase Showcase

Gradle

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}
dependencies {
    compile 'com.github.pavel163:FilledView:1.1.0'
}

How to use (min api 19)

<com.ebr163.view.FilledView
        android:id="@+id/filled_view"
        android:layout_width="300dp"
        android:layout_height="150dp"
        app:border_show="true"
        app:fill_color="@color/colorAccent"
        app:radius="50dp"
        app:start_mode="left"
        app:text="TEST"
        app:textSize="24sp" />

Additonal optional attributes:

  • fill_color - color
  • border_show - boolean
  • radius - dimension (corner radius)
  • start_mode - left, top, right or bottom
  • text - string
  • textSize - dimension

Other configurable APIs:

  • public void setProgress(float percent), set progress (percent >= 0f && percent <= 1f)
  • public void setFillColor(int color)
  • public void setText(String text)
  • public void showBorder(boolean value)
  • public void setTextSize(int textSize)
  • public void setRadius(int radius)
  • public void setStartMode(StartMode startPosition)
  • public void setBorderSize(int borderSize)

License

MIT