Easy way to hide system bar on Android ICS

后端 未结 8 1179
抹茶落季
抹茶落季 2020-11-28 10:32

I will give my ICS tablets for users to complete a survey so I would like the user to work with my app only. They should not be able to switch to the home screen, press back

8条回答
  •  隐瞒了意图╮
    2020-11-28 10:46

    I want to add some information to the existing replies hoping it will be useful for someone.

    To get a real full screen working on my low cost China tablets I need to edit a file located in

    system/build.prop
    

    replace the text

    ro.property.tabletUI=true
    

    with

    #ro.property.tabletUI=true
    

    (I comment the line). After that, I can get a full screen using

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

    for each activity in the minfest.xml

    This solution Is good only if you sell tablets with your application and needs root privileges to edit the system/build.prop. So it's not a solution for all, so please do not downvote this little contribute.

    EDIT: I noticed that my tablets have hardware buttons (Home, menù and back) on the frames. So Android lets me to hide the system bar. I tryed with other tablets that haven't hardware buttons without success.

提交回复
热议问题