use of com.orhanobut.dialogplus.OnItemClickListener in project dialogplus by orhanobut.
the class MainActivity method showOnlyContentDialog.
private void showOnlyContentDialog(Holder holder, int gravity, BaseAdapter adapter, OnItemClickListener itemClickListener, OnDismissListener dismissListener, OnCancelListener cancelListener, boolean expanded) {
final DialogPlus dialog = DialogPlus.newDialog(this).setContentHolder(holder).setGravity(gravity).setAdapter(adapter).setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(DialogPlus dialog, Object item, View view, int position) {
Log.d("DialogPlus", "onItemClick() called with: " + "item = [" + item + "], position = [" + position + "]");
}
}).setOnDismissListener(dismissListener).setOnCancelListener(cancelListener).setExpanded(expanded).setCancelable(true).create();
dialog.show();
}
use of com.orhanobut.dialogplus.OnItemClickListener in project dialogplus by orhanobut.
the class MainActivity method showCompleteDialog.
private void showCompleteDialog(Holder holder, int gravity, BaseAdapter adapter, OnClickListener clickListener, OnItemClickListener itemClickListener, OnDismissListener dismissListener, OnCancelListener cancelListener, boolean expanded) {
final DialogPlus dialog = DialogPlus.newDialog(this).setContentHolder(holder).setHeader(R.layout.header).setFooter(R.layout.footer).setCancelable(true).setGravity(gravity).setAdapter(adapter).setOnClickListener(clickListener).setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(DialogPlus dialog, Object item, View view, int position) {
Log.d("DialogPlus", "onItemClick() called with: " + "item = [" + item + "], position = [" + position + "]");
}
}).setOnDismissListener(dismissListener).setExpanded(expanded).setContentHeight(ViewGroup.LayoutParams.WRAP_CONTENT).setOnCancelListener(cancelListener).setOverlayBackgroundResource(android.R.color.transparent).create();
dialog.show();
}
use of com.orhanobut.dialogplus.OnItemClickListener in project dialogplus by orhanobut.
the class MainActivity method showNoHeaderDialog.
private void showNoHeaderDialog(Holder holder, int gravity, BaseAdapter adapter, OnClickListener clickListener, OnItemClickListener itemClickListener, OnDismissListener dismissListener, OnCancelListener cancelListener, boolean expanded) {
final DialogPlus dialog = DialogPlus.newDialog(this).setContentHolder(holder).setFooter(R.layout.footer).setCancelable(true).setGravity(gravity).setAdapter(adapter).setOnClickListener(clickListener).setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(DialogPlus dialog, Object item, View view, int position) {
Log.d("DialogPlus", "onItemClick() called with: " + "item = [" + item + "], position = [" + position + "]");
}
}).setOnDismissListener(dismissListener).setOnCancelListener(cancelListener).setExpanded(expanded).create();
dialog.show();
}
use of com.orhanobut.dialogplus.OnItemClickListener in project dialogplus by orhanobut.
the class DialogPlusBuilderTest method testSetOnItemClickListener.
@Test
public void testSetOnItemClickListener() {
DialogPlusBuilder builder = DialogPlus.newDialog(context);
assertThat(builder.getOnItemClickListener()).isNull();
OnItemClickListener listener = new OnItemClickListener() {
@Override
public void onItemClick(DialogPlus dialog, Object item, View view, int position) {
}
};
builder.setOnItemClickListener(listener);
assertThat(builder.getOnItemClickListener()).isNotNull();
assertThat(builder.getOnItemClickListener()).isEqualTo(listener);
}
use of com.orhanobut.dialogplus.OnItemClickListener in project dialogplus by orhanobut.
the class MainActivity method showNoFooterDialog.
private void showNoFooterDialog(Holder holder, int gravity, BaseAdapter adapter, OnClickListener clickListener, OnItemClickListener itemClickListener, OnDismissListener dismissListener, OnCancelListener cancelListener, boolean expanded) {
final DialogPlus dialog = DialogPlus.newDialog(this).setContentHolder(holder).setHeader(R.layout.header).setCancelable(true).setGravity(gravity).setAdapter(adapter).setOnClickListener(clickListener).setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(DialogPlus dialog, Object item, View view, int position) {
Log.d("DialogPlus", "onItemClick() called with: " + "item = [" + item + "], position = [" + position + "]");
}
}).setOnDismissListener(dismissListener).setOnCancelListener(cancelListener).setExpanded(expanded).create();
dialog.show();
}
Aggregations