我有一個小的應用程序與相機,我有一個設備,這不是一個問題,但如果我可以改變應用程序將提高很多美學。在框架中放一個按鈕.Layaout
我把活動的XML代碼:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/layout">
<FrameLayout
android:id="@+id/preview"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="0dip">
</FrameLayout>
<Button
android:id="@+id/buttonClick"
android:layout_width="109dp"
android:layout_height="105dp"
android:layout_gravity="center"
android:background="@drawable/obutrador2" >
</Button>
</LinearLayout>
當我運行應用程序,有一個白色的條紋沿着按鈕佔據了整個屏幕的高度。我如何解決這個問題?這會使該按鈕出現在相機捕捉的圖像上方,因爲該應用具有默認的手機。
問題是如何定位框架佈局,使其填充屏幕並將按鈕居中放置在底部。如果我將FrameLayout全屏顯示,按鈕消失。
我離開一個鏈接發生了什麼照片: https://www.dropbox.com/s/jbns8jddtwxjhdp/IMAG0348.jpg
請上傳一下這個佈局看起來像一個畫面,然後添加一個鏈接到你的問題圖片。 – 2013-02-23 01:32:11
對不起,我忘了,看得更清楚 – wiki 2013-02-23 01:36:35
你可以做一個截圖而不是拍照嗎? – 2013-02-23 01:38:42