aurelhubert / aurelhubert/ahbottomnavigation
must use Theme.Compat for AppTheme's parent?
- Dominant language
- Java
- Stars
- 3.8k
- Forks
- 672
- PR merge metrics
- No merged PRs in 30d
Description
I'm a starter of Android dev. my app's minSDKVersion is 21, AppTheme's parent is set to 'android:Theme.Material.Light', MainActivity inherits from Activity.
I got an exception when add an item. It says 'java.lang.UnsupportedOperationException: Failed to resolve attribute at index 13: TypedValue{t=0x2/d=0x7f030131 a=-1}'.
I finally found a solution: change AppTheme's parent to 'Theme.Compat', and MainActivity's superclass to AppCompatActivity.
Is this the only way? I must use compat? and why? please help me. thanks!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reported exception with minSDKVersion 21, an AppTheme parent of android:Theme.Material.Light, and MainActivity extending Activity. Compare that setup with Theme.Compat and AppCompatActivity, then document which configuration is supported and why the attribute lookup succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100