res/drawable-xxx/ 對應密度目錄ImageView 或 FrameLayout 背景顯示整圖View(或自定義 View),按設計圖座標設置點擊區域<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY"
android:src="@drawable/ui_design" />
<View
android:id="@+id/btn_funny"
android:layout_width="120dp"
android:layout_height="60dp"
android:layout_marginLeft="80dp"
android:layout_marginTop="200dp"
android:background="@android:color/transparent" />
</FrameLayout>
findViewById(R.id.btn_funny).setOnClickListener(v -> {
startActivity(new Intent(this, FunnyActivity.class));
});
複雜交互建議用 WebView 加載 HTML imagemap,或採用 ConstraintLayout + Guideline 精確定位。