Как получить навигационный планку по умолчанию в этом мире Hello?Android

Форум для тех, кто программирует под Android
Anonymous
Как получить навигационный планку по умолчанию в этом мире Hello?

Сообщение Anonymous »

Код: Выделить всё

MainActivity.java

Код: Выделить всё

package com.example.test;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import android.view.ViewGroup.LayoutParams;
import android.view.Gravity;
import android.widget.LinearLayout;
import android.view.WindowManager;
import android.view.View;
import android.view.Window;

public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

TextView txt = new TextView(this);
txt.setLayoutParams(new LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT
));
txt.setText("Hello, world!");

LinearLayout lay = new LinearLayout(this);
lay.setLayoutParams(new LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT
));
lay.addView(txt);
setContentView(lay);
}
}
< /code>
AndroidManifest.xml













< /code>
And I get
Изображение

Where are the three nagivation buttons ? Why is there a fullscreen icon at bottom right ? Is this navigation bar or something else ? How do I get the app window sandwiched between status bar and navigation bar ?
I tested this on Xiaomi Redmi Note 5 Pro (APILEVEL=28).

Подробнее здесь: https://stackoverflow.com/questions/794 ... ello-world

Вернуться в «Android»