As previous responses highlighted, it is bug. I recommend not to disable the specific lint warning project-wide, but for that method only. Annotate your method as follows:
@SuppressLint("RestrictedApi")
@Override
public void setupDialog(Dialog dialog, int style) {
super.setupDialog(dialog, style);
//your code here
}
More Related Contents:
- How do I use DrawerLayout to display over the ActionBar/Toolbar and under the status bar?
- Android Studio keeps refusing to resolve com.android.support:appcompat-v7:29.0.1
- No resource found that matches the given name ‘@style/Theme.AppCompat.Light’
- Upgraded to AppCompat v22.1.0 and now getting IllegalArgumentException: AppCompat does not support the current theme features
- AppCompat v7 r21 returning error in values.xml?
- Android Lollipop, AppCompat ActionBar custom view doesn’t take up whole screen width
- Toolbar and Contextual ActionBar with AppCompat-v7
- InflateException with FloatingActionButton from Official Design Library
- How to use and style new AlertDialog from appCompat 22.1 and above
- You need to use a Theme.AppCompat theme (or descendant) with this activity. Change to Theme.AppCompat causes other error
- Tab not taking full width on Tablet device [Using android.support.design.widget.TabLayout]
- How to change Toolbar Navigation and Overflow Menu icons (appcompat v7)?
- “You need to use a Theme.AppCompat theme (or descendant) with the design library” error
- The import android.support.v7.app cannot be resolved
- Don’t collapse Toolbar when RecyclerView fits the screen
- Status bar turns white and does not show content behind it
- CardView Corner Radius
- Cannot resolve symbol ‘Theme’ in styles.xml (Android Studio)
- Set ActionBar Tabs at bottom in ActionBarActivity
- java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/os/BuildCompat
- CoordinatorLayout using the ViewPager’s RecyclerView
- Android v21 Theme.Appcompat color accent is ignored, no padding on dialogs
- Is any difference between a MaterialButton and a simple Button?
- transparent Actionbar with AppCompat-v7 21
- Fixing Error in styles.xml to generate R.java : No resource found name ‘Theme.AppCompat.Light’
- How animate Burger to Arrow with Appcompat v7 21, Toolbar and DrawerLayout
- Android Material Design Datepicker with AppCompat
- NoClassDefFoundError: Failed resolution of: Landroid/support/v7/appcompat/R$styleable
- Getting exception : java.lang.NoClassDefFoundError: android.support.v7.app.AppCompatDelegateImplV14
- gradle, Could not expand ZIP appcompat-v7:19.0.1