FragmentTop.java
FragmentLeft.java
FragmentRight.java
fragment_main.xml
fragment_top_layout.xml
fragment_left_layout.xml
fragment_right_layout.xml
======================================================
Other layout for fragment resizing
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="100"
>
<LinearLayout
android:id="@+id/layout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="70"
<fragment
android:id="@+id/topFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.test.Topfragment" >
</fragment>
</LinearLayout>
<LinearLayout
android:id="@+id/layout2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="30"
<fragment
android:id="@+id/bodyFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.test.BodyFragment" >
</fragment>
</LinearLayout>
</LinearLayout>
Java
LinearLayout layout1 = (LinearLayout) findViewById(R.id.layout1);
LinearLayout.LayoutParams param = layout1.getLayoutParam();
param.weight = you want value;
layout1.setLayoutParam(param);
'programmer > android' 카테고리의 다른 글
Java Doc 생성 (0) | 2013.07.31 |
---|---|
listview animation (0) | 2013.07.25 |
Adapter를 사용하는 View(ListView, GridView)에 Context menu 사용하기 (0) | 2013.07.25 |
Content Uri and File path (0) | 2013.07.25 |
Screen rotation (0) | 2013.07.24 |