use of com.android.gallery3d.filtershow.filters.FilterWatermarkRepresentation in project android_packages_apps_Gallery2 by LineageOS.
the class FilterShowActivity method showWaterMark.
private void showWaterMark(FilterRepresentation representation) {
FilterWatermarkRepresentation watermarkRepresentation = (FilterWatermarkRepresentation) representation;
if (mWaterMarkView != null) {
rlImageContainer.removeView(mWaterMarkView);
hasWaterMark = false;
watermarkRepresentation.reset();
}
DisplayMetrics dm = getResources().getDisplayMetrics();
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(dm.widthPixels, dm.heightPixels);
String textHint;
switch(watermarkRepresentation.getMarkType()) {
case 0:
textHint = locationStr;
break;
case 2:
textHint = temperature;
break;
default:
textHint = watermarkRepresentation.getTextHint();
break;
}
WaterMarkView waterMarkView = watermarkRepresentation.getWaterMarkView(textHint);
rlImageContainer.addView(waterMarkView, params);
mWaterMarkView = waterMarkView;
mSaveWaterMark.useRepresentation(representation);
imgComparison.bringToFront();
mSaveWaterMark.getExifData(this, mSelectedImageUri);
mWaterMarkView.mTouchable = true;
hasWaterMark = true;
}
Aggregations