[GUIDE] Statusbar Weather Text

July 07, 2017
Kali ini saya akan membagikan guide untuk menampilkan text cuaca di statusbar.

Screenshot:
weather

weather

weather

weather

weather


Feature:
  • Weather Text Style (Hidden, w/Scale, wo/Scale)
  • Weather Text Placement (left/right)
  • Weather Text color with Custom color/Rainbow/Animated Rainbow
  • Weather Text size
  • Weather Text font style
  • Weather icon coloring
  • Weather icon Placement
  • Condition icon style (Monochrome/Colored/VCloud)


Requirement:
  • Mengerti compile/decompile APK
  • APKTool
  • Notepad++ (PC)

Bahan:
  1. Guide Statusbar Weather Text.zip
  2. ZenControl.apk
  3. LockClock.apk

How:
Part AsusSystemUI:
1. Decompile AsusSystemUI.apk
2. Letakkan smali yg dari guide ke tempat masing".. Overwrite aja smali yg dh ada..
3. Buka res/layout/statusbar.xml
   Cari: <com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
   Tambahkan diatasnya:
  
    <com.bamzzz.WeatherTextLeft android:id="@id/weather_text_left" android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingEnd="3.0dip" android:singleLine="true" />

   Cari: <include layout="@layout/system_icons" />
   Tambahkan dibawahnya:
   
    <com.bamzzz.WeatherText android:id="@id/weather_text" android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingStart="3.0dip" android:paddingEnd="3.0dip" android:singleLine="true" />

4. Buka res/values/ids.xml
   Tambahkan:
    <item type="id" name="weather_text">false</item>
    <item type="id" name="weather_text_left">false</item>
   
5. Recompile UI nya, jgn lupa di Sign dan zipalign biar enteng
6. Selesai.. siap di push UI nya

Part ZenControl:
1. Decompile ZenControl

2. Buka dan tambahkan script dibawah ini di /res/xml/ui_prefs.xml

    <PreferenceScreen android:title="@string/status_bar_weather_title"
        android:summary="@string/status_bar_weather_summary">
        <PreferenceCategory android:title="@string/status_bar_weather_title" />
        <com.wubydax.romcontrol.prefs.MyListPreference
            android:defaultValue="0"
            android:key="status_bar_temperature"
            android:title="@string/status_bar_weather_title"
            android:dialogTitle="@string/status_bar_weather_title"
            android:entries="@array/status_bar_weather_entries"
            android:entryValues="@array/status_bar_weather_values" />
        <com.wubydax.romcontrol.prefs.MyListPreference
            android:defaultValue="1"
            android:key="status_bar_temperature_style"
            android:title="@string/status_bar_weather_location_title"
            android:dialogTitle="@string/status_bar_weather_location_title"
            android:entries="@array/status_bar_weather_location_entries"
            android:entryValues="@array/status_bar_weather_location_values" />
        <com.wubydax.romcontrol.prefs.MyListPreference
            android:defaultValue="1"
            android:key="status_bar_weather_rainbow_color"
            android:title="@string/status_bar_weather_color_title"
            android:entries="@array/status_bar_weather_rainbow_color_entries"
            android:entryValues="@array/status_bar_weather_rainbow_color_values" />
        <com.wubydax.romcontrol.prefs.ColorPickerPreference
            android:title="@string/status_bar_weather_custom_color"
            android:key="status_bar_weather_color"
            android:defaultValue="\#ffffffff"
            alphaSlider="true" />
        <com.wubydax.romcontrol.prefs.MyListPreference
            android:defaultValue="0"
            android:key="status_bar_weather_icon"
            android:title="@string/status_bar_weather_icon_title"
            android:entries="@array/status_bar_weather_icon_entries"
            android:entryValues="@array/status_bar_weather_icon_values" />
        <com.wubydax.romcontrol.prefs.MyListPreference
            android:defaultValue="1"
            android:key="status_bar_weather_condition_icon"
            android:title="@string/status_bar_weather_condition_icon_title"
            android:dialogTitle="@string/status_bar_weather_condition_icon_dlg_title"
            android:entries="@array/status_bar_weather_condition_icon_entries"
            android:entryValues="@array/status_bar_weather_condition_icon_values" />
        <SwitchPreference
            android:defaultValue="false"
            android:key="status_bar_weather_colorize_all_icons"
            android:title="@string/status_bar_weather_colorize_all_icons_title"
            android:summary="@string/status_bar_weather_colorize_all_icons_summary" />
        <com.wubydax.romcontrol.prefs.ColorPickerPreference
            android:title="@string/status_bar_weather_icon_color_title"
            android:key="status_bar_weather_icon_color"
            android:defaultValue="\#ffffffff"
            alphaSlider="true" />
        <com.wubydax.romcontrol.prefs.MyListPreference
            android:defaultValue="0"
            android:key="status_bar_weather_font_style"
            android:entries="@array/status_bar_weather_font_style_entries"
            android:entryValues="@array/status_bar_weather_font_style_values"
            android:title="@string/status_bar_weather_font_style_title" />
        <com.wubydax.romcontrol.prefs.SeekBarPreference
            android:icon="@null"
            android:key="status_bar_weather_size"
            android:title="@string/status_bar_weather_size_title"
            android:max="23"
            min="4"
            android:defaultValue="14"
            unitsRight="dp" />
        <PreferenceScreen
            android:summary="@string/status_bar_open_weather_settings_summary"
            android:title="@string/status_bar_open_weather_settings_title">
            <intent
                android:targetClass="com.cyanogenmod.lockclock.preference.Preferences"
                android:targetPackage="com.cyanogenmod.lockclock" />
        </PreferenceScreen>
    </PreferenceScreen>

3. Buka dan tambahkan script dibawah ini di res/values/strings.xml

    <string name="status_bar_weather_title">Weather Text</string>
    <string name="status_bar_weather_summary">Enable various weather text options in statusbar</string>
    <string name="status_bar_weather_hidden">Hidden</string>
    <string name="status_bar_weather_show_scale">Shown with scale</string>
    <string name="status_bar_weather_hide_scale">Shown without scale</string>
    <string name="status_bar_weather_location_title">Placement</string>
    <string name="status_bar_weather_location_summary">Select where the weather temperature is shown on the statusbar</string>
    <string name="status_bar_weather_location_right">Show on right</string>
    <string name="status_bar_weather_location_left">Show on left</string>
    <string name="status_bar_weather_color_title">Temperature color</string>
    <string name="status_bar_weather_size_title">Font size</string>
    <string name="status_bar_weather_font_style_title">Font style</string>
    <string name="status_bar_weather_icon_title">Weather Icon</string>
    <string name="status_bar_weather_icon_color_title">Weather Icon Color</string>
    <string name="status_bar_weather_condition_icon_title">Condition icon</string>
    <string name="status_bar_weather_condition_icon_dlg_title">Coose an icon for displaying the weather condition</string>
    <string name="status_bar_weather_condition_icon_monochrome_title">Monochrome</string>
    <string name="status_bar_weather_condition_icon_colored_title">Colored</string>
    <string name="status_bar_weather_condition_icon_vclouds_title">VClouds</string>
    <string name="status_bar_weather_colorize_all_icons_title">Colorize all icons</string>
    <string name="status_bar_weather_colorize_all_icons_summary">Enable to colorize all icons, disable to colorize only the monochrome icons</string>
    <string name="status_bar_weather_custom_color">Custom Color</string>
    <string name="status_bar_weather_rainbow_color">Rainbow</string>
    <string name="status_bar_weather_anim_rainbow_color">Animated Rainbow</string>
    <string name="status_bar_open_weather_settings_title">Weather settings</string>
    <string name="status_bar_open_weather_settings_summary">Open cyanogen widget preference</string>
    <string name="status_bar_weather_font_normal">Normal</string>
    <string name="status_bar_weather_font_italic">Italic</string>
    <string name="status_bar_weather_font_bold">Bold</string>
    <string name="status_bar_weather_font_bold_italic">Bold Italic</string>
    <string name="status_bar_weather_font_light">Light</string>
    <string name="status_bar_weather_font_light_italic">Light Italic</string>
    <string name="status_bar_weather_font_thin">Thin</string>
    <string name="status_bar_weather_font_thin_italic">Thin Italic</string>
    <string name="status_bar_weather_font_condensed">Condensed</string>
    <string name="status_bar_weather_font_condensed_italic">Condensed Italic</string>
    <string name="status_bar_weather_font_condensed_light">Condensed Light</string>
    <string name="status_bar_weather_font_condensed_light_italic">Condensed Light Italic</string>
    <string name="status_bar_weather_font_condensed_bold">Condensed Bold</string>
    <string name="status_bar_weather_font_condensed_bold_italic">Condensed Bold Italic</string>
    <string name="status_bar_weather_font_medium">Medium</string>
    <string name="status_bar_weather_font_medium_italic">Medium Italic</string>
    <string name="status_bar_weather_font_black">Black</string>
    <string name="status_bar_weather_font_black_italic">Black Italic</string>

4. Buka dan tambahkan script dibawah ini di res/values/arrays.xml

    <string-array name="status_bar_weather_entries" translatable="false">
        <item>@string/status_bar_weather_hidden</item>
        <item>@string/status_bar_weather_show_scale</item>
        <item>@string/status_bar_weather_hide_scale</item>
    </string-array>
    <string-array name="status_bar_weather_values" translatable="false">
        <item>0</item>
        <item>1</item>
        <item>2</item>
    </string-array>
    <string-array name="status_bar_weather_location_entries" translatable="false">
        <item>@string/status_bar_weather_location_right</item>
        <item>@string/status_bar_weather_location_left</item>
    </string-array>
    <string-array name="status_bar_weather_location_values" translatable="false">
        <item>0</item>
        <item>1</item>
    </string-array>
    <string-array name="status_bar_weather_condition_icon_entries">
        <item>@string/status_bar_weather_condition_icon_monochrome_title</item>
        <item>@string/status_bar_weather_condition_icon_colored_title</item>
        <item>@string/status_bar_weather_condition_icon_vclouds_title</item>
    </string-array>
    <string-array name="status_bar_weather_condition_icon_values" translatable="false">
        <item>0</item>
        <item>1</item>
        <item>2</item>
    </string-array>
    <string-array name="status_bar_weather_font_style_entries">
        <item>@string/status_bar_weather_font_normal</item>
        <item>@string/status_bar_weather_font_italic</item>
        <item>@string/status_bar_weather_font_bold</item>
        <item>@string/status_bar_weather_font_bold_italic</item>
        <item>@string/status_bar_weather_font_light</item>
        <item>@string/status_bar_weather_font_light_italic</item>
        <item>@string/status_bar_weather_font_thin</item>
        <item>@string/status_bar_weather_font_thin_italic</item>
        <item>@string/status_bar_weather_font_condensed</item>
        <item>@string/status_bar_weather_font_condensed_italic</item>
        <item>@string/status_bar_weather_font_condensed_light</item>
        <item>@string/status_bar_weather_font_condensed_light_italic</item>
        <item>@string/status_bar_weather_font_condensed_bold</item>
        <item>@string/status_bar_weather_font_condensed_bold_italic</item>
        <item>@string/status_bar_weather_font_medium</item>
        <item>@string/status_bar_weather_font_medium_italic</item>
        <item>@string/status_bar_weather_font_black</item>
        <item>@string/status_bar_weather_font_black_italic</item>
    </string-array>
    <string-array name="status_bar_weather_font_style_values" translatable="false">
        <item>0</item>
        <item>1</item>
        <item>2</item>
        <item>3</item>
        <item>4</item>
        <item>5</item>
        <item>6</item>
        <item>7</item>
        <item>8</item>
        <item>9</item>
        <item>10</item>
        <item>11</item>
        <item>12</item>
        <item>13</item>
        <item>14</item>
        <item>15</item>
        <item>16</item>
        <item>17</item>
    </string-array>
    <string-array name="status_bar_weather_rainbow_color_entries" translatable="false">
        <item>@string/status_bar_weather_custom_color</item>
        <item>@string/status_bar_weather_rainbow_color</item>
        <item>@string/status_bar_weather_anim_rainbow_color</item>
    </string-array>
    <string-array name="status_bar_weather_rainbow_color_values" translatable="false">
        <item>0</item>
        <item>1</item>
        <item>2</item>
    </string-array>
    <string-array name="status_bar_weather_icon_entries" translatable="false">
        <item>@string/status_bar_weather_hidden</item>
        <item>@string/right</item>
        <item>@string/left</item>
    </string-array>
    <string-array name="status_bar_weather_icon_values" translatable="false">
        <item>0</item>
        <item>1</item>
        <item>2</item>
    </string-array>

5. Recompile ZenControl..

6. Install ZenControl seperti apk normal
   Copy LockClock.apk ke /system/priv-app/LockClock/

7. Selesai

Bugs: Rainbow text color masih ngawur.

Kurang dan lebihnya ane minta maaf.. semoga sukses.. Keep oprek.. Salam Bootloop ^_^

MyThread: XDA
========================================================================

Created by bamzzz@xda
fb.me/bamz4ever

ZenControl by Wuby986@xda & daxgirl@xda

CyanogenMOD Developers Team

========================================================================

Artikel Terkait

Previous
Next Post »

2 comments

Write comments

Silahkan tinggalkan komentar EmoticonEmoticon