@DIV
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
tools:context="lightbox.june.fragmenttest.MainActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/scrollView">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment
android:layout_width="match_parent"
android:layout_height="wrap_content"
@c:red(android:name="lightbox.june.fragmenttest.ButtonsUpperside")
android:id="@+id/fragment1"
@c:green(tools:layout="@layout/buttons")/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/editText1"/>
<fragment
android:layout_width="match_parent"
android:layout_height="wrap_content"
@c:red(android:name="lightbox.june.fragmenttest.ButtonsUnderside")
android:id="@+id/fragment2"
@c:green(tools:layout="@layout/buttons")/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/editText2"/>
</LinearLayout>
</ScrollView>
</LinearLayout>
@END
@DIV
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="ボタン1"
android:id="@+id/buttonLeft"
android:layout_weight="1"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="ボタン2"
android:id="@+id/buttonRight"
android:layout_weight="1"/>
</LinearLayout>
@END
@SHOW
一つのボタン定義画面を fragment 要素で二度使い、それぞれに別々のクラスを紐づけて処理を行います
@END |