android:keepScreenOn && android:visibility gone? Which one is stronger?
In case I have `android:keepScreenOn="true":
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/main">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_world"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceLarge"/>
<GridLayout
android:id="@+id/myLayout"
android:background="@android:color/background_dark"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:keepScreenOn="true">
</GridLayout>
</RelativeLayout>
And later in my app I change myLayout
's visibility
to gone, while keep displaying the main
layout, will it keep my screen on?
So technically speaking, is visibility=gone
disabling keepScreenOn
?
Source: View source