2010-09-08 59 views

回答

3

如果分割畫面的大小無論如何都是固定的,爲什麼不使用包含2個子佈局的LinearLayout

例子:

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" android:layout_width="fill_parent" 
    android:layout_height="fill_parent"> 
    <LinearLayout android:id="@+id/LinearLayout01" 
     android:layout_width="fill_parent" android:layout_height="fill_parent" 
     android:layout_weight="1"> 
     <TextView android:id="@+id/TextView01" android:layout_width="wrap_content" 
      android:layout_height="wrap_content" android:text="Upper half" /> 
    </LinearLayout> 
    <LinearLayout android:layout_height="fill_parent" 
     android:layout_width="fill_parent" android:layout_weight="1" 
     android:id="@+id/LinearLayout01"> 
     <TextView android:id="@+id/TextView02" android:layout_width="wrap_content" 
      android:layout_height="wrap_content" android:text="Lower half" /> 
    </LinearLayout> 
</LinearLayout> 

哪會像

alt text

+0

這不是我想要的。它應該像MS分割屏幕一樣,我們將通過點擊「SplitScreen」來分割屏幕。兩個屏幕將包含相同的內容。如果我們在頂部屏幕進行更改,它應該反映在底部屏幕中。我希望此功能可以在Android中實施。 – 2010-09-08 11:35:02

+0

關於如何在android中實現這個分屏功能的任何想法? – 2010-09-08 12:58:16

+0

嗨!此屏幕上的任意更新Android的分屏? – 2010-09-09 09:31:28