A common list dialog, use simple, the function is powerful, can be customized and strong, like UIActionSheet in IOS
##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");
- The font color
- Background
- Icon
- Multi packet
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.