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);
}
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;
}
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);
}
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;
}
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);
}
Aggregations