我想要做的是在按下按鈕時在「2」(第二個LinearLayout)的頂部顯示「框架」(或新佈局)。我應該怎麼做?如果按鈕沒有按下,預先製作並使其隱藏起來?Android:將東西放在線性佈局上
我有這種類型的佈局:
XML:
<LinearLayout>
<LinearLayout>
</LinearLayout>
<LinearLayout>
//here would be another view, only shown when a button is clicked
<ViewFlipper>
</ViewFlipper>
</LinearLayout>
<RelativeLayout
</RelativeLayout>
</LinearLayout>
嘗試隱藏和顯示。 – 2012-02-10 09:33:26