Intent i = getIntent();
Bundle myBundle = i.getExtras();
date1 = myBundle.getString("Date1");
date2 = myBundle.getString("Date2");
user = myBundle.getString("UserName");
chain = myBundle.getString("ChainName");
shop = myBundle.getString("ShopName");
product_g = myBundle.getString("ProductGroup");
product_c = myBundle.getString("ProductCategory");
product = myBundle.getString("Product");
count = myBundle.getInt("Count");
type_c = myBundle.getInt("CountType");
price = myBundle.getInt("Price");
type_p = myBundle.getInt("PriceType");
inch = myBundle.getInt("Inch");
promotor = myBundle.getInt("Promotor");
I need these variables in recycler adapter to make retrofit request in RecyclerView
adapter.
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
android.app.AlertDialog.Builder mBuilder = new android.app.AlertDialog.Builder(context);
LayoutInflater li = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
final View mView = li.inflate(R.layout.sales_filtered_shop_pop_up, null);
final RecyclerView rd3 = (RecyclerView) mView.findViewById(R.id.sales_rv);
Button mClose = (Button) mView.findViewById(R.id.sales_pop_up_btn_close);
mBuilder.setView(mView);
final android.app.AlertDialog dialog = mBuilder.create();
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
dialog.setCancelable(false);
// here
dialog.show();
mClose.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialog.dismiss();
}
});
}
});
This is my RecyclerView
adapter item click. I need the variables in // here
to make Retrofit
api call.