Well, just do what the error message tells you.
Don’t call setContentView()
before requestFeature()
.
Note:
As said in comments, for both ActionBarSherlock
and AppCompat
library, it’s necessary to call requestFeature()
before super.onCreate()
More Related Contents:
- How to define dimens.xml for every different screen size in android?
- Why fragments, and when to use fragments instead of activities?
- Error while Running Android Application – Could not initialize OpenglES emulation, use ‘-gpu off’ to disable it
- How to wrap the height of a ViewPager to the height of its current Fragment?
- One Activity and all other Fragments [closed]
- How To Show and hide ActionBar with AppCompat v.7
- How to create always-top fullscreen overlay activity in Android
- Android: is using setContentView multiple times bad while changing layouts?
- Move an Image in circular path in android
- Percentage width in a RelativeLayout
- Activity, AppCompatActivity, FragmentActivity, and ActionBarActivity: When to Use Which?
- How can I change default dialog button text color in android 5
- Create blurry transparent background effect
- Android layout replacing a view with another view on run time
- Notification click: activity already open
- Losing data when rotate screen
- Starting Activity from Fragment causes NullPointerException
- Android: Capturing the return of an activity
- Whatsapp Message Layout – How to get time-view in the same row
- Don’t keep activities – What is it for?
- Determining if an Activity exists on the current device?
- android:dither=”true” does not dither, what’s wrong?
- How to replace a Fragment on button click of that fragment?
- Start service in Android
- In android layouts what is the effect/meaning of layout_height=”0dip”
- What is the difference between onPause() and onStop() of Android Activites?
- ViewTreeLifecycleOwner not found from DecorView@2da7146[MyActivity]
- Getting the Application Context
- Something’s wrong in Corner radius Android
- Android SlidingTabLayout with icons