我正在構建一個計算器應用程序,我擁有所有按鈕的圖像。我還有一張我想用於計算器背景的圖像。我應該使用哪種佈局?
這裏是什麼,我有一個簡單的例子:
按鈕(所有單個圖像):
背景(單幅影像):
所需的外觀:
我會用什麼佈局來放置一個圖像網格(按鈕)在罪惡之上gle圖像。 GridLayout通過FrameLayout?
我正在構建一個計算器應用程序,我擁有所有按鈕的圖像。我還有一張我想用於計算器背景的圖像。我應該使用哪種佈局?
這裏是什麼,我有一個簡單的例子:
按鈕(所有單個圖像):
背景(單幅影像):
所需的外觀:
我會用什麼佈局來放置一個圖像網格(按鈕)在罪惡之上gle圖像。 GridLayout通過FrameLayout?
我會
<LinearLayout android:background="..." android:orientation="vertical">
<LinearLayout android:orientation="horizontal">
<Button ... />
<Button ... />
<Button ... />
</LinearLayout><LinearLayout android:orientation="horizontal">
<Button ... />
<Button ... />
<Button ... />
</LinearLayout><LinearLayout android:orientation="horizontal">
<Button ... />
<Button ... />
<Button ... />
</LinearLayout><LinearLayout android:orientation="horizontal">
<Button ... />
<Button ... />
</LinearLayout>
</LinearLayout>
去加入適當android:layout_weight
值和你做。我不會使用GridLayout
什麼的,因爲你根本沒有動態佈局。這是所有的靜態,將永遠不會改變...
<FrameLayout android:background="....">
...
啊我看到你添加了背景屬性。謝謝! – 2013-03-23 11:44:21
aha :)我編輯它!再次檢查@JanTacci – AVEbrahimi 2013-03-23 11:46:12
gotcha謝謝! – 2013-03-23 11:47:09