Add Android application to handle system ui part
Based on shashlikd from https://github.com/shashlik/shashlikd
This commit is contained in:
parent
84429abb7d
commit
9995a6238c
325 changed files with 2634 additions and 0 deletions
11
android/res/layout/activity_main.xml
Normal file
11
android/res/layout/activity_main.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity">
|
||||
|
||||
<TextView android:text="@string/hello_world" android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</RelativeLayout>
|
||||
290
android/res/layout/navigation_bar.xml
Normal file
290
android/res/layout/navigation_bar.xml
Normal file
|
|
@ -0,0 +1,290 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/* apps/common/assets/default/default/skins/StatusBar.xml
|
||||
**
|
||||
** Copyright 2011, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<org.anbox.NavigationBarView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:systemui="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@drawable/system_bar_background"
|
||||
>
|
||||
|
||||
<FrameLayout android:id="@+id/rot0"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:id="@+id/nav_buttons"
|
||||
android:animateLayoutChanges="true"
|
||||
>
|
||||
|
||||
<!-- navigation controls -->
|
||||
<View
|
||||
android:layout_width="@dimen/navigation_side_padding"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
<org.anbox.KeyButtonView android:id="@+id/back"
|
||||
android:layout_width="@dimen/navigation_key_width"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ic_sysbar_back"
|
||||
systemui:keyCode="4"
|
||||
android:layout_weight="0"
|
||||
android:scaleType="center"
|
||||
/>
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
<org.anbox.KeyButtonView android:id="@+id/home"
|
||||
android:layout_width="@dimen/navigation_key_width"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ic_sysbar_home"
|
||||
systemui:keyCode="3"
|
||||
systemui:keyRepeat="false"
|
||||
android:layout_weight="0"
|
||||
android:scaleType="center"
|
||||
/>
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
<org.anbox.KeyButtonView android:id="@+id/recent_apps"
|
||||
android:layout_width="@dimen/navigation_key_width"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ic_sysbar_recent"
|
||||
android:layout_weight="0"
|
||||
android:scaleType="center"
|
||||
/>
|
||||
<FrameLayout
|
||||
android:layout_width="@dimen/navigation_side_padding"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0" >
|
||||
<org.anbox.KeyButtonView
|
||||
android:id="@+id/menu"
|
||||
android:layout_width="@dimen/navigation_extra_key_width"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ic_sysbar_menu"
|
||||
android:visibility="invisible"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_gravity="end"
|
||||
systemui:keyCode="82" />
|
||||
|
||||
<org.anbox.KeyButtonView
|
||||
android:id="@+id/ime_switcher"
|
||||
android:layout_width="@dimen/navigation_extra_key_width"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="invisible"
|
||||
android:layout_gravity="end" />
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- lights out layout to match exactly -->
|
||||
<LinearLayout
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:id="@+id/lights_out"
|
||||
android:visibility="gone"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="@dimen/navigation_key_width"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="@dimen/navigation_side_padding"
|
||||
android:src="@drawable/ic_sysbar_lights_out_dot_small"
|
||||
android:scaleType="center"
|
||||
android:layout_weight="0"
|
||||
/>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
<ImageView
|
||||
android:layout_width="@dimen/navigation_key_width"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ic_sysbar_lights_out_dot_large"
|
||||
android:scaleType="center"
|
||||
android:layout_weight="0"
|
||||
/>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
<ImageView
|
||||
android:layout_width="@dimen/navigation_key_width"
|
||||
android:layout_marginEnd="@dimen/navigation_side_padding"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ic_sysbar_lights_out_dot_small"
|
||||
android:scaleType="center"
|
||||
android:layout_weight="0"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout android:id="@+id/rot90"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:visibility="gone"
|
||||
android:paddingTop="0dp"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:id="@+id/nav_buttons"
|
||||
android:animateLayoutChanges="true"
|
||||
>
|
||||
|
||||
<!-- navigation controls -->
|
||||
<FrameLayout
|
||||
android:layout_weight="0"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/navigation_side_padding" >
|
||||
<org.anbox.KeyButtonView
|
||||
android:id="@+id/ime_switcher"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/navigation_extra_key_width"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_gravity="top"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<org.anbox.KeyButtonView
|
||||
android:id="@+id/menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/ic_sysbar_menu_land"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_gravity="top"
|
||||
android:visibility="invisible"
|
||||
systemui:keyCode="82" />
|
||||
</FrameLayout>
|
||||
|
||||
<org.anbox.KeyButtonView android:id="@+id/recent_apps"
|
||||
android:layout_height="@dimen/navigation_key_width"
|
||||
android:layout_width="match_parent"
|
||||
android:src="@drawable/ic_sysbar_recent_land"
|
||||
android:scaleType="center"
|
||||
android:layout_weight="0"
|
||||
/>
|
||||
<View
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
<org.anbox.KeyButtonView android:id="@+id/home"
|
||||
android:layout_height="@dimen/navigation_key_width"
|
||||
android:layout_width="match_parent"
|
||||
android:src="@drawable/ic_sysbar_home_land"
|
||||
android:scaleType="center"
|
||||
systemui:keyCode="3"
|
||||
systemui:keyRepeat="false"
|
||||
android:layout_weight="0"
|
||||
/>
|
||||
<View
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
<org.anbox.KeyButtonView android:id="@+id/back"
|
||||
android:layout_height="@dimen/navigation_key_width"
|
||||
android:layout_width="match_parent"
|
||||
android:src="@drawable/ic_sysbar_back_land"
|
||||
android:scaleType="center"
|
||||
systemui:keyCode="4"
|
||||
android:layout_weight="0"
|
||||
/>
|
||||
<View
|
||||
android:layout_height="@dimen/navigation_side_padding"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="0"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- lights out layout to match exactly -->
|
||||
<LinearLayout
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/lights_out"
|
||||
android:visibility="gone"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_height="@dimen/navigation_key_width"
|
||||
android:layout_marginTop="@dimen/navigation_side_padding"
|
||||
android:layout_width="match_parent"
|
||||
android:src="@drawable/ic_sysbar_lights_out_dot_small"
|
||||
android:scaleType="center"
|
||||
android:layout_weight="0"
|
||||
/>
|
||||
<View
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
<ImageView
|
||||
android:layout_height="@dimen/navigation_key_width"
|
||||
android:layout_width="match_parent"
|
||||
android:src="@drawable/ic_sysbar_lights_out_dot_large"
|
||||
android:scaleType="center"
|
||||
android:layout_weight="0"
|
||||
/>
|
||||
<View
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
<ImageView
|
||||
android:layout_height="@dimen/navigation_key_width"
|
||||
android:layout_marginBottom="@dimen/navigation_side_padding"
|
||||
android:layout_width="match_parent"
|
||||
android:src="@drawable/ic_sysbar_lights_out_dot_small"
|
||||
android:scaleType="center"
|
||||
android:layout_weight="0"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
</org.anbox.NavigationBarView>
|
||||
Loading…
Add table
Add a link
Reference in a new issue