随笔分类 - Android Java
摘要:1. use given .so a. make lib dir under the app's dir b.copy your libXX.so into the dir. c.modify the Android.mkadd "COCAL_JNI_SHARED_LIBRARIES :=libXX"[cpp] view plaincopyLOCAL_PATH:=$(callmy-dir)include$(CLEAR_VARS)LOCAL_MODULE_TAGS:=optionalLOCAL_SRC_FILES:=$(callall-java-files-under
阅读全文
摘要:How can adapter display the content of the listview.1.AbsListView.java[cpp] view plaincopyprotectedvoidonMeasure(intwidthMeasureSpec,intheightMeasureSpec){.......finalViewchild=obtainView(0,mIsScrap);.....}//one item, called one time.2.AbsListView.java[java] view plaincopyViewobtainView(intposition,
阅读全文
摘要:1.sensor type TYPE_ACCELEROMETER=1 TYPE_MAGNETIC_FIELD=2 (what's value mean at x and z axis) TYPE_ORIENTATION=3 TYPE_GYROSCOPE=4 TYPE_LIGHT=5(in ) TYPE_PRESSURE=6 TYPE_TEMPERATURE=7 TYPE_PROXIMITY=8 TYPE_GRAVITY=9TYPE_LINEAR_ACCELERATION=10TYPE_ROTATION_VECTOR=11some function of the sensor may b
阅读全文
摘要:steps 1.FrameLoader.cpp didFirstLayout 3.FrameLoaderClientAndroid.cpp dispatchDidFirstLayout 3.WebViewCore.cpp didFirstLayout(); 4.WebViewCore.java// will also callsetupViewport() didFirstLayout(); 5.BrowserFrame.java didFirstLayout(); 6.WebViewCore.java contentDraw(); 7.WebViewCore.java webkitDrawL
阅读全文
摘要:[java] view plaincopyprivateBitmapcreateScreenshot(intwidth,intheight){//Werendertoabitmap2xthedesiredsizesothatwecanthen//re-scaleitwithfilteringsincecanvas.scaledoesn'tfilter//Thishelpsreducealiasingatthecostofbeingslightlyblurryfinalintfilter_scale=2;Picturethumbnail=capturePicture();if(thumb
阅读全文
摘要:Classes:from parent to child1.junitpackage junit.framework;public interface Test { public abstract int countTestCases(); public abstract void run(TestResult result);}Assertpackage junit.framework;public class Assert {...assertTrue()assertFalse()fail()assertEquals()assertNotNull()assertNull()...}fail
阅读全文
摘要:a.webkit to chromium to webkitResourceLoaderAndroid to chromium// for file 1.ResourceLoaderAndroid::start 2.WebUrlLoader::start (convert "ResourceRequest" to "WebRequest") 3.WebUrlLoaderClient::start 4.WebRequest::start 5.URLRequest::start()//chromium 6.URLRequest::StartJob(URLRe
阅读全文

浙公网安备 33010602011771号