NullPointerException with AppCompat BottomSheets

前端 未结 5 1554
LinearLayout bottomSheetViewgroup = (LinearLayout) findViewById(R.id.bottomSheet);

bottomSheetBehavior = BottomSheetBehavior.from(bottomSheetViewgroup);

bottomShee         


        
5条回答
  •  孤城傲影
    2020-12-20 12:20

    I've found a solution but I still don't known why this happen. The solution is put this last line to user call directly after the activity is running. Ex: in a contextMenu callback or in any OnClickListener.

提交回复
热议问题