Answer the question
In order to leave comments, you need to log in
I use data transfer via bundle, but for some reason the data is transferred only 1 time, how to fix it?
I am using this piece of code to send data
@Override
public void onClick(View v) {
DialogFragment dlg;
dlg = new barcodeView();
Coupons coupons = coupons2.get(position);
String i = coupons.getTAG();
Log.v("dwdwdw",""+i);
Bundle bundle = new Bundle();
if (i.equals("lentaAmount500")){
FragmentManager fragmentManager = ((AppCompatActivity)context).getSupportFragmentManager();
bundle.clear();
bundle.putString("someValue", "5000112592702");
dlg.setArguments(bundle);
dlg.show(fragmentManager,"barcodeview");
}
if (i.equals("lentaAmount300")){
FragmentManager fragmentManager = ((AppCompatActivity)context).getSupportFragmentManager();
bundle.clear();
bundle.putString("someValue", "0000054490086");
dlg.setArguments(bundle);
dlg.show(fragmentManager,"barcodeview");
}
if (i.equals("lentaAmount100")){
FragmentManager fragmentManager = ((AppCompatActivity)context).getSupportFragmentManager();
bundle.clear();
bundle.putString("someValue", "0000054491472");
dlg.setArguments(bundle);
dlg.show(fragmentManager,"barcodeview");
}
if (i.equals("petiarochkaAmount500")){
FragmentManager fragmentManager = ((AppCompatActivity)context).getSupportFragmentManager();
bundle.clear();
bundle.putString("someValue", "0000054492387");
dlg.setArguments(bundle);
dlg.show(fragmentManager,"barcodeview");
}
if (i.equals("petiarochkaAmount300")){
FragmentManager fragmentManager = ((AppCompatActivity)context).getSupportFragmentManager();
bundle.clear();
bundle.putString("someValue", "0049000065206");
dlg.setArguments(bundle);
dlg.show(fragmentManager,"barcodeview");
}
if (i.equals("petiarochkaAmount100")){
FragmentManager fragmentManager = ((AppCompatActivity)context).getSupportFragmentManager();
bundle.clear();
bundle.putString("someValue", "050051000481");
dlg.setArguments(bundle);
dlg.show(fragmentManager,"barcodeview");
}
barcode_data = bundle.getString("someValue");
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question