У меня есть XML-макет, который я использую в качестве нижнего листа с помощью BottomSheetDragHandleView, но когда он отображается, я вообще ни к чему не могу получить доступ. Что я должен делать? В настоящее время я использую макет координат в XML-макете основного действия.
Это мой Java-код:
У меня есть XML-макет, который я использую в качестве нижнего листа с помощью BottomSheetDragHandleView, но когда он отображается, я вообще ни к чему не могу получить доступ. Что я должен делать? В настоящее время я использую макет координат в XML-макете основного действия. Это мой Java-код: [code]package com.example.outletmapsbeta;
// Set the view for the BottomSheetDialog bottomSheetDialogIm3.setContentView(bottomSheetViewIm3);
bottomSheetDialogIm3.getWindow().setDimAmount(0f); // 0f berarti tidak ada dimming bottomSheetDialogIm3.setCanceledOnTouchOutside(false); BottomSheetBehavior behaviorIm3 = BottomSheetBehavior.from((View) bottomSheetViewIm3.getParent());
// Set the peek height behaviorIm3.setPeekHeight(1045); // Set this to whatever height you want in pixels
// Set the view for the BottomSheetDialog bottomSheetDialog3id.setContentView(bottomSheetView3id);
bottomSheetDialog3id.getWindow().setDimAmount(0f); // 0f berarti tidak ada dimming bottomSheetDialog3id.setCanceledOnTouchOutside(false); BottomSheetBehavior behavior3id = BottomSheetBehavior.from((View) bottomSheetView3id.getParent());
// Set the peek height behavior3id.setPeekHeight(1045); // Set this to whatever height you want in pixels
Button closeButton = findViewById(R.id.butt_test_close); closeButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (bottomSheetDialogIm3.isShowing() || bottomSheetDialog3id.isShowing()) { bottomSheetDialogIm3.dismiss(); bottomSheetDialog3id.dismiss(); } } }); } } [/code] Я пытаюсь сделать что-то похожее на приложения Google Maps. Интерактивный объект на заднем плане (сзади).