簡體   English   中英

如何將單個線性布局拆分為兩個線性布局

[英]How to split the single linearlayout into two linear layout

我已經下載了一個有關在線性布局上簽名的項目

我要做什么?

在我的項目中,我將線性布局分成兩個線性布局,在第一個布局中,我可以將簽名放在圖像上,然后需要保存在圖庫中,在另一個布局中,我將在圖像上寫一些內容並保存到圖庫中作為畫廊的單一布局,

但是在項目中,我只能保存第一個布局本身,但是我需要寫第二個布局,並且需要保存在圖庫中。 請任何人幫我。

您可以像這樣將兩個相等的LinearLayout划分為兩個。

<LinearLayout android:orientation="vertical" android:layout_height="fill_parent" android:layout_width="fill_parent">
  <LinearLayout android:layout_weight="1" android:layout_height="fill_parent" android:layout_width="fill_parent">

{Put all those you want to come in 1st layout here}

  </LinearLayout>
  <LinearLayout android:layout_weight="1" android:layout_height="fill_parent" android:layout_width="fill_parent">

{Put all those you want to come in 2nd layout here}

  </LinearLayout>
</LinearLayout>
<LinearLayout android:orientation="vertical"
 android:layout_height="fill_parent"
 android:weightsum="2"
 android:orientation=""// horizontal or veritical
 android:layout_width="fill_parent">
 <LinearLayout 
    android:layout_weight="1"
    android:layout_height="fill_parent"
    android:layout_width="fill_parent">


 </LinearLayout>
 <LinearLayout 
        android:layout_weight="1" 
        android:layout_height="fill_parent"
        android:layout_width="fill_parent">

 </LinearLayout>
</LinearLayout>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM