Popularity
0.6
Growing
Activity
3.7
Declining
4
1
2

Code Quality Rank: L5
Programming language: Kotlin
Tags: Other Widget    

Popup-Dismiss-Catchable-Spinner alternatives and similar packages

Based on the "Other Widget" category.
Alternatively, view Popup-Dismiss-Catchable-Spinner alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of Popup-Dismiss-Catchable-Spinner or a related project?

Add another 'Other Widget' Package

README

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


*Note that all licence references and agreements mentioned in the Popup-Dismiss-Catchable-Spinner README section above are relevant to that project's source code only.