看板 AndroidDev 關於我們 聯絡資訊
上次有發文問過問題 是有關coverflow的問題 那時候無法解決的是選單問題 就是要點選圖片可以有觸發事件 現在解決了 跟大家分享一下程式碼囉 其實coverflow的程式碼網路上都有範例 但是選單觸發事件就要自己加上去 以下就貼上片段程式(觸發事件) coverFlow.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View v, int position, long id) { // TODO Auto-generated method stub if(position==1){ Intent intent = new Intent(); intent.setClass(CoverFlowExample.this, studentIndex.class); startActivity(intent); CoverFlowExample.this.finish();} if(position==2){ Intent intent = new Intent(); intent.setClass(CoverFlowExample.this, DownloadIndex.class); startActivity(intent); CoverFlowExample.this.finish();} } }); 其實不難 大家可以參考看看囉 如果有需要完整範例的留信箱給我再寄給你參考 因為是專題的東西 裡面的圖把都是自己畫的 傳上去不太好 我也只是新手還很弱 板上的大家都太厲害了 我還要多學學 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.133.169.67
tericky:推分享~ 07/26 20:15
sorrel20567:推分享!!!! 07/26 20:29
tomap41017:推分享 07/27 02:21
Jotarun:http://pastebin.com/LQ7sqFza 幫原po重貼code 07/27 11:31
k11926:謝謝你喔~ 07/27 13:04
milochen:推一個 :) 08/01 10:11