[TUT][4.1+] How to transform your framework into Honami framework!

Search This thread

KuaQ

Senior Member
May 4, 2012
631
1,047
Włocławek
kuaq-projects.meximas.com
Hi, its my first tut on XDA Forum

I would like to share with you my knowledge.



To decompile, sign and recompile files I using Advance ApkTool




1. Theme accent color in dialog, pop up, settings, text highlight etc..

Screens:
dialog_light_text.jpg
dialog_dark.jpg


Tutorial:

Its very easy mod! :)

1. Recompile your framework-res.apk

2. Go to /res/values/ and open color.xml

3. Find <color name="holo_blue_light">..</color> and replace value with @com.sonyericsson.uxp:color/semc_theme_accent_color


shoud look like this:

holo_blue_color.png


4. Now find:
Code:
  <color name="highlighted_text_dark">
  <color name="highlighted_text_light">
  <color name="highlighted_text_holo_dark">
  <color name="highlighted_text_holo_light">

and replace color value with @com.sonyericsson.uxp:color/semc_theme_accent_color

5. Now go to apktool.yml and add this line under isFrameworkApk: true

Code:
usesFramework:
  ids:
  - 2

6. Now recompile, sign and push into /system/framework !




2. Theme accent color in Progress bar

Screens:
proggres.jpg


Tutorial:

1. Recompile your framework-res

2. Download this files proggres.rar and paste to /res/drawable & /drawable-hdpi

3. Now go to styles.xml and find this line:

Code:
<item name="progressDrawable">@drawable/progress_horizontal_holo_light</item>
replace it with
Code:
<item name="progressDrawable">@drawable/semc_progress_horizontal_holo_light</item>

now find this line:

Code:
<item name="progressDrawable">@drawable/progress_horizontal_holo_dark</item>

and replace it with

Code:
<item name="progressDrawable">@drawable/semc_progress_horizontal_holo_dark</item>

4. Recompile, sign and push in /system/framework!


3. Cool list separator accorind theme color!

Screens:
Screenshot_2014_08_18_15_26_37.png
Screenshot_2014_08_18_12_53_47.png
list_separators.jpg


Tutorial:

1. Recompile your framework-res

2. Create new list_separator_background.xml file in /res/drawable

Code:
<?xml version="1.0" encoding="utf-8"?>
<shape
  xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@com.sonyericsson.uxp:color/semc_theme_accent_color" />
    <corners android:topRightRadius="8.0px" android:bottomRightRadius="8.0px" />
    <padding android:left="4.0dip" android:top="2.0dip" android:right="4.0dip" android:bottom="2.0dip" />
</shape>

3. Now go to styles.xml and find this

Code:
@drawable/dark_header_dither

and replace it with this:

Code:
@drawable/list_separator_background

find this:
Code:
@drawable/light_header_dither

and replace it with this:
Code:
@drawable/list_separator_background

find this style
Code:
<style name="Widget.Holo.TextView.ListSeparator" parent="@style/Widget.TextView.ListSeparator">

under this style find this
Code:
<item name="background">

and replace it with
Code:
@drawable/list_separator_background
like this:
list_separator.png


do the same with this style
Code:
<style name="Widget.Holo.Light.TextView.ListSeparator" parent="@style/Widget.TextView.ListSeparator">

4. Recompile, sign and push to /framework



4. Text fields according theme color and search box

Screens:
text_field_2.jpg
text_fields.jpg



Tutorial:

1. Decompile your framework-res

2. Download this files Text fields and paste it

3. Open styles.xml and find this style:


a)

Code:
<style name="Theme.Holo.Light" parent="@style/Theme.Light">

under this style find
Code:
<item name="editTextColor
and
Code:
<item name="editTextBackground">

Replace it to look like this:
edit_text_light.png


Code:
<item name="editTextColor">@color/semc_edittext_color_dark</item>
<item name="editTextBackground">@drawable/semc_edit_text_holo_light</item>


b)

Now, under this style:
Code:
<style name="Theme.Holo" parent="@style/Theme">

find this:

Code:
<item name="editTextColor
Code:
<item name="editTextBackground">

and edit to look like this:
tekst_field_dark.png


Code:
<item name="editTextColor">@color/semc_edittext_color_dark</item>
<item name="editTextBackground">@drawable/semc_edit_text_holo_dark</item>

4. Now find this line
Code:
<item name="searchViewTextField">
and edit to look like this:

in Theme.Holo
Code:
 <item name="searchViewTextField">@drawable/semc_textfield_searchview_holo_dark</item>

in Theme.Holo.Light
Code:
<item name="searchViewTextField">@drawable/semc_textfield_searchview_holo_dark</item>

5. Save, recompile, sign and push to framework!




5. How to port switchers accorind theme color

Screens:
switch.jpg
switch_dark.jpg


Tutorial:

1. Decompile your framework-res

2. Download switch.rar (see attachment) and paste it

3. Now go to /res/values/strings.xml and add this string to end of the file
Code:
<string name="capital_on_blind" />
<string name="capital_off_blind" />
save & exit

4.1 Open styles.xml and find this style:

Code:
<style name="Widget.Holo.Light.CompoundButton.Switch" parent="@style/Widget.CompoundButton.Switch">

edit this style to look like this:
Code:
<style name="Widget.Holo.Light.CompoundButton.Switch" parent="@style/Widget.CompoundButton.Switch">
        <item name="textOn">@string/capital_on_blind</item>
        <item name="textOff">@string/capital_off_blind</item>
        <item name="thumb">@drawable/switch_inner_holo_light</item>
        <item name="switchTextAppearance">@style/TextAppearance.Holo.Widget.Switch</item>
        <item name="track">@drawable/switch_track_holo_light</item>
        <item name="switchMinWidth">70.0dip</item>
        <item name="switchPadding">8.0dip</item>
        <item name="thumbTextPadding">12.0dip</item>
    </style>

4.2 Now find this style
Code:
<style name="Widget.Holo.CompoundButton.Switch" parent="@style/Widget.Holo.CompoundButton">

end edit to look like this:
Code:
<style name="Widget.Holo.CompoundButton.Switch" parent="@style/Widget.Holo.CompoundButton">
        <item name="textOn">@string/capital_on_blind</item>
        <item name="textOff">@string/capital_off_blind</item>
        <item name="thumb">@drawable/switch_inner_holo_dark</item>
        <item name="switchTextAppearance">@style/TextAppearance.Holo.Widget.Switch</item>
        <item name="track">@drawable/switch_track_holo_light</item>
        <item name="switchMinWidth">70.0dip</item>
        <item name="switchPadding">8.0dip</item>
        <item name="thumbTextPadding">12.0dip</item>
    </style>

5. Save, recompile, sign and push to framework!



Its my first tutorial,
Hit thanks If you like it!
 

Attachments

  • switch.rar
    75 KB · Views: 283
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 51
    Hi, its my first tut on XDA Forum

    I would like to share with you my knowledge.



    To decompile, sign and recompile files I using Advance ApkTool




    1. Theme accent color in dialog, pop up, settings, text highlight etc..

    Screens:
    dialog_light_text.jpg
    dialog_dark.jpg


    Tutorial:

    Its very easy mod! :)

    1. Recompile your framework-res.apk

    2. Go to /res/values/ and open color.xml

    3. Find <color name="holo_blue_light">..</color> and replace value with @com.sonyericsson.uxp:color/semc_theme_accent_color


    shoud look like this:

    holo_blue_color.png


    4. Now find:
    Code:
      <color name="highlighted_text_dark">
      <color name="highlighted_text_light">
      <color name="highlighted_text_holo_dark">
      <color name="highlighted_text_holo_light">

    and replace color value with @com.sonyericsson.uxp:color/semc_theme_accent_color

    5. Now go to apktool.yml and add this line under isFrameworkApk: true

    Code:
    usesFramework:
      ids:
      - 2

    6. Now recompile, sign and push into /system/framework !




    2. Theme accent color in Progress bar

    Screens:
    proggres.jpg


    Tutorial:

    1. Recompile your framework-res

    2. Download this files proggres.rar and paste to /res/drawable & /drawable-hdpi

    3. Now go to styles.xml and find this line:

    Code:
    <item name="progressDrawable">@drawable/progress_horizontal_holo_light</item>
    replace it with
    Code:
    <item name="progressDrawable">@drawable/semc_progress_horizontal_holo_light</item>

    now find this line:

    Code:
    <item name="progressDrawable">@drawable/progress_horizontal_holo_dark</item>

    and replace it with

    Code:
    <item name="progressDrawable">@drawable/semc_progress_horizontal_holo_dark</item>

    4. Recompile, sign and push in /system/framework!


    3. Cool list separator accorind theme color!

    Screens:
    Screenshot_2014_08_18_15_26_37.png
    Screenshot_2014_08_18_12_53_47.png
    list_separators.jpg


    Tutorial:

    1. Recompile your framework-res

    2. Create new list_separator_background.xml file in /res/drawable

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <shape
      xmlns:android="http://schemas.android.com/apk/res/android">
        <solid android:color="@com.sonyericsson.uxp:color/semc_theme_accent_color" />
        <corners android:topRightRadius="8.0px" android:bottomRightRadius="8.0px" />
        <padding android:left="4.0dip" android:top="2.0dip" android:right="4.0dip" android:bottom="2.0dip" />
    </shape>

    3. Now go to styles.xml and find this

    Code:
    @drawable/dark_header_dither

    and replace it with this:

    Code:
    @drawable/list_separator_background

    find this:
    Code:
    @drawable/light_header_dither

    and replace it with this:
    Code:
    @drawable/list_separator_background

    find this style
    Code:
    <style name="Widget.Holo.TextView.ListSeparator" parent="@style/Widget.TextView.ListSeparator">

    under this style find this
    Code:
    <item name="background">

    and replace it with
    Code:
    @drawable/list_separator_background
    like this:
    list_separator.png


    do the same with this style
    Code:
    <style name="Widget.Holo.Light.TextView.ListSeparator" parent="@style/Widget.TextView.ListSeparator">

    4. Recompile, sign and push to /framework



    4. Text fields according theme color and search box

    Screens:
    text_field_2.jpg
    text_fields.jpg



    Tutorial:

    1. Decompile your framework-res

    2. Download this files Text fields and paste it

    3. Open styles.xml and find this style:


    a)

    Code:
    <style name="Theme.Holo.Light" parent="@style/Theme.Light">

    under this style find
    Code:
    <item name="editTextColor
    and
    Code:
    <item name="editTextBackground">

    Replace it to look like this:
    edit_text_light.png


    Code:
    <item name="editTextColor">@color/semc_edittext_color_dark</item>
    <item name="editTextBackground">@drawable/semc_edit_text_holo_light</item>


    b)

    Now, under this style:
    Code:
    <style name="Theme.Holo" parent="@style/Theme">

    find this:

    Code:
    <item name="editTextColor
    Code:
    <item name="editTextBackground">

    and edit to look like this:
    tekst_field_dark.png


    Code:
    <item name="editTextColor">@color/semc_edittext_color_dark</item>
    <item name="editTextBackground">@drawable/semc_edit_text_holo_dark</item>

    4. Now find this line
    Code:
    <item name="searchViewTextField">
    and edit to look like this:

    in Theme.Holo
    Code:
     <item name="searchViewTextField">@drawable/semc_textfield_searchview_holo_dark</item>

    in Theme.Holo.Light
    Code:
    <item name="searchViewTextField">@drawable/semc_textfield_searchview_holo_dark</item>

    5. Save, recompile, sign and push to framework!




    5. How to port switchers accorind theme color

    Screens:
    switch.jpg
    switch_dark.jpg


    Tutorial:

    1. Decompile your framework-res

    2. Download switch.rar (see attachment) and paste it

    3. Now go to /res/values/strings.xml and add this string to end of the file
    Code:
    <string name="capital_on_blind" />
    <string name="capital_off_blind" />
    save & exit

    4.1 Open styles.xml and find this style:

    Code:
    <style name="Widget.Holo.Light.CompoundButton.Switch" parent="@style/Widget.CompoundButton.Switch">

    edit this style to look like this:
    Code:
    <style name="Widget.Holo.Light.CompoundButton.Switch" parent="@style/Widget.CompoundButton.Switch">
            <item name="textOn">@string/capital_on_blind</item>
            <item name="textOff">@string/capital_off_blind</item>
            <item name="thumb">@drawable/switch_inner_holo_light</item>
            <item name="switchTextAppearance">@style/TextAppearance.Holo.Widget.Switch</item>
            <item name="track">@drawable/switch_track_holo_light</item>
            <item name="switchMinWidth">70.0dip</item>
            <item name="switchPadding">8.0dip</item>
            <item name="thumbTextPadding">12.0dip</item>
        </style>

    4.2 Now find this style
    Code:
    <style name="Widget.Holo.CompoundButton.Switch" parent="@style/Widget.Holo.CompoundButton">

    end edit to look like this:
    Code:
    <style name="Widget.Holo.CompoundButton.Switch" parent="@style/Widget.Holo.CompoundButton">
            <item name="textOn">@string/capital_on_blind</item>
            <item name="textOff">@string/capital_off_blind</item>
            <item name="thumb">@drawable/switch_inner_holo_dark</item>
            <item name="switchTextAppearance">@style/TextAppearance.Holo.Widget.Switch</item>
            <item name="track">@drawable/switch_track_holo_light</item>
            <item name="switchMinWidth">70.0dip</item>
            <item name="switchPadding">8.0dip</item>
            <item name="thumbTextPadding">12.0dip</item>
        </style>

    5. Save, recompile, sign and push to framework!



    Its my first tutorial,
    Hit thanks If you like it!
    7
    To do:

    •How to port search box and text fields according theme color, Added
    •How to port switchers accorind theme color, Added
    •How to port btn_toggle, day &number picker according theme color
    • and more...
    2
    Congrats!!

    Really useful and well written!!
    2