Https://github.com/daimajia/AndroidViewHover
This thing GitHub a Chinese programmer to do a special effect, the Chinese programmer is still quite bull (but the best of all ran abroad, the country can not stay).
This little demo uses the Android support library--renderscript. Support this jar package directory in \sdk\build-tools\, (I was looking for a good while to find this, Android.support.v8.renderscript had to say that he is a rookie AH ~ a lot of things do not understand, but I have a good spirit, Know how to think, how to solve problems, Xi Hee self-praise a bit)
With the worship of Daniel, I downloaded the project and then built a new code to test it in eclipse. The results found a lot of problems ...
First, you need to add the jar package provided below the above URL, there are nineoldandroid, androideas ..., androidview ... and a androidviewhover, but the last one I didn't add to the project, Because I copied the code is directly to download the project in the library's source code files, this androidviewhover is only after the library packaging, although the compiler class faster, but I currently do not use this JAR package test success, and see how others write the jar code. If you add the error that will report multiple Dex, meaning that the jar package or class repeats, resulting in a large number of multiple errors, as an experienced rookie, I immediately realized that my problem and solved, hehe.
Finally, add the SUPPORT-V7 project library file, this step is not smooth, because the activity in this demo is inherited by Actionbaractivity, and this class in the jar package of V7, but after the Add library file can not be found, An error occurred:
Excerpt:
The type android.support.v4.app.taskstackbuilder$supportparentable cannot be resolved.
Today in the use of the lower version of Actionbar, in succession to the actionbaractivity times "the type android.support.v4.app.taskstackbuilder$supportparentable cannot be resolved. It was indirectly referenced from required. class files "error, the online search for a long time finally solved.
The source of the problem: since the Android-support-v4.jar package under Eclipse was copied to the ' Android-support-v7-appcompat ' library project when the jar package for the project was copied, Replaced the original Android-support-v4.jar, and Eclipse comes with a lower version, resulting in an error.
Solution: Of course, replace the Android-support-v4.jar. \sdk\extras\android\support\v7\appcompat\libs under the Android-support-v4.jar.
PS: A moment of negligence, resulting in a lot of time in the search to solve the problem of error, in this record.
I follow the above method results really to me, I put the V7 library project file inside the V4, V7jar package are remove, and then all add to their project, finally clean, no error. Because this demo is very special, using a lot of git above the other open source, I just want to say that cattle people will be integrated resource code for me to use, and then upgrade the master Ah! Useful to Com.makeramen.RoundImageView, and com.squareup.picasso.Transformation This class, I admire the pleasantly surprised! Know the truth of my tears pouring down ...
Finally successfully completed the demo test run!
PS: Forget to write an important, use renderscript also need
1. In the class where you need to use Renderscript, import the Renderscript graphics library package:android.support.v8.renderscript . If you already have the built-in rnederscript (for example you are using Android 4.3 version), you need to import the package from android.renderscript changed to android.support.v8.renderscript .
Import android.support.v8.renderscript.*;
2. In your project.properties, make sure your target code is android-18 and add the following code:
renderscript.target=18renderscript.support.mode=truesdk.buildtools=18.1.0
That's it! With the Renderscript support library, you can continue to use native Renderscript packages in app development (with some minor exceptions, as mentioned below), and you can also use the latest features of the Renderscript toolchain in your own scripts.
For complete details about the Renderscript support Library, see Accessing Renderscript Java APIs.