use of com.aviary.android.feather.graphics.PreviewCircleDrawable in project mobile-android by photo.
the class SpotDrawPanel method onActivate.
/*
* (non-Javadoc)
*
* @see com.aviary.android.feather.effects.AbstractEffectPanel#onActivate()
*/
@Override
public void onActivate() {
super.onActivate();
((ImageViewSpotDraw) mImageView).setOnDrawStartListener(this);
mBackgroundDrawThread.start();
mBackgroundDrawThread.setRadius((float) Math.max(1, mBrushSizes[0]), mPreviewWidth);
updateSelection((View) mGallery.getSelectedView(), mGallery.getSelectedItemPosition());
mToast = IToast.make(getContext().getBaseContext(), -1);
mCircleDrawablePreview = new PreviewCircleDrawable(0);
ImageView image = (ImageView) mToast.getView().findViewById(R.id.size_preview_image);
image.setImageDrawable(mCircleDrawablePreview);
mLensButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// boolean selected = arg0.isSelected();
setSelectedTool(((ImageViewSpotDraw) mImageView).getDrawMode() == TouchMode.DRAW ? TouchMode.IMAGE : TouchMode.DRAW);
}
});
mLensButton.setVisibility(View.VISIBLE);
contentReady();
}
use of com.aviary.android.feather.graphics.PreviewCircleDrawable in project mobile-android by photo.
the class DrawingPanel method initToast.
/**
* Inits the toast.
*/
private void initToast() {
mToast = IToast.make(getContext().getBaseContext(), -1);
mCircleDrawablePreview = new PreviewCircleDrawable(0);
mCircleDrawablePreview.setStyle(Paint.Style.FILL);
ImageView image = (ImageView) mToast.getView().findViewById(R.id.size_preview_image);
image.setImageDrawable(mCircleDrawablePreview);
}
use of com.aviary.android.feather.graphics.PreviewCircleDrawable in project mobile-android by photo.
the class DelayedSpotDrawPanel method onActivate.
/*
* (non-Javadoc)
*
* @see com.aviary.android.feather.effects.AbstractEffectPanel#onActivate()
*/
@Override
public void onActivate() {
super.onActivate();
disableHapticIsNecessary(mGallery);
((ImageViewSpotDraw) mImageView).setOnDrawStartListener(this);
mBackgroundDrawThread.start();
mBackgroundDrawThread.setRadius((float) Math.max(1, mBrushSizes[0]), mPreview.getWidth());
mToast = IToast.make(getContext().getBaseContext(), -1);
mCircleDrawablePreview = new PreviewCircleDrawable(0);
ImageView image = (ImageView) mToast.getView().findViewById(R.id.size_preview_image);
image.setImageDrawable(mCircleDrawablePreview);
mLensButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// boolean selected = arg0.isSelected();
setSelectedTool(((ImageViewSpotDraw) mImageView).getDrawMode() == TouchMode.DRAW ? TouchMode.IMAGE : TouchMode.DRAW);
}
});
mLensButton.setVisibility(View.VISIBLE);
// TODO: check if selection is correct when panel opens
// updateSelection( (View) mGallery.getSelectedView(), mGallery.getSelectedItemPosition() );
contentReady();
}
Aggregations