All Projects → stfalcon-studio → Universalpickerdialog

stfalcon-studio / Universalpickerdialog

Android dialog with auto generated pickers inside, which depends on count of datasets provided. Made by Stfalcon

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Universalpickerdialog

Flutter app
🔥🔥🔥本项目包括各种基本控件使用(Text、TextField、Icon、Image、Listview、Gridview、Picker、Stepper、Dialog、Slider、Row、Appbar、Sizebox、BottomSheet、Chip、Dismissible、FlutterLogo、Check、Switch、TabBar、BottomNavigationBar、Sliver等)、豆瓣电影、tubitv、每日一文、和天气、百姓生活、随机诗词、联系人、句子迷、好奇心日报、有道精品课、高德定位、音乐播放器🎵、追书神器等板块
Stars: ✭ 2,140 (+1450.72%)
Mutual labels:  dialog, picker
vscode-color
Helper with GUI to generate color codes such as CSS color notations.
Stars: ✭ 88 (-36.23%)
Mutual labels:  dialog, picker
Amazing Time Picker
Timepicker (Clock Picker) for Angular 2, Angular 4 and Angular 5, Angular 6, Angular 7 - Compatible with Angular Material
Stars: ✭ 142 (+2.9%)
Mutual labels:  dialog, picker
HHChaosToolkit
A set of MVVM tookit class libraries for uwp platform.
Stars: ✭ 27 (-80.43%)
Mutual labels:  dialog, picker
Md Date Time Picker
An implementation of Material Design Picker components in vanilla CSS, JS, and HTML
Stars: ✭ 272 (+97.1%)
Mutual labels:  dialog, picker
Vue Ctk Date Time Picker
VueJS component to select dates & time, including a range mode
Stars: ✭ 707 (+412.32%)
Mutual labels:  dialog, picker
Jh flutter demo
a flutter demo
Stars: ✭ 229 (+65.94%)
Mutual labels:  dialog, picker
flutter jd address selector
京东地址选择器
Stars: ✭ 26 (-81.16%)
Mutual labels:  dialog, picker
HijriDatePicker
Material (Gregorian - Hijri) Date & Time Picker
Stars: ✭ 128 (-7.25%)
Mutual labels:  dialog, picker
React Native Actions Sheet
A Cross Platform(Android & iOS) ActionSheet with a flexible api, native performance and zero dependency code for react native. Create anything you want inside ActionSheet.
Stars: ✭ 412 (+198.55%)
Mutual labels:  dialog, picker
Singledateandtimepicker
You can now select a date and a time with only one widget !
Stars: ✭ 921 (+567.39%)
Mutual labels:  dialog, picker
React Native Material Dialog
Material design dialogs for React Native 💬
Stars: ✭ 135 (-2.17%)
Mutual labels:  dialog
Dialog corpus
用于训练中英文对话系统的语料库 Datasets for Training Chatbot System
Stars: ✭ 1,662 (+1104.35%)
Mutual labels:  dialog
Pingplacepicker
An almost plug and play replacement for Google's Place Picker
Stars: ✭ 124 (-10.14%)
Mutual labels:  picker
Belvedere
An image picker library for Android
Stars: ✭ 122 (-11.59%)
Mutual labels:  picker
Gydl
gydl (Graphical Youtube-dl) is a GUI wrapper around the already existing youtube-dl program.
Stars: ✭ 136 (-1.45%)
Mutual labels:  dialog
Nkvphonepicker
An UITextField subclass to simplify country code's picking. Swift 5.0
Stars: ✭ 131 (-5.07%)
Mutual labels:  picker
V Dialogs
A simple and clean instructional dialog plugin for Vue2, dialog type including Modal, Alert, Mask and Toast
Stars: ✭ 121 (-12.32%)
Mutual labels:  dialog
Panter Dialog
Panter Dialog is an stylish android library that helps users add cool features like adding header and header logos
Stars: ✭ 119 (-13.77%)
Mutual labels:  dialog
Calendar
📆 calendar 日历
Stars: ✭ 119 (-13.77%)
Mutual labels:  picker

UniversalPickerDialog

Customizable dialog with auto generated pickers inside that depend on the dataset count.

alt tag

Who we are

Need iOS and Android apps, MVP development or prototyping? Contact us via [email protected]. We develop software since 2009, and we're known experts in this field. Check out our portfolio and see more libraries from stfalcon-studio.

Download

Download via Gradle:

compile 'com.github.stfalcon:universalpickerdialog:0.1.0'

or Maven:

<dependency>
  <groupId>com.github.stfalcon</groupId>
  <artifactId>universalpickerdialog</artifactId>
  <version>0.1.0</version>
  <type>pom</type>
</dependency>

Usage

Implement callback interface:

public class MainActivity extends AppCompatActivity
        implements View.OnClickListener, UniversalPickerDialog.OnPickListener {

Then implement OnPickListener.onPick(int[], int) method:

@Override
public void onPick(int[] selectedValues, int key) {
    String str = list.get(selectedValues[0]);
    Object obj = array[selectedValues[0]];

    /*do some logic*/
}

Now you can build the dialog and show it. Just add these few lines:

new UniversalPickerDialog.Builder(this)
                .setTitle(R.string.hello)
                .setListener(this)
                .setInputs(
                        new UniversalPickerDialog.Input(0, list),
                        new UniversalPickerDialog.Input(2, array)
                )
                .show();

Data set is passing to Picker using Input class that supports lists as well as arrays, so no data conversion is required :)). It takes in constructor default item position in carousel as the first argument and data set as the second.

Builder was extended by a many methods for more flexibility and convenience of use. Here's the full list (you can find the javadoc on each of these methods):

new UniversalPickerDialog.Builder(this)
                .setTitle(R.string.hello)
                .setTitle("Hello!")
                .setTitleColorRes(R.color.green)
                .setTitleColor(Color.GREEN)
                .setBackgroundColorRes(R.color.white)
                .setBackgroundColor(Color.WHITE)
                .setContentTextColorRes(R.color.green)
                .setContentTextColor(Color.GREEN)
                .setPositiveButtonText(R.string.yep)
                .setPositiveButtonText("Yep!")
                .setNegativeButtonText(R.string.nope)
                .setNegativeButtonText("Nope!")
                .setButtonsColor(R.color.green)
                .setButtonsColorRes(Color.GREEN)
                .setPositiveButtonColorRes(R.color.green)
                .setPositiveButtonColor(Color.GREEN)
                .setNegativeButtonColorRes(R.color.red)
                .setNegativeButtonColor(Color.RED)
                .setContentTextSize(16)
                .setListener(this)
                .setInputs(
                        new UniversalPickerDialog.Input(2, list),
                        new UniversalPickerDialog.Input(0, array)
                )
                .setKey(123)
                .build()
                .show();

Take a look at the sample project for more information.

License

Copyright (C) 2017 stfalcon.com

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].