Skip to content

Instantly share code, notes, and snippets.

@kalvian1060
Created May 20, 2017 07:56
Show Gist options
  • Save kalvian1060/a3280961da82ca84bf410aa8bd0e9d07 to your computer and use it in GitHub Desktop.
Save kalvian1060/a3280961da82ca84bf410aa8bd0e9d07 to your computer and use it in GitHub Desktop.
Main Activirty untuk container
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="id.kalviansofian.belajarfragment.MainActivity">
<LinearLayout
android:id="@+id/action_container"
android:layout_width="match_parent"
android:layout_height="300dp"
android:orientation="vertical" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/action_container"
android:orientation="vertical"
android:padding="10dp">
<Button
android:id="@+id/addFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Add Fragment" />
<Button
android:id="@+id/replaceFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/action_container"
android:text="Replace Fragment" />
<Button
android:id="@+id/removeFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/action_container"
android:text="Remove Fragment" />
</LinearLayout>
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment