下面列出了android.support.v4.app.FragmentActivity#findViewById ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
context = getContext();
image = (TouchImageView) view.findViewById(R.id.image);
videoPlayImage = (ImageView) view.findViewById(R.id.videoPlayImage);
// minZoom = TouchImageView.SUPER_MIN_MULTIPLIER * image.getMinZoom();
// maxZoom = TouchImageView.SUPER_MAX_MULTIPLIER * image.getMaxZoom();
// image.setZoom(curZoom);
final FragmentActivity activity = getActivity();
viewPager = (ViewPager) activity.findViewById(R.id.photoViewPager);
mGestureDetector = new GestureDetector(getContext(), new SimpleOnGestureListener() {
@Override
public boolean onSingleTapConfirmed(MotionEvent e) {
Log.d(TAG, "onSingleTapConfirmed " + e + photoFragment);
if (photoFragment != null) {
return photoFragment.onSingleTapConfirmed(e);
}
return false;//performClick();
}
});
view.setOnTouchListener(onTouch);
//videoPlayImage.setOnTouchListener(onTouch);
image.setOnTouchListener(onTouch);
//rootView.setOnDoubleTapListener(onDoubleTapListener);
//image.setOnDoubleTapListener(onDoubleTapListener);
centerInfo = (TextView) view.findViewById(R.id.centerInfo);
//backgroundImage.setZoom(1.5f);
//backgroundImage.setMinZoom(1.0f);
//backgroundImage.setMaxZoom(3.0f);
//backgroundImage.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
//backgroundImage.setZoom(1);
loadImageToView();
}
public void setProxy(FragmentActivity proxyActivity, String jarname, String jar_packagename) {
JLog.i("clf", "setProxy..proxyActivity=" + proxyActivity + ",jarname=" + jarname + ",jar_packagename=" + jar_packagename);
this.proxyActivity = proxyActivity;
this.jarname = jarname;
this.jar_packagename = jar_packagename;
this.root = (ViewGroup) proxyActivity.findViewById(16908290);
JLog.i("clf", "setProxy..root=" + this.root);
setJarResource(true);
JLog.i("clf", "setProxy..1");
JLog.i("clf", "setProxy..getClassLoader()=" + getClassLoader());
this.context = new JarContext(proxyActivity, getClassLoader());
JLog.i("clf", "setProxy..context=" + this.context);
}
public MvpView(FragmentActivity activity) {
super(activity);
mvpTv = activity.findViewById(R.id.mvpUpdateTv);
ClickUtils.applyPressedBgDark(mvpTv);
mvpTv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
getPresenter(MvpPresenter.class).updateMsg();
}
});
}
@SuppressWarnings("unchecked")
public static <T extends View> T findView(FragmentActivity activity, int id) {
return (T) activity.findViewById(id);
}
public MyFragmentManager(FragmentActivity mContext){
this.mContext = mContext;
this.barTitle = (TextView)(mContext.findViewById(R.id.top_bar_title));
this.fragmentManager = mContext.getSupportFragmentManager();
}