求GTAAnimManager

[Tutorial] How To Change The Bootscreen On Your Android Phone And Make Waiting For It To Turn On Suck Less
Total Shares49
Article Contents
Let's face it: as Android users, we like options. One of the greatest things about this platform is the insane level of customization possible, especially if you don't mind getting your hands a little dirty. With some readily available tools (all of which are extremely free) and the proper knowledge, you can make your android phone do almost anything you could possibly want and make it look however you want. What we'll be talking about today is the bootscreen.
The bootscreen is that animation that plays during your phone's (admittedly long) power-on sequence. It's really easy to switch it out and, provided you've found one you like, I can show you how to change it. After some deliberation, I've decided the best place to start is the beginning.
There are some tools you'll need to have installed before we can start. First off, except in some special cases where the /system/ directory has write access already, you'll need root access. Chances are you can find out all about that by heading over to
and searching for your device in the forums. Once you've done that, you'll need one of two things:
A file explorer on the phone that supports root functions. Some popular ones are , , and .
The Android SDK installed on your computer. To install the SDK, follow these instructions:
Download and install the . This should also install the USB drivers you'll need.
If it doesn't install the drivers, .
Plug your phone into your computer.
Go to the settings menu. Navigate to Applications&Development&USB Debugging and check that box.&
Using the command prompt on your computer, navigate to the "Platform-tools" folder of the SDK.
Type in "adb devices" (without the quotes) and hit the enter key. If your phone shows up (usually a crazy string of letters and numbers), then you're good to go.
Now let's say you have found a bootscreen that you really like and that matches your phones resolution (that's important). Sometimes they'll package it as a handy flashable .ZIP file that you can simply apply in recovery mode. Most of the time, though, you're going to download a bootanimation.zip file that will have to be installed manually.
Basically, the idea is that we are going to be putting a new animation on our phone that will run instead of the stock bootscreen and, if we can't manage that, we'll replace the old one with a sucker-free one. We'll do them in order of difficulty. (Bonus points for you if you caught the reference in this section's title)
It is very important for me to note here that, for the purposes of this tutorial, everything is going to be geared toward the HTC Evo because that is the device I'm currently using. It has been brought to our attention that there are some variables across devices. The location of the file may be different on your device.
Most devices seem to store their animation is /system/media/
My HTC devices all store bootanimation.zip in /system/customize/resource/
Some users have reported being able to load bootscreens into /data/local/ which is significant because /data/ is always writable and does NOT REQUIRE ROOT ACCESS. This has not worked on my EVO, Hero, or my friend's Droid Incredible.
If there are any other locations that work or don't work you can let us know in the comments and we'll incorporate them (thanks to all the people who helped me out with this information).
The Root File Explorer Method
This is, by a wide margin, the simplest method and in no way requires a computer. You can download the bootscreen directly to your phone and move it where you need it all on-device.
1. Install The App
Download and install one of the above mentioned root file explorers (, , ) or any other of your choosing. It just has to get root access.
2. Download your boot animation.
I mean...yeah. That's the point, right?
3. Backup (OPTIONAL)
You can either copy the original bootscreen and paste it on your sdcard/computer, or you can rename it bootanimation.bak and leave it in the original directory for safe keeping.
4. Copy/move
Copy the bootanimation.zip to the directory that it belongs in.
5. Reboot. Enjoy.
Reboot. Enjoy.
The Recovery Flash Method
The flashable .zip method is as straight-forward as straight-forward can be:
1. Put the .zip file on your sdcard
2. Boot your phone into the recovery console
3. Select "Flash ZIP from sdcard"
4. Find the .zip file
5. Flash it
The ADB Method (AKA The "Aw, Dang It" Method)
For each phone the location may be a little different, but the idea remains the same. We're going to be swapping the bootanimation.zip that came on the phone with one that doesn't suck. I'll be using a Windows computer to do this on my HTC EVO 4G.
It's pretty simple if you're comfortable with ADB. Even if you're not, though, it's simple enough for you to pick up quickly
1. The Hunt
Find your animation. There are a multitude of places to find them, but I plan on showing a lot in the future, so let's just assume you want .
2. The Name
Rename the .zip file to "bootanimation.zip".
3. The Location
Place this .zip file in the same directory as the SDK's "ADB.exe" file. If you have a recent version of the SDK, this will be in the "platform-tools" directory. On older versions, it will be in the "tools" directory.
4. The Commando
Here's where the magic happens: We're now going to the command line or, as I call it, the commando line. That sounds way cooler.
5. Black Ops
Now, we'll navigate to the directory with ADB in it that we talked about earlier. (My Android SDK folder is named "ASDK" for the sake of brevity.)
6. Did You Plug It In Right?
Now we're going to run a command to make sure your phone is being recognized by your computer. Type in (without quotes) "adb devices" and hope that some crazy numbers and letter show up.
7. This Is Getting Real
Neat. We're ready to roll. We're now going to mount the system as read/write so we can mess with system files. My favorite method is the simple command "adb remount". Alternatively, you can type in "adb shell" and (on the EVO, as well as most other HTC devices) run the command "mount - o remount,rw -t yaffs2 /dev/block/mtdblock3 /system" then, subsequently, "exit". Well done. You are now the builder and destroyer of Android (provided it told you 'remount succeeded').
8. Back That Thang Up
We're in the home stretch now. Remember how we put the bootanimation.zip in the folder we also have ADB in? Here's why. We are going to back up the old bootanimation.zip then install our new one. The first order order of business is getting into the shell (basically using the command line in the phone using our computer as the window to see it). Type in "adb shell", hit enter, then type "su" and hit enter, just to make sure you're in superuser mode. Then we'll navigate to where the current bootscreen is on the phone. Mine is in /system/customize/resource/ so I'm going to type in "cd /system/customize/resource" then, just to make sure I'm right, I'll type in "ls" and verify the file is there. Now, let's make sure we have a backup in case we do something ridiculous and need to roll back. Type in "mv bootanimation.zip bootanimation.bak. Basically, the old one will sit there and, should we need to, we can rename it back to bootanimation.zip and it will be back to its old self. Issue the exit command until you're out of ADB shell.
9. Do The Deed!
This is it, guys. The final step. We will now issue the magic command:
"adb push bootanimation.zip /system/customize/resource/"
10. You're Done. Turn It Off And Enjoy.
The name of this step is also the entirety of the step. You did it.
While it may seem a little convoluted, this project is easy for beginners and SUPER easy for advanced users. It makes an awesome introduction to ADB and Android modding in general. I hope this helped you out and I look forward to seeing how all you crazy cats use and abuse this information to do hilarious, amazing, and entertaining things.
Do you have a Google Home?
Yes, more than one.
No, but only because it's not available in my country.
No, but I plan to get one.
No, and I don't want one.
&Loading ...后使用快捷导航没有帐号?
只需一步,快速开始
只需一步,快速开始
查看: 1693|回复: 4
【rosuke839】【工具】GTAAnimManager
你这样只看不注册,真的大丈夫?~
才可以下载或查看,没有帐号?
在rosuke839的个人网站上找到的,喜欢修改动作的同学可以试试,截图在下面
& & & & & & & & & & & & & & & &
其实这就是我前几天发帖载入模型时用的。。。
old tool, but a good part of the collection...thanks for sharing
额算论坛没有吧:L;P
路过,翻出来下载。
Powered by Discuz!X3.2. Theme By Yeei!7315人阅读
Android动画(4)
Fragment是Android在API 11之后加入的一个组件,对提高Android开发中的布局合理性和布局效率都有很大作用,尤其是在Android平板等大屏幕设备的开发中,Fragment的引入能更好地利用较大的屏幕空间。
  本文主要说明Fragment使用简介、Fragment自定义动画的使用、监听动画过程、以及在较低API版本中使用兼容性包来实现上述功能。
  首先简要说一下添加Fragment方法,可以直接在Activity的布局文件中加入fragment标签
android:name=&com.example.test.ExampleFragment&
android:id=&@+id/example_fragment&
android:layout_width=&wrap_content&
android:layout_height=&wrap_content&
也可以在代码中将Fragment加入已存在的ViewGroup中
FragmentManager fragmentManager = getFragmentManager();FragmentTransaction ft = fragmentManager.beginTransaction();ExampleFragment fragment = new ExampleFragment();ft.add(R.id.fragment_container, fragment);ft.commit();
而在Fragment类中加入UI则只需要在Fragment类中重写onCreateView方法,并在方法中添加布局文件
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// TODO Auto-generated method stub
return inflater.inflate(R.layout.example_fragment, container, false);
  第二,为Fragment添加动画。添加自带动画效果很简单,只需要在添加Fragment或者进行Fragment动作变化时为FragmentTransaction对象添加setTransaction()方法,自带的动画效果有:FragmentTransaction.TRANSIT_FRAGMENT_OPEN、TRANSIT_FRAGMENT_CLOSE、TRANSIT_FRAGMENT_FADE等等,任君选择。而除了add()添加fragment方法之外还有replace()、show()、hide()等不同的操作。
FragmentTransaction ft = getFragmentManager().beginTransaction();ft.add(R.id.fragment_container, fragment, &ExampleFragment&)
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
.commit();
如果这些自带动画效果不能满足我们的要求,比如想要实现Fragment的滑动效果,就需要自定义动画了。添加自定义动画的方法是setCustomAnimations(int enter, int exit),这两个参数分别是进入和离开两个动画的资源文件ID。使用方法如下,注意setCustomAnimations方法必须在replace或者add等方法之前被调用。
FragmentTransaction ft = getFragmentManager().beginTransaction();ft.setCustomAnimations(R.anim.fragment_in, R.anim.fragment_out);ft.replace(R.id.fragment_container, newFragment, &fragment&);// Start the animated transition.</mit();
然后就是自己定义动画文件fragment_in.xml和fragment_out.xml了,但是这里有个非常要注意的问题,原生库android.app.Fragment支持的动画不再是以前的含有&translate&标签的动画了,而是新的&objectAnimator&标签。比如定义向左滑入动画我们以前都是这么写的
&?xml version=&1.0& encoding=&utf-8&?&&set&
&translate xmlns:android=&/apk/res/android&
android:fromXDelta=&100%p&
android:toXDelta=&0&
android:interpolator=&@android:anim/decelerate_interpolator&
android:duration=&300&/&&/set&
但是如果在原生Fragment动画中使用此描述文件,会出现不认识translate标志的错误,新的动画描述方法如下:
&?xml version=&1.0& encoding=&utf-8&?&&set&
&objectAnimator xmlns:android=&/apk/res/android&
android:propertyName=&x&
android:valueType=&floatType&
android:valueFrom=&1280&
android:valueTo=&0&
android:duration=&300&/&&/set&
这样写进入和离开动画效果就没有问题了。在这里有个问题我暂时没明白,在使用&translate&时可使用fromXDelta=&100%p&这样的方式以百分比的形式定义位置,而在&objectAnimator&貌&#20284;没找到这种相对的定义方法,有高手知道还请赐教~
至于为什么Google要这么蛋疼弄一种新的动画定义方式我也不特别能理解。。。就跟Animation和Animator一样。
  第三,在我们自定义好动画后,有时候需要判断我的动画有没有开始?有没有结束?这时就需要对动画执行状态进行监听。对此,可以在Fragment类中重写一个onCreateAnimator()方法,这个方法会在执行动画时被调用。在方法中设置动画Animator的监听器。如下:
public Animator onCreateAnimator(int transit, boolean enter, int nextAnim) {
final Animator anim = AnimatorInflater.loadAnimator(getActivity(), nextAnim);
anim.addListener(new AnimatorListenerAdapter()
public void onAnimationStart(Animator animation)
//动画开始
public void onAnimationEnd(Animator animation)
//动画结束
  最后,上面说的一切都是在API 11也就是3.0以上的系统中原生支持的,如果我们需要在支持低于3.0系统的app中使用Fragment该怎么办呢?这时的自定义动画和动画监听又将如何?下面来说明这些问题。
  解决的方法很简单,原生不足,兼容来补。为了增加对低版本系统的兼容性,Android提供了一个兼容性库,叫做android-support-v4.jar(有了这个库,妈妈再也不用担心我的应用兼容性了),这个包现在在新建工程时应该就带着了,而其对应的兼容性包android.support.v4.app中,就包含有Fragment这个类。也就是说,支持老版本的app(MiniSDK选API 11以下)在使用Fragment时,就直接继承自android.support.v4.app.Fragment,而不继承自原生的android.app.Fragment。同样,FragmentTransaction和FragmentManager来自这个兼容性包,这里要注意的是来自这个包的获取FragmentManager的方法不再是getFragmentManager(),而是getSupportFragmentManager()。
  使用这个兼容性包之后,添加自定义动画的过程仍和之前一致,不过由于是低版本的兼容性包,所以描述动画的xml文件中,我们又需要用回以前&translate&的描述方法,其实这对用习惯这种动画定义方法的人来说还是比较方便的。(又可以用相对位置定义了。。。)
  使用兼容性包的Fragment我们仍然想监听动画状态,但这时发现继承自兼容性包的Fragment已经找不到可重写的方法onCreateAnimator()了,这时,会出现另一个更老、我们更熟悉的方法onCreateAnimation(),同样,重写这个方法并在其中为Animation对象设置监听器以实现对动画状态的监听。
public Animation onCreateAnimation(int transit, boolean enter, int nextAnim) {
Animation anim = AnimationUtils.loadAnimation(getActivity(), nextAnim);
anim.setAnimationListener(new AnimationListener() {
public void onAnimationStart(Animation animation) {
//动画开始
public void onAnimationRepeat(Animation animation) {
//动画循环
public void onAnimationEnd(Animation animation) {
//动画结束
  以上,就是我总结的Fragment动画相关的一些内容。
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:3196854次
积分:20299
积分:20299
排名:第374名
原创:25篇
转载:783篇
评论:869条
(1)(5)(3)(74)(30)(126)(18)(3)(1)(3)(7)(16)(43)(1)(5)(2)(2)(1)(18)(6)(3)(27)(10)(7)(6)(2)(7)(8)(1)(6)(27)(22)(9)(29)(30)(42)(19)(34)(10)(27)(83)(17)(17)

我要回帖

 

随机推荐