Need Modern Permission Popup

Need Modern Permission Popup

Needs

    An easy way to implement modern permission instructions popup. Needs can be fully customized and showing with animations. 


Download

Gradle

And add a dependency code to your module‘s build.gradle file.

Usage

Basic example

This is a basic example on a screenshot. Here is how to create Needs using Needs.Builder.

Create using kotlin dsl

This is how to create Needs‘s instance using kotlin dsl.

OnConfirmListener

We can listen to the confirm button is clicked using OnConfirmListener.

Show and dismiss

Here is how to show needs popup and dismiss easily.

TextForm

TextFrom is an attribute class that has some attributes about TextView for customizing popup texts.

Here is how to create TextForm using kotlin dsl.

NeedsTheme

NeedsTheme is an attribute class for changing Needs popup theme easily.

Here is how to create NeedsTheme using kotlin dsl.

NeedsItemTheme

NeedsTheme is an attribute class for changing Needs popup RecyclerView’s item theme easily.

Here is how to create NeedsItemTheme using kotlin dsl.

NeedsAnimation

NeedsAnimation implements showing and dismissing popup with animations.

ELASTICCIRCULAR
NONEFADE

Preference

If you want to show-up the Popup only once or a specific number of times, here is how to implement it simply.

Avoid Memory leak

Dialog, PopupWindow and etc.. have memory leak issue if not dismissed before activity or fragment are destroyed. But Lifecycles are now integrated with the Support Library since Architecture Components 1.0 Stable released. So we can solve the memory leak issue so easily.


Just use setLifecycleOwner method. Then dismiss method will be called automatically before activity or fragment would be destroyed.

Needs builder methods

151 total views, 3 views today

(Visited 66 times, 1 visits today)

You May Also Like

About the Author: Android Developer

This is Mohammad I am Android Application Developer. I am the founder of Android Tutorial Online blog. I am programming lover and professional blogger from India. I spend most of my time doing programming and helping other programmers. This Android tutorial online blog for learning and share Android code.
My Chatbot
Powered by Replace Me