Android: theme = "@android: style / Theme.Translucent.NoTitleBar" causing my activity to crash

I'm trying to create a semi-transparent theme in my activity, but adding this theme to my manifest is causing my application to crash.

   android:theme="@android:style/Theme.Translucent.NoTitleBar"

      

Any specific reason for this behavior?

+3


source to share


1 answer


You are probably using the activity class from the support library i.e. AppCompatActivity

...

This requires using a support theme that does not include transparent activity. You can create a custom semi-transparent theme for AppCompat like this .



Or use a different activity class:

public class MainActivity extends Activity {

      

+4


source







All Articles