Java Code Examples for android.support.v4.app.FragmentActivity#findViewById()

The following examples show how to use android.support.v4.app.FragmentActivity#findViewById() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ImageFragment.java    From PowerFileExplorer with GNU General Public License v3.0 5 votes vote down vote up
@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();
	}
 
Example 2
Source File: JarBaseFragmentActivity.java    From letv with Apache License 2.0 5 votes vote down vote up
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);
}
 
Example 3
Source File: MvpView.java    From AndroidUtilCode with Apache License 2.0 5 votes vote down vote up
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();
        }
    });
}
 
Example 4
Source File: Ui.java    From spark-setup-android with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public static <T extends View> T findView(FragmentActivity activity, int id) {
    return (T) activity.findViewById(id);
}
 
Example 5
Source File: MyFragmentManager.java    From wakao-app with MIT License 4 votes vote down vote up
public MyFragmentManager(FragmentActivity mContext){
	this.mContext = mContext;
	this.barTitle = (TextView)(mContext.findViewById(R.id.top_bar_title));
	this.fragmentManager = mContext.getSupportFragmentManager();
}