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
You need to use a Theme.AppCompat theme (or descendant) with this activity
When I use the component in my project, I have got this Error message!
So I have found the code and located the error at the following code:
else if (v == mTextViewQuantity) { if (!quantityDialog) return;
if (mTextViewClickListener != null) { mTextViewClickListener.onClick(v); return; } // Crash at this line! AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); builder.setTitle(labelDialogTitle); final View inflate = LayoutInflater.from(getContext()).inflate(R.layout.qv_dialog_changequantity, null, false); final EditText et = (EditText) inflate.findViewById(R.id.qv_et_change_qty); et.setText(String.valueOf(quantity)); builder.setView(inflate); builder.setPositiveButton(labelPositiveButton, null); final AlertDialog dialog = builder.show(); dialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { String newQuantity = et.getText().toString(); if (isValidNumber(newQuantity)) { int intNewQuantity = Integer.parseInt(newQuantity); Log.d(VIEW_LOG_TAG, "newQuantity " + intNewQuantity + " max " + maxQuantity); if (intNewQuantity > maxQuantity) { Toast.makeText(getContext(), "Maximum quantity allowed is " + maxQuantity, Toast.LENGTH_LONG).show(); } else if (intNewQuantity < minQuantity) { Toast.makeText(getContext(), "Minimum quantity allowed is " + minQuantity, Toast.LENGTH_LONG).show(); } else { setQuantity(intNewQuantity); hideKeyboard(et); dialog.dismiss(); } } else { Toast.makeText(getContext(), "Enter valid number", Toast.LENGTH_LONG).show(); } } }); }
getContext() should be replaced by getActivity(). Currently I have to note the code to solve this problem!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
You need to use a Theme.AppCompat theme (or descendant) with this activity
When I use the component in my project, I have got this Error message!
So I have found the code and located the error at the following code:
else if (v == mTextViewQuantity) {
if (!quantityDialog) return;
getContext() should be replaced by getActivity(). Currently I have to note the code to solve this problem!
The text was updated successfully, but these errors were encountered: