it's the first time I am trying to implement a BottomSheetDialog into my Android Studio project. In order to get a little bit more familiar with the process I tried following this tutorial on Youtube: https://youtu.be/hfoXhiMTc0c. In my actual Java Class, the BottomSheet is activated when I am scanning an NFC-Chip containing different information. However I am not able to display the information from the Chip dynamicly on the Sheet. I guess that is due to the Sheet being static? How would I be able to display the information from the chip which is already stored in a variable in my Java class to be displayed in a textfield of the BottomSheet?
Any help is appreciated, thank you!
here's the code snippet of the java class where the BottomSheet is extended:
final BottomSheetDialog bottomSheetDialog = new BottomSheetDialog(
Scan.this, R.style.BottomSheetDialogTheme
);
View bottomSheetView = LayoutInflater.from(getApplicationContext())
.inflate(
R.layout.layout_bottom_sheet,
(LinearLayout)findViewById(R.id.bottomSheetContainer)
);
bottomSheetView.findViewById(R.id.addToCloset).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
bottomSheetDialog.dismiss();
}
});
bottomSheetDialog.setContentView(bottomSheetView);
bottomSheetDialog.show();```