Customizable Item Setting View Android

Overview

ItemSettingView

Simple ItemSettingView and Custom

Release Android Arsenal License

Installation

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.andhikayuana:YuanaItemSettingView:1.0.0'
}

Usage

you can use like this

<id.yuana.itemsettingview.ItemSettingView
        android:id="@+id/itemNotification"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="?attr/selectableItemBackground"
        android:padding="10dp"
        app:settingActionIcon="@drawable/ic_arrow_right"
        app:settingDescription="@string/txt_notifications_desc"
        app:settingDescriptionColor="@android:color/holo_green_light"
        app:settingIcon="@drawable/ic_notifications"
        app:settingLabel="@string/txt_notifications"
        app:settingLabelColor="@android:color/holo_green_dark" />
ItemSettingView itemSettingView = (ItemSettingView) findViewById(R.id.itemNotification);

/**
 * available method
 */
itemSettingView.setLabel(R.string.your_label);
itemSettingView.setLabel("string label");
itemSettingView.setDescription(R.string.your_descsription);
itemSettingView.setDescription("string description");
itemSettingView.setIcon(ContextCompat.getDrawable(this, R.drawable.your_icon));
itemSettingView.setActionIcon(ContextCompat.getDrawable(this, R.drawable.your_action_icon));
itemSettingView.setLabelColor(R.color.your_color);
itemSettingView.setDescriptionColor(R.color.your_color);

/**
 * custom action here
 * you can pass all extends view like this
 */
Switch switchNotification = new Switch(this);
switchNotification.setChecked(true);
switchNotification.setOnCheckedChangeListener((buttonView, isChecked) -> {
  //your implementation
});

itemSettingView.setCustomViewAction(switchNotification);

// or you can get custom view like this
Switch customViewAction = (Switch) settingNotification.getCustomViewAction();
customViewAction.setChecked(false);

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Todos

  1. ?

Donation

ko-fi

License

MIT License

Copyright (c) 2018 Andhika Yuana

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You might also like...
用于做Path动画的自定义View。 I have a path.I have a view. (Oh~),Path(Anim)View.
用于做Path动画的自定义View。 I have a path.I have a view. (Oh~),Path(Anim)View.

PathAnimView 用于做Path动画的自定义View。 I have a path.I have a view. (Oh~),Path(Anim)View. 现已经找到图片-SVG-PATH的正确姿势, Now i have a pic.I have a view. Oh~,Path(A

:balloon: A lightweight popup like tooltips, fully customizable with an arrow and animations.
:balloon: A lightweight popup like tooltips, fully customizable with an arrow and animations.

Balloon 🎈 A lightweight popup like tooltips, fully customizable with arrow and animations. Including in your project Gradle Add below codes to your r

Highly customizable SlidingLayer as you have seen in Wunderlist

6Wunderkinder SlidingLayer for Android This repository hosts a library that provides an easy way to include an autonomous layer/view that slides from

The CustomCalendarView provides an easy and customizable calendar to create a Calendar. It dispaly the days of a month in a grid layout and allows to navigate between months

Custom-Calendar-View To use the CustomCalendarView in your application, you first need to add the library to your application. You can do this by eith

Highly customizable SlidingLayer as you have seen in Wunderlist

6Wunderkinder SlidingLayer for Android This repository hosts a library that provides an easy way to include an autonomous layer/view that slides from

TourGuide is an Android library that aims to provide an easy way to add pointers with animations over a desired Android View

TourGuide TourGuide is an Android library. It lets you add pointer, overlay and tooltip easily, guiding users on how to use your app. Refer to the exa

View that imitates Ripple Effect on click which was introduced in Android L  (for Android 2.3+)
View that imitates Ripple Effect on click which was introduced in Android L (for Android 2.3+)

RippleView View that imitates Ripple Effect on click which was introduced in Android L. Usage For a working implementation, Have a look at the Sample

Snake View is a simple and animated linear chart for Android.
Snake View is a simple and animated linear chart for Android.

Snake View Snake library is a simple and animation line chart for Android. Latest Version How to use Configuring your project dependencies Add the lib

[] A simple way to
[] A simple way to "badge" any given Android view at runtime without having to cater for it in layout

Android ViewBadger A simple way to "badge" any given Android view at runtime without having to cater for it in layout. Note: If your aim is to replica

Releases(1.0.0)
Owner
Andhika Yuana
Hello from 🇮🇩
Andhika Yuana
Custom & highly configurable seek slider with sliding intervals, disabled state and every possible setting to tackle!

LabeledSeekSlider Custom & highly configurable seek slider with sliding intervals, disabled state and every possible setting to tackle! Minimum target

Edgar Žigis 78 Sep 27, 2022
An Android library introducing a stack of Views with the first item being flippable.

FlippableStackView An Android library introducing a stack of Views with the first item being flippable. Views inside the stack remain the aspect ratio

Bartek Lipinski 812 Dec 7, 2022
A simple, customizable and easy to use swipeable view stack for Android.

SwipeStack A simple, customizable and easy to use swipeable view stack for Android. QuickStart Include the Gradle dependency dependencies { compil

Frederik Schweiger 1.5k Dec 30, 2022
Fully customizable implementation of "Snowfall View" on Android.

Android-Snowfall Fully customizable implementation of "Snowfall View" on Android. That's how we use it in our app Hotellook Compatibility This library

Jetradar Mobile 1.2k Dec 21, 2022
A simple and customizable two or three states Switch View

RMSwitch A simple View that works like a switch, but with more customizations. With the option to choose between two or three states. (from v1.1.0) **

Riccardo Moro 656 Dec 2, 2022
A customizable debug screen to view and edit flags that can be used for development in Jetpack Compose applications

Tweaks A customizable debug screen to view and edit flags that can be used for development in Jetpack Compose applications To include the library add

Guillermo Merino Jiménez 4 Jan 14, 2022
Android View for displaying and selecting values in a circle-shaped View, with animations and touch gestures.

CircleDisplay Android View for displaying and selecting (by touch) values / percentages in a circle-shaped View, with animations. Features Core featur

Philipp Jahoda 287 Nov 18, 2022
⚡️A highly customizable, powerful and easy-to-use alerting library for Android.

Flashbar A highly customizable, powerful and easy-to-use alerting library for Android. Specs This library allows you to show messages or alerts in you

Aritra Roy 1.7k Dec 7, 2022
A nicer-looking, more intuitive and highly customizable alternative for radio buttons and dropdowns for Android.

SwipeSelector Undergoing for some API changes for a 2.0 major version, see example usage in the sample module! What and why? Bored of dull looking rad

Iiro Krankka 1.1k Dec 30, 2022
FloatingView can make the target view floating above the anchor view with cool animation

FloatingView FloatingView can make the target view floating above the anchor view with cool animation Links 中文版 README Blog about FloatingView demo.ap

UFreedom 1.8k Dec 27, 2022