本文整理汇总了Java中com.bm.library.PhotoView.enable方法的典型用法代码示例。如果您正苦于以下问题:Java PhotoView.enable方法的具体用法?Java PhotoView.enable怎么用?Java PhotoView.enable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.bm.library.PhotoView
的用法示例。
在下文中一共展示了PhotoView.enable方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initData
import com.bm.library.PhotoView; //导入方法依赖的package包/类
private void initData(){
image = (PhotoView) findViewById(R.id.source_img);
image.enable();
toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setTitle(R.string.text_image);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onBackPressed();
}
});
layoutParams = new LayoutParams(ScreenUtil.getScreenWidth(), ScreenUtil.getScreenHeight()-toolbar.getHeight());
Intent intent = getIntent();
image.setImageBitmap(getBitmapFromUri(Uri.parse(intent.getStringExtra(getString(R.string.id_image_uri)))));
image.setLayoutParams(layoutParams);
}
示例2: instantiateItem
import com.bm.library.PhotoView; //导入方法依赖的package包/类
@Override
public Object instantiateItem(ViewGroup container, int position) {
View view = LayoutInflater.from(container.getContext()).inflate(R.layout.layout_image_browser, null);
mPhotoView = (PhotoView) view.findViewById(R.id.mPhotoView);
tv_progress = (TextView) view.findViewById(R.id.tv_progress);
mPhotoView.enable();
String url = list.get(position);
if (SharePrefUtil.getBoolean(context, "load_hd_pic", false)) {
url = url.replace("thumbnail", "large");
LogUtils.i("原图尺寸图片地址 :" + url);
} else {
url = url.replace("thumbnail", "bmiddle");
LogUtils.i("中等尺寸图片地址 :" + url);
}
imageLoader.displayImage(url, mPhotoView, options, listener, onProgressListener);
container.addView(view);
return view;
}
示例3: initPhotoView
import com.bm.library.PhotoView; //导入方法依赖的package包/类
public void initPhotoView(){
photoView = (PhotoView) findViewById(R.id.img);
// 启用图片缩放功能
photoView.enable();
// 禁用图片缩放功能 (默认为禁用,会跟普通的ImageView一样,缩放功能需手动调用enable()启用)
// photoView.disenable();
}
示例4: instantiateItem
import com.bm.library.PhotoView; //导入方法依赖的package包/类
@Override
public Object instantiateItem(ViewGroup container, int position) {
PhotoView view = new PhotoView(ImageBrowserActivity.this);
view.enable();
view.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
Glide.with(ImageBrowserActivity.this)
.load(mList.get(position).getPath())
.crossFade()
.into(view);
container.addView(view);
return view;
}