Search in sources :

Example 1 with OnItemClickListener

use of org.holoeverywhere.widget.AdapterView.OnItemClickListener in project mobile-android by photo.

the class PhotoDetailsFragment method initThumbnailsList.

public void initThumbnailsList(View v) {
    thumbnailsList = (HorizontalListView) v.findViewById(R.id.thumbs);
    LayoutParams params = thumbnailsList.getLayoutParams();
    params.height = mImageThumbWithBorderSize;
    thumbnailsList.setLayoutParams(params);
    thumbnailsList.setAdapter(thumbnailsAdapter);
    thumbnailsList.setOnItemClickListener(new OnItemClickListener() {

        @Override
        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            TrackerUtils.trackButtonClickEvent("thumb", PhotoDetailsFragment.this);
            CommonUtils.debug(TAG, "Thumb clicked.");
            detailsVisible = true;
            mViewPager.setCurrentItem(position);
        }
    });
    thumbnailsList.setOnDownListener(new OnDownListener() {

        @Override
        public void onDown(MotionEvent e) {
            CommonUtils.debug(TAG, "Thumbnails List onDown");
            detailsVisible = true;
        }
    });
}
Also used : LayoutParams(android.view.ViewGroup.LayoutParams) OnItemClickListener(org.holoeverywhere.widget.AdapterView.OnItemClickListener) OnDownListener(com.trovebox.android.common.ui.widget.HorizontalListView.OnDownListener) AdapterView(org.holoeverywhere.widget.AdapterView) ImageView(android.widget.ImageView) View(android.view.View) HorizontalListView(com.trovebox.android.common.ui.widget.HorizontalListView) PhotoView(uk.co.senab.photoview.PhotoView) TextView(android.widget.TextView) MotionEvent(android.view.MotionEvent)

Aggregations

MotionEvent (android.view.MotionEvent)1 View (android.view.View)1 LayoutParams (android.view.ViewGroup.LayoutParams)1 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 HorizontalListView (com.trovebox.android.common.ui.widget.HorizontalListView)1 OnDownListener (com.trovebox.android.common.ui.widget.HorizontalListView.OnDownListener)1 AdapterView (org.holoeverywhere.widget.AdapterView)1 OnItemClickListener (org.holoeverywhere.widget.AdapterView.OnItemClickListener)1 PhotoView (uk.co.senab.photoview.PhotoView)1