0

image

So I want to get rid of the black area at the top and the gray "news" area should be the very top of the screen. What is this section called?

I tried this but it just crashed my app.

<resources xmlns:tools="http://schemas.android.com/tools">
    <!-- Base application theme. -->
    <style name="Theme.SeanLee_TheFootballGallery_2201" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
        <!-- Primary brand color. -->
        <item name="colorPrimary">@color/purple_500</item>
        <item name="colorPrimaryVariant">@color/purple_700</item>
        <item name="colorOnPrimary">@color/white</item>
        <!-- Secondary brand color. -->
        <item name="colorSecondary">@color/teal_200</item>
        <item name="colorSecondaryVariant">@color/teal_700</item>
        <item name="colorOnSecondary">@color/black</item>
        <!-- Status bar color. -->
        <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
        <!-- Customize your theme here. -->
        <item name="android:windowFullscreen">true</item>
    </style>
</resources>
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_core);

        getSupportActionBar().setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.gray_01, null)));

        populateCollection();

        getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, NewsFragment.newInstance(mCollection)).commit();
    }
RaBaKa 78
  • 1,115
  • 7
  • 11
Sean LEE
  • 23
  • 4

2 Answers2

0

add this to your manifest :

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

Ali Salehi
  • 164
  • 2
  • 9
0

Please explain this a bit:- You want to get rid of it from all the screens or in a specific screens.

ekibet
  • 176
  • 2
  • 8