假设没有git工具。能够点击master。
刚好近期lollipop的Launcher源代码也更新了。和之前的Launcher3会有一些差别,只是不大,倒入过程大同小异。
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvd2FuZ2ppbnl1NTAx/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvd2FuZ2ppbnl1NTAx/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />
三是加入BackupProtos.java这个类。
能够从上一步中获取。英文好的朋友能够看一下以下的步骤:
Do it yourself
- Use Git to pull down the latest Launcher 3 source:
git clone https://android.googlesource.com/platform/packages/apps/Launcher3
- Import existing code into Eclipse (Android Project from Existing Code)
- Change the project build target to API level 19
- Add Android support libraries
- Build protocol buffers JAR from AOSP source. You will actually need to build the protoc binary as well. You need to know how to use ‘make’ have gcc available for the protoc binary, and Maven for the JAR: https://android.googlesource.com/pla…l/protobuf.git
- Use protoc binary built from step above to generate the BackupProtos.java file:
protoc –javanano_out=src/ -I protos protos/backup.proto
- Rename the Android package (Android Tools->Rename Application Package) to one of your choice
- Add min SDK in a new ‘uses-sdk’ element in AndroidManifest.xml (works down to API level 17 without too many complaints in Lint, obviously stick to 19 to play it safe).
- Clean and run. BIND APP WIDGETS error can be ignored
Fabio Lo Brutto:
https://plus.google.com/+FabioLoBrutto/posts/KJeyKMBHVT7
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvd2FuZ2ppbnl1NTAx/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />
最后执行,截图例如以下:
所以说,假设把Launcher里面的自己定义的View掌握了,那么对Launcher也就基本掌握了。
因此,学习重点应该集中在自己定义View上。