本文整理了Java中android.widget.Gallery.setOnItemClickListener()
方法的一些代码示例,展示了Gallery.setOnItemClickListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Gallery.setOnItemClickListener()
方法的具体详情如下:
包路径:android.widget.Gallery
类名称:Gallery
方法名:setOnItemClickListener
暂无
代码示例来源:origin: nostra13/Android-Universal-Image-Loader
@SuppressWarnings("deprecation")
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fr_image_gallery, container, false);
Gallery gallery = (Gallery) rootView.findViewById(R.id.gallery);
gallery.setAdapter(new ImageAdapter(getActivity()));
gallery.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
startImagePagerActivity(position);
}
});
return rootView;
}
代码示例来源:origin: novoda/android-demos
@Override
public View onCreateView(
LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState);
Gallery gallery = (Gallery) inflater.inflate(R.layout.carousel_gallery, null);
gallery.setAdapter(new GalleryAdapter(mContext));
gallery.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> l, View v, int position, long id) {
count = position;
((Carousel) mContext).setSelectedId(id);
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.hide(fragment);
ft.commit();
}
});
gallery.requestFocus();
gallery.setSelection(mCurCheckPosition);
return gallery;
}
}
代码示例来源:origin: jiangqqlmj/Android-Universal-Image-Loader-Modify
@SuppressWarnings("deprecation")
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fr_image_gallery, container, false);
Gallery gallery = (Gallery) rootView.findViewById(R.id.gallery);
gallery.setAdapter(new ImageAdapter(getActivity()));
gallery.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
startImagePagerActivity(position);
}
});
return rootView;
}
代码示例来源:origin: stackoverflow.com
ga.setOnItemClickListener(new OnItemClickListener() {
代码示例来源:origin: stackoverflow.com
gallery.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
Toast.makeText(MainActivity.this, "Your selected position = " + position, Toast.LENGTH_SHORT).show();
代码示例来源:origin: livroandroid/5ed
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
getActionBar().setDisplayHomeAsUpEnabled(true);
setContentView(R.layout.activity_exemplo_gallery);
Gallery g = (Gallery) findViewById(R.id.gallery);
g.setAdapter(new ImagemAdapter(this, imagens));
g.setOnItemClickListener(onGalleryItemClick(this));
}
代码示例来源:origin: redfish64/TinyTravelTracker
gallery.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView parent, View v, int position, long id) {
MediaLocTime mlt = mlts.get((int)id);
代码示例来源:origin: redfish64/TinyTravelTracker
gallery.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView parent, View v, int position, long id) {
MediaLocTime mlt = mlts.get((int)id);
内容来源于网络,如有侵权,请联系作者删除!