use of org.aisen.weibo.sina.sinasdk.bean.PicUrls in project AisenWeiBo by wangdan.
the class PictureFragment method layoutInit.
@Override
protected void layoutInit(LayoutInflater inflater, Bundle savedInstanceSate) {
super.layoutInit(inflater, savedInstanceSate);
mStatus = PictureStatus.wait;
image = savedInstanceSate == null ? (PicUrls) getArguments().getSerializable("url") : (PicUrls) savedInstanceSate.getSerializable("url");
Uri uri = Uri.parse(image.getThumbnail_pic());
if ("file".equals(uri.getScheme().toLowerCase())) {
origFile = new File(uri.getPath());
} else {
origFile = BitmapLoader.getInstance().getCacheFile(getOrigImage());
setHasOptionsMenu(true);
}
photoView.setOnPhotoTapListener(new PhotoViewAttacher.OnPhotoTapListener() {
@Override
public void onPhotoTap(View view, float v, float v1) {
getActivity().finish();
}
});
mWebView.addJavascriptInterface(new PictureJavaScriptInterface(), "picturejs");
layError.setPadding(0, 0, 0, SystemUtils.getNavigationBarHeight(getActivity()));
loadPicture(viewFailure);
findViewById(R.id.txtFailure).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
loadPicture(v);
}
});
}
Aggregations