我用下面的XML代碼爲我的相機佈局:Android相機佈局
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/preview"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/buttonClick"
android:text="Click" android:layout_gravity="right|bottom" />
</FrameLayout>
當用戶點擊它會捕獲圖像畫面。
現在我想要做的是在同一個視圖中有另一個按鈕來啓動我的圖像查看器,該怎麼做?我想是這樣的(圖像瀏覽器按鈕在右下角):
非常感謝您的幫助! :)
按鈕仍然沒有顯示,任何想法,爲什麼 – Emkey
請發表您的代碼和我們?檢查它一起 – duonghv
什麼代碼?我已經張貼我的XML以上... – Emkey