preview :
howto :
framework.jar
1) line 72~ : change animation speed.
Code:
// Tune-able parameters
private static final int CHEVRON_INCREMENTAL_DELAY = 800;
private static final int CHEVRON_ANIMATION_DURATION = 4000;
private static final int RETURN_TO_HOME_DELAY = 1200;
private static final int RETURN_TO_HOME_DURATION = 300;
2) line 305~ :
Code:
private void startChevronAnimation() {
final float r = mHandleDrawable.getWidth() * 0.4f;
final float chevronAnimationDistance = mOuterRadius * 0.9f;
final float from[][] = {
{mWaveCenterX - r, mWaveCenterY}, // left
{mWaveCenterX + r, mWaveCenterY}, // right
{mWaveCenterX, mWaveCenterY - r}, // top
{mWaveCenterX, mWaveCenterY + r} }; // bottom
final float to[][] = {
{mWaveCenterX - chevronAnimationDistance, mWaveCenterY}, // left
{mWaveCenterX + chevronAnimationDistance, mWaveCenterY}, // right
{mWaveCenterX, mWaveCenterY - chevronAnimationDistance}, // top
{mWaveCenterX, mWaveCenterY + chevronAnimationDistance} }; // bottom
mChevronAnimations.clear();
final float startScale = 0.5f;
final float endScale = 2.0f;
for (int direction = 0; direction < 4; direction++) {
for (int count = 0; count < mFeedbackCount; count++) {
Code:
private void startChevronAnimation() {
final float r = mHandleDrawable.getWidth() * 0.4f;
final float chevronAnimationDistance = mOuterRadius * 0.9f;
final float from[][] = {
{mWaveCenterX - r, mWaveCenterY}, // left
{mWaveCenterX, mWaveCenterY}, // right
{mWaveCenterX, mWaveCenterY - r}, // top
{mWaveCenterX, mWaveCenterY + r} }; // bottom
final float to[][] = {
{mWaveCenterX - chevronAnimationDistance, mWaveCenterY}, // left
{mWaveCenterX, mWaveCenterY}, // right
{mWaveCenterX, mWaveCenterY - chevronAnimationDistance}, // top
{mWaveCenterX, mWaveCenterY + chevronAnimationDistance} }; // bottom
mChevronAnimations.clear();
final float startScale = 0.3f;
final float endScale = 1.1f;
for (int direction = 0; direction < 4; direction++) {
for (int count = 0; count < mFeedbackCount; count++) {
framework-res.apk
download resources (PNGs - WVGA only) :
http://www.mediafire.com/?ksnc84d04w96uv8
1) decompile framework-res.apk
2) delete /res/drawable/ic_lockscreen_outerring.xml
3) add resource PNGs to /res/drawable-****/
4) open /layout/keyguard_screen_tab_unlock.xml
from :
Code:
Code:
332.0dip">
5" android:verticalOffset="0.0dip" android:horizontalOffset="0.0dip" />
android:visibility="gone" android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:textColor="?textColorSecondary" android:ellipsize="marquee" android:gravity="center_horizontal" android:id="@id/carrier" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="12.0dip" android:singleLine="true" android:layout_alignParentBottom="true" />
5) open /res/values/arrays.xml :
from :
Code:
- @drawable/ic_lockscreen_unlock
- @null
- @drawable/ic_lockscreen_camera
- @null
- @string/description_target_unlock
- @null
- @string/description_target_camera
- @null
Code:
- @drawable/ic_lockscreen_unlock
- @string/description_target_unlock
6) open /res/values/dimens.xml
from :
Code:
270.0dip
135.0dip
Code:
220.0dip
120.0dip
7) recompile.
-----------------------------------------------------------------------------
Previous version :
this mod was originally posted in Nexus S theme forum.
[MOD][IMM26] change ICS lockscreen animation to honeycomb style
at first, i don't have any intention to write guide for this mod because i think the method is too stupid ..
but many people requested it so i wrote this simple guide.
-----------------------------------------------------------------------------
firstly, you have to edit lockscreen animation related code.
1) primitive way
platform_frameworks_base/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java
1) line 72~
Code:
// Tune-able parameters
private static final int CHEVRON_INCREMENTAL_DELAY = 160;
private static final int CHEVRON_ANIMATION_DURATION = 850;
private static final int RETURN_TO_HOME_DELAY = 1200;
private static final int RETURN_TO_HOME_DURATION = 300;
Code:
// Tune-able parameters
private static final int CHEVRON_INCREMENTAL_DELAY = 480;
private static final int CHEVRON_ANIMATION_DURATION = 3000;
private static final int RETURN_TO_HOME_DELAY = 1200;
private static final int RETURN_TO_HOME_DURATION = 300;
2) line 305~ : same as above guide (new version).
and if you think this method is too difficult...
2) much easier way
1) decompile you rom's framework.jar using apktool.
2) go to framework.jar/smali/com/android/internal/widget/multiwaveview
3) download this file.
- for stock, AOSP or CM9 based rom : http://www.mediafire.com/?1wkbjt1bxsqsjnr
- for AOKP based rom : http://www.mediafire.com/?zb4mm1aaas1c8oc
this zip contain MultiWaveView.smali. replace original file with this one.
4) recompile.
5) done
-----------------------------------------------------------------------------
time to theme
: you have to replace lockscreen related PNGs in framework-res.apk.
framework-res.apk/res/drawable-hdpi or mdpi or xhdpi...
- ic_lockscreen_chevron_down.png
- ic_lockscreen_chevron_left.png
- ic_lockscreen_chevron_right.png (important)
- ic_lockscreen_chevron_up.png
and if you want, change lockscreen handle too.
- ic_lockscreen_handle_normal.png
- ic_lockscreen_handle_pressed.png
all my works are here (for hdpi).
1) default honeycomb ripple : http://www.mediafire.com/?7ktduz5dhsmzq6p
2) chrome logo :
download : http://www.mediafire.com/?osjng768zznfeh6
3) android logo
download : http://www.mediafire.com/?56sjs541bij3ygu
4) AT Field style (octagonal ripple)
download : http://www.mediafire.com/?t8lrdkr23nex7pc
5) Google Play logo
download : http://www.mediafire.com/?1vbc3ctdc7p94j4
0 comments:
Post a Comment