I have a Fragment with a RecyclerView that displays items. When I click on one item a new Fragment is instantiated:
public void onItemClick(View view, int position) {
getActivity().getSupportFragmentManager().beginTransaction()
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
.add(R.id.detail_container, new DetailFragment())
.addToBackStack(null)
.commit();
selected_item = position;
}
and added to a container with a black background:
<FrameLayout
android:id="@+id/detail_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="30dp"
android:background="@android:color/black" />
However as you can see the background is still transparent.. I tried a lot of different approaches but they didn't worked..