Practical_5-1
Practical_5-1
<Button
android:id="@+id/button1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button 1" />
<Button
android:id="@+id/button2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button 2" />
<Button
android:id="@+id/button3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button 3" />
<Button
android:id="@+id/button4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button 4" />
<Button
android:id="@+id/button5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button 5" />
<Button
android:id="@+id/button6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button 6" />
<Button
android:id="@+id/button7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button 7" />
<Button
android:id="@+id/button8"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button 8" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
>
<Button
android:id="@+id/button9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button 9"
android:layout_marginLeft="3dp"/>
<Button
android:id="@+id/button10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button 10"
android:layout_marginLeft="30dp"/>
<Button
android:id="@+id/button11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button 11"
android:layout_marginLeft="30dp"/>
</LinearLayout>
</LinearLayout>
Output:
<View
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@color/green"
android:layout_x="0dp"
android:layout_y="0dp"/>
<View
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@color/green"
android:layout_x="150dp"
android:layout_y="150dp"/>
<View
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@color/green"
android:layout_x="300dp"
android:layout_y="300dp"/>
</AbsoluteLayout>
Output: