Change your users progress capability with ProgressableImageView
ProgressableImageView
Motivated by layout in Words Of Wonders app.
Demo
Divider Width Demo
Divider Color Demo
Usage
<com.gungoren.view.ProgressableImageView
android:id="@+id/top"
android:background="@drawable/bg_img"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:src="@drawable/dubai"
android:scaleType="fitXY"
android:layout_margin="20dp"
app:dividerColor="@color/divider_color"
android:layout_below="@id/desc"
app:progress="0.3"
app:direction="bottomToTop"
app:dividerWidth="2dp"
app:touchEnabled="true"/>
progressableImageView.setProgress(progress); //use this if you want to progress
progressableImageView.setDividerWidthAsDp(dp); //use this if you want to change divider width. When it set to zero it will be invisible
progressableImageView.setDividerWidthAsPx(px); //use this if you want to change divider width. When it set to zero it will be invisible
progressableImageView.setDividerColor(color); //use this for set a new color divider color.
progressableImageView.setDirection(ProgressDirection.bottom_to_top); // use this if you wnat to change direction of progress available values [left_to_right, left_to_right, right_to_left, top_to_bottom, bottom_to_top]
progressableImageView.setTouchEnabled(boolean) // enable progress change with touch event
Attribute
app:progress
value is between 0 and 1 float value. 1 = fullly bright. 0 = fully gray.
app:dividerColor
value is color which type is color.
app:dividerWidth
value is divider width which type is dimen.
app:direction
value is for progress direction which type is enum and values [leftToRight,rightToLeft,topToBottom,bottomToTop].
app:touchEnabled
value is for progress change by touch event which type is boolean.
maven { url 'https://jitpack.io' }
dependencies {
compile 'com.github.gungoren:ProgressableImageView:1.0.2'
}