[Android Themes] zhalx:
(Part II) Add Float Effect Background Menu And Child Menu Settings

Add Float Effect Background Menu And Child Menu Settings

[IMG="add background float effect on settings and child settings"]http://1.bp.blogspot.com/-K-c1mMTnt68/VhKXTJRj19I/AAAAAAAAAuk/Wpt-onX2kSY/s1600/Screenshot-catatandroid-2015-10-05-21-10-02.png[/IMG]​

Prepare

- Know How to Decompile Recompile

- Finished Part I

- Disable Signature System

- Settings.apk

- framework-res.apk

Guides

- Decompile Settings.apk

- go to folder \res\values\

- open styles.xml

- add this above </resources>

<style name="Mole.ListSeparator" parent="@*android:style/Widget.TextView.ListSeparator">
<item name="android:textStyle">bold</item>
<item name="android:textColor">@color/merah_yanu</item>
<item name="android:background">@drawable/duawarna_yanu</item>
<item name="android:paddingTop">25.0dip</item>
<item name="android:paddingBottom">@dimen/yanu_head_padd</item>
<item name="android:textAllCaps">true</item>
<item name="android:paddingStart">@dimen/yanu_head_padd</item>
</style>

- add this code on "Mole.Theme"

<item name="android:listSeparatorTextViewStyle">@style/Mole.ListSeparator</item>

- so it will look like this

<style name="Mole.Theme" parent="@*android:style/Theme.Holo">
<item name="android:actionBarStyle">@style/Mole.Holo.Bar</item>
<item name="android:listSeparatorTextViewStyle">@style/Mole.ListSeparator</item>
</style>

- still on folder values

- open dimens.xml

- add above </resources>

<dimen name="yanu_head_padd">17.0dip</dimen>

- open colors.xml

- add above </resources>

<color name="merah_yanu">#fff44336</color>
<color name="gray_yanu">#ff2a2a2a</color>
<color name="lightgray_yanu">#ff191919</color>
<color name="bgmenu_yanu">#502a2a2a</color>

- open folder \res\drawable

- make one xml file and named it duawarna_yanu.xml

- write inside duawarna_yanu.xml with these code

<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:height="9.0dip">
<shape android:shape="rectangle"
xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#00000000" />
</shape>
</item>
<item android:top="9.0dip">
<shape android:shape="rectangle"
xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/gray_yanu" />
</shape>
</item>
</layer-list>

- save

- Recompile - sign - push

- Reboot

Edit Background list
​

- still on Settings.apk

- go to folder \res\layout\

- open preference_header_item.xml

- compare these code, looks on android:background and android:layout_margin

- if you guys os JB 4.2.1 maybe can direct paste these code

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:background="[B]@color/lightgray_yanu[/B]" android:paddingRight="?android:scrollbarSize" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="48.0dip"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content">
<ImageView android:layout_gravity="center" android:id="@id/icon" android:layout_width="@dimen/header_icon_width" android:layout_height="wrap_content" android:layout_margin="[B]@dimen/yanu_head_padd[/B]" />
</LinearLayout>
<RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="6.0dip" android:layout_marginRight="6.0dip" android:layout_marginBottom="6.0dip" android:layout_weight="1.0">
<TextView android:textAppearance="?android:textAppearanceMedium" android:ellipsize="marquee" android:id="@*android:id/title" android:fadingEdge="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" />
<TextView android:textAppearance="?android:textAppearanceSmall" android:ellipsize="end" android:id="@*android:id/summary" android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="2" android:layout_below="@*android:id/title" android:layout_alignLeft="@*android:id/title" />
</RelativeLayout>
</LinearLayout>

- save

- open preference_header_switch_item.xml

- compare againt, looks on android:background and android:layout_margin

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:background="[B]@color/lightgray_yanu[/B]" android:paddingRight="?android:scrollbarSize" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="48.0dip"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content">
<ImageView android:layout_gravity="center" android:id="@id/icon" android:layout_width="@dimen/header_icon_width" android:layout_height="wrap_content" android:layout_margin="[B]@dimen/yanu_head_padd[/B]" />
</LinearLayout>
<RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="2.0dip" android:layout_marginTop="6.0dip" android:layout_marginRight="6.0dip" android:layout_marginBottom="6.0dip" android:layout_weight="1.0">
<TextView android:textAppearance="?android:textAppearanceMedium" android:ellipsize="marquee" android:id="@*android:id/title" android:fadingEdge="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" />
<TextView android:textAppearance="?android:textAppearanceSmall" android:ellipsize="end" android:id="@*android:id/summary" android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="2" android:layout_below="@*android:id/title" android:layout_alignLeft="@*android:id/title" />
</RelativeLayout>
<Switch android:layout_gravity="center" android:id="@id/switchWidget" android:padding="8.0dip" android:focusable="false" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>

- save, recompile - sign - push

Makes float effect on Child menu Settings

​

- still on Settings.apk

- go to folder \res\layout

- open and prepare to edit these files too

- add this code on each Parent layout (lines #2)

android:background="@color/bgmenu_yanu"

- save - recompile -push

- reboot

- next we will edit framework-res.apk too

- decompile framework-res.apk

- go to folder \res\layout

- open and prepare to edit these files too

- againt add this code on those parent layout

android:background="@color/bgmenu_yanu"

- go to folder \res\values

- open colors.xml

- add above </resources>

<color name="bgmenu_yanu">#502a2a2a</color>

- save - recompile - push

- reboot