Popup-Dismiss-Catchable-Spinner - A custom android Spinner to which you could set listener for popup dismissal event

Overview

Popup-Dismiss-Catchable-Spinner

Description

A custom Spinner to which you could set listener for popup dismissal event.

Download

Insert these lines into your Module's build.gradle file.

repositories {
    jcenter()
}

dependencies {
    implementation 'com.duchuyctlk.widget:spinner-lib:0.0.3'
}

Usage

Follow the Download step.

In layout files, use com.duchuyctlk.widget.PopupDismissCatchableSpinner instead of Spinner widget.

<com.duchuyctlk.widget.PopupDismissCatchableSpinner
  android:id="@+id/spinner1"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:layout_centerInParent="true"
  android:layout_marginTop="@dimen/activity_vertical_margin"
  android:entries="@array/item_arrays"
  android:prompt="@string/spinner_prompt"
  android:spinnerMode="dropdown" />

Implement PopupDismissListener interface.

public class MainActivity extends Activity implements PopupDismissListener {
	// TODO override interface's method
	@Override
	public void onDismiss(DialogInterface dialog) {
		// you could process drop down case and dialog case seperately if needed
	}
}

Call PopupDismissCatchableSpinner.addOnPopupDismissListener(PopupDismissListener listener) and you are able to catch show/dismiss events

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		// ...
		spinner1 = (PopupDismissCatchableSpinner) findViewById(R.id.spinner1);
		spinner1.addOnPopupDismissListener(this);
		// ...
	}

License

Copyright 2016 Nguyen Duc Huy

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.

Status on CircleCI: Circle CI

Test coverage on Coveralls.io: Coverage Status

You might also like...
💳 A quick and easy flip view through which you can create views with two sides like credit cards, poker cards etc.
💳 A quick and easy flip view through which you can create views with two sides like credit cards, poker cards etc.

The article on how this library was created is now published. You can read it on this link here. →. 💳 EasyFlipView Built with ❤︎ by Wajahat Karim and

A View on which you can freely draw, customizing paint width, alpha and color, and take a screenshot of the content. Useful for note apps, signatures or free hand writing.
A View on which you can freely draw, customizing paint width, alpha and color, and take a screenshot of the content. Useful for note apps, signatures or free hand writing.

FreeDrawView A View that let you draw freely on it. You can customize paint width, alpha and color. Can be useful for notes app, signatures or hands-f

Useful library to use custom fonts in your android app
Useful library to use custom fonts in your android app

EasyFonts A simple and useful android library to use custom fonts in android apps without adding fonts into asset/resource folder.Also by using this l

Custom android music player view.
Custom android music player view.

InteractivePlayerView Custom android music player view. Screen Check it on youtube Usage(XML) Define it in your xml file. co.mobiwise.library.Intera

Android Library for Custom Switches.
Android Library for Custom Switches.

Android Library for Custom Switches.

Custom wheel widget for android
Custom wheel widget for android

Wheel widget for Android To include the wheel widget in the current layout, you should add in the layout xml this lines: it.sephiroth.android

A beautiful Android custom View that works similar to a range or seekbar. With animations.
A beautiful Android custom View that works similar to a range or seekbar. With animations.

ValueBar A beautiful Android custom View that works similar to a range or seekbar. Selection by gesture. With animations. Supporting API level 11+. De

An android custom view that displays a circle with a colored arc given a mark
An android custom view that displays a circle with a colored arc given a mark

MarkView An android custom view that displays a circle with a colored arc given a mark. Usage Add as a dependency compile 'com.github.xiprox.markv

This is a android custom view , like a scratch card effect!
This is a android custom view , like a scratch card effect!

ScratchView This is a android custom view , like a scratch card effect! Last Update 采纳DearZack童鞋的优化思路,把计算擦除面积比例的操作放在手指离开屏幕时,以降低对CPU的占用。 Articles Scrat

Comments
  • Fix some issues

    Fix some issues

    Hi!

    Thank you for your library.

    I try use it in my project, and fixed some issues for that.

    StackOverflow caused when I use my multi-select logic in adapter.

    opened by e16din 0
  • [f] Separate lib module and demo app module. Upload lib to jcenter.

    [f] Separate lib module and demo app module. Upload lib to jcenter.

    • Separate lib module and demo app module.
    • Upload lib module to jcenter.
    • Modify installv1.gradle and bintrayv1.gradle to read from SysEnv for running on a CI.
    • Update README.md
    opened by duchuyctlk 0
  • [r] Use RetroLambda

    [r] Use RetroLambda

    • Update Android Plugin for Gradle 2.1.0
    • Use Java 8 + RetroLambda for compiling and using lambda expressions
    • Split onShow method into a separate interface.
    opened by duchuyctlk 0
Owner
Huy Nguyen
Software engineer
Huy Nguyen
Set custom font in Android application

MagicViews Provides a simple way to set custom font in Android application. Adding to your project Add the library as a dependency to your build.gradl

Ivan Kocijan 225 Nov 20, 2022
: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

Jaewoong Eum 2.8k Jan 5, 2023
Provenance-eventstream-legacy-kotlin - A legacy Kotlin library for reading from the Provenance event stream

provenance-eventstream-legacy-kotlin A legacy Kotlin library for reading from th

Figure Technologies Inc. 1 Jan 13, 2022
Android layout decorators : Injecting custom attributes in layout files, Using decorators to get rid of unnecessary class explosion with custom views

Decor Decor is a library that applies decorators to Android layout with additional attributes without the need to extend and create a custom View for

Mouna Cheikhna 304 Nov 25, 2022
IconicDroid is a custom Android Drawable which allows to draw icons from several iconic fonts.

IconicDroid IconicDroid is a custom Android Drawable which allows to draw icons from several iconic fonts. Try out the sample application on the Googl

Artur Termenji 387 Nov 20, 2022
Custom UI control for android which is showing data as a segments and a value inside them.

Segmented Bar View for Android Custom UI control for android which is showing data as a segments and a value inside them. Screenshots Install From rep

GSPD 354 Nov 10, 2022
A custom view, in which device contact list is displayed

Getting Started This repository contains a custom view, in which device contact list is displayed Implementation Go to Settings.gradle, inside reposit

Ankit Kumar 2 May 7, 2022
A set of Android-UI components to make it easier to request permission in a user friendly way.

Permission UI A set of Android-UI components to make it easier to request permission in a user friendly way. Access background location A jetpack comp

Stefan Wärting 54 Nov 3, 2022
A set of widgets to create smooth slideshows with ease.

Android SlideShow Widget A set of widgets to create smooth slide shows with ease. The slide show components are fully customizable and are not limited

MarvinLabs 211 Nov 20, 2022
Android library which allows you to swipe down from an activity to close it.

Android Sliding Activity Library Easily create activities that can slide vertically on the screen and fit well into the Material Design age. Features

Jake Klinker 1.3k Nov 25, 2022