dialog plus android github 1

dialog plus android github

DialogPlus dialog = DialogPlus.newDialog(this)
  .setAdapter(adapter)
  .setOnItemClickListener(new OnItemClickListener() {
    @Override
    public void onItemClick(DialogPlus dialog, Object item, View view, int position) {
    }
  })
  .setExpanded(true)  // This will enable the expand feature, (similar to android L share dialog)
  .create();
dialog.show();

Here is what the above code is Doing:
1. Create a dialog with a custom adapter.
2. Set an item click listener.
3. Set the dialog to be expanded.
4. Show the dialog.

### Customizing the dialog

You can customize the dialog by using the following methods:

“`java
dialog.setContentHolder(new ViewHolder(R.layout.custom_view));
dialog.setContentHolder(new ViewHolder(view));
dialog.setContentHolder(new ViewHolder(view, height, width));
dialog.setContentHolder(new ViewHolder(view, height, width, gravity));
dialog.setContentHolder(new ViewHolder(view, height, width, gravity, padding));
dialog.setContentHolder(new ViewHolder(view, height, width, gravity, padding, margin));
dialog.setContentHolder(new ViewHolder(view, height, width, gravity, padding, margin, paddingLeft));
dialog.setContentHolder(new ViewHolder(view, height, width, gravity, padding, margin, paddingLeft, paddingTop));
dialog.setContentHolder(new ViewHolder(view, height, width, gravity, padding, margin, paddingLeft, paddingTop, paddingRight));
dialog.setContentHolder(new ViewHolder(view, height, width, gravity, padding, margin, paddingLeft, paddingTop, paddingRight, paddingBottom));
dialog.setContentHolder(new ViewHolder(view, height, width, gravity, padding, margin, paddingLeft, paddingTop, paddingRight, paddingBottom, scale));
dialog.setContentHolder(new ViewHolder(view, height, width, gravity, padding, margin, paddingLeft, paddingTop, paddingRight, paddingBottom, scale, onItemClickListener));
dialog.setContentHolder(new ViewHolder(view, height, width, gravity, padding, margin, paddingLeft, paddingTop, paddingRight, paddingBottom, scale, onItemClickListener, onItemLongClickListener));
dialog.setContentHolder(new ViewHolder(view, height, width, gravity, padding, margin, paddingLeft, paddingTop, paddingRight, paddingBottom, scale, onItemClickListener, onItemLongClickListener, onDismissListener));
dialog.setContentHolder(new ViewHolder(view, height, width, gravity, padding, margin, paddingLeft, paddingTop, paddingRight, paddingBottom, scale, onItemClickListener, onItemLongClickListener, onDismissListener, isHeader));
dialog.setContentHolder(new ViewHolder(view, height, width, gravity, padding, margin, paddingLeft, paddingTop, paddingRight, paddingBottom, scale, onItemClickListener, onItemLongClickListener, onDismissListener, isHeader, isFooter));
dialog.setContentHolder(new ViewHolder(view, height, width, gravity, padding, margin, paddingLeft, paddingTop, paddingRight, paddingBottom, scale, onItemClickListener, onItemLongClickListener, onDismissListener, isHeader, isFooter, isExpanded));
dialog.setContentHolder(new ViewHolder(view, height, width, gravity, padding, margin, paddingLeft, paddingTop, paddingRight, paddingBottom, scale, onItemClickListener, onItemLongClickListener, onDismissListener, isHeader, isFooter, isExpanded, inAnimation));
dialog.setContentHolder(new ViewHolder(view, height, width,

Similar Posts