Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppSidebar (1/2) #12

Open
wants to merge 2 commits into
base: jb4.3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions core/java/android/provider/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -2673,6 +2673,62 @@ public static void setShowGTalkServiceStatusForUser(ContentResolver cr, boolean
*/
public static final String POINTER_SPEED = "pointer_speed";

/**
* Whether or not to use the app sidebar
*
* @hide
*/
public static final String APP_SIDEBAR_ENABLED = "app_sidebar_enabled";

/**
* User defined transparency level for sidebar
*
* @hide
*/
public static final String APP_SIDEBAR_TRANSPARENCY = "app_sidebar_transparency";

/**
* Disable text labels for app sidebar items
*
* @hide
*/
public static final String APP_SIDEBAR_DISABLE_LABELS = "app_sidebar_disable_labels";

/**
* Position of app sidebar
*
* @hide
*/
public static final String APP_SIDEBAR_POSITION = "app_sidebar_position";

/**
* Width of the appbar trigger
*
* @hide
*/
public static final String APP_SIDEBAR_TRIGGER_WIDTH = "app_sidebar_trigger_width";

/**
* Position of appbar trigger
*
* @hide
*/
public static final String APP_SIDEBAR_TRIGGER_TOP = "app_sidebar_trigger_top";

/**
* Height of the appbar trigger
*
* @hide
*/
public static final String APP_SIDEBAR_TRIGGER_HEIGHT = "app_sidebar_trigger_height";

/**
* Whether to display the trigger region or not
*
* @hide
*/
public static final String APP_SIDEBAR_SHOW_TRIGGER = "app_sidebar_show_trigger";

/**
* Whether to enable pie controls
* The value is 1, 2 or 0).
Expand Down
18 changes: 18 additions & 0 deletions packages/SystemUI/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.REBOOT" />

<!-- App Sidebar -->
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" />

<!-- Launcher helper extra permissions -->
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.NFC" />
Expand Down Expand Up @@ -239,6 +242,21 @@
</intent-filter>
</service>

<activity android:name=".statusbar.sidebar.SidebarConfigurationActivity"
android:label="@string/title_activity_sidebar_configuration"
android:taskAffinity=""
android:excludeFromRecents="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>

<provider
android:name=".statusbar.sidebar.SidebarContentProvider"
android:authorities="org.chameleonos.sidebar.contentprovider" >
</provider>

<activity android:name=".Somnambulator"
android:label="@string/start_dreams"
android:icon="@mipmap/ic_launcher_dreams"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/SystemUI/res/drawable-hdpi/tab_left.9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/SystemUI/res/drawable-hdpi/tab_right.9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/SystemUI/res/drawable-xhdpi/tab_left.9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/SystemUI/res/drawable-xhdpi/tab_right.9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions packages/SystemUI/res/drawable/item_placeholder.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<stroke
android:width="2dp"
android:color="#FF00FF80" />

<solid
android:color="#8000FF80" />

<corners
android:radius="3dp" />

</shape>
10 changes: 10 additions & 0 deletions packages/SystemUI/res/drawable/sidebar_drag_enter.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<stroke
android:width="2dp"
android:color="#FF27a9e1" />

<solid
android:color="#8027a9e1" />

</shape>
10 changes: 10 additions & 0 deletions packages/SystemUI/res/drawable/sidebar_drag_exit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<stroke
android:width="2dp"
android:color="#FF808080" />

<solid
android:color="#80808080" />

</shape>
13 changes: 13 additions & 0 deletions packages/SystemUI/res/drawable/trigger_region.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<stroke
android:width="2dp"
android:color="#FF27a9e1" />

<solid
android:color="#8027a9e1" />

<corners
android:radius="3dp" />

</shape>
9 changes: 9 additions & 0 deletions packages/SystemUI/res/layout/app_sidebar.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>

<com.android.systemui.statusbar.AppSidebar xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/app_sidebar"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@android:color/transparent" >

</com.android.systemui.statusbar.AppSidebar>
34 changes: 34 additions & 0 deletions packages/SystemUI/res/layout/folder_icon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2008 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.
-->

<com.android.systemui.statusbar.sidebar.FolderIcon
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:focusable="true">
<ImageView
android:id="@+id/preview_background"
android:layout_gravity="center_horizontal"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:src="@drawable/portal_ring_inner_holo" />
<TextView
android:id="@+id/folder_icon_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
</com.android.systemui.statusbar.sidebar.FolderIcon>
73 changes: 73 additions & 0 deletions packages/SystemUI/res/layout/setup_user_folder.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2008 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.
-->

<com.android.systemui.statusbar.sidebar.Folder
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/portal_container_holo">

<GridView
android:id="@+id/folder_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/folder_padding"
android:paddingRight="@dimen/folder_padding"
android:paddingTop="@dimen/folder_padding"
android:paddingBottom="@dimen/folder_padding"
android:cacheColorHint="#ff333333"
android:hapticFeedbackEnabled="false"
android:layout_margin="5dp"
android:numColumns="auto_fit"
android:verticalSpacing="5dp"
android:horizontalSpacing="5dp"
android:columnWidth="60dp" />

<FrameLayout
android:id="@+id/folder_footer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:gravity="center_horizontal"
android:background="#00000000" >

<com.android.systemui.statusbar.sidebar.FolderEditText
android:id="@+id/folder_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center_horizontal"
android:paddingTop="@dimen/folder_name_padding"
android:paddingBottom="@dimen/folder_name_padding"
android:textSize="14sp"
android:textColor="#ff33b5e5"
android:textColorHighlight="#ff333333"
android:singleLine="true"
android:focusable="true"
android:imeOptions="flagNoExtractUi"/>
<!--
<ImageView
android:id="@+id/btn_sort"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_margin="2dp"
android:layout_gravity="right|center_horizontal"
android:src="@android:drawable/ic_menu_sort_by_size" />
-->
</FrameLayout>

</com.android.systemui.statusbar.sidebar.Folder>
76 changes: 76 additions & 0 deletions packages/SystemUI/res/layout/sidebar_configuration_layout.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/frame_layout"
android:baselineAligned="false"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<LinearLayout
android:baselineAligned="false"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >

<ScrollView
android:id="@+id/sidebar"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:padding="2dp"
android:background="@drawable/sidebar_drag_exit" >

<com.android.systemui.statusbar.sidebar.AppContainer
android:id="@+id/contents"
android:layout_width="@dimen/setup_sidebar_width"
android:layout_height="wrap_content"
android:orientation="vertical" />

</ScrollView>

<GridView
android:id="@+id/available_apps"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_margin="5dp"
android:numColumns="auto_fit"
android:verticalSpacing="5dp"
android:horizontalSpacing="5dp"
android:columnWidth="60dp" />

</LinearLayout>

<LinearLayout
android:id="@+id/first_use"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@android:drawable/screen_background_dark_transparent" >

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginLeft="40dp"
android:src="@drawable/drag_drop_arrow" />

<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center"
android:layout_margin="10dp"
android:textColor="@android:color/white"
android:textSize="16sp"
android:textStyle="bold"
android:text="@string/content_setup_instructions" />

<Button
android:id="@+id/dismiss"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="@string/content_setup_dismiss" />

</LinearLayout>
</FrameLayout>
Loading