package com.huawei.hwmdemo.view;

import android.os.Bundle;
import android.widget.FrameLayout;

import androidx.fragment.app.Fragment;

import com.huawei.hwmdemo.view.sdk.SsoLoginFragment;

public class FragmentContainerActivity extends BaseActivity {
    private Fragment mFragment;

    @Override
    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        FrameLayout frame = new FrameLayout(this);
        if (savedInstanceState == null) {
            mFragment = new SsoLoginFragment();

            if (getSupportFragmentManager().findFragmentById(android.R.id.content) == null) {
                getSupportFragmentManager().beginTransaction()
                    .add(android.R.id.content, mFragment)
                    .commit();
            }
        }

        setContentView(frame);
    }
}
