From 0ca5d858327d71298cf86f20461b90a9cd38d780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Bussa?= Date: Tue, 24 Jan 2017 22:10:31 +0100 Subject: [PATCH] Update README.md --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 45ee58f..3b51900 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,28 @@ app:hv_add_icon="@drawable/ic_action_settings" headerView.setShowAddButton(true); app:hv_show_add_button="true" ``` +#### Callback +```Java +headerView.setCallback(new HeaderCallback() { + + @Override + public boolean onSelect(int id, boolean isActive) { + //return profile id selected and if is the active profile + return true; //true for close the dialog, false for do nothing + } + + @Override + public boolean onItem(int id) { + //return witch buttom item is selected + return true; //true for close the dialog, false for do nothing + } + + @Override + public boolean onAdd() { + return true; //true for close the dialog, false for do nothing + } +}); +``` #### Loading image from network Just add this in your class Application (of course you can use your preferred libs for load images) ```Java