GenericDialog¶
-
public abstract class
GenericDialog
extends DialogFragment¶ A generic class that makes it easy to customize dialog boxes. example usage of an implementation
AlertboxDialog
AlertboxDialog alertboxDialog = new AlertboxDialog(); alertboxDialog.disableButtons(true); alertboxDialog.setTitle("NETWORK ERROR"); alertboxDialog.setIcon(R.drawable.fail); alertboxDialog.setMessage(activity.getString(R.string.network_error)); alertboxDialog.show(activity.getSupportFragmentManager(), "network_error");
Fields¶
Methods¶
onCreateView¶
-
public View
onCreateView
(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)¶
onViewReady¶
-
protected abstract void
onViewReady
(View view, Bundle savedInstanceState)¶ Add your logic to this method since at this point most of the work is done for you and the base layout has been polutated with your content layout
setLeftButton¶
-
public void
setLeftButton
(String label, ButtonClickedListener clickListener)¶ SEt the listner to be invoked when the left button is clicked
Parameters: - label –
- clickListener –
setRightButton¶
-
public void
setRightButton
(String label, ButtonClickedListener clickListener)¶ set listener to be invoked when the right button is cliked.
Parameters: - label –
- clickListener –