1. decompile resource files
Use axmlprinter2.jar to decompile the XML file:
1. Obtain the res file of the APK (extract Res/layout/Main. XML), and put axmlprinter2.jar under this directory.
2. Open the CMD terminal and go to the directory
17:39:41 09-20. 196: E/androidruntime (32388): Android. view. windowmanager $ badtokenexception: unable to add window -- token android. OS. binderproxy @ 45907880 is not valid; is your activity running?
This bug may be caused by many situations.
The project encountered the function of processing batch data insertion. Later, the data insertion effect is improved, and transactions are used.
Override method in contentprovider:
@ Override public contentproviderresult [] applybatch (arraylist
1. imagebutton. setontouchlistener (New ontouchlistener (){
Int [] postion = new int [] {0, 0 };@ OverridePublic Boolean ontouch (view V, motionevent event ){Int x = (INT) event. getrawx ();Int y = (INT) event. getrawy ();Int left = V. getleft
Today, I encountered a very demanding problem. I need to add an image that can be used to switch images by scrolling to the headview ON THE listview.
Then we started to use scorller and velocitytracker, but when sliding the headview, the following
You need to perform the following steps to re-compile Android. jar with your own API on the basis of successful Android source code compilation.
1. add your own source code and create a folder under the framework/base Directory of the android source
In the past few days, when I completed the example "Automatically complete mobile phone Address Book Search" in "anbdroidsdk development example book", because the example in the book is for sdk1.5, when I used android2.2, if the phone
Private void loadall1_bybatch (){Final long T = debug_loaders? Systemclock. uptimemillis (): 0;
// Don't use these two variables in any of the callback runnables.// Otherwise we hold a reference to them.Final callbacks oldcallbacks = mcallbacks. Get
From: http://www.linuxidc.com/Linux/2011-10/44785.htm
Because Android uses Java as the development language, many people do not pay attention to the memory issues when using it.
As a result, when the program runs, the memory is constantly consumed,
After such a long time, we still have some gains...
Custom listview. Each item contains a textview and a button, and you want to change the background of the button after each click. The status changes when you open it again...
Listitemview.
/*** Method for obtaining the rounded corner bitmap * @ Param bitmap needs to be converted to the rounded corner bitmap * @ Param pixels the degree of the rounded corner. The larger the value, larger rounded corner * @ return rounded corner bitmap */
@ OverridePublic void onbackpressed (){// Todo auto-generated method stubSuper. onbackpressed ();Toast. maketext (this, "Haha", Toast. length_long). Show ();// Return;}
In this way, when you press, the activity exits and prompts "Haha "!
When
There are several tabs on the main interface during project creation. Some users often slide the screen left and right to switch the tab, so they have added the function of switching between the right and right sliding screens.
Basic Idea:
The
Robotium performs Android automated testing for the initial experience. The content of this article is as follows:
I. Only APK, robotium testing without source code:
Ii. Source Code test of APK to be tested:
Robotium Web site: http://code.google.com/
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service