Using com.example.android.apis.graphics
I am interested in using a class file (CameraPreview.java) from this package com.example.android.apis.graphics.
I suppose it is wrong to just copy and paste this file into /src of my package.
How do I set the build path so i can use the line
import com.example.android.apis.graphics....
I am using Eclipse and the build path is 开发者_运维技巧separated under Source/Projects/Libraries...
I tried linking up the whole DemoAPIs project but it will cause this project to also be installed when run. I only want it to build the class file that I am using. I want to keep my apk file small.
This is sample code (hence com.example). It is there for you to copy the code into your app however you want and use it modify it in whatever way you want.
You absolutely do not want to turn all of ApiDemos into a library and link it into your app. That would be... crazy. Just take the source code you want and use it in your app.
i think you need a library of it, so you can import the package and use all class regarding package. for library (basically in form of .jar
) are attach with project and you can explore it
精彩评论