1. Adaptive Image configuration of various sizes: http://blog.csdn.net/luoyuhhy/article/details/6451901
Search Keyword: Android Image Adaptive resolution
2. Dialog: http://www.cnblogs.com/salam/archive/2010/11/15/1877512.html
3, photo album, camera image processing: http://my.oschina.net/onlytwo/blog/71192
4. [Android instance] listview nested gridview (gridview achieves horizontal sliding)
Address: http://download.csdn.net/detail/wyyl1/5121975
5. Transfer objects
List is a serializable object.
Pass value:
Intent mintent = new intent (mcontext, chexiactivity. Class );
Carbrand cb = GCB. getfllist (). Get (position );
Bundle mbundle = new bundle ();
Mbundle. putserializable ("carbrandlist", list );
Mintent. putextras (mbundle );
Mcontext. startactivity (mintent );
Valid value:
List = (arraylist <carbrands>) getintent (). getserializableextra ("carbrandlist ");
6. Android. Support. v4.view. pageradapter obtains the current page.
Pageradapter get current page
Mviewpager. getcurrentitem ()
Address: http://stackoverflow.com/questions/8538035/android-pageradapter-get-current-position
7. Exit the app code from Android
Android. OS. process. killprocess (Android. OS. process. mypid ());
Code with the dialog box:
New alertdialog. Builder (this). settitle ("exit"). setmessage ("OK? ")
. Setpositivebutton ("yes", new onclicklistener (){
@ Override
Public void onclick (dialoginterface dialog, int which ){
Android. OS. process. killprocess (Android. OS. process. mypid ());
}
}). Setnegativebutton ("no", null). Show ();
8. android-support-v4.jar source code Association
Remove Android Dependencies
Right-click the libs android-support-v4.jar build path-> Add to build path
Re-select the Android version to regenerate Android Dependencies
Address: http://www.cnblogs.com/hanleytowne/archive/2013/01/24/android-support-v4.html
9. Disable activity sleep. Disable sleep in Android.
Getwindow (). setflags (windowmanager. layoutparams. flag_keep_screen_on, windowmanager. layoutparams. flag_keep_screen_on );
Address: http://abc20899.iteye.com/blog/1045537