1, online JSON check tool: www.bejson.com2, Message.what uses static quantities on the handler of the message that is commonly used in the. private static final int msg_successs=0x111;message.what=msg_success;3,message transfer Optimization, object New way.Normal: Message msg=new message ();handler.sendmessage (msg);Modified to:Message msg = Handler.obtainmessage ();handler.sendmessage (msg);Advantages:returns a new message instance from the entire Me
, anyway, I studied the day did not find, later in the process in see can not inadvertently insert willow, if you first found, please message tell me, common improvement. This is not an estimate because this eclipse plugin solves the problem of duplicate configuration.A: How to reduce duplicate configuration?Right mouse button above this icon, appears below:The second item in the interim is the meaning of replication, and after the copy is complete, you just have to select your test class.B.code
This is also learned yesterday, to do a summary.Check whether the service is turned on to write a tool class, easy to use, the name of the service returned a Boolean value, of course, because of the need, but also a contextual context.Say a few key points of this tool class:1. method to transmit context and servicename,context used to getsystemservice () operation to obtain Activitymanager. Note that this m
Http://www.cnblogs.com/zhanglanyun/archive/2012/09/24/2700698.html
No matter how careful you are, it is impossible to completely avoid bad code. At this time, some tools are required to help us check whether there is any place in the code that will cause memory leakage. The ddms in Android tools comes with a very good memory monitoring tool heap (here I use the ADT plug-in of eclipse, and take the real mach
No matter how careful you are, it is impossible to completely avoid bad code. At this time, some tools are required to help us check whether there is any place in the code that will cause memory leakage. The ddms in Android tools comes with a very good memory monitoring tool heap (here I use the ADT plug-in of eclipse, and take the real machine as an example, the situation in the simulator is similar ). To
Project requirements: Text scrolling is required. Considering that there are two ways to implement animations in Android, Tween and flame, we still need to use tween after reading the materials, I wrote a tool class animutil, which calls the tool class to implement the view animation effect. In order to facilitate the update of the View Interface, animutil also i
Presumably to play Android's children's shoes are mostly aware that the Android APK installation package can be decompile source code, if the developer is released without obfuscation and other cryptographic processing, the decompile code is almost identical to the real source.To decompile the APK, you need to use Apktool.jar, which is now updated to APKTOOL_2.0.0RC6. Apktool.jar can decompile the apk from the command line, and there are many tools av
In view of the frequent use of Sqlite database for data persistence, a little encapsulation, easy to use.This package class mainly supports the function
Supports multi-user data storage
Support for SQLite database upgrade
Support for incoming SQL statement build table
Support Sqlitedatabase basic operation. For example: Execsql, rawquery, insert, etc.
Resolves a database concurrency problem
Affix the package class code first/** * * @ClassName: Databaseopenhelper *
In the process of development. We often use log to output logs to help us debug the programBut sometimes it is not enough to satisfy our needs, for example, I want to know which package this log message comes from. Which classSo we encapsulate a log class. Convenient for our useImport Android.util.log;import cn.edu.sdnu.i.smartsdnu.config;/** * This is a Log of the tool class output information source (package name and class name) * Created by Jimbo o
1. view the current stack
1) function: InProgramJoinCodeTo view the printed current function call relationship in logcat.
2) method:New exception ("Print trace"). printstacktrace ();
2. methodtracing
1) function: this function is used for hotspot analysis and performance optimization. It analyzes the CPU time used by each function, the number of calls, and the function call relationship.
2) method:
A) add the tracing switch to the program code.
Import
Eclipse version of Android development tool (using Thunderbolt download):Http://dl.google.com/android/adt/adt-bundle-windows-x86.zipHttp://dl.google.com/android/adt/adt-bundle-windows-x86_64.zipHttp://dl.google.com/android/adt/adt-bundle-linux-x86.zipHttp://dl.google.com/
You can enter the android console in two ways:
1. Run the emulator-shell command directly;
2. After starting emulator, run the ADB shell command.
Then we can use some common Linux commands, such as LS and cat. However, the toolbox provided by Android (located in/system/bin) is too simple. Some commands such as find do not support Android or are not well supported
Android TraceView is the most authoritative performance analysis tool, androidtraceviewWhat is TraceView?
Traceview is a good performance analysis tool on the android platform. It allows us to understand the performance of the program we want to track in a graphical way, and can be specific to the method.Role of Tracev
information about downloads such as:Getstatusbyid (long) Get download statusGetdownloadbytes (long) get Download progress informationGetbytesandstatus (long) Get download progress information and statusGetFileName (long) get the download file pathGetURI (long) get download URIGetReason (long) gets the download failure or pause reasonGetpausedreason (long) get download pause reasonGetErrorCode (long) get download error codeSource visible Downloadmanagerpro.java, more methods and more detailed pa
From http://android.group.iteye.com/group/wiki/3041-himi-xiaominghimi-traceview-sdcard
As I am currently working in a professional online game company, I need to use some methods to streamline and optimize the online game code currently in operation, we need to use a good viewing tool-android traceview provided in the android SDK. The following describes how to u
. This technology benefits from the technology described earlier: Android in the root-free hook application of its own system services, the technical principle is very simple, is the use of dynamic Agent technology + reflection mechanism. This technology can be used for this automatic blasting function, we just need to add this hook code at the entrance of the program. This technique has been practiced in the previous article: a new posture for the ap
public class Memorymanager {private static final String TAG = "Memorymanager";p rivate static final int maxmemory=50*1024*1 024;//Maximum Memory/** * To determine if the system is running in low memory * @param context * @return */public static Boolean hasacailmemory () {//Get phone internal space size long Memory = Getavailableinternalmemorysize (); LOG.I (TAG, memory+ ""), if (Memory Android Memory Management To
Some of the previous articles introduced some of the tools commonly used in Android, the tools presented today are more practical and convenient, it can be used to quantify the indicators to tell us which method executes the longest, is called the most times, there is no duplicate call. Let's take a look at how it's used for us.A code area for labeling testsWhat if we want to test the GridView Setup adapter code? It's easy to clip it in two lines of c
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.