本文整理汇总了Java中com.ortiz.touch.TouchImageView类的典型用法代码示例。如果您正苦于以下问题:Java TouchImageView类的具体用法?Java TouchImageView怎么用?Java TouchImageView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TouchImageView类属于com.ortiz.touch包,在下文中一共展示了TouchImageView类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onCreateView
import com.ortiz.touch.TouchImageView; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater,
@Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_viewer, container, false);
final ActionBar actionBar = activity.getSupportActionBar();
image = (TouchImageView) rootView.findViewById(R.id.image);
image.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (actionBar.isShowing()) {
actionBar.hide();
} else {
actionBar.show();
}
}
});
url = getArguments().getString("url");
return rootView;
}
开发者ID:xingrz,项目名称:meizhi,代码行数:25,代码来源:ViewerFragment.java
示例2: instantiateItem
import com.ortiz.touch.TouchImageView; //导入依赖的package包/类
@Override
public Object instantiateItem(ViewGroup container, int position){
TouchImageView imageView = new TouchImageView(getContext());
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
// decode the file into a bitmap and show it afterwards
ImageMessage msg = mListener.getImageAtIndex(position);
final BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeFile(msg.file, options);
DisplayMetrics metrics = new DisplayMetrics();
getActivity().getWindowManager().getDefaultDisplay().getMetrics(metrics);
// Calculate inSampleSize
options.inSampleSize = AsyncDrawable.calculateInSampleSize(options,
metrics.widthPixels, metrics.heightPixels, true);
// Decode bitmap with inSampleSize set
options.inJustDecodeBounds = false;
Bitmap bitmap = BitmapFactory.decodeFile(msg.file, options);
imageView.setImageBitmap(bitmap);
imageView.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v){
showOverlay(!overlayActive);
}
});
container.addView(imageView, 0);
return imageView;
}
开发者ID:Nik-Sch,项目名称:ChatApp-Android,代码行数:30,代码来源:SingleImageFragment.java
示例3: onCreateView
import com.ortiz.touch.TouchImageView; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.image_slides_page_view, container, false);
TouchImageView mImgView = (TouchImageView) rootView.findViewById(R.id.image_slides_page_image_view);
new FetchImageAsync(mImgView, false).execute(urlStr);
return rootView;
}
开发者ID:petalyaa,项目名称:Launchpet2,代码行数:8,代码来源:ReadFeedActivity.java
示例4: TiTouchImageView
import com.ortiz.touch.TouchImageView; //导入依赖的package包/类
public TiTouchImageView(final TiViewProxy proxy) {
super(proxy);
tiv = new TouchImageView(proxy.getActivity());
getLayoutParams().autoFillsHeight = true;
getLayoutParams().autoFillsWidth = true;
setNativeView(tiv);
}
开发者ID:iotashan,项目名称:TiTouchImageView,代码行数:11,代码来源:ViewProxy.java
注:本文中的com.ortiz.touch.TouchImageView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论