[Nexus S Themes and Apps] shane6374:
Progress bars(Download bar)

This one I originally wrote for froyo, but still applies on ICS

The first one I’m going to do is the progress bars. I know I’ve read this one in another guide, but I’m going to go a bit more in depth with it.

File that will be modded here are res/drawable/progress_horizontal.xml and res/values/styles.xml.

Starting with the progress_horizantal.xml

First the background that is filled by the progress bar.

<item android:id="@id/background">
<shape>
<corners android:radius="6.0dip" />
<gradient android:startColor="#ff7d7f94" android:endColor="#ff6f7285" android:angle="270.0" android:centerColor="#ff6f7285" />
</shape>
</item>

Things that you might want to change here is the how the ends of the bar look and the color.

The end are controlled by <corners android:radius="6.0dip" />. If you want it flat you would enter 0.0dip here.

The color is controlled here: <gradient android:startColor="#ff7d7f94" android:endColor="#ff6f7285" android:angle="270.0" android:centerColor="#ff6f7285" />. As you can see there are 3 places where you can choose a color, top, bottom, center, in that order.

These same rules also apply to the bar itself in this string and can be edited the same way.

<item android:id="@id/progress">
<clip>
<shape>
<corners android:radius="6.0dip" />
<gradient android:startColor="#ff00aa00" android:endColor="#99444444" android:angle="270.0" android:centerColor="#ff00ff00" />
</shape>
</clip>
</item>

I would suggest the value of <corners android:radius="6.0dip" /> be the same in all of the stings of this xml file.

Next I’ll cover the height of the bar which is in the styles.xml.

This string controls things like the volume bar and download progress bars.

<style name="Widget.ProgressBar.Horizontal" parent="@style/Widget.ProgressBar">
<item name="maxHeight">12.0dip</item>
<item name="indeterminateOnly">false</item>
<item name="indeterminateDrawable">@drawable/progress_indeterminate_horizontal</item>
<item name="progressDrawable">@drawable/progress_horizontal</item>
<item name="minHeight">12.0dip</item>
</style>

Here you adjust <item name="maxHeight">12.0dip</item> and <item name="minHeight">12.0dip</item>. The larger the number the bigger the bar will be. I suggest keeping these numbers the same in both the max and min.

This string follows the same rules and controls the progress bars in the settings.

<style name="Widget.SeekBar" parent="@style/Widget">
<item name="focusable">true</item>
<item name="maxHeight">12.0dip</item>
<item name="indeterminateOnly">false</item>
<item name="indeterminateDrawable">@drawable/progress_horizontal</item>
<item name="progressDrawable">@drawable/progress_horizontal</item>
<item name="minHeight">12.0dip</item>
<item name="thumb">@drawable/seek_thumb</item>
<item name="thumbOffset">8.0dip</item>
</style>

How to center the date in the pulldown:

Systemui.apk/res/layout/status_bar_expanded.xml

Stock code:

<RelativeLayout android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="52.0dip">
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="left|center" android:id="@id/date" android:paddingLeft="16.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_alignParentLeft="true" />
<ImageView android:id="@id/settings_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_toRightOf="@id/date" android:contentDescription="@string/accessibility_settings_button" />
<ImageView android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_clear" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
</RelativeLayout>

Edited Code:

<RelativeLayout android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="52.0dip">
<ImageView android:id="@id/settings_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:contentDescription="@string/accessibility_settings_button" />
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="center" android:id="@id/date" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
<ImageView android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_clear" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
</RelativeLayout>

Making the pulldown (semi)transparent

Systemui/res/values/drawables.xml

Here's the code I used in the transparent mod thread linked in an earlier post:

<item type="drawable" name="notification_number_text_color">#ffffffff</item>
<item type="drawable" name="notification_item_background_color">#66111111</item>
<item type="drawable" name="notification_item_background_color_pressed">#cc257390</item>
<item type="drawable" name="ticker_background_color">#55000000</item>
<item type="drawable" name="status_bar_background">#55000000</item>
<item type="drawable" name="status_bar_recents_background_solid">#55000000</item>
<item type="drawable" name="status_bar_recents_app_thumbnail_background">#55000000</item>
<item type="drawable" name="status_bar_notification_row_background_color">#55000000</item>
<item type="drawable" name="notification_header_bg">#55000000</item>
<item type="drawable" name="notification_tracking_bg">#55000000</item>
<item type="drawable" name="recents_callout_line">#99ffffff</item>
<item type="drawable" name="notification_item_background_legacy_color">#ffaaaaaa</item>

Adding your own pulldown imageworks great with the mod above.

Systemui.apk/res/layout/status_bar_tracking.xml

Stock code:

<com.android.systemui.statusbar.phone.TrackingView android:orientation="vertical" android:paddingLeft="0.0px" android:paddingRight="0.0px" android:paddingBottom="0.0px" android:focusable="true" android:visibility="gone" android:descendantFocusability="afterDescendants"

Pulldown added code:

<com.android.systemui.statusbar.phone.TrackingView android:orientation="vertical" android:background="@drawable/pulldown_bg" android:paddingLeft="0.0px" android:paddingRight="0.0px" android:paddingBottom="0.0px" android:focusable="true" android:visibility="gone" android:descendantFocusability="afterDescendants"

Then add an image called pulldown_bg.png in the drawable-hdpi folder.

---------- Post added at 10:59 PM ---------- Previous post was at 10:26 PM ----------

Gonna reserve one more.