diff --git a/demo/src/main/AndroidManifest.xml b/demo/src/main/AndroidManifest.xml index 2a5f51f..c8e26a3 100644 --- a/demo/src/main/AndroidManifest.xml +++ b/demo/src/main/AndroidManifest.xml @@ -17,6 +17,7 @@ + Contact me + * Follow me + * ================================================ + */ +public class FragmentHost extends AppCompatActivity implements CustomAdapt{ + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_host); + getSupportFragmentManager().beginTransaction().add(R.id.container1, new CustomFragment1()).commit(); + getSupportFragmentManager().beginTransaction().add(R.id.container2, new CustomFragment2()).commit(); + getSupportFragmentManager().beginTransaction().add(R.id.container3, new CustomFragment3()).commit(); + } + + @Override + public boolean isBaseOnWidth() { + return true; + } + + @Override + public float getSizeInDp() { + return 720; + } +} diff --git a/demo/src/main/res/layout/activity_host.xml b/demo/src/main/res/layout/activity_host.xml new file mode 100644 index 0000000..0e4dfb4 --- /dev/null +++ b/demo/src/main/res/layout/activity_host.xml @@ -0,0 +1,24 @@ + + + + + + + + + \ No newline at end of file