I have this mini app insided MainActivity.java:
class Drawer extends BaseDrawerActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }
}


public class MainActivity extends BaseDrawerActivity  {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }
}

I also have a menu for it.
If I put "setContentView(R.layout.activity_main);
        initializeDrawer();" in MainActivity, it shows the menu, if I put it into Drawer class, it doesn't. Why? 
BTW here's my BaseDrawerActivity:
package com.HidiStudios.BeST;

import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.view.GravityCompat;
import androidx.drawerlayout.widget.DrawerLayout;

import android.content.Intent;
import android.content.SharedPreferences;
import android.util.Log;
import android.view.MenuItem;
import android.widget.Toast;

import com.google.android.material.navigation.NavigationView;

import java.util.Objects;

public abstract class BaseDrawerActivity extends AppCompatActivity
        implements NavigationView.OnNavigationItemSelectedListener {

    protected DrawerLayout drawerLayout;
    protected NavigationView navigationView;
    protected ActionBarDrawerToggle drawerToggle;

    // Initialize the drawer in the derived activity’s ‘onCreate’ method.
    protected void initializeDrawer() {
        drawerLayout = findViewById(R.id.drawer_layout);
        navigationView = findViewById(R.id.nav_view);
        drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.open, R.string.close);
        drawerLayout.addDrawerListener(drawerToggle);
        drawerToggle.syncState();
        Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
        navigationView.setNavigationItemSelectedListener(this);
    }

    // Handle drawer item selected in one place.
    @Override
    public boolean onNavigationItemSelected(@NonNull MenuItem item) {
        // Your navigation item handling code…
        int id = item.getItemId();
        navigationView.bringToFront();

        if (!(this instanceof BaseDrawerActivity) && id == R.id.home) {
            Toast.makeText(BaseDrawerActivity.this, "Home pressed", Toast.LENGTH_SHORT).show();
            finish();
        } else if (!(this instanceof LeaderboardActivity) && id == R.id.leaderboard) {
            Toast.makeText(BaseDrawerActivity.this, "Leaderboard pressed", Toast.LENGTH_SHORT).show();

            if (1==2//MainActivity.changedSinceSynced
            ) {/*
                MainActivity.changedSinceSynced = false; //sync is done here, not using onStop
                MainActivity.saveToDB(false, new MainActivity.DbOperationCompleteListener() {
                    @Override
                    public void onDbOperationComplete() {
                        openLeaderboardActivity();
                    }
                });*/
            } else {
                openLeaderboardActivity();
            }
        } else if (id == R.id.chatroom) {
            Toast.makeText(BaseDrawerActivity.this, "chatroom pressed", Toast.LENGTH_SHORT).show();
        }/*else if (id == R.id.login) {
            Toast.makeText(BaseDrawerActivity.this, "Login pressed", Toast.LENGTH_SHORT).show();
        }*/else if (id == R.id.share) {
            share();
        } else if (id == R.id.chat_with_me) {
            Toast.makeText(BaseDrawerActivity.this, "chat_with_me pressed", Toast.LENGTH_SHORT).show();
        }

        // Close drawer after item is selected.
        drawerLayout.closeDrawer(GravityCompat.START);
        return false; // return true if you want to indicate the item was selected.
    }

    @Override
    public boolean onOptionsItemSelected(@NonNull MenuItem item) {
        if (drawerToggle.onOptionsItemSelected(item)) {
            return true;
        }
        return super.onOptionsItemSelected(item);
    }

    private void openLeaderboardActivity() {
        Intent intent = new Intent(this, LeaderboardActivity.class);
        startActivity(intent);
    }
/*
    private void openMainActivity() {
        Intent intent = new Intent(this, MainActivity.class);
        startActivity(intent);
    }
*/
    private void share() {
        Intent sendIntent = new Intent();
        sendIntent.setAction(Intent.ACTION_SEND);
        sendIntent.putExtra(Intent.EXTRA_TEXT, "You owe me a coffee if you can't beat me, [nickname]!\nDownload this app: [link]");
        sendIntent.setType("text/plain");
        startActivity(sendIntent);
    }
}

The reason I'm doing it, because in the end the MainActivity has to extend StatsUtil for the functions inside to work properly