We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Main activity contains below code
ProductRegistrationDetails productRegistrationDetails = new ProductRegistrationDetails(); productRegistrationDetails.setActiveRegistrationFound(isActiveRegistrationFound); productRegistrationDetails.setNumberOfFreebies(numberOfFreebies); productRegistrationDetails.setNumberOfRegistrationBasedAdsPerMonth(numberOfRegistrationBasedAdsPerMonth); productRegistrationDetails.setRemainingProduct(remainingProduct); productRegistrationDetails.setTrialEnabled(isTrialEnabled); productRegistrationDetails.setTrialExpired(isTrialExpired); productRegistrationDetails.setUpgradedPackageIsUsing(isUpgradedPackageIsUsing); ProductRegistrationAdapter adapter = new ProductRegistrationAdapter(context, productRegistrationDetails); DialogPlus dialogPlus = DialogPlus.newDialog(this) .setAdapter(adapter) .setContentHolder(new ListHolder()) .setExpanded(true) .setCancelable(true) .setContentHeight(ViewGroup.LayoutParams.WRAP_CONTENT) .setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(DialogPlus dialog, Object item, View view, int position) { CustomSnackBar snackBar = new CustomSnackBar(context, view, "this is test", Snackbar.LENGTH_LONG, CustomSnackBar.INFO); snackBar.show(); } }) .create(); dialogPlus.show();
My Adapter Class
public class ProductRegistrationAdapter extends BaseAdapter { private static final String TAG = ProductRegistrationAdapter.class.getSimpleName(); private Context mContext; private ProductRegistrationDetails productRegistrationDetails; public ProductRegistrationAdapter(@NonNull Context context, ProductRegistrationDetails details) { this.mContext = context; productRegistrationDetails = details; } @Override public int getCount() { return 1; } @Override public Object getItem(int i) { return i; } @Override public long getItemId(int i) { return i; } @Override public View getView(final int i, View view, ViewGroup viewGroup) { ProductRegistrationAdapter.ViewHolder holder; if (view == null) { LayoutInflater inflater = (LayoutInflater) mContext .getSystemService(Context.LAYOUT_INFLATER_SERVICE); view = inflater.inflate(R.layout.registration_dialog, viewGroup, false); holder = new ProductRegistrationAdapter.ViewHolder(); holder.registerNow = (Button) view.findViewById(R.id.register_now); holder.info = (TextView) view.findViewById(R.id.dialog_info); view.setTag(holder); } else { holder = (ProductRegistrationAdapter.ViewHolder) view.getTag(); } return view; } private static class ViewHolder { TextView info; TextView Id; Button registerNow; } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Main activity contains below code
My Adapter Class
The text was updated successfully, but these errors were encountered: