Android-AlertView

仿iOS的AlertViewController

Stars
1.4K

Android-AlertView

iOSAlertViewController iOS AlertViewController AlertActionSheetapi.

Demo

demoModulegradle :

   compile 'com.bigkoo:alertview:1.0.3'

config in java code

new AlertView("", null, "", null,
                new String[]{"", ""},
                this, AlertView.Style.ActionSheet, new OnItemClickListener(){
                    public void onItemClick(Object o,int position){
                        Toast.makeText(this, "" + position + "", 
                        Toast.LENGTH_SHORT).show();
                    }
                }).show();
                
//builder
new AlertView.Builder().setContext(context)
                .setStyle(AlertView.Style.ActionSheet)
                .setTitle("")
                .setMessage(null)
                .setCancelText("")
                .setDestructive("", "")
                .setOthers(null)
                .setOnItemClickListener(listener)
                .build()
                .show();
new AlertView("", "", null, new String[]{""}, null, this, 
                AlertView.Style.Alert, null).show();

Demo