All Projects → JDevZone → CheckableTextView

JDevZone / CheckableTextView

Licence: MIT license
A simple and flexible Checked TextView or Checkable TextView

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to CheckableTextView

Toothyprogress
A polyline determinated ProgressBar written in Kotlin
Stars: ✭ 56 (-48.15%)
Mutual labels:  widget, view
STTextView
📝 STTextView is a light-weight library that adds a placeholder to the UITextView.
Stars: ✭ 36 (-66.67%)
Mutual labels:  text, textview
Fancyaccordionview
An Android fancy accordion view
Stars: ✭ 64 (-40.74%)
Mutual labels:  widget, view
Gradient Widgets
Flutter widgets wrapped with gradients
Stars: ✭ 290 (+168.52%)
Mutual labels:  widget, text
instagram-text-editor
An Instagram like text editor Flutter widget that helps you to change your text style.
Stars: ✭ 66 (-38.89%)
Mutual labels:  widget, text
Supertextview
Hi,Developer,Welcome to use SuperTextView !
Stars: ✭ 3,170 (+2835.19%)
Mutual labels:  widget, view
Overflow Pager Indicator
Simple paging indicator widget with pager dataset ovewflow effect à la Instagram behavior
Stars: ✭ 136 (+25.93%)
Mutual labels:  widget, view
Sharpview
安卓带有尖角气泡的控件(TextView,ImageView,EditText,Layout),支持渐变色,圆角等自定义属性
Stars: ✭ 137 (+26.85%)
Mutual labels:  view, textview
text-style-editor
Text style editor widget for flutter
Stars: ✭ 25 (-76.85%)
Mutual labels:  widget, text
AndroidUiKit
uikit widget common baseview Adapter faster develop
Stars: ✭ 48 (-55.56%)
Mutual labels:  widget, view
EasyMoney-Widgets
The widgets (EditText and TextView) for support of money requirements like currency, number formatting, comma formatting etc.
Stars: ✭ 91 (-15.74%)
Mutual labels:  widget, textview
FillProgressLayout
A simple and flexible Fillable Progress Layout written in Kotlin
Stars: ✭ 77 (-28.7%)
Mutual labels:  view, ux
simple-analog-clock
Simple clock view for displaying uh...time?
Stars: ✭ 24 (-77.78%)
Mutual labels:  widget, view
Iconswitch
🍭 Custom Android Switch widget
Stars: ✭ 874 (+709.26%)
Mutual labels:  widget, view
Spannabletextview
SpannableTextView is a custom TextView which lets you customize the styling of slice of your text or statment via Spannables, but without the hassle of having to deal directly with Spannable themselves.
Stars: ✭ 177 (+63.89%)
Mutual labels:  view, text
Flutterweekview
Displays a highly customizable week view (or day view) which is able to display events, to be scrolled, to be zoomed-in & out and a lot more !
Stars: ✭ 130 (+20.37%)
Mutual labels:  widget, view
Social Text View
A custom Android TextView that highlights social media lingo (#hashtags, @mentions, phone, emails, and urls).
Stars: ✭ 64 (-40.74%)
Mutual labels:  view, text
Materialchipview
Material Chip view. Can be used as tags for categories, contacts or creating text clouds
Stars: ✭ 1,181 (+993.52%)
Mutual labels:  view, text
Finalcut
A text-based widget toolkit
Stars: ✭ 244 (+125.93%)
Mutual labels:  widget, text
Hyena
鬣狗快速开发库(2018年6月停止维护)
Stars: ✭ 21 (-80.56%)
Mutual labels:  view, textview

CheckableTextView


Checkable TextView [KOTLIN]

A simple and flexible Checked TextView or Checkable TextView written in Kotlin


Android Arsenal GitHub license GitHub code size in bytes Version


What's New

Animation Demo

New Ripple Like Fill Effect

Normal
(duration = 250 ms)

Custom Duration
(duration = 2000 ms)

Sorry for flicker in slow motion video demo . You know android studio screen recorder sucks sometimes 😅

Custom Interpolators

custom interpolator support added

Interpolator Demo

BounceInterpolator
with fall down animation

AnticipateOvershootInterpolator
with translate animation



Installation

  1. Add it in your root build.gradle at the end of repositories:
	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}
  1. Add the dependency in app gradle
	dependencies {
	        implementation 'com.github.JDevZone:CheckableTextView:{latest_version}'
	}

Basic usage

<com.devzone.checkabletextview.CheckableTextView
            app:ctv_TextStyle="@style/TextAppearance.General"
            app:ctv_IconTint="@color/colorAccent"
            app:ctv_IconChecked="true"
            app:ctv_Icon="@drawable/ic_cancel_custom_vector"
            app:ctv_Text="@string/app_name"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"/>

Change State Programatically

You can change checked state as follows :

checkedTV.setChecked(isChecked)

Default value shouldNotifyListeners is false

or

checkedTV.setChecked(isChecked,shouldNotifyListeners)

First Boolean parameter isChecked sets the current state Second Boolean parameter shouldNotifyListeners determines if onCheckChange method should be called or not.

Get Current State

checkedTV.isChecked()

No Fancy enums, Just true for checked state and false for unchecked is returned

Listen State Changes

You can listen to state changes by registering a listener like as follows :

checkedTV.setOnCheckChangeListener()

and get callback in implemented method :

override fun onCheckChange(view: View, isChecked: Boolean) {
        // checkedTV returned as view
        // isChecked current state of the view
    }

Set Custom Interpolator

checkedTV.setAnimInterpolator(BounceInterpolator())

Experimental

checkedTV.setClickEnabled(isClickable: Boolean)

Pass isClickable true for enable and false for disable clicks

currently restricted to RestrictTo.Scope.LIBRARY you can use it simply Suppressing Lint Warnings (if have any) as @SuppressLint("RestrictedApi")

Customisation

Here are the attributes you can specify through XML or related setters:

  • ctv_Text - Set text.
  • ctv_TextSize - Set text size.
  • ctv_TextColor - Set text color.
  • ctv_TextStyle - Set text style.
  • ctv_Icon - Set custom icon.
  • ctv_IconTint - Set icon tint.
  • ctv_IconChecked - Set TextView (CheckableTextView) state checked.
  • ctv_TextGravity - Set text gravity.
  • ctv_AnimType - Set check animation type currently three available (scale,translate and fall_down).
  • ctv_AnimDuration - Set duration for check animation.
  • ctv_AnimFirstTime - Animate CheckableTextView for very first time.
  • ctv_RippleAlpha - Set Alpha (Transparency) value for ripple like fill effect
  • ctv_RippleTint - Set color value for ripple like fill effect
  • ctv_RippleFillEnabled - Sets if ripple like fill effect is enabled or not

📄 License

Checkable TextView is released under the MIT license. See LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].