Permalink
Browse files

Add ActionBar, modify ViewPager to work off of lits, added Readme

  • Loading branch information...
Pedlar committed Dec 12, 2011
1 parent 8ed48ad commit e0d231edb3cc947adb2e471ddb4d850302e350df
View
@@ -29,7 +29,7 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
-
+<!--
<activity
android:name=".Settings"
android:taskAffinity="com.cyanogenmod.settings"
@@ -44,7 +44,7 @@
<activity android:name=".SubSettings"
android:taskAffinity="com.cyanogenmod.settings">
</activity>
-
+-->
<!-- Notification Widget -->
<activity android:name=".activities.PowerWidget"
android:label="@string/title_widget_buttons"
@@ -55,50 +55,30 @@
<action android:name="android.cyanogenmod.WIDGET_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
- <meta-data android:name="com.cyanogenmod.settings.FRAGMENT_CLASS"
- android:value="com.cyanogenmod.settings.activities.PowerWidget" />
- <meta-data android:name="com.cyanogenmod.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/power_widget_settings" />
</activity>
- <activity android:name="Settings$PowerWidgetChooserActivity"
+ <activity android:name=".activities.PowerWidget$PowerWidgetChooser"
android:label="@string/title_widget_picker"
android:configChanges="orientation|keyboardHidden|screenSize"
android:clearTaskOnLaunch="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
- <meta-data android:name="com.cyanogenmod.settings.FRAGMENT_CLASS"
- android:value="com.cyanogenmod.settings.activities.PowerWidget$PowerWidgetChooser" />
- <meta-data android:name="com.cyanogenmod.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/power_widget_settings" />
- <meta-data android:name="com.cyanogenmod.settings.PARENT_FRAGMENT_TITLE"
- android:value="@string/title_widget_buttons" />
- <meta-data android:name="com.cyanogenmod.settings.PARENT_FRAGMENT_CLASS"
- android:value="com.cyanogenmod.settings.Settings$PowerWidgetActivity" />
</activity>
- <activity android:name="Settings$PowerWidgetOrderActivity"
+ <activity android:name=".activities.PowerWidget$PowerWidgetOrder"
android:label="@string/title_widget_order"
android:configChanges="orientation|keyboardHidden|screenSize"
android:clearTaskOnLaunch="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
- <meta-data android:name="com.cyanogenmod.settings.FRAGMENT_CLASS"
- android:value="com.cyanogenmod.settings.activities.PowerWidget$PowerWidgetOrder" />
- <meta-data android:name="com.cyanogenmod.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/power_widget_settings" />
- <meta-data android:name="com.cyanogenmod.settings.PARENT_FRAGMENT_TITLE"
- android:value="@string/title_widget_buttons" />
- <meta-data android:name="com.cyanogenmod.settings.PARENT_FRAGMENT_CLASS"
- android:value="com.cyanogenmod.settings.Settings$PowerWidgetActivity" />
</activity>
<!--- End Notification Widget -->
<!--- Backlight -->
- <activity android:name="Settings$BackLightActivity"
+ <activity android:name=".activities.Backlight"
android:label="@string/backlight_title"
android:configChanges="orientation|keyboardHidden|screenSize"
android:clearTaskOnLaunch="true">
@@ -107,10 +87,6 @@
<action android:name="android.cyanogenmod.BACKLIGHT_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
- <meta-data android:name="com.cyanogenmod.settings.FRAGMENT_CLASS"
- android:value="com.cyanogenmod.settings.activities.Backlight" />
- <meta-data android:name="com.cyanogenmod.settings.TOP_LEVEL_HEADER_ID"
- android:resource="@id/backlight_settings" />
</activity>
<activity android:name=".activities.LightLevelsActivity"
View
@@ -0,0 +1,20 @@
+CMSettings is a central location for CyanogenMod specific settings, instead of cluttering the AOSP Settings app.
+
+To add a item to a category you need to modify the src/com/cyanogenmod/settings/lists/<category>.java file.
+This file contains a list of items that should be in the list, along with the Activity it launches.
+Formart shoud look like:
+
+{ "[title string name]", "[summary string name]", "com.cyanogenmod.settings.activities.<CLASS>", "", "[0,1,2]" }
+
+For Title, and Summary you want to use the Resource Identifier name, as it is replaced in the Adapter with the correct localized string.
+
+0 = Header
+1 = Normal
+2 = Switch
+
+If you choose switch you will need to make a switch class inside of the "switches" folder, and then modify SlideSettings.java
+to add the class in the appropriate places, please look at "mWidgetSwitch" and "PowerWidgetSwitch" for examples of how to create this.
+
+For your Preference activities this should be made the same way as normal, preferbally use fragments where preferencescreens use to be used.
+You can see PowerWidget.java for a good way to keep everything contained in a single file for cleanliness.
+
@@ -35,8 +35,8 @@
<TextView android:id="@+id/summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_below="@android:id/title"
- android:layout_alignLeft="@android:id/title"
+ android:layout_below="@id/title"
+ android:layout_alignLeft="@id/title"
android:textAppearance="?android:attr/textAppearanceSmall"
android:ellipsize="end"
android:maxLines="2" />
Oops, something went wrong.

0 comments on commit e0d231e

Please sign in to comment.