Skip to content

Commit

Permalink
FW: Ribbon - Toggles
Browse files Browse the repository at this point in the history
Fix for some toggles not getting set properly
fix user toggle fc
fix some toggles hieght being HUGE

respect users click vib setting.

respect ribbon padding

sync custom toggle if in multiple places

fix theme issues.

Fixed Icon from Nitroz

Change-Id: Ia225e822485b715e6daddeb7b62e232e72db5e36
  • Loading branch information
Stevespear426 committed May 9, 2013
1 parent 3557dd9 commit 70379b3
Show file tree
Hide file tree
Showing 52 changed files with 444 additions and 54 deletions.
15 changes: 15 additions & 0 deletions core/java/android/provider/Settings.java
Expand Up @@ -3294,6 +3294,16 @@ public static void setShowGTalkServiceStatusForUser(ContentResolver cr, boolean
"swipe_ribbon_color_bottom",
};

/**
*
* @hide
*/
public static final String[] SWIPE_RIBBON_TOGGLES = new String[] {
"swipe_ribbon_toggles_left",
"swipe_ribbon_toggles_right",
"swipe_ribbon_toggles_bottom",
};

/**
*
* @hide
Expand Down Expand Up @@ -3410,6 +3420,11 @@ public static void setShowGTalkServiceStatusForUser(ContentResolver cr, boolean
*/
public static final String CUSTOM_TOGGLE_REVERT = "custom_toggle_revert";

/**
* @hide
*/
public static final String CUSTOM_TOGGLE_STATE = "custom_toggle_state";

/**
* @hide
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/SystemUI/AndroidManifest.xml
Expand Up @@ -259,7 +259,7 @@
</intent-filter>
</activity>
<activity
android:name="com.android.systemui.aokp.StatusbarToggle"
android:name="com.android.systemui.aokp.StatusbarToggleShortcut"
android:label="@string/toggle_statusbar"
android:icon="@drawable/toggle_statusbar"
android:theme="@android:style/Theme.Holo.Panel"
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions packages/SystemUI/res/layout/aokp_swipe_ribbon.xml
Expand Up @@ -28,6 +28,37 @@
android:gravity="center"
android:descendantFocusability="afterDescendants">

<LinearLayout
android:paddingTop="1.0dip"
android:paddingBottom="1.0dip"
android:orientation="vertical"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<ImageButton
android:id="@+id/toggles"
android:layout_gravity="center"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="4.0dp"
android:paddingRight="4.0dp" />

<TextView
android:textAppearance="?android:attr/textAppearanceSmall"
android:id="@+id/label"
android:gravity="center"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="end"
android:maxLines="1"
android:scrollHorizontally="true" />

</LinearLayout>

<LinearLayout
android:id="@+id/ribbon"
android:layout_width="wrap_content"
Expand Down
2 changes: 2 additions & 0 deletions packages/SystemUI/res/values/strings.xml
Expand Up @@ -543,6 +543,8 @@
<!-- App window Strings -->
<string name="close">Close</string>
<string name="app_window">Applications</string>
<string name="toggles">Toggles</string>
<string name="ribbon">Ribbon</string>

<!-- Target/Action Strings -->
<string name="shortcut_label">AOKP Actions</string>
Expand Down
Expand Up @@ -58,7 +58,7 @@ private int getProperShortcutIcon(String className) {
return R.drawable.toggle_torch;
} else if (c.equals ("NavbarToggle")) {
return R.drawable.toggle_navbar;
} else if (c.equals ("StatusbarToggle")) {
} else if (c.equals ("StatusbarToggleShortcut")) {
return R.drawable.toggle_statusbar;
} else if (c.equals ("WidgetToggle")) {
return R.drawable.ic_sysbar_widget;
Expand Down

0 comments on commit 70379b3

Please sign in to comment.