Newer
Older
IrisClient / app / src / main / java / org / ntlab / irisclient / GameMemberActivity.java
yugo-asano on 6 Oct 2022 880 bytes レイアウトの制約の追加
package org.ntlab.irisclient;

import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;

import android.os.Bundle;

public class GameMemberActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_member_game);

        FragmentManager fragmentManager = getSupportFragmentManager();
        FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();

        // BackStackを設定
        fragmentTransaction.addToBackStack(null);

        // パラメータを設定
        fragmentTransaction.replace(R.id.container,
                        DrawingCardFragment.newInstance("Fragment"));
        fragmentTransaction.commit();
    }
}