Android - Show/Hide system bar on 4.2.2 (Nexus 10)

后端 未结 3 1713
情歌与酒
情歌与酒 2021-02-06 17:46

I got issue with Nexus 10 - 4.2.2. I was testing code below on Galaxy Tab 10.1 with 4.0.4 and it was working fine:

try 
{
    Process proc = Runtime.getRuntime()         


        
3条回答
  •  长发绾君心
    2021-02-06 18:31

    I think you should not use system calls via Runtime.exec() to get that result. You should look at the code in FullscreenActivity template (sources are placed in /tools/templates/activities/FullscreenActivity/root): that is a full working example showing how to show/hide system bars (both top and bottom one) programmatically, and it even supports animations for API 13+.

提交回复
热议问题