[英]Displaying ImageButtons in an Activity
這會幫助你,
http://www.inter-fuser.com/2010/01/android-coverflow-widget.html
還有這個
http://stackoverflow.com/questions/5116825/android-circular-gallery-or-listview-with-zoom-in-and-out-option/5116945#5116945
謝謝。
您應該檢查Gallery小部件。
是的,這是可能的。像按鈕單擊監聽器一樣,圖像按鈕也有一個監聽器。
您可以嘗試以下代碼:-
ImageButton imageButton = new ImageButton(getApplicationContext());
imageButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent intent = new Intent("<activity_class_name or intent action");
context.startActivity(intent);
}
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.