diff --git a/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/tests/SampleActivity.java b/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/tests/SampleActivity.java index f316437..ddc6b36 100644 --- a/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/tests/SampleActivity.java +++ b/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/tests/SampleActivity.java @@ -1,9 +1,12 @@ package org.ntlab.radishforandroidstudio.cactusClient.tests; +import android.support.v4.app.Fragment; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; +import android.view.View; import org.ntlab.radishforandroidstudio.R; +import org.ntlab.radishforandroidstudio.framework.gameMain.RealTime3DFragment; public class SampleActivity extends AppCompatActivity { @@ -12,4 +15,29 @@ super.onCreate(savedInstanceState); setContentView(R.layout.activity_sample); } + + + public void ClickButton(View view){ + Fragment fragment; + + if(view == findViewById(R.id.button)){ + fragment = new RealTime3DFragment(); + getSupportFragmentManager() + .beginTransaction() + .replace(R.id.fragment_field, fragment) + .commit(); + } + + if(view == findViewById(R.id.button2)){ + fragment = new StartFragment(); + getSupportFragmentManager() + .beginTransaction() + .replace(R.id.fragment_field, fragment) + .commit(); + } + + + } + + }