I'm doing popUp , I just need to pop up a kind of tooltip with a short description. I do this by creating an activit and I give it dimensions and it seems like what I want. But the problem is that, like any activ, it has an actionBar that doesn’t look like it))

In general, like this

enter image description here

I tried to add this line

  @Override protected void onCreate(Bundle savedInstanceState) { --->> requestWindowFeature(Window.FEATURE_NO_TITLE); super.onCreate(savedInstanceState); setContentView(R.layout.activity_pop); 

but nothing changes absolutely ...

Tell me how to do this? Moreover, I know that it is widely used in games, because there every millimeter of the screen is important ...

By the way, I don’t know if it matters or not, but I have Android 5.0

I tried to create my style like this

 <style name="AppTheme.CustomStyle"> <item name="android:windowActionBar">false</item> <item name="android:windowNoTitle">true</item> <item name="android:windowIsTranslucent">true</item> <item name="android:windowCloseOnTouchOutside">true</item> </style> 

and like this I assign it to the manifest

  <activity android:name=".Pop" android:theme="@style/AppTheme.CustomStyle" ></activity> 

But nothing helps

    1 answer 1

    1. Create a style to activate.
    2. Write in it

       <item name="android:windowActionBar">false</item> <item name="android:windowNoTitle">true</item> 
    3. Assign its activation either in the manifest or in the code before calling super.onCreate(savedInstanceState);

    Installation of the class of activites on the Activity extension instead of AppCompatActivity can also help.

    • I edited the question, please see what I did wrong? - Aleksey Timoshchenko
    • @AlekseyTimoshchenko, try setting the parent style. Depending on which class extends the activity, it can be Theme.AppCompat.Light.NoActionBar or Theme.Light.NoTitleBar. - Yuriy SPb
    • Everything turned out ...)) indeed, the problem was that my activation expanded the AppCompatActivity class when I changed it to Activity it all worked)) I didn’t even know that it somehow influences ... Add this to your answer, maybe it will still be useful, and I will mark it as correct - Aleksey Timoshchenko
    • @AlekseyTimoshchenko, added the answer. Although you yourself can make changes to any answers and I think that for AppCompatActivity should work) - Juriy Spb