Search in sources :

Example 1 with ImageViewTouch

use of it.sephiroth.android.library.imagezoom.ImageViewTouch in project Klyph by jonathangerbaud.

the class ImageFragment method onViewCreated.

@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
    progress = (ProgressBar) view.findViewById(R.id.progress);
    emptyView = (ListEmptyView) view.findViewById(R.id.emptyView);
    imageView = (ImageViewTouch) view.findViewById(R.id.image);
    slidingDrawer = (KlyphSlidingDrawer) view.findViewById(R.id.sliding_drawer);
    captionInfo = (ViewGroup) view.findViewById(R.id.caption_info);
    profileImage = (ImageView) view.findViewById(R.id.author_profile_image);
    authorName = (TextView) view.findViewById(R.id.author_name);
    postTime = (TextView) view.findViewById(R.id.post_time);
    sendTextEdit = (EditText) view.findViewById(R.id.send_text_edit);
    sendButton = (ImageButton) view.findViewById(R.id.send_button);
    emptyView.setText(R.string.cannot_find_photo);
    getListView().setCacheColorHint(AttrUtil.getColor(getActivity(), android.R.attr.windowBackground));
    // imageView.setOnScaleListener(this);
    imageView.setSingleTapListener(new ImageViewTouch.OnImageViewTouchSingleTapListener() {

        @Override
        public void onSingleTapConfirmed() {
            toggleBarVisibility();
        }
    });
    sendButton.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            handlePostComment();
        }
    });
    defineEmptyText(R.string.no_comment);
    adapter = new MultiObjectAdapter(getListView(), SpecialLayout.PHOTO);
    setListAdapter(adapter);
    // setRequestType(Query.PHOTO_AND_COMMENTS);
    setRequestType(Query.PHOTO);
    super.onViewCreated(view, savedInstanceState);
    //Crash if before super.onViewCreated(view, savedInstanceState);
    getListView().getAdapter().registerDataSetObserver(observer);
}
Also used : MultiObjectAdapter(com.abewy.android.apps.klyph.adapter.MultiObjectAdapter) ImageViewTouch(it.sephiroth.android.library.imagezoom.ImageViewTouch) ImageView(android.widget.ImageView) View(android.view.View) TextView(android.widget.TextView) ListView(android.widget.ListView) ListEmptyView(com.abewy.android.apps.klyph.view.ListEmptyView)

Example 2 with ImageViewTouch

use of it.sephiroth.android.library.imagezoom.ImageViewTouch in project mobile-android by photo.

the class EffectsPanel method makeView.

@Override
public View makeView() {
    View view = super.makeView();
    if (mEnableFastPreview) {
        ((ImageViewTouch) view).setScrollEnabled(false);
        ((ImageViewTouch) view).setScaleEnabled(false);
    }
    return view;
}
Also used : ImageViewTouch(it.sephiroth.android.library.imagezoom.ImageViewTouch) AviaryGLSurfaceView(com.aviary.android.feather.opengl.AviaryGLSurfaceView) View(android.view.View)

Example 3 with ImageViewTouch

use of it.sephiroth.android.library.imagezoom.ImageViewTouch in project mobile-android by photo.

the class ImageSwitcher method setImageDrawable.

/**
	 * Sets the image drawable.
	 * 
	 * @param drawable
	 *           the drawable
	 * @param reset
	 *           the reset
	 * @param matrix
	 *           the matrix
	 * @param maxZoom
	 *           the max zoom
	 */
public void setImageDrawable(Drawable drawable, boolean reset, Matrix matrix, float maxZoom) {
    ImageViewTouch image = null;
    if (mSwitchEnabled)
        image = (ImageViewTouch) this.getNextView();
    else
        image = (ImageViewTouch) this.getChildAt(0);
    image.setImageDrawable(drawable, reset, matrix, maxZoom);
    if (mSwitchEnabled)
        showNext();
    else
        setDisplayedChild(0);
}
Also used : ImageViewTouch(it.sephiroth.android.library.imagezoom.ImageViewTouch)

Example 4 with ImageViewTouch

use of it.sephiroth.android.library.imagezoom.ImageViewTouch in project mobile-android by photo.

the class BordersPanel method makeView.

@Override
public View makeView() {
    ImageViewTouch view = new ImageViewTouch(getContext().getBaseContext(), null);
    view.setBackgroundColor(0x00000000);
    view.setDoubleTapEnabled(false);
    view.setLayoutParams(new ImageSwitcher.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
    return view;
}
Also used : ImageSwitcher(com.aviary.android.feather.widget.ImageSwitcher) ImageViewTouch(it.sephiroth.android.library.imagezoom.ImageViewTouch)

Example 5 with ImageViewTouch

use of it.sephiroth.android.library.imagezoom.ImageViewTouch in project mobile-android by photo.

the class ImageSwitcher method setImageBitmap.

/**
	 * Sets the image bitmap.
	 * 
	 * @param bitmap
	 *           the bitmap
	 * @param reset
	 *           the reset
	 * @param matrix
	 *           the matrix
	 * @param maxZoom
	 *           the max zoom
	 */
public void setImageBitmap(Bitmap bitmap, boolean reset, Matrix matrix, float maxZoom) {
    ImageViewTouch image = null;
    if (mSwitchEnabled)
        image = (ImageViewTouch) this.getNextView();
    else
        image = (ImageViewTouch) this.getChildAt(0);
    image.setImageBitmap(bitmap, reset, matrix, maxZoom);
    if (mSwitchEnabled)
        showNext();
    else
        setDisplayedChild(0);
}
Also used : ImageViewTouch(it.sephiroth.android.library.imagezoom.ImageViewTouch)

Aggregations

ImageViewTouch (it.sephiroth.android.library.imagezoom.ImageViewTouch)5 View (android.view.View)2 ImageView (android.widget.ImageView)1 ListView (android.widget.ListView)1 TextView (android.widget.TextView)1 MultiObjectAdapter (com.abewy.android.apps.klyph.adapter.MultiObjectAdapter)1 ListEmptyView (com.abewy.android.apps.klyph.view.ListEmptyView)1 AviaryGLSurfaceView (com.aviary.android.feather.opengl.AviaryGLSurfaceView)1 ImageSwitcher (com.aviary.android.feather.widget.ImageSwitcher)1