Tôi muốn tạo chế độ xem tùy chỉnh như thế này. Làm thế nào để đặt các nút trên hình ảnh trong Android?
Tôi đã thử các sau đây
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical" >
<ImageView
android:id="@+id/customView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/sample_image" />
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|top"
android:text="Button" />
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|bottom"
android:text="Button" />
</FrameLayout>
Làm thế nào tôi có thể tạo ra một cái nhìn như thế này? Làm thế nào tôi có thể đặt các nút trên hình ảnh như thế này?
Cảm ơn trước Advance
sử dụng tương đối bố trí. – SKK
kiểm tra câu trả lời của tôi bên dưới. Tôi đã đính kèm một ảnh chụp màn hình. – SKK