0
我有機器人在我設置一個按鈕的使用FrameLayout
文本的應用程序,像:設置在Android上按鈕的文本使用框架佈局
<FrameLayout android:layout_width="fill_parent"
android:layout_toRightOf="@id/surface_camera"
android:layout_height="fill_parent">
<Button android:layout_width="match_parent"
android:id="@+id/btnPhoto"
android:layout_height="match_parent"/>
<TextView
android:layout_width="match_parent"
android:id="@+id/textview"
android:textColor="#000000"
android:textSize="20dip"
android:layout_gravity="center_horizontal|bottom"
android:layout_height="match_parent"
android:text="Take Photo"
/>
</FrameLayout>
而結果看起來像這樣的: http://i53.tinypic.com/2ypgn0l.png
我想問問有沒有進一步使用該FrameLayout
我可以旋轉此文任何posibility ??? ...讓我們用90度的說......如果YES
,怎麼樣?謝謝!
我已經嘗試命名2文件夾佈局和佈局土地,並在每兩個定義不同的佈局....但有一個問題。在我的onCreate()我設置此:this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);並且因爲它永遠不會讀取佈局文件夾,不管我如何切換手機視圖,始終將其視爲橫向視圖 – adrian
嗯,那是奇怪的。您是否嘗試在清單文件中設置活動的方向,而不是在創建時進行。它不是很多不同,但我不能得到什麼導致你的問題。 – blessenm
在這個活動中我使用了相機。我試着用90度旋轉相機,我試着設置它的方向......但沒有任何東西。但是這條線的作用僅僅是我的按鈕上的文字看起來像這樣。我也嘗試過動畫....但動畫切換我的按鈕...不是我的文本。我一直在爲這幾天而努力...沒有任何東西。讓我試試這個清單文件,我會讓你知道:) – adrian