[問題] Imageview轉貼的問題

看板AndroidDev作者時間12年前 (2013/02/23 06:11), 編輯推噓3(302)
留言5則, 3人參與, 最新討論串1/2 (看更多)
我現在做了一個gallery在上面的配置 以下是畫面 圖一 圖二 圖三 (這塊往左往右滑動) --------- 這塊秀上面圖一~圖三的大圖 --------- 我現在想將下面大圖做成按下去 轉到另一格畫面(我另一個畫面想 用canvas弄成一個像小畫家畫畫板這樣) 我該用什麼方式轉過去 下面顯示是imageView 可以做成button嗎? 利用Intent的方式可行嗎? 抱歉問題有點多~每天都被老師追殺很無助 以下是程式碼 layout 配置 <?xml version="1.0" encoding="UTF-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <Gallery android:id="@+id/gallery" android:layout_width="fill_parent" android:layout_height="100dp" android:spacing="10dp" /> <ImageView android:id="@+id/imageview" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </LinearLayout> ---------------------------------------------------------------------------- 控制的程式碼 http://pastebin.com/vxDQsYTk 抱歉版面有點亂~請求大大幫忙了 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.124.77.3 ※ 編輯: treeyoyo 來自: 140.124.77.3 (02/23 14:14)

02/23 16:45, , 1F
setOnClickListener?0.0?
02/23 16:45, 1F

02/24 08:49, , 2F
ImageButton
02/24 08:49, 2F
用 VIEW.OnClickListener 這不知道行不行 ※ 編輯: treeyoyo 來自: 140.124.77.3 (02/24 13:01)

03/03 08:35, , 3F
基本上,ImageView和Button都屬於View,應該都可以用OnClic
03/03 08:35, 3F

03/03 08:36, , 4F
kListener,也都可以設src和background,你試試看吧
03/03 08:36, 4F

03/03 08:42, , 5F
Intent可以,可是你可能還需要SharedPreferences
03/03 08:42, 5F
文章代碼(AID): #1HA5sbAz (AndroidDev)
討論串 (同標題文章)
文章代碼(AID): #1HA5sbAz (AndroidDev)