Try to replace
View v = inflater.inflate(R.layout.camera_fragment, parent);
With
View v = inflater.inflate(R.layout.camera_fragment, parent, false);
or
View v = inflater.inflate(R.layout.camera_fragment, null);
More Related Contents:
- Android – android.view.InflateException: Binary XML file line #8: Error inflating class fragment
- Activity, AppCompatActivity, FragmentActivity, and ActionBarActivity: When to Use Which?
- How to set Android camera orientation properly?
- How to get existing fragments when using FragmentPagerAdapter
- Failed to load map. Error contacting Google servers. This is probably an authentication issue
- Android. Fragment getActivity() sometimes returns null
- Android DialogFragment vs Dialog
- actionbar up navigation with fragments
- Initialize MapFragment programmatically with Maps API v2
- Android onClick in XML vs. OnClickListener
- Removing a Fragment from the back stack
- Start an activity from a fragment
- Can I use view pager with views (not with fragments)
- Android – SupportMapFragment with GoogleMaps API 2.0 giving IllegalArgumentException
- Overlay images onto Camera preview SurfaceView
- How to set a ViewPager inside a Fragment
- Camera Tutorial for Android (using surfaceview)
- Problem inflating custom view for AlertDialog in DialogFragment
- Where/How to getIntent().getExtras() in an Android Fragment? [duplicate]
- When switch fragment with SwipeRefreshLayout during refreshing, fragment freezes but actually still work
- Is there a way to get references for all currently active fragments in an Activity?
- How to capture image from custom CameraView in Android?
- Android SharedPreferences in Fragment
- Take a screenshot using MediaProjection
- How to replace a Fragment on button click of that fragment?
- Fragment onCreateView and onActivityCreated called twice
- Custom camera android
- How to use StartActivityForResult()
- Is there a method that works like start fragment for result?
- Kotlin: open new Activity inside of a Fragment