随笔分类 -  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 阅读全文
posted @ 2012-04-06 21:56 cascais 阅读(246) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2012-04-06 21:53 cascais 阅读(0) 评论(0) 推荐(0)
摘要: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, 阅读全文
posted @ 2012-04-06 21:47 cascais 阅读(205) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2012-04-06 21:41 cascais 阅读(245) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2012-04-05 22:00 cascais 阅读(277) 评论(0) 推荐(0)
摘要:[java] view plaincopyprivateBitmapcreateScreenshot(intwidth,intheight){//Werendertoabitmap2xthedesiredsizesothatwecanthen//re-scaleitwithfilteringsincecanvas.scaledoesn'tfilter//Thishelpsreducealiasingatthecostofbeingslightlyblurryfinalintfilter_scale=2;Picturethumbnail=capturePicture();if(thumb 阅读全文
posted @ 2012-04-05 21:59 cascais 阅读(692) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2012-04-03 22:01 cascais 阅读(479) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2012-04-02 20:26 cascais 阅读(296) 评论(0) 推荐(0)