Description
I was trying to achieve showing the bottomsheet on the view of UnityPlayerActivity, which is the default activity exported from unity, but I found the bottomsheet couldn't be seeing unless I rotated the phone.It means the bottomsheet was Instantiated but be covered by the view of unity.I wonder if there is anything I can do with bottomsheet or the preset of bottomsheet conflicts with unity-exported activity.
Here are my codes:
mUnityPlayer = new UnityPlayer(this);
setContentView(R.layout.unity_layout);
linearLayout = (LinearLayout)findViewById(R.id.unity_player);
linearLayout.addView(mUnityPlayer.getView());
mUnityPlayer.requestFocus();
in my click function I use it like this
ExploreFragment exploreFragment = new ExploreFragment();
//explorefragment is a child class of BottomSheetFragment
exploreFragment.show(getSupportFragmentManager(),R.id.unity_bottomsheet);
Activity