[Galaxy S 4 Themes and Apps] nmeuret:
Dear friends,

Just a little HowTo thread to show how to make a cool S5 themed Power Menu.

The idea was to make the sound toggle like the S5 :

Old:

New:

The Idea :

- Remove the old sound icons,

- Replace and move old toogles.

Changing framework-res.apk:

- Decompile framework-res.apk,

- Copy the provided source files (drawable\tw_silent_mode_indicator, drawable-xxhdpi\PNgs),

- Change layout\global_actions_silent_mode.xml :

Old:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="?listPreferredItemHeight"
xmlns:android="http://schemas.android.com/apk/res/android">
<View android:visibility="invisible" android:layout_width="4.0dip" android:layout_height="fill_parent" />
[COLOR="Red"]<LinearLayout android:orientation="vertical" android:id="@id/option1" android:background="?actionBarItemBackground" android:focusable="true" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" android:contentDescription="@string/globalactions_silent_mode_mute">
<ImageView android:layout_gravity="center" android:layout_width="34.0dip" android:layout_height="34.0dip" android:layout_marginTop="5.0dip" android:src="@drawable/tw_device_options_mute" android:scaleType="center" />
<TextView android:textSize="15.0dip" android:textColor="#fff5f5f5" android:gravity="center" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/global_action_sound_mode_mute" />
<ImageView android:layout_gravity="center" android:background="@drawable/tw_silent_mode_indicator" android:duplicateParentState="true" android:layout_width="fill_parent" android:layout_height="5.0dip" android:layout_marginTop="1.0dip" android:layout_marginBottom="5.0dip" android:scaleType="center" />
</LinearLayout>[/COLOR]
<LinearLayout android:orientation="horizontal" android:layout_width="1.0dip" android:layout_height="fill_parent" android:layout_marginLeft="4.0dip" android:layout_marginTop="5.0dip" android:layout_marginRight="4.0dip" android:layout_marginBottom="5.0dip">
<ImageView android:layout_gravity="center" android:layout_width="1.0dip" android:layout_height="fill_parent" android:src="@drawable/tw_device_options_divider" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:id="@id/option2" android:background="?actionBarItemBackground" android:focusable="true" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" android:contentDescription="@string/globalactions_silent_mode_vibrate">
<ImageView android:layout_gravity="center" android:layout_width="34.0dip" android:layout_height="34.0dip" android:layout_marginTop="5.0dip" android:src="@drawable/tw_device_options_vibrate" android:scaleType="center" />
<TextView android:textSize="15.0dip" android:textColor="#fff5f5f5" android:gravity="center" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/global_action_sound_mode_vibrate" />
<ImageView android:layout_gravity="center" android:background="@drawable/tw_silent_mode_indicator" android:duplicateParentState="true" android:layout_width="fill_parent" android:layout_height="5.0dip" android:layout_marginTop="1.0dip" android:layout_marginBottom="5.0dip" android:scaleType="center" />
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:id="@id/dynamic_spacer" android:layout_width="1.0dip" android:layout_height="fill_parent" android:layout_marginLeft="4.0dip" android:layout_marginTop="5.0dip" android:layout_marginRight="4.0dip" android:layout_marginBottom="5.0dip">
<ImageView android:layout_gravity="center" android:layout_width="1.0dip" android:layout_height="fill_parent" android:src="@drawable/tw_device_options_divider" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:id="@id/option3" android:background="?actionBarItemBackground" android:focusable="true" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" android:contentDescription="@string/globalactions_silent_mode_sound">
<ImageView android:layout_gravity="center" android:layout_width="34.0dip" android:layout_height="34.0dip" android:layout_marginTop="5.0dip" android:src="@drawable/tw_device_options_sound" android:scaleType="center" />
<TextView android:textSize="15.0dip" android:textColor="#fff5f5f5" android:gravity="center" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/global_action_sound_mode_sound" />
<ImageView android:layout_gravity="center" android:background="@drawable/tw_silent_mode_indicator" android:duplicateParentState="true" android:layout_width="fill_parent" android:layout_height="5.0dip" android:layout_marginTop="1.0dip" android:layout_marginBottom="5.0dip" android:scaleType="center" />
</LinearLayout>
<View android:visibility="invisible" android:layout_width="4.0dip" android:layout_height="fill_parent" />
</LinearLayout>

New :

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="horizontal" android:background="#ff005060" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="?listPreferredItemHeight"
xmlns:android="http://schemas.android.com/apk/res/android">
<View android:visibility="invisible" android:layout_width="4.0dip" android:layout_height="fill_parent" />
[COLOR="Red"] <LinearLayout android:orientation="vertical" android:id="@id/option1" android:background="#ff005060" android:focusable="true" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" android:contentDescription="@string/globalactions_silent_mode_mute">
<ImageView android:layout_gravity="center" android:background="@drawable/tw_silent_mode_indicator" android:duplicateParentState="true" android:layout_width="45.0dip" android:layout_height="45.0dip" android:layout_marginTop="3.0dip" android:layout_marginBottom="1.0dip" android:scaleType="center" />
<TextView android:textSize="15.0dip" android:textColor="#fff5f5f5" android:gravity="center" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/global_action_sound_mode_mute" />
</LinearLayout>[/COLOR]
<LinearLayout android:orientation="vertical" android:id="@id/option2" android:background="#ff005060" android:focusable="true" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" android:contentDescription="@string/globalactions_silent_mode_vibrate">
<ImageView android:layout_gravity="center" android:background="@drawable/tw_silent_mode_indicator2" android:duplicateParentState="true" android:layout_width="45.0dip" android:layout_height="45.0dip" android:layout_marginTop="3.0dip" android:layout_marginBottom="1.0dip" android:scaleType="center" />
<TextView android:textSize="15.0dip" android:textColor="#fff5f5f5" android:gravity="center" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/global_action_sound_mode_vibrate" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:id="@id/option3" android:background="#ff005060" android:focusable="true" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" android:contentDescription="@string/globalactions_silent_mode_sound">
<ImageView android:layout_gravity="center" android:background="@drawable/tw_silent_mode_indicator3" android:duplicateParentState="true" android:layout_width="45.0dip" android:layout_height="45.0dip" android:layout_marginTop="3.0dip" android:layout_marginBottom="1.0dip" android:scaleType="center" />
<TextView android:textSize="15.0dip" android:textColor="#fff5f5f5" android:gravity="center" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/global_action_sound_mode_sound" />
</LinearLayout>
<View android:visibility="invisible" android:layout_width="4.0dip" android:layout_height="fill_parent" />
</LinearLayout>

- Add new resources in the public.xml file (PNG, tw_silent_mode_indicator2.xml & tw_silent_mode_indicator3.xml) :

[COLOR="Red"]	<public type="drawable" name="tw_silent_mode_indicator2" id="0x01080fcf" />
<public type="drawable" name="tw_silent_mode_indicator3" id="0x01080fd0" />
<public type="drawable" name="tw_device_options_mute_off" id="0x01080fd1" />
<public type="drawable" name="tw_device_options_mute_on" id="0x01080fd2" />
<public type="drawable" name="tw_device_options_sound_off" id="0x01080fd3" />
<public type="drawable" name="tw_device_options_sound_on" id="0x01080fd4" />
<public type="drawable" name="tw_device_options_vibrate_off" id="0x01080fd5" />
<public type="drawable" name="tw_device_options_vibrate_on" id="0x01080fd6" />	[/COLOR]

- Recompile the framework-res apk and put it on you phone.

Now you should have something like this :

UPDATE:

Sound icons ipdated in V1.2, Should be OK now (proper tansparent colors & shapes).

For those who use Imperium V10, here is the compiled framework file (+ System UI to have the complete System Mod):

http://www.mediafire.com/download/r7ot40836ilrev7/S5SysTheme.zip