All Projects → zagum → Android Switchicon

zagum / Android Switchicon

Licence: apache-2.0
Google launcher-style implementation of switch (enable/disable) icon

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Android Switchicon

Mahapps.metro.iconpacks
Awesome icon packs for WPF and UWP in one library
Stars: ✭ 1,157 (-50.49%)
Mutual labels:  material, material-ui, icons
Svelte Material Ui
Svelte Material UI Components
Stars: ✭ 2,081 (-10.95%)
Mutual labels:  material, material-ui
Materialanim
基于Android 系统的动画总结
Stars: ✭ 123 (-94.74%)
Mutual labels:  material, material-ui
Iconshowcase Dashboard
A full-of-features, easy-to-customize, free and open source, Material Design dashboard for icon packs.
Stars: ✭ 197 (-91.57%)
Mutual labels:  material, icons
Smart Webcomponents
Web Components & Custom Elements for Professional Web Applications
Stars: ✭ 110 (-95.29%)
Mutual labels:  material, material-ui
Materialabout
It's a material-design about screen to use on your Android apps. A developer profile and application information easy to integrate. 🔖
Stars: ✭ 1,511 (-35.34%)
Mutual labels:  material, material-ui
Ibackdrop
A library to simply use Backdrop in your project (make it easy). Read more ->
Stars: ✭ 137 (-94.14%)
Mutual labels:  material, material-ui
Angular Material Dashboard
Angular admin dashboard with material design
Stars: ✭ 1,321 (-43.47%)
Mutual labels:  material, material-ui
La Capitaine Icon Theme
La Capitaine is an icon pack designed to integrate with most desktop environments. The set of icons takes inspiration from the latest iterations of macOS and Google's Material Design.
Stars: ✭ 1,858 (-20.5%)
Mutual labels:  material, icons
Iconfontsimagelist
Components to simplify use of "Icon fonts": resize, color, opacity and more... with full support for High-DPI apps. Rendering optimized with GDI+
Stars: ✭ 147 (-93.71%)
Mutual labels:  material-ui, icons
Material Singleinputform
A single EditText instead of a classical form. Library that implements flavienlaurent's singleinputform
Stars: ✭ 202 (-91.36%)
Mutual labels:  material, material-ui
Materialspinner
Implementation of a Material Spinner for Android with TextInputLayout functionalities
Stars: ✭ 107 (-95.42%)
Mutual labels:  material, material-ui
Material Design Icons
Material Design icons by Google
Stars: ✭ 44,551 (+1806.33%)
Mutual labels:  material, icons
Mdi React
Material Design Icons for React/Preact packaged as single components
Stars: ✭ 117 (-94.99%)
Mutual labels:  material, icons
Cardview
Material Design Cards ? How cool is that !
Stars: ✭ 101 (-95.68%)
Mutual labels:  material, material-ui
Linearprogressbar
Material Linear Progress Bar for your iOS apps
Stars: ✭ 131 (-94.39%)
Mutual labels:  material, material-ui
Jekyll Material Theme
A Jekyll Theme based on Material Design using Materialize.
Stars: ✭ 165 (-92.94%)
Mutual labels:  material, material-ui
Notion Icons 2.0
Create a more vibrant and modern workspace. Use Github Issues to request more Icons.
Stars: ✭ 93 (-96.02%)
Mutual labels:  material, icons
Cyanea
A theme engine for Android
Stars: ✭ 1,319 (-43.56%)
Mutual labels:  material, material-ui
Styled Icons
💅 Popular icon packs like Font Awesome, Material Design, and Octicons, available as React Styled Components
Stars: ✭ 1,878 (-19.64%)
Mutual labels:  material, icons

Android-SwitchIcon

API

Google launcher-style implementation of switch (enable/disable) icon

image

Compatibility

This library is compatible from API 15 (Android 4.0.3).

Download

Add it in your root build.gradle at the end of repositories:

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

Add the dependency

dependencies {
    implementation 'com.github.zagum:Android-SwitchIcon:1.4.0'
}

Usage

SwitchIconView extends from AppCompatImageView so you can set icon with app:srcCompat

Set any icon (vector or image) to SwitchIconView and enjoy switchable icon in your app :)

Use app:si_tint_color to set color to icon. Default color is black;

Use app:si_disabled_color to set color when icon disabled. Default color is equals with app:si_tint_color;

Use app:si_disabled_alpha to set alpha when icon disabled. Default alpha is .5;

Use app:si_no_dash if you don't want to draw dash, when icon disabled;

Use app:si_animation_duration if you want to change switching state animation duration;

Use app:si_enabled to set initial icon state;

Fully customized implementation:

    <com.github.zagum.switchicon.SwitchIconView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:padding="8dp"
        app:si_animation_duration="500"
        app:si_disabled_alpha=".3"
        app:si_disabled_color="#b7b7b7"
        app:si_tint_color="#ff3c00"
        app:si_enabled="false"
        app:si_no_dash="true"
        app:srcCompat="@drawable/ic_cloud"/>

Public methods and fields:

  var isIconEnabled: Boolean

  fun setIconEnabled(enabled: Boolean, animate: Boolean = true)

  fun switchState(animate: Boolean = true)
  

See sample project for more information.

License

Copyright 2017 Evgenii Zagumennyi

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
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].