Skip to content

benjyair/PubDialog

Repository files navigation

PubDialog

A common list dialog, use simple, the function is powerful, can be customized and strong, like UIActionSheet in IOS

PubDialog

Download Demo

##Use

//Initialize an array of characters
List<String> list = new ArrayList<>(3);
list.add("Send message");
list.add("Like profile");
list.add("Add to favorites");

//Initialize PubDialogFragment
PubDialogFragment pubDialog = PubDialogFragment.newInstance(list, false);

//Callback (can also be not provided)
pubDialog.setItemClickListener(new PubDialogFragment.ItemClickListener() {

    @Override
    public void onItemClick(View clickedView, DialogObject dialogObject,
                            int groupIndex, int itemIndex) {
        //Handle events in the callback
        //do something
    }
});

//In the use of the local
pubDialog.show(getSupportFragmentManager(), "setting");

Function Customization

  • The font color
  • Background
  • Icon
  • Multi packet

More

License

Copyright 2015 KokerWang

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.

About

A common list dialog,like UIActionSheet in IOS, more than customized and strong

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages