[GUIDE] [TUT] Toast Animation - Android

GUIDE Toast Animation (Suppport Show-Hide Toast Icon)
Work and Tested - CM 12.1 & LP Based
​
1. Decompile framework-res
copy and paste ingredients into place
framework-res.apk\res\values
styles.xml
add the following lines
<style name="Animation.Toast.Fade" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/fade_in</item>
<item name="windowExitAnimation">@anim/fade_out</item>
</style>
<style name="Animation.Toast.SlideRight" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/slide_in_right</item>
<item name="windowExitAnimation">@anim/slide_out_right</item>
</style>
<style name="Animation.Toast.SlideLeft" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/slide_in_left</item>
<item name="windowExitAnimation">@anim/slide_out_left</item>
</style>
<style name="Animation.Toast.Xylon" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/xylon_toast_enter</item>
<item name="windowExitAnimation">@anim/xylon_toast_exit</item>
</style>
<style name="Animation.Toast.Toko" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/toko_toast_enter</item>
<item name="windowExitAnimation">@anim/toko_toast_exit</item>
</style>
<style name="Animation.Toast.Tn" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/tn_toast_enter</item>
<item name="windowExitAnimation">@anim/tn_toast_exit</item>
</style>
<style name="Animation.Toast.Honami" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/honami_toast_enter</item>
<item name="windowExitAnimation">@anim/honami_toast_exit</item>
</style>
<style name="Animation.Toast.FastFade" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/fast_fade_in</item>
<item name="windowExitAnimation">@anim/fast_fade_out</item>
</style>
<style name="Animation.Toast.GrowFade" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/grow_fade_in</item>
<item name="windowExitAnimation">@anim/fast_fade_out</item>
</style>
<style name="Animation.Toast.GrowFadeCenter" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/grow_fade_in_center</item>
<item name="windowExitAnimation">@anim/fast_fade_out</item>
</style>
<style name="Animation.Toast.Translucent" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/translucent_enter</item>
<item name="windowExitAnimation">@anim/translucent_exit</item>
</style>
<style name="Animation.Toast.GrowFadeBottom" parent="@style/Animation.Toast">
<item name="windowEnterAnimation">@anim/grow_fade_in_from_bottom</item>
<item name="windowExitAnimation">@anim/fast_fade_out</item>
</style>
Click to expand...
Click to collapse
Recompile-Decompile again..
open public.xml, and leave it opened
2.Decompile framework.jar
Copy and paste Ingredients Into His place
Replace id below conform with public.xml framework-res.apk
framework.jar\smali_classes2\android\widget\Toast$TN.smali (15 hits)
Line 97 : const v1, 0x1030004 # type="style" name="Animation.Toast"
Line 301: const v8, 0x1020006 # type="id" name="icon"
Line 525: const v8, 0x1030004 # type="style" name="Animation.Toast"
Line 535: const v8, 0x10304c3 # type="style" name="Animation.Toast.Fade"
Line 545: const v8, 0x10304c4 # type="style" name="Animation.Toast.SlideRight"
Line 555: const v8, 0x10304c5 # type="style" name="Animation.Toast.SlideLeft"
Line 565: const v8, 0x10304c6 # type="style" name="Animation.Toast.Xylon"
Line 575: const v8, 0x10304c7 # type="style" name="Animation.Toast.Toko"
Line 585: const v8, 0x10304c8 # type="style" name="Animation.Toast.Tn"
Line 595: const v8, 0x10304c9 # type="style" name="Animation.Toast.Honami"
Line 605: const v8, 0x10304ca # type="style" name="Animation.Toast.FastFade"
Line 615: const v8, 0x10304cb # type="style" name="Animation.Toast.GrowFade"
Line 625: const v8, 0x10304cc # type="style" name="Animation.Toast.GrowFadeCenter"
Line 635: const v8, 0x10304ce # type="style" name="Animation.Toast.GrowFadeBottom"
Line 645: const v8, 0x10304cd # type="style" name="Animation.Toast.Translucent"
Click to expand...
Click to collapse
3.Decompile Settings.apk
Settings.apk\res\xml
copy and paste ingredients into place
Settings.apk\res\xml
display.xml
-Add Line
<PreferenceScreen android:id="@+id/animation_settings" android:title="@string/animation_settings" android:fragment="com.android.settings.rr.AnimationSettings" />
Click to expand...
Click to collapse
Settings.apk\res\values
strings.xml
add the following lines
<string name="misc_settings_title"><b>Miscellaneous</b></string>
<string name="animation_settings"><b>Animations</b></string>
<string name="toast_title"><b>Toast</b></string>
<string name="toast_icon_title">Toast icon</string>
<string name="toast_animation_title">Toast animations</string>
<string name="toast_animation_summary">Select and preview system toast animation</string>
<string name="toast_none_animation">None</string>
<string name="toast_default_animation">Default</string>
<string name="toast_fade_animation">Fade animation</string>
<string name="toast_SlideRight_animation">Slide right</string>
<string name="toast_SlideLeft_animation">Slide left</string>
<string name="toast_Xylon_animation">Xylon animation</string>
<string name="toast_Toko_animation">Toko animation</string>
<string name="toast_Tn_animation">Tn animation</string>
<string name="toast_Honami_animation">Honami animation</string>
<string name="toast_FastFade_animation">Fast fade</string>
<string name="toast_GrowFade_animation">Grow fade</string>
<string name="toast_GrowFadeCenter_animation">Grow fade center</string>
<string name="toast_GrowFadeBottom_animation">Grow fade bottom</string>
<string name="toast_Translucent_animation">Translucent animation</string>
<string name="animation_settings_title">Animations</string>
Click to expand...
Click to collapse
Settings.apk\res\values
arrays.xml
add the following lines
<string-array name="toast_animation_entries">
<item>@string/toast_none_animation</item>
<item>@string/toast_default_animation</item>
<item>@string/toast_fade_animation</item>
<item>@string/toast_SlideRight_animation</item>
<item>@string/toast_SlideLeft_animation</item>
<item>@string/toast_Xylon_animation</item>
<item>@string/toast_Toko_animation</item>
<item>@string/toast_Tn_animation</item>
<item>@string/toast_Honami_animation</item>
<item>@string/toast_FastFade_animation</item>
<item>@string/toast_GrowFade_animation</item>
<item>@string/toast_GrowFadeCenter_animation</item>
<item>@string/toast_GrowFadeBottom_animation</item>
<item>@string/toast_Translucent_animation</item>
</string-array>
<string-array name="toast_animation_values">
<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>
</string-array>
Click to expand...
Click to collapse
Settings.apk\smali\com\android\settings
SettingsPreferenceFragment.smali
PHP:
-copy and paste the line below
.field protected mContext:Landroid/content/Context;
-right below
.field private mContentResolver:Landroid/content/ContentResolver;
--------------------------------------------------------------------------
-copy and paste this line
.line 93
invoke-virtual {p0}, Lcom/android/settings/SettingsPreferenceFragment;->getActivity()Landroid/app/Activity;
move-result-object v1
invoke-virtual {v1}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;
move-result-object v1
iput-object v1, p0, Lcom/android/settings/SettingsPreferenceFragment;->mContext:Landroid/content/Context;
.line 94
invoke-virtual {p0}, Lcom/android/settings/SettingsPreferenceFragment;->getActivity()Landroid/app/Activity;
move-result-object v2
invoke-virtual {v2}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;
move-result-object v2
iput-object v2, p0, Lcom/android/settings/SettingsPreferenceFragment;->mContext:Landroid/content/Context;
-right below
invoke-super {p0, p1}, Landroid/preference/PreferenceFragment;->onCreate(Landroid/os/Bundle;)V
Recompile
Decompile
Settings.apk\smali\com\android\settings\rr
AnimationSettings.smali
Replace id below conform with public.xml
const v1, 0x7f06006c public type="xml" name="rr_animation_settings" id="
Click to expand...
Click to collapse
Recompile.
Files and Compare Press Me​

Thanks bro, and good job !!
Enviado desde mi Lenovo K50-t5 mediante Tapatalk

Related

[GUIDE][GB] Status bar and notification panel color changer | owner pic mod

Long story short. I decided to port some of my mods to a stock status bar .I tried to make the process relatively easy. So it shouldn't be too much of a problem trying.
Status bar and notification panel color changer
Step 1
Decompile your systemui.apk. Extract the attached zip file. Copy the contents into the smali folder.
Step 2
Open res/layout/status_bar.xml.
Find the first line
Code:
<com.android.systemui.statusbar.StatusBarView android:orientation="vertical" android:background="#ff000000" android:focusable="true" android:descendantFocusability="afterDescendants"
Change it to
Code:
<com.android.systemui.statusbar.StatusBarView android:orientation="vertical" android:background="#00000000" android:focusable="true" android:descendantFocusability="afterDescendants"
We just changed the background color to transparent in the above step
After the first line paste this
Code:
<com.b16h22.statusbar.StatusBar android:id="@id/status_bar" android:layout_width="fill_parent" android:layout_height="fill_parent" />
Now save this file
Step 3
Open res/layout/status_bar_tracking.xml
Find this code just below first line
Code:
<View android:background="#ff8e979f" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" />
Change it to this
Code:
<com.b16h22.statusbar.Pulldown android:id="@id/view" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" />
Now save this file
Step 4
Open res/values/ids.xml and add these at the end
Code:
<item type="id" name="status_bar">false</item>
<item type="id" name="view">false</item>
Save the file and compile systemui.apk.
Step 5
Now decompile the systemui again
Open public.xml and find these
Code:
<public type="id" name="status_bar" id="[COLOR="DeepSkyBlue"]0x7f090028[/COLOR]" />
<public type="id" name="view" id="[COLOR="Red"]0x7f090029[/COLOR]" />
Open smali/com/b16h22/statusbar/StatusBar.smali
Find
Code:
const v2, [COLOR="DeepSkyBlue"]0x7f090026[/COLOR]
Change it to the id in blue in public.xml
Code:
const v2, [COLOR="DeepSkyBlue"]0x7f090028[/COLOR]
Now open smali/com/b16h22/statusbar/Pulldown.smali
Find
Code:
const v2, [COLOR="Red"]0x7f090027[/COLOR]
Change it to the id in red in public.xml
Code:
const v2, [COLOR="Red"]0x7f090029[/COLOR]
Now re-compile systemui again and push it to phone. Use StatusBarMods.apk from the attachment to change the color.
Click to expand...
Click to collapse
Status bar owner picture
This mod is a little complicated.But if you follow the steps well enough,it's going to be fairly easy.Think twice before asking a doubt.
We are adding owner picture functionality to status bar like android 4.2 and integrate the photo picker to the settings.apk. So let's start with integrating photo picker to settings.I wrote a few classes for this.Extract the "Owner_mod_files_settings.zip" and get the smali files and resource files from it.
Step 1
Get these files from the extracted zip
Code:
res/layout/profile_info.xml
res/drawable/done.xml
res/drawable/pick_profile_picture.xml
res/drawable-ldpi/done_normal.png
res/drawable-ldpi/done_pressed.png
res/drawable-ldpi/ic_qs_default_user.png
res/drawable-ldpi/ic_settings_owner.png
res/drawable-ldpi/pick_profile_normal.png
res/drawable-ldpi/pick_profile_pressed.png
Decompile settings.apk and put the above files in respective folders
Step 2
Get these smali files from the extracted zip and place it in the smali/ folder of decompiled apk
Code:
smali/com/b16h22/Profile.smali
smali/com/b16h22/Profile$1.smali
smali/com/b16h22/Profile$2.smali
Step 3
Now open the ids.xml and add these ids in it
Code:
<item type="id" name="image">false</item>
<item type="id" name="owner">false</item>
<item type="id" name="linear_layout">false</item>
<item type="id" name="profile_pic">false</item>
<item type="id" name="layout1">false</item>
<item type="id" name="change_picture_text">false</item>
<item type="id" name="photo_picker">false</item>
<item type="id" name="linear_layout1">false</item>
<item type="id" name="layout2">false</item>
<item type="id" name="name_field">false</item>
<item type="id" name="name_edit">false</item>
Open strings.xml and add these strings
Code:
<string name="change_pic">Change profile picture</string>
<string name="profile_pic">SET PROFILE PICTURE</string>
<string name="profile_name">CHANGE PROFILE NAME</string>
Step 4
Now recompile the apk and decompile it again. Now open the public.xml and find these ids.These may not be the same in your apk. It may differ.I have color coded them to make it easier to distinguish in the upcoming steps
Code:
<public type="layout" name="profile_info" id="[COLOR="Blue"]0x7f03005a[/COLOR]" />
<public type="drawable" name="ic_qs_default_user" id="[COLOR="Indigo"]0x7f0200b2[/COLOR]" />
<public type="id" name="image" id="[COLOR="Magenta"]0x7f0b011b[/COLOR]" />
<public type="id" name="owner" id="[COLOR="Orange"]0x7f0b011c[/COLOR]" />
<public type="id" name="photo_picker" id="[COLOR="DarkOrchid"]0x7f0b0121[/COLOR]" />
<public type="id" name="name_field" id="[COLOR="YellowGreen"]0x7f0b0124[/COLOR]" />
<public type="id" name="name_edit" id="[COLOR="SeaGreen"]0x7f0b0125[/COLOR]" />
Now open smali/com/b16h22/Profile.smali and find the method
Code:
.method protected onCreate(Landroid/os/Bundle;)V
And replace the ids in it with the ones from public.xml
Code:
.method protected onCreate(Landroid/os/Bundle;)V
.locals 4
.parameter "savedInstanceState"
.prologue
.line 27
invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V
.line 28
const v2, [COLOR="blue"]0x7f03005a[/COLOR] # profile_info
invoke-virtual {p0, v2}, Lcom/b16h22/Profile;->setContentView(I)V
.line 30
const v2, [COLOR="DarkOrchid"]0x7f0b0121[/COLOR] #photo_picker
invoke-virtual {p0, v2}, Lcom/b16h22/Profile;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/ImageView;
.line 31
.local v0, photo:Landroid/widget/ImageView;
const v2, [COLOR="Orange"]0x7f0b011c[/COLOR] # owner
invoke-virtual {p0, v2}, Lcom/b16h22/Profile;->findViewById(I)Landroid/view/View;
move-result-object v2
check-cast v2, Landroid/widget/TextView;
iput-object v2, p0, Lcom/b16h22/Profile;->owner:Landroid/widget/TextView;
.line 32
const v2, [COLOR="YellowGreen"]0x7f0b0124[/COLOR] # name_field
invoke-virtual {p0, v2}, Lcom/b16h22/Profile;->findViewById(I)Landroid/view/View;
move-result-object v2
check-cast v2, Landroid/widget/EditText;
iput-object v2, p0, Lcom/b16h22/Profile;->name:Landroid/widget/EditText;
.line 33
const v2, [COLOR="SeaGreen"]0x7f0b0125[/COLOR] # name_edit
invoke-virtual {p0, v2}, Lcom/b16h22/Profile;->findViewById(I)Landroid/view/View;
move-result-object v2
check-cast v2, Landroid/widget/ImageView;
iput-object v2, p0, Lcom/b16h22/Profile;->done:Landroid/widget/ImageView;
.line 34
const v2, [COLOR="Magenta"]0x7f0b011b[/COLOR] # image
invoke-virtual {p0, v2}, Lcom/b16h22/Profile;->findViewById(I)Landroid/view/View;
move-result-object v2
check-cast v2, Landroid/widget/ImageView;
iput-object v2, p0, Lcom/b16h22/Profile;->imageView:Landroid/widget/ImageView;
.line 37
const-string v2, "EvoPrefsFile"
const/4 v3, 0x0
invoke-virtual {p0, v2, v3}, Lcom/b16h22/Profile;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v1
.line 38
.local v1, sharedPreferences:Landroid/content/SharedPreferences;
const-string v2, "profileName"
const-string v3, "null"
invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v2
iput-object v2, p0, Lcom/b16h22/Profile;->profName:Ljava/lang/String;
.line 39
iget-object v2, p0, Lcom/b16h22/Profile;->profName:Ljava/lang/String;
const-string v3, "null"
if-ne v2, v3, :cond_0
.line 40
iget-object v2, p0, Lcom/b16h22/Profile;->owner:Landroid/widget/TextView;
const-string v3, "Owner"
invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 46
:goto_0
const-string v2, "profilePic"
const-string v3, "null"
invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v2
iput-object v2, p0, Lcom/b16h22/Profile;->imageUri:Ljava/lang/String;
.line 47
iget-object v2, p0, Lcom/b16h22/Profile;->imageUri:Ljava/lang/String;
const-string v3, "null"
if-ne v2, v3, :cond_1
.line 48
iget-object v2, p0, Lcom/b16h22/Profile;->imageView:Landroid/widget/ImageView;
const v3, [COLOR="Indigo"]0x7f0200b2[/COLOR] #ic_qs_default_user
invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setImageResource(I)V
.line 53
:goto_1
new-instance v2, Lcom/b16h22/Profile$1;
invoke-direct {v2, p0}, Lcom/b16h22/Profile$1;-><init>(Lcom/b16h22/Profile;)V
invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
.line 64
iget-object v2, p0, Lcom/b16h22/Profile;->done:Landroid/widget/ImageView;
new-instance v3, Lcom/b16h22/Profile$2;
invoke-direct {v3, p0}, Lcom/b16h22/Profile$2;-><init>(Lcom/b16h22/Profile;)V
invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
.line 80
return-void
.line 42
:cond_0
iget-object v2, p0, Lcom/b16h22/Profile;->owner:Landroid/widget/TextView;
iget-object v3, p0, Lcom/b16h22/Profile;->profName:Ljava/lang/String;
invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 43
iget-object v2, p0, Lcom/b16h22/Profile;->name:Landroid/widget/EditText;
iget-object v3, p0, Lcom/b16h22/Profile;->profName:Ljava/lang/String;
invoke-virtual {v2, v3}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V
goto :goto_0
.line 50
:cond_1
iget-object v2, p0, Lcom/b16h22/Profile;->imageView:Landroid/widget/ImageView;
iget-object v3, p0, Lcom/b16h22/Profile;->imageUri:Ljava/lang/String;
invoke-static {v3}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v3
invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setImageURI(Landroid/net/Uri;)V
goto :goto_1
.end method
Step 5
Now open the res/xml/settings.xml
and add this iconpreferencescreen.You can add it anywhere you want.I'm assuming you have basic knowledge about preference xmls.
Code:
<com.android.settings.IconPreferenceScreen android:title="Owner Profile" settings:icon="@drawable/ic_settings_owner">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.b16h22.Profile" />
</com.android.settings.IconPreferenceScreen>
EDIT:I forgot to write the step to assign new activity to the android manifest. Thanks to 3r41nl33n for remembering me
Open AndroidManifest.xml and add this
Code:
<activity android:label="@string/change_pic" android:name="com.b16h22.Profile">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
Now save files and compile the settings.apk and push it to system.You have to resign the apk and other system apks or disable signature verification. Now you will have somethng like this
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Now we can move on to modifying the systemui.apk.Decompile systemui.apk
Step 6
Open status_bar_expanded.xml and paste this where you want to put the owner image.
Code:
<LinearLayout android:layout_width="106.66699dip" android:layout_height="106.66699dip">
<com.b16h22.statusbar.ProfilePicture android:id="@id/profile" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="1.0px" android:layout_marginTop="1.0px" android:layout_marginRight="1.0px" android:layout_marginBottom="1.0px" android:scaleType="centerCrop" />
<com.b16h22.statusbar.ProfileName android:textStyle="normal" android:textColor="#ffffffff" android:gravity="center" android:layout_gravity="center_vertical" android:id="@id/profile_name" android:background="#cc000000" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="1.0px" android:layout_marginRight="1.0px" android:layout_marginBottom="1.0px" android:layout_alignParentBottom="true" />
</LinearLayout >
Now extract the "Owner_mod_files_systemui.zip" and put the smali folder in the systemui smali folder and the pngs in the drawable-ldpi folder.
Step 7
Open ids.xml and add these
Code:
<item type="id" name="profile">false</item>
<item type="id" name="profile_name">false</item>
Recompile the apk and decompile it again
Step 8
Open public.xml and note these ids
Code:
<public type="id" name="profile" id="0x7f09003a" />
<public type="id" name="profile_name" id="0x7f09003b" />
<public type="drawable" name="ic_qs_default_user" id="0x7f02012e" />
Step 9
Open smali/com/b16h22/statusbar/ProfilePicture.smali and find this
Code:
.line 21
const v4, 0x7f09003a
replace the id with the id of "profile"
find
Code:
const v5, 0x7f02012e
replace it with the id of drawable "ic_qs_default_user"
Open smali/com/b16h22/statusbar/ProfilePicture$2.smali
Find
Code:
const v2, 0x7f02012e
replace it with id of drawable "ic_qs_default_user"
Open smali/com/b16h22/statusbar/ProfileName.smali
find
Code:
.line 19
const v2, 0x7f09003b
replace it with the id of "profile_name"
Now recompile the apk and push to system. You should be able to change picture from the settings. Think twice before askin anything. Please point out the faults in the guide if there is any.
DOWNLOADS
owner_mod_files_systemui.zip
owner_mod_files_settings.zip
Click to expand...
Click to collapse
Anyone can use this mods but give credits where its due and keep the spirit of open source. Kanging is bad mmkay
Click to expand...
Click to collapse
Awesome guide,like your rom bro:thumbup:
GREEEEETZ WITH BEATZ!!!
awesome guide
i have problem to decompile ure systemui
haha
bt now i know where the secret
haha
i like ure rom brother
Awesome
Can you make one for the 3 layouts of statusbar too
And AOKP Toggles?
Excited
i wanna try bro ! good job :laugh:
Hey b16h22, dont make tuts for other stuff, ur rom will not be uniqe!
Sent from my GT-S5360 using xda app-developers app
m4RinKo2 said:
Hey b16h22, dont make tuts for other stuff, ur rom will not be uniqe!
Sent from my GT-S5360 using xda app-developers app
Click to expand...
Click to collapse
I guess so bro
Sent From With Connection
Visit My blog : Dvikzz.com
awesome
thanx bro. gonna hav it in our rom maybe..
Great guide. Gonna try to make my own sir.
thanks to your guide..
Sent from my GT-S5360 using xda premium
it didnt worked fr me..
b16h22 said:
Long story short. I decided to port some of my mods to a stock status bar .I tried to make the process relatively easy. So it shouldn't be too much of a problem trying.
​
Click to expand...
Click to collapse
i tried it. but it didnt worked fr me. i am attaching the systemui. can u please help me to point out what i did wrong? thanx in advance..
I m getting this error when recompiling back systemui
l0lh4rd said:
I m getting this error when recompiling back systemui
Click to expand...
Click to collapse
Check your status_bar.xml for error.One of the lines is not well formed.
Sent from my GT-S5360
Tks u sir ! i got it (^.,,.^)
Do you have free time ? Check your PM
markmellarpes said:
thanks to your guide..
View attachment 2076180
View attachment 2076181
Sent from my GT-S5360 using xda premium
Click to expand...
Click to collapse
Can you share your systemui.apk...nd icon pack you used....plsss
Hit
Button If This Post Helped You
awesome dude, I tried :fingers-crossed:
Good work Op, I am using your rom and its really great looking.. and the statusbar is fully customisable..
Edit: the mod is working great too.
Plz tell me the procedure to use the Moded StatusBarMods.apk on my stock rom.I'm new to this.. @admin
b16h22 said:
Long story short. I decided to port some of my mods to a stock status bar .I tried to make the process relatively easy. So it shouldn't be too much of a problem trying.
​
Click to expand...
Click to collapse
You are doing a very good job mate. Educating users how to modify and add tweaks for ROMS will prevent them from kanging your work and maybe they will come up with a different tweak with your guide. Keep it up. I always admire your work and thank you for believing in the spirit of open source

[Q&A] Guide L Panel For Samsung (Touchwiz)

Q&A for Guide L Panel For Samsung (Touchwiz)
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for Guide L Panel For Samsung (Touchwiz). If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
Unable To Find tw_status_bar_expanded.xml in layout Folder..
eboybasit said:
Items Required:-
Apktool 1.5.2 (MUST)
Notepad++
Attachment
Brain
Common sense
-Decompile SystemUI.apk
-Open systemui_src/res/layout
-Open gemini_status_bar_expanded.xml / tw_status_bar_expanded.xml {depends on your chipset}
Copy this and paste it in your expanded.
Code:
<include layout="@layout/eboybasit_ltoggles" />
Save it.
- Open res/values/colors.xml
● Copy the below given codes and paste it above </resources>
Code:
<color name="quickpanel_text_color_ing">#ff75899b</color>
<color name="quickpanel_text_color_off">#ff999fa4</color>
<color name="quickpanel_text_color_on">#ffffffff</color>
Save it.
After that Open string.xml
● Copy the below given codes and paste it above </resources>
Code:
<string name="quickpanel_data_text">Data</string>
<string name="quickpanel_sound_text">Sound</string>
<string name="quickpanel_vibrate_text">Vibration</string>
MERGE FILES OF ATTACHMENT IN YOUR SYSTEMUI
Recompile and decompile again...
Now its time for id replacement.Open public.xml and search the corresponding id and replace it in corresponding smali file as said below.
SystemUI\smali\com\mda\Ltoggle\GpsSettingButton.smali (6 hits)
Code:
Line 98: const v3, 0x7f090165<public type="id" name="quickpanel_gps_btn_icon"
Line 130: const v1, 0x7f020267<public type="drawable" name="quickpanel_icon_gps_on"
Line 133: const v4, 0x7f0a0010<public type="color" name="quickpanel_text_color_on"
Line 139: const v1, 0x7f020266<public type="drawable" name="quickpanel_icon_gps_off"
Line 142: const v4, 0x7f0a000f<public type="color" name="quickpanel_text_color_off"
Line 312: const v0, 0x7f0c011f<public type="string" name="quickpanel_gps_text"
SystemUI\smali\com\mda\Ltoggle\MobileDataSettingButton.smali (6 hits)
Code:
Line 142: const v3, 0x7f090166<public type="id" name="quickpanel_data_btn_icon"
Line 174: const v1, 0x7f020265<public type="drawable" name="quickpanel_icon_data_on"
Line 177: const v4, 0x7f0a0010<public type="color" name="quickpanel_text_color_on"
Line 183: const v1, 0x7f020264<public type="drawable" name="quickpanel_icon_data_off"
Line 186: const v4, 0x7f0a000f<public type="color" name="quickpanel_text_color_off"
Line 433: const v0, 0x7f0c01ba<public type="string" name="quickpanel_data_text"
SystemUI\smali\com\mda\Ltoggle\SoundSettingButton.smali (6 hits)
Code:
Line 127: const v3, 0x7f090169<public type="id" name="quickpanel_sound_btn_icon"
Line 159: const v1, 0x7f02026d<public type="drawable" name="quickpanel_icon_sound_on"
Line 162: const v4, 0x7f0a0010<public type="color" name="quickpanel_text_color_on"
Line 168: const v1, 0x7f02026c<public type="drawable" name="quickpanel_icon_sound_off"
Line 171: const v4, 0x7f0a000f<public type="color" name="quickpanel_text_color_off"
Line 478: const v0, 0x7f0c01bc<public type="string" name="quickpanel_sound_text"
SystemUI\smali\com\mda\Ltoggle\SyncSettingButton.smali (6 hits)
Code:
Line 103: const v3, 0x7f090167<public type="id" name="quickpanel_sync_btn_icon"
Line 135: const v1, 0x7f02026f<public type="drawable" name="quickpanel_icon_sync_on"
Line 138: const v4, 0x7f0a0010<public type="color" name="quickpanel_text_color_on"
Line 144: const v1, 0x7f02026e<public type="drawable" name="quickpanel_icon_sync_off"
Line 147: const v4, 0x7f0a000f<public type="color" name="quickpanel_text_color_off"
Line 315: const v0, 0x7f0c0129<public type="string" name="quickpanel_sync_text"
SystemUI\smali\com\mda\Ltoggle\VibrateSettingButton.smali (6 hits)
[/CODE]
Line 157: const v3, 0x7f09016a<public type="id" name="quickpanel_vibrate_btn_icon"
Line 189: const v1, 0x7f020271<public type="drawable" name="quickpanel_icon_vibrate_on"
Line 192: const v4, 0x7f0a0010<public type="color" name="quickpanel_text_color_on"
Line 198: const v1, 0x7f020270<public type="drawable" name="quickpanel_icon_vibrate_off"
Line 201: const v4, 0x7f0a000f<public type="color" name="quickpanel_text_color_off"
Line 330: const v0, 0x7f0c01bd<public type="string" name="quickpanel_vibrate_text"
[/CODE]
Save, recompile, sign it and push.
Credit And Thanks To:
- Allah Subhaana Wa Ta'alla
- Muhammad Sallal lahu alayhi wassallam
- MDA
- Om Rio Hutabarat (for vertical Toggles )
- Maaadr
- Hendry Zykes
- Eboy Basit
- You
Click to expand...
Click to collapse
plz help ..i m on touchwiz 4.2.2
Answer
Adesh123 said:
plz help ..i m on touchwiz 4.2.2
Click to expand...
Click to collapse
try to find gemini status bar expanded.xml
eboybasit said:
try to find gemini status bar expanded.xml
Click to expand...
Click to collapse
No...its Not...there !! see the attachment
Adesh123 said:
No...its Not...there !! see the attachment
Click to expand...
Click to collapse
System bar expanded.xml

[GUIDE] [TUT] Aokp Custom Animations

GUIDE AOKP CUSTOM ANIMATIONS
Work and Tested - CM 12.1 & LP Based
​
1. Decompile framework-res.apk
copy and paste ingredients into place
framework-res.apk\res\values
strings.xml
add the following lines
<string name="animation_fade">Fade</string>
<string name="animation_slide_right">Slide in right</string>
<string name="animation_slide_left">Slide in left</string>
<string name="animation_slide_right_no_fade">Slide in right (No fade)</string>
<string name="animation_slide_left_no_fade">Slide in left (No fade)</string>
<string name="animation_slide_up">Slide in bottom</string>
<string name="animation_slide_down">Slide in top</string>
<string name="animation_default">Default</string>
<string name="animation_translucent">Translucent</string>
<string name="animation_grow_shrink">Grow in (Top)</string>
<string name="animation_grow_shrink_center">Grow in (Center)</string>
<string name="animation_grow_shrink_bottom">Grow in (Bottom)</string>
<string name="animation_grow_shrink_left">Grow in (Left)</string>
<string name="animation_grow_shrink_right">Grow in (Right)</string>
<string name="action_null">Blank</string>
Click to expand...
Click to collapse
Recompile-Decompile again..
framework-res.apk\res\values
open public.xml, and leave it opened
2. Decompile framework.jar
copy and paste ingredients into place
framework.jar\smali\android\provider
Settings$System.smali
PHP:
-copy and paste the line below
.field public static final ACTIVITY_ANIMATION_CONTROLS:[Ljava/lang/String;
-right above
.field public static final ADB_ENABLED:Ljava/lang/String; = "adb_enabled"
-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-
-copy and paste the lines below
.field public static final ANIMATION_CONTROLS_DURATION:Ljava/lang/String; = "animation_controls_duration"
.field public static final ANIMATION_CONTROLS_EXIT_ONLY:Ljava/lang/String; = "animation_controls_exit_only"
.field public static final ANIMATION_CONTROLS_NO_OVERRIDE:Ljava/lang/String; = "animation_controls_no_override"
.field public static final ANIMATION_CONTROLS_REVERSE_EXIT:Ljava/lang/String; = "animation_controls_reverse_exit"
-right above
.field public static final ANIMATOR_DURATION_SCALE:Ljava/lang/String; = "animator_duration_scale"
-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-
-copy and paste the line below
.line 3994
const/16 v4, 0xb
new-array v4, v4, [Ljava/lang/String;
const-string v5, "activity_open"
aput-object v5, v4, v9
const-string v5, "activity_close"
aput-object v5, v4, v10
const-string v5, "task_open"
aput-object v5, v4, v11
const-string v5, "task_close"
aput-object v5, v4, v12
const-string v5, "task_to_front"
aput-object v5, v4, v13
const/4 v5, 0x5
const-string v6, "task_to_back"
aput-object v6, v4, v5
const/4 v5, 0x6
const-string v6, "wallpaper_open"
aput-object v6, v4, v5
const/4 v5, 0x7
const-string v6, "wallpaper_close"
aput-object v6, v4, v5
const/16 v5, 0x8
const-string v6, "wallpaper_intra_open"
aput-object v6, v4, v5
const/16 v5, 0x9
const-string v6, "wallpaper_intra_close"
aput-object v6, v4, v5
const/16 v5, 0xa
const-string v6, "task_open_behind"
aput-object v6, v4, v5
sput-object v4, Landroid/provider/Settings$System;->ACTIVITY_ANIMATION_CONTROLS:[Ljava/lang/String;
-right
sput-object v4, Landroid/provider/Settings$System;->DEFAULT_ALARM_ALERT_URI:Landroid/net/Uri;
Replace id below conform with public.xml framework-res.apk
framework.jar\smali_classes2\com\android\internal\util\aicp
AwesomeAnimationHelper.smali
Line 93 : const v1, 0x10a0088 * type="anim" name="slow_fade_out"
Line 98 : const v1, 0x10a0087 * type="anim" name="slow_fade_in"
Line 106: const v1, 0x10a0085 * type="anim" name="slide_out_right_ribbon"
Line 111: const v1, 0x10a007b * type="anim" name="slide_in_right_ribbon"
Line 119: const v1, 0x10a0082 * type="anim" name="slide_out_left_ribbon"
Line 124: const v1, 0x10a0077 * type="anim" name="slide_in_left_ribbon"
Line 132: const v1, 0x10a007f * type="anim" name="slide_out_down_ribbon"
Line 137: const v1, 0x10a007d * type="anim" name="slide_in_up_ribbon"
Line 145: const v1, 0x10a0086 * type="anim" name="slide_out_up"
Line 150: const v1, 0x10a0075 * type="anim" name="slide_in_down"
Line 158: const v1, 0x10a0084 * type="anim" name="slide_out_right_no_fade"
Line 163: const v1, 0x10a007a * type="anim" name="slide_in_right_no_fade"
Line 171: const v1, 0x10a0081 * type="anim" name="slide_out_left_no_fade"
Line 176: const v1, 0x10a0076 * type="anim" name="slide_in_left_no_fade"
Line 184: const v1, 0x10a009b * type="anim" name="translucent_exit_ribbon"
Line 189: const v1, 0x10a0098 * type="anim" name="translucent_enter_ribbon"
Line 197: const v1, 0x10a0072 * type="anim" name="shrink_fade_out_ribbon"
Line 202: const v1, 0x10a0026 * type="anim" name="grow_fade_in_ribbon"
Line 210: const v1, 0x10a006e * type="anim" name="shrink_fade_out_center_ribbon"
Line 215: const v1, 0x10a0022 * type="anim" name="grow_fade_in_center_ribbon"
Line 223: const v1, 0x10a0071 * type="anim" name="shrink_fade_out_left_ribbon"
Line 228: const v1, 0x10a0025 * type="anim" name="grow_fade_in_left_ribbon"
Line 236: const v1, 0x10a0073 * type="anim" name="shrink_fade_out_right_ribbon"
Line 241: const v1, 0x10a0027 * type="anim" name="grow_fade_in_right_ribbon"
Line 249: const v1, 0x10a0070 * type="anim" name="shrink_fade_out_from_bottom_ribbon"
Line 254: const v1, 0x10a0024 * type="anim" name="grow_fade_in_from_bottom_ribbon"
Line 475: const v2, 0x10407ce * type="string" name="action_null"
Line 487: const v2, 0x10407c7 * type="string" name="animation_default"
Line 498: const v2, 0x10407c0 * type="string" name="animation_fade"
Line 509: const v2, 0x10407c1 * type="string" name="animation_slide_right"
Line 520: const v2, 0x10407c3 * type="string" name="animation_slide_right_no_fade"
Line 531: const v2, 0x10407c2 * type="string" name="animation_slide_left"
Line 542: const v2, 0x10407c5 * type="string" name="animation_slide_up"
Line 553: const v2, 0x10407c6 * type="string" name="animation_slide_down"
Line 564: const v2, 0x10407c4 * type="string" name="animation_slide_left_no_fade"
Line 575: const v2, 0x10407c8 * type="string" name="animation_translucent"
Line 586: const v2, 0x10407cb * type="string" name="animation_grow_shrink_bottom"
Line 597: const v2, 0x10407ca * type="string" name="animation_grow_shrink_center"
Line 608: const v2, 0x10407cc * type="string" name="animation_grow_shrink_left"
Line 619: const v2, 0x10407cd * type="string" name="animation_grow_shrink_right"
Line 630: const v2, 0x10407c9 * type="string" name="animation_grow_shrink"
Line 668: const v3, 0x10a0071 * type="anim" name="shrink_fade_out_left_ribbon"
Line 670: const v1, 0x10a0070 * type="anim" name="shrink_fade_out_from_bottom_ribbon"
Line 672: const v2, 0x10a003b * type="anim" name="no_animation"
Line 707: const v1, 0x10a0087 * type="anim" name="slow_fade_in"
Line 715: const v1, 0x10a0088 * type="anim" name="slow_fade_out"
Line 723: const v1, 0x10a0082 * type="anim" name="slide_out_left_ribbon"
Line 729: const v1, 0x10a007b * type="anim" name="slide_in_right_ribbon"
Line 737: const v1, 0x10a0085 * type="anim" name="slide_out_right_ribbon"
Line 745: const v1, 0x10a0085 * type="anim" name="slide_out_right_ribbon"
Line 751: const v1, 0x10a0077 * type="anim" name="slide_in_left_ribbon"
Line 759: const v1, 0x10a0082 * type="anim" name="slide_out_left_ribbon"
Line 767: const v1, 0x10a0086 * type="anim" name="slide_out_up"
Line 773: const v1, 0x10a007d * type="anim" name="slide_in_up_ribbon"
Line 781: const v1, 0x10a007f * type="anim" name="slide_out_down_ribbon"
Line 789: const v1, 0x10a007f * type="anim" name="slide_out_down_ribbon"
Line 795: const v1, 0x10a0075 * type="anim" name="slide_in_down"
Line 803: const v1, 0x10a0086 * type="anim" name="slide_out_up"
Line 811: const v1, 0x10a0081 * type="anim" name="slide_out_left_no_fade"
Line 817: const v1, 0x10a007a * type="anim" name="slide_in_right_no_fade"
Line 825: const v1, 0x10a0084 * type="anim" name="slide_out_right_no_fade"
Line 833: const v1, 0x10a0084 * type="anim" name="slide_out_right_no_fade"
Line 839: const v1, 0x10a0076 * type="anim" name="slide_in_left_no_fade"
Line 847: const v1, 0x10a0081 * type="anim" name="slide_out_left_no_fade"
Line 855: const v1, 0x10a009a * type="anim" name="translucent_exit_left"
Line 861: const v1, 0x10a0098 * type="anim" name="translucent_enter_ribbon"
Line 869: const v1, 0x10a009b * type="anim" name="translucent_exit_ribbon"
Line 881: const v1, 0x10a0026 * type="anim" name="grow_fade_in_ribbon"
Line 889: const v1, 0x10a0072 * type="anim" name="shrink_fade_out_ribbon"
Line 903: const v1, 0x10a0022 * type="anim" name="grow_fade_in_center_ribbon"
Line 911: const v1, 0x10a006e * type="anim" name="shrink_fade_out_center_ribbon"
Line 919: const v1, 0x10a0073 * type="anim" name="shrink_fade_out_right_ribbon"
Line 925: const v1, 0x10a0025 * type="anim" name="grow_fade_in_left_ribbon"
Line 945: const v1, 0x10a0027 * type="anim" name="grow_fade_in_right_ribbon"
Line 953: const v3, 0x10a0073 * type="anim" name="shrink_fade_out_right_ribbon"
Line 961: const v1, 0x10a0072 * type="anim" name="shrink_fade_out_ribbon"
Line 967: const v1, 0x10a0024 * type="anim" name="grow_fade_in_from_bottom_ribbon"
Click to expand...
Click to collapse
Recompile..
3.Decompile services.jar
copy and paste ingredients into place
Replace id below conform with public.xml framework-res.apk
services.jar\smali\com\android\server\wm\
AppTransition.smali
Line 244 : const/high16 v1, 0x10e0000 * type="integer" name="config_shortAnimTime"
Line 253 : const v0, 0x10c0003 * type="interpolator" name="decelerate_cubic"
Line 262 : const v0, 0x10c000d * type="interpolator" name="fast_out_slow_in"
Line 3509: const v6, 0x10a009e * type="anim" name="voice_activity_open_enter"
Line 3528: const v6, 0x10a009f * type="anim" name="voice_activity_open_exit"
Line 3558: const v6, 0x10a009c * type="anim" name="voice_activity_close_enter"
Line 3574: const v6, 0x10a009d * type="anim" name="voice_activity_close_exit"
Click to expand...
Click to collapse
Recompile..
4.Settings.apk
Settings.apk\res\xml
copy and paste ingredients into place
-OPEN
display.xml
-Add Line
<PreferenceScreen android:title="@string/aokp_animation_title" android:key="aokp_animation" android:summary="@string/aokp_animation_summary" android:fragment="com.android.settings.aicp.AnimationControls" />
Click to expand...
Click to collapse
-OPEN
strings.xml
add the following lines
<string name="aokp_animation_title">System animations</string>
<string name="aokp_animation_summary">AOKP custom animation</string>
<string name="title_animation_no_override">Prevent App Overrides</string>
<string name="summary_animation_no_override">Prevent apps from overriding transitions.</string>
<string name="animation_exit_only_title">Enter only animation</string>
<string name="animation_reverse_exit_title">Reverse exit animation</string>
<string name="activity_open_title">Activity open animation</string>
<string name="activity_close_title">Activity close animation</string>
<string name="task_open_title">Task open animation</string>
<string name="task_close_title">Task close animation</string>
<string name="task_move_to_front_title">Move to front animation</string>
<string name="task_move_to_back_title">Move to back animation</string>
<string name="wallpaper_open_title">Wallpaper open animation</string>
<string name="wallpaper_close_title">Wallpaper close animation</string>
<string name="wallpaper_intra_open_title">Wallpaper intra open animation</string>
<string name="wallpaper_intra_close_title">Wallpaper intra close animation</string>
<string name="task_open_behind_title">Task open behind animation</string>
<string name="animation_duration_title">Animation duration</string>
<string name="animation_duration_default">Default</string>
Click to expand...
Click to collapse
ids.xml
add the following lines
<item type="id" name="monitor_box">false</item>
<item type="id" name="seek_bar">false</item>
Click to expand...
Click to collapse
GO TO
PHP:
Settings.apk\smali\com\android\settings
SettingsPreferenceFragment.smali
-copy and paste the line below
.field protected mContext:Landroid/content/Context;
-right below
.field private mContentResolver:Landroid/content/ContentResolver;
-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-
-copy and paste this line
.field protected mContentRes:Landroid/content/ContentResolver;
-right below
# instance fields
-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-
-copy and paste this lines
.method public setTitle(I)V
.locals 1
.param p1, "resId" # I
.prologue
.line 526
invoke-virtual {p0}, Lcom/android/settings/SettingsPreferenceFragment;->getActivity()Landroid/app/Activity;
move-result-object v0
invoke-virtual {v0, p1}, Landroid/app/Activity;->setTitle(I)V
.line 527
return-void
.end method
-right below
.method protected showDialog(I)V
-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-'-
-copy and paste this lines
.line 93
invoke-virtual {p0}, Lcom/android/settings/SettingsPreferenceFragment;->getActivity()Landroid/app/Activity;
move-result-object v1
invoke-virtual {v1}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;
move-result-object v1
iput-object v1, p0, Lcom/android/settings/SettingsPreferenceFragment;->mContext:Landroid/content/Context;
.line 95
invoke-virtual {p0}, Lcom/android/settings/SettingsPreferenceFragment;->getActivity()Landroid/app/Activity;
move-result-object v1
invoke-virtual {v1}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
iput-object v1, p0, Lcom/android/settings/SettingsPreferenceFragment;->mContentRes:Landroid/content/ContentResolver;
-right below
invoke-super {p0, p1}, Landroid/preference/PreferenceFragment;->onCreate(Landroid/os/Bundle;)V
Replace id below conform with public.xml
Settings.apk\smali\com\android\settings\aicp\AnimationControls.smali
Line 263: const v5, 0x7f090fb2 * type="string" name="aokp_animation_title"
Line 268: const v5, 0x7f060006 * type="xml" name="aicp_aokp_animation_controls"
Settings.apk\smali\com\android\settings\aicp\AnimBarPreference.smali
Line 80 : const v2, 0x7f040107 * type="layout" name="slider_preference"
Line 90 : const v1, 0x7f100260 * type="id" name="monitor_box"
Line 101: const v1, 0x7f100261 * type="id" name="seek_bar"
Line 223: const v2, 0x7f090fc0 * type="string" name="animation_duration_default"
Click to expand...
Click to collapse
Recompile.
Files and Compare Press Me​

[GUIDE] [TUT] GestureAnyWhere

GUIDE GestureAnyWhere
Work and Tested - CM 12.1 & LP Based
​
1. Decompile framework
copy and paste ingredients into place
Recompile.
2. Decompile SystemUI
copy and paste ingredients into place
Then go res/values/colors.xml.
<color name="gesture_overlay_background_fill_color">#80000000</color>
<color name="gesture_color">@android:color/holo_blue_light</color>
Click to expand...
Click to collapse
Then go res/values/id.xml
<item type="id" name="content">false</item>
<item type="id" name="gesture_overlay">false</item>
<item type="id" name="gesture_text">false</item>
<item type="id" name="cancel_gesturing">false</item>
Click to expand...
Click to collapse
Recompile-Decompile again..
Go to & open
smali/com/android/systemui/statusbar/BaseStatusBar.smali
PHP:
-copy and paste the line below
.field protected mGestureAnywhereView:Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;
.annotation runtime Landroid/annotation/ChaosLab;
classification = .enum Landroid/annotation/ChaosLab$Classification;->NEW_FIELD:Landroid/annotation/ChaosLab$Classification;
name = "GestureAnywhere"
.end annotation
.end field
-right below
.field private mFontScale:F
--------------------------------------------------------------------------
-copy and paste the line below
.method protected addGestureAnywhereView()V
.locals 3
.annotation runtime Landroid/annotation/ChaosLab;
classification = .enum Landroid/annotation/ChaosLab$Classification;->NEW_METHOD:Landroid/annotation/ChaosLab$Classification;
name = "GestureAnywhere"
.end annotation
.prologue
.line 2413
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mContext:Landroid/content/Context;
const v1, 0x7f040011
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v0
check-cast v0, Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;
iput-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mGestureAnywhereView:Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;
.line 2415
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mWindowManager:Landroid/view/WindowManager;
iget-object v1, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mGestureAnywhereView:Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;
const/4 v2, 0x3
invoke-virtual {p0, v2}, Lcom/android/systemui/statusbar/BaseStatusBar;->getGestureAnywhereViewLayoutParams(I)Landroid/view/WindowManager$LayoutParams;
move-result-object v2
invoke-interface {v0, v1, v2}, Landroid/view/WindowManager;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
.line 2416
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mGestureAnywhereView:Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;
invoke-virtual {v0, p0}, Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;->setStatusBar(Lcom/android/systemui/statusbar/BaseStatusBar;)V
.line 2417
return-void
.end method
-right below
# virtual methods
<Replace ID const v1, 0x7f040011 WITH --> type="layout" name="gesture_anywhere_overlay">
--------------------------------------------------------------------------
-copy and paste the line below
.method protected getGestureAnywhereViewLayoutParams(I)Landroid/view/WindowManager$LayoutParams;
.locals 6
.param p1, "gravity" # I
.annotation runtime Landroid/annotation/ChaosLab;
classification = .enum Landroid/annotation/ChaosLab$Classification;->NEW_METHOD:Landroid/annotation/ChaosLab$Classification;
name = "GestureAnywhere"
.end annotation
.prologue
.line 2427
new-instance v0, Landroid/view/WindowManager$LayoutParams;
const/4 v1, -0x2
const/4 v2, -0x1
const/16 v3, 0x7e1
const v4, 0x840068
const/4 v5, -0x3
invoke-direct/range {v0 .. v5}, Landroid/view/WindowManager$LayoutParams;-><init>(IIIII)V
.line 2438
.local v0, "lp":Landroid/view/WindowManager$LayoutParams;
iget v1, v0, Landroid/view/WindowManager$LayoutParams;->privateFlags:I
or-int/lit8 v1, v1, 0x40
iput v1, v0, Landroid/view/WindowManager$LayoutParams;->privateFlags:I
.line 2439
or-int/lit8 v1, p1, 0x30
iput v1, v0, Landroid/view/WindowManager$LayoutParams;->gravity:I
.line 2440
const-string v1, "GestureAnywhereView"
invoke-virtual {v0, v1}, Landroid/view/WindowManager$LayoutParams;->setTitle(Ljava/lang/CharSequence;)V
.line 2442
return-object v0
.end method
.method public getHandler()Landroid/os/Handler;
.locals 1
.prologue
.line 344
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mHandler:Lcom/android/systemui/statusbar/BaseStatusBar$H;
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mHandler:Lcom/android/systemui/statusbar/BaseStatusBar$H;
:goto_0
return-object v0
:cond_0
invoke-virtual {p0}, Lcom/android/systemui/statusbar/BaseStatusBar;->createHandler()Lcom/android/systemui/statusbar/BaseStatusBar$H;
move-result-object v0
goto :goto_0
.end method
-right Above
.method protected abstract getMaxKeyguardNotifications()I
--------------------------------------------------------------------------
Go to & open
smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
PHP:
-Look
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
-Immediately after
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#.locals 51 # 51 you may be different, it does not pay attention
-copy and paste the line below
.annotation runtime Landroid/annotation/ChaosLab;
classification = .enum Landroid/annotation/ChaosLab$Classification;->CHANGE_CODE:Landroid/annotation/ChaosLab$Classification;
name = "GestureAnywhere"
.end annotation
-Look Next
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->startGlyphRasterizeHack()V
-copy and paste the line below
invoke-virtual/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->addGestureAnywhereView()V
Replace id below conform with public.xml
SystemUI\smali\com\android\systemui\pac\TriggerOverlayView.smali
492 public type="drawable" name="trigger_region"
SystemUI\smali\com\android\systemui\pac\gestureanywhere\GestureAnywhereView.smali
892 public type="id" name="content"
901 public type="id" name="gesture_overlay"
944 public type="id" name="cancel_gesturing"
Click to expand...
Click to collapse
3. Decompile Settings.apk
copy and paste ingredients into place
Then go res/values/arrays.xml
<string-array name="gesture_anywhere_position_entries">
<item>@string/gesture_anywhere_position_left</item>
<item>@string/gesture_anywhere_position_right</item>
</string-array>
<string-array name="gesture_anywhere_position_values">
<item>3</item>
<item>5</item>
</string-array>
Click to expand...
Click to collapse
Then go res/values/colors.xml
<color name="ga_gesture_color">#ff07998b</color>
<color name="icon_tint_color">@android:color/material_deep_teal_500</color>
Click to expand...
Click to collapse
Then go res/values/dimens.xml
<dimen name="ga_gesture_thumbnail_inset">8.0dip</dimen>
<dimen name="ga_gesture_thumbnail_size">64.0dip</dimen>
<dimen name="shortcut_picker_left_padding">40.0dip</dimen>
Click to expand...
Click to collapse
Then go res/values/ids.xml
<item type="id" name="gesture_name">false</item>
<item type="id" name="gestures_overlay">false</item>
<item type="id" name="done">false</item>
<item type="id" name="addButton">false</item>
<item type="id" name="reloadButton">false</item>
<item type="id" name="seekBarPrefUnitsRight">false</item>
<item type="id" name="seekBarPrefValue">false</item>
<item type="id" name="seekBarPrefUnitsLeft">false</item>
<item type="id" name="seekBarPrefBarContainer">false</item>
Click to expand...
Click to collapse
Then go res/values/strings.xml
<string name="gesture_anywhere_title">Gesture anywhere</string>
<string name="gesture_anywhere_enabled_title">Gesture anywhere</string>
<string name="gesture_anywhere_enabled_summary">Enable the Gesture anywhere feature</string>
<string name="gesture_anywhere_position_title">Location</string>
<string name="gesture_anywhere_position_left">Left edge</string>
<string name="gesture_anywhere_position_right">Right edge</string>
<string name="gesture_anywhere_gestures_title">Gestures</string>
<string name="gesture_anywhere_gestures_summary">Add, remove and edit gestures</string>
<string name="ga_button_add">Add gesture</string>
<string name="ga_button_reload">Reload</string>
<string name="ga_button_discard">Discard</string>
<string name="ga_button_done">Done</string>
<string name="ga_prompt_gesture_name">Name</string>
<string name="ga_error_missing_name">You must enter a name</string>
<string name="ga_save_success">Gesture saved in %s</string>
<string name="ga_rename_action">OK</string>
<string name="ga_cancel_action">Cancel</string>
<string name="ga_gestures_loading">Loading gestures...</string>
<string name="ga_gestures_empty">No gestures</string>
<string name="ga_gestures_activity">Gestures</string>
<string name="ga_gestures_edit">Edit</string>
<string name="ga_gestures_delete">Delete</string>
<string name="ga_gestures_delete_success">Gesture deleted</string>
<string name="ga_gestures_rename_title">Rename gesture</string>
<string name="ga_gestures_rename_label">Gesture name</string>
<string name="ga_gestures_error_loading">Could not load %s. Make sure you have storage available.</string>
<string name="trigger_category">Trigger region</string>
<string name="trigger_width_title">Trigger width</string>
<string name="trigger_width_summary">Adjust the width of the trigger area</string>
<string name="trigger_top_title">Trigger position</string>
<string name="trigger_top_summary">Adjust the vertical postion of the trigger area</string>
<string name="trigger_bottom_title">Trigger height</string>
<string name="trigger_bottom_summary">Adjust the height of the trigger area</string>
<string name="seekbar_default">Default</string>
<string name="profile_applist_title">Applications</string>
<string name="picker_activities">Activities</string>
<string name="select_custom_app_title">Select custom app</string>
<string name="select_custom_activity_title">Select custom activity</string>
Click to expand...
Click to collapse
Then go res/xml/display.xml
<PreferenceScreen android:layout="@layout/pac_gestureanywhere_preference" android:title="@string/gesture_anywhere_title" android:key="gesture_anywhere" android:fragment="com.android.settings.pac.gestureanywhere.GestureAnywhereSettings" />
Click to expand...
Click to collapse
Then in AndroidManifest.xml
At the bottom before </ application> add
<activity android:name=".pac.gestureanywhere.GestureAnywhereBuilderActivity"/>
<activity android:name=".pac.gestureanywhere.GestureAnywhereCreateGestureActivity"/>
Click to expand...
Click to collapse
Recompile-Decompile again..
Replace id below conform with public.xml
smali\com\android\settings\pac\utils\SeekBarPreferenceCham.smali
354 <public type="id" name="seekBarPrefBarContainer"
461 <public type="layout" name="seek_bar_preference"
703 <public type="string" name="seekbar_default"
859 <public type="id" name="seekBarPrefValue"
899 <public type="id" name="seekBarPrefUnitsRight"
914 <public type="id" name="seekBarPrefUnitsLeft"
>
smali\com\android\settings\pac\gestureanywhere\GestureAnywhereBuilderActivity$GesturesAdapter.smali
120 <public type="layout" name="ga_gestures_item"
>
smali\com\android\settings\pac\gestureanywhere\GestureAnywhereBuilderActivity$GesturesLoadTask.smali
353 <public type="string" name="ga_gestures_error_loading"
384 <public type="id" name="addButton"
395 <public type="id" name="reloadButton"
444 <public type="color" name="ga_gesture_color"
453 <public type="dimen" name="ga_gesture_thumbnail_inset"
464 <public type="dimen" name="ga_gesture_thumbnail_size"
477 <public type="id" name="addButton"
488 <public type="id" name="reloadButton"
>
smali\com\android\settings\pac\gestureanywhere\GestureAnywhereBuilderActivity.smali
157 <public type="string" name="ga_gestures_empty"
233 <public type="string" name="ga_gestures_delete_success"
494 <public type="layout" name="ga_gestures_list"
589 <public type="string" name="ga_gestures_edit"
596 <public type="string" name="ga_gestures_delete"
>
smali\com\android\settings\pac\gestureanywhere\GestureAnywhereCreateGestureActivity.smali
210 <public type="id" name="gestures_overlay"
241 <public type="layout" name="ga_create_gesture"
246 <public type="id" name="done"
279 <public type="id" name="gesture_name"
292 <public type="id" name="gestures_overlay"
426 <public type="id" name="gestures_overlay"
>
smali\com\android\settings\pac\gestureanywhere\GestureAnywhereSettings.smali
104 <public type="xml" name="gesture_anywhere"
556 <public type="string" name="gesture_anywhere_title"
>
smali\com\android\settings\pac\gestureanywhere\ShortcutPickHelper$AppExpandableAdapter.smali
133 <public type="dimen" name="shortcut_picker_left_padding"
>
smali\com\android\settings\pac\gestureanywhere\ShortcutPickHelper.smali
336 <public type="string" name="profile_applist_title"
346 <public type="string" name="picker_activities">
476 <public type="string" name="select_custom_activity_title"
667 <public type="string" name="profile_applist_title"
678 <public type="string" name="picker_activities"
743 <public type="drawable" name="activities_icon"
780 <public type="string" name="select_custom_app_title">
Click to expand...
Click to collapse
DONE
Files and Compare Press Me​
Thank you very much ?
Enviado desde mi Lenovo K50-t5 mediante Tapatalk

[GUIDE] [TUT] Weather On Lockscreen

GUIDE Weather On Lockscreen
Work and Tested - CM 12.1 & LP Based
​
1. Decompile settings.apk
At the files:
Settings\res\xml\security_settings_chooser.xml
Settings\res\xml\security_settings_fingerprint.xml
Settings\res\xml\security_settings_lockscreen.xml
Settings\res\xml\security_settings_password.xml
Settings\res\xml\security_settings_pattern.xml
Settings\res\xml\security_settings_pin.xml
Looking for:
<PreferenceScreen android:title="@string/owner_info_settings_title" android:key="owner_info_settings" android:summary="@string/owner_info_settings_summary" android:fragment="com.android.settings.OwnerInfoSettings" />
Add this line, following inserted :
<PreferenceScreen android:title="@string/weather_lock_screen_settings_title" android:key="lockscreen_weather" android:fragment="com.android.settings.ahmednhk.LockScreen.LockScreenWeatherSettings" />
Click to expand...
Click to collapse
ADD ALL THIS LINES.
Settings\res\values\arrays.xml
<string-array name="weather_condition_icon_entries">
<item>@string/weather_condition_icon_monochrome_title</item>
<item>@string/weather_condition_icon_colored_title</item>
<item>@string/weather_condition_icon_vclouds_title</item>
</string-array>
<string-array name="weather_condition_icon_values">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
Click to expand...
Click to collapse
Settings\res\values\ids.xml
<item type="id" name="weather_hex">false</item>
<item type="id" name="weather_enter">false</item>
<item type="id" name="weather_color_picker_view">false</item>
<item type="id" name="weather_white_panel">false</item>
<item type="id" name="weather_black_panel">false</item>
<item type="id" name="weather_cyan_panel">false</item>
<item type="id" name="weather_red_panel">false</item>
<item type="id" name="weather_green_panel">false</item>
<item type="id" name="weather_yellow_panel">false</item>
<item type="id" name="weather_old_color_panel">false</item>
<item type="id" name="weather_new_color_panel">false</item>
<item type="id" name="weather_edittext">false</item>
<item type="id" name="weather_color_panel_view">false</item>
<item type="id" name="weather_hex_color_input">false</item>
<item type="id" name="weather_color_panel">false</item>
Click to expand...
Click to collapse
Settings\res\values\strings.xml
<string name="weather_lock_screen_settings_title">Lock screen weather</string>
<string name="weather_dlg_reset_values_message">"Reset values to
System- or Cyan?"</string>
<string name="weather_dlg_reset_android">System</string>
<string name="weather_dlg_reset_cyan">Cyan</string>
<string name="weather_reset">Reset</string>
<string name="weather_show_weather_title">Show weather</string>
<string name="weather_show_weather_summary">Enable to show weather informations</string>
<string name="weather_show_location_title">Show location</string>
<string name="weather_show_location_summary">Enable to show the location</string>
<string name="weather_show_timestamp_title">Show timestamp</string>
<string name="weather_show_timestamp_summary">Enable to show the timestamp</string>
<string name="weather_condition_icon_title">Condition icon</string>
<string name="weather_condition_icon_dlg_title">Coose an icon for displaying the weather condition</string>
<string name="weather_condition_icon_monochrome_title">Monochrome</string>
<string name="weather_condition_icon_colored_title">Colored</string>
<string name="weather_condition_icon_vclouds_title">VClouds</string>
<string name="weather_colorize_all_icons_title">Colorize all icons</string>
<string name="weather_colorize_all_icons_summary">Enable to colorize all icons, disable to colorize only the monochrome icons</string>
<string name="weather_icons_title">Icons</string>
<string name="weather_colors_title">Colors</string>
<string name="weather_text_title">Text</string>
<string name="weather_dialog_color_picker">Color Picker</string>
<string name="weather_press_color_to_apply">Press on color below to apply</string>
<string name="weather_arrow_right">→</string>
<string name="weather_arrow_down">↓</string>
<string name="weather_hex">Hex:</string>
<string name="weather_hex_hint">\#ff000000</string>
<string name="weather_set">Set</string>
<string name="weather_color_default">Default</string>
Click to expand...
Click to collapse
*compile and decompile again to assign the ID to a file*
Settings\smali\com\android\settings\ahmednhk\LockScreen\LockScreenWeatherSettings.smali
<public type="string" name="weather_reset"
Line 131>
<public type="drawable" name="ic_settings_reset"
Line 137>
<public type="xml" name="ahmednhk_lock_screen_weather"
Line 508>
Settings\smali\com\android\settings\ahmednhk\LockScreen\LockScreenWeatherSettings$MyAlertDialogFragment.smali
<public type="string" name="weather_reset"
Line 137
<public type="string" name="weather_dlg_reset_values_message"
Line 143
<public type="string" name="cancel"
Line 149
<public type="string" name="weather_dlg_reset_android"
Line 157
<public type="string" name="weather_dlg_reset_cyan"
Line 167>
Settings\smali\com\android\settings\ahmednhk\LockScreen\ColorPicker\ColorPickerDialog.smali
<public type="layout" name="weather_color_picker"
Line 129
<public type="string" name="weather_dialog_color_picker"
Line 142
<public type="id" name="weather_color_picker_view"
Line 147
<public type="id" name="weather_old_color_panel"
Line 158
<public type="id" name="weather_new_color_panel"
Line 169
<public type="id" name="weather_white_panel"
Line 180
<public type="id" name="weather_black_panel"
Line 191
<public type="id" name="weather_cyan_panel"
Line 202
<public type="id" name="weather_red_panel"
Line 213
<public type="id" name="weather_green_panel"
Line 224
<public type="id" name="weather_yellow_panel"
Line 235
<public type="id" name="weather_hex"
Line 246
<public type="id" name="weather_enter"
Line 257
<public type="id" name="weather_new_color_panel"
Line 413>
Click to expand...
Click to collapse
*Compile Settings DONE*
2. Decompile SystemUI.apk
ADD ALL THIS LINES.
SystemUI\res\layout\keyguard_status_view.xml
Looking for:
<TextClock android:textColor="@color/clock_white" android:layout_gravity="center_horizontal" android:id="@id/clock_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/bottom_text_spacing_digital" android:singleLine="true" android:format12Hour="@string/keyguard_widget_12_hours_format" android:format24Hour="@string/keyguard_widget_24_hours_format" style="@style/widget_big_thin" />
<include layout="@layout/keyguard_status_area" />
Add this line, following inserted :
<include layout="@layout/keyguard_weather_view" />
Click to expand...
Click to collapse
SystemUI\res\values\ids.xml
<item type="id" name="keyguard_weather_view">false</item>
<item type="id" name="weather_panel">false</item>
<item type="id" name="left_panel">false</item>
<item type="id" name="city">false</item>
<item type="id" name="wind">false</item>
<item type="id" name="center_panel">false</item>
<item type="id" name="weather_image">false</item>
<item type="id" name="right_panel">false</item>
<item type="id" name="current_temp">false</item>
<item type="id" name="humidity">false</item>
<item type="id" name="condition">false</item>
Click to expand...
Click to collapse
SystemUI\res\values\colors.xml
<color name="keyguard_default_primary_text_color">#ffffffff</color>
<color name="keyguard_default_secondary_text_color">#b3ffffff</color>
<color name="keyguard_default_icon_color">#ffffffff</color>
Click to expand...
Click to collapse
*compile and decompile again to assign the ID to a file*
SystemUI\smali\com\android\keyguard\KeyguardStatusView$Patterns.smali
0x11200c5 - <public type="bool" name="def_custom_dateformat">
строка 78
Click to expand...
Click to collapse
NOTE: We will add a line, only the changed file your ID (in the description), that is, you just do the changes, making your ID and only then add the file.​
PHP:
SystemUI\smali\com\android\keyguard\R$color.smali
At the end add:
.field public static final keyguard_default_icon_color:I = 0x7f080068
.field public static final keyguard_default_primary_text_color:I = 0x7f080066
SystemUI\smali\com\android\keyguard\R$id.smali
At the end add:
.field public static final keyguard_weather_view:I = 0x7f0f016f
.field public static final city:I = 0x7f0f0172
.field public static final wind:I = 0x7f0f0173
.field public static final weather_image:I = 0x7f0f0175
.field public static final current_temp:I = 0x7f0f0177
.field public static final humidity:I = 0x7f0f0178
.field public static final condition:I = 0x7f0f0179
.field public static final timestamp:I = 0x7f0f00bb
-U DONE CHANGED ALL ID'S OKAY -->>
----> *Compile SystemUI DONE*
DON'T FORGET TO TRANSFER ALL FILES (framework.jar)
ALSO U MUST TRANSFER My Update LockClock and replace with oldest.
Files and Compare Press Me​
Thank you !!!
Enviado desde mi Lenovo K50-t5 mediante Tapatalk

Categories

Resources