Merge "Fix app shelf being visible during setup wizard"
This commit is contained in:
@@ -69,62 +69,65 @@
|
||||
android:contentDescription="@string/accessibility_home"
|
||||
/>
|
||||
|
||||
<com.android.systemui.statusbar.phone.NavigationBarApps
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
|
||||
<ImageView android:id="@+id/app_divider"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:src="@drawable/nav_app_divider"
|
||||
/>
|
||||
|
||||
<!-- TODO: Build the list of icons dynamically. -->
|
||||
<com.android.systemui.statusbar.phone.NavigationBarRecents
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
<ImageView android:id="@+id/recent0"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:padding="6dp"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
<ImageView android:id="@+id/recent1"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:padding="6dp"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
<ImageView android:id="@+id/recent2"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:padding="6dp"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
</com.android.systemui.statusbar.phone.NavigationBarRecents>
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
<!-- Container for the app shelf. -->
|
||||
<LinearLayout
|
||||
android:id="@+id/app_shelf"
|
||||
android:orientation="horizontal"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
>
|
||||
<com.android.systemui.statusbar.phone.NavigationBarApps
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
|
||||
<ImageView android:id="@+id/app_divider"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:src="@drawable/nav_app_divider"
|
||||
/>
|
||||
|
||||
<!-- TODO: Build the list of icons dynamically. -->
|
||||
<com.android.systemui.statusbar.phone.NavigationBarRecents
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
<ImageView android:id="@+id/recent0"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:padding="6dp"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
<ImageView android:id="@+id/recent1"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:padding="6dp"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
<ImageView android:id="@+id/recent2"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:padding="6dp"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
</com.android.systemui.statusbar.phone.NavigationBarRecents>
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="@dimen/navigation_extra_key_width"
|
||||
@@ -262,62 +265,65 @@
|
||||
android:contentDescription="@string/accessibility_home"
|
||||
/>
|
||||
|
||||
<com.android.systemui.statusbar.phone.NavigationBarApps
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
|
||||
<ImageView android:id="@+id/app_divider"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:src="@drawable/nav_app_divider"
|
||||
/>
|
||||
|
||||
<!-- TODO: Build the list of icons dynamically. -->
|
||||
<com.android.systemui.statusbar.phone.NavigationBarRecents
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
<ImageView android:id="@+id/recent0"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:padding="6dp"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
<ImageView android:id="@+id/recent1"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:padding="6dp"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
<ImageView android:id="@+id/recent2"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:padding="6dp"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
</com.android.systemui.statusbar.phone.NavigationBarRecents>
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
<!-- Container for the app shelf. -->
|
||||
<LinearLayout
|
||||
android:id="@+id/app_shelf"
|
||||
android:orientation="horizontal"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
>
|
||||
<com.android.systemui.statusbar.phone.NavigationBarApps
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
|
||||
<ImageView android:id="@+id/app_divider"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:src="@drawable/nav_app_divider"
|
||||
/>
|
||||
|
||||
<!-- TODO: Build the list of icons dynamically. -->
|
||||
<com.android.systemui.statusbar.phone.NavigationBarRecents
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
<ImageView android:id="@+id/recent0"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:padding="6dp"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
<ImageView android:id="@+id/recent1"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:padding="6dp"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
<ImageView android:id="@+id/recent2"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:padding="6dp"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
</com.android.systemui.statusbar.phone.NavigationBarRecents>
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="@dimen/navigation_extra_key_width"
|
||||
|
||||
@@ -243,6 +243,10 @@ public class NavigationBarView extends LinearLayout {
|
||||
return mCurrentView.findViewById(R.id.ime_switcher);
|
||||
}
|
||||
|
||||
public View getAppShelf() {
|
||||
return mCurrentView.findViewById(R.id.app_shelf);
|
||||
}
|
||||
|
||||
private void getIcons(Resources res) {
|
||||
mBackIcon = res.getDrawable(R.drawable.ic_sysbar_back);
|
||||
mBackLandIcon = res.getDrawable(R.drawable.ic_sysbar_back_land);
|
||||
@@ -341,6 +345,12 @@ public class NavigationBarView extends LinearLayout {
|
||||
getBackButton() .setVisibility(disableBack ? View.INVISIBLE : View.VISIBLE);
|
||||
getHomeButton() .setVisibility(disableHome ? View.INVISIBLE : View.VISIBLE);
|
||||
getRecentsButton().setVisibility(disableRecent ? View.INVISIBLE : View.VISIBLE);
|
||||
|
||||
// The app shelf, if it exists, follows the visibility of the home button.
|
||||
View appShelf = getAppShelf();
|
||||
if (appShelf != null) {
|
||||
appShelf.setVisibility(disableHome ? View.INVISIBLE : View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean inLockTask() {
|
||||
|
||||
Reference in New Issue
Block a user