I try to get a key from the main class but it is Always getting null
```
Bundle bundle =new Bundle();
String type = bundle.getString("theType");
if (type =="Check"){
view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.item_note_check, parent, false);
}else if (type =="photo"){
view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.item_note_photo, parent, false);
}else {view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.item_note, parent, false);
}المحافظة على التنسيق
```
to get kType from
public void onRadioButtonTypeClicked(View view) {
// Is the button now checked?
boolean checked = ((RadioButton) view).isChecked();
Bundle bundle = new Bundle();
// Intent intent = new Intent();
kType="photo";
// Check which radio button was clicked
switch(view.getId()) {
case R.id.radioButtonSheet:
if (checked)
mImageNoteV.setImageResource(R.drawable.radio_button_note);
kType= "note";
bundle.putString("theType",kType);
// intent.putExtra("theType",kType);
break;
case R.id.radioButtonDone:
if (checked)
mImageNoteV.setImageResource(R.drawable.radio_button_check_box);
kType="Check";
bundle.putString("theType",kType);
// intent.putExtra("theType",kType);
break;
case R.id.radioButtonPicture:
if (checked)
mImageNoteV.setImageResource(R.drawable.radio_button_photo);
kType = "photo";
bundle.putString("theType",kType);
// intent.putExtra("theType",kType);
break;
}
i try to set it in other class and get it again from it but does not work = null. is there good way to solve this
https://stackoverflow.com/questions/60236931/how-can-i-change-the-itemlayout-in-adapter-class/60238047?noredirect=1#comment106553915_60238047<
ارجو الاجابة بالعربي