1
頁我在ViewPager
4張圖片,我想一個一個滑動這些圖像和第四圖像後,我想說明第一image.following代碼顯示了自動滑動翻頁,但在第四張照片後停止。如何ViewPager自動幻燈片的Android
switchtimer= new Timer();
switchtimer.schedule(new TimerTask() {
@Override
public void run() {
Log.v("TimerMtd", "Timer call");
handler.post(Update);
}
}, 1500,3000);
}
Handler handler = new Handler();
Runnable Update = new Runnable() {
public void run() {
mPager.setCurrentItem(currentpage);
currentpage++;
if(currentpage > 2){
currentpage = 0;
Log.v("TimerMtd", currentpage+"cutrrentpage =");
}
}
};
PLZ建議如果有任何替代 –
嗨,Patle,你好嗎? –
KYA patle嚳回覆德迪亞KAR瓊脂你們TU海來。從圖姆薩爾喜海吶 –