In my MainActivity layout, I have a TabLayout with ViewHolder and I'm opening Fragment from the adapter in my MainActivity. But the Fragment not showing properly,
I also refer this link but it's different, I m not able to solve my problem.
Here's main_activity_layout.xml:
My MainActivity view before opening the Fragment.
And after opening the Fragment it looks like this:
Here's how I make the fragment transaction.
((MyViewHolder) holder).checkout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
FragmentManager manager = ((AppCompatActivity) mContext).getSupportFragmentManager();
PaymentFragment paymentFragment = new PaymentFragment();
manager.beginTransaction().add(R.id.main_contenier,paymentFragment).addToBackStack(null).commit();
}
});
So my question is how can I show my Fragment? Is there any other way? I can't apply DialogFragment here. How to show fragment as a new blank Activity?

