看板 AndroidDev 關於我們 聯絡資訊
問題: 如題,我用ViewFlipper讓一個imageButton做動畫效果 然後按了那個按鈕以後會跳到下一頁,但是我卻沒有辦 法讓它換頁,不知道是什麼問題 貼上部分程式碼請大家幫忙看看: java: ViewFlipper va =(ViewFlipper)this.findViewById(R.id.viewAnimator1); va.setInAnimation(AnimationUtils.loadAnimation(this, R.layout.tom_anim)); va.setOutAnimation(AnimationUtils.loadAnimation(this, R.layout.tom_anim_out)); va.startFlipping(); ib1 = (ImageButton) findViewById(R.id.imageButton1); ib1.setOnClickListener(new OnClickListener(){ public void onClick(View v){ Intent intent = new Intent(); intent.setClass(studentIndex.this, Index.class); startActivity(intent); studentIndex.this.finish(); } }); 在xml裡面就是ViewFLipper包著imageButton 請高手幫忙解題 感激不盡 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.133.169.68
ted66:我是都沒+finish()妳去掉試試看 或者貼上XML跟這CLASS完整的 05/20 01:21
k11926:沒加finish???但是finish不是跳頁的程式碼嗎? 05/20 06:59
badhabit:那是結束的意思。 05/20 16:01
btsken:請問這問題解決了嗎 06/29 13:58