Common Android tool package --- SharedPreferencesUtil and androidpreference
SharedPreferences is often used to save some simple data, such as recording user operation configurations. It is easy to use.
Public class SharedPreferencesUtil {// name of the stored sharedpreferences file private static final String FILE_NAME = "save_file_name "; /*** save data to the file * @ param context * @ param key * @ para
1. Reference article: https://developer.android.com/studio/profile/battery-historian.htmlThis article is about if the Dump power Day file Batterystats.txt, and then use historian.py to convert it to an HTML file, so that developers more directly understand the information.But historian has been upgraded to 2.0, not using Python for data analysis, but directly using the go language.For example: The item on Https://github.com/google/battery-historian mentioned above has been updated and the Python
(R.mipmap.ic_launcher). Centercrop (). into (ImageView); } Public Static voidDownloadpicresize (String url,context context,imageview ImageView,intWidthintheight) {Glide.with (context). Load (URL). Diskcachestrategy (Diskcachestrategy.all) . Placeholder (R.drawable.bizhi). Error (R.drawable.bizhi). Centercrop (). O Verride (width, height). into (ImageView); } /*** When downloading asynchronously, save and transfer data via interface*/ Public Interfaceresultcallback{v
Android doesn't have to write annoying toast every time, just call this packaged class and you can use it!
Copy Code code as follows:
Package com.zhanggeng.contact.tools;
/*** Toasttool can make your use Toast more easy;** @author Zhanggeng* @version v1.0.1* @since JDK5.0**/Import Android.content.Context;Import Android.widget.Toast;
public class Toasttool {/**** @param context of the Class ' s context, where want to use this
are two main ways of using TraceView:
The simplest way is to open DDMS directly, select a process, and then press the "Start Method Profiling" button above, and so on when the red dots turn black, it means that TraceView has started to work. Then I can slide one of the following tables (now the operation on the phone will definitely be stuck, because the Android system is checking the calls of each Java method in the Dalvik virtual machine,
From January Google released 16 series of video on performance optimization, this period of time in the major communities have seen a lot of excellent articles about the optimization series. We have analyzed the causes of performance, shared how to optimize our applications, and introduced tools to help us detect performance issues.One of the tools that is described in some of the system performance tuning tools: TraceViewTraceView is an Android platf
Android Studio uses the new Gradle build tool to configure the NDK environment and gradlendk
Android Studio 1.3 Beta1 supports NDK. However, it uses a brand new and experimental gradle build tool. Official Address: http://tools.android.com/tech-docs/new-build-system/gradle-experimental.
Before configuration, update
The tools folder of the SDK contains the android simulator operation's Important Command ADB. ADB is called Android debug Bridge, which serves as the debugging bridge. With this tool, you can manage the status of a device or mobile phone simulator and perform the following operations:
(1) quickly update devices or mobile phone SimulatorsCodeSuch as application
TraceView and androidtraceview of Android Performance Tuning Tool
Since the 16 Performance Optimization series Videos released by Google in January, many excellent articles on the optimization series have been found in major communities during this time. I have analyzed the causes of performance, shared how to optimize our applications, and introduced some tools to help us detect performance problems.
One
information can be. 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
Android test Appium, Robotium, monkey and other frameworks or tool comparisons1. Appium Test (functional test, user acceptance test, black box test)-Rating:8The Appium test is equivalent to a black box test. Just test UI logic correctness. So the Appium test framework provides limited methods. Gets a Appiumdriver object. The object just has a lot of findelements() methods to get to the UI element. UI elemen
Monkeyrunner ToolsObjective:Recently began to study the Android automated test method, some of the tools, methods and frameworks to do some simple collation, including Android test framework, CTS, Monkey, Monkeyrunner, benchmark, other test tool and so on. Because the contact time is very short, many places have the insufficiency, hoped can communicate with every
What is TraceView?TraceView is an Android platform equipped with a good performance analysis tool. It can be graphically used to let us know the performance of the program we want to track, and can be specific to method.The role of TraceViewReview the execution time of the tracking code, and analyze what is a lengthy operationA call that can be used to track methods, especially the method call relationships
collector
Android Memory Analysis Tool # # Memory MONITORGC operations need to pause other threads, so a short time-frequent GC can have an impact on the UI thread, causing frequent GC to have two common cases, where a large number of objects are created and released immediately in a short time. For example, creating an object in the OnDraw method of the view-young generation's memory area reaches the
Use of the Android source code repository and Repo ToolPreface I haven't had a weekend off for a long time. Alas, I don't have to talk about it anymore. I have to learn more and enrich myself at any time. ROM Porting is very tedious and involves a lot of knowledge points. Here we will introduce the terms that ROM Porting often hear and the use of Repo tools.AOSP, AOKP, and cm I believe many Android enthusia
the Android community, Kang said it was a custom-made ROM, a ROM from the private sector. CM is the abbreviation of CyanogenMod, the Cyanogen team is the world's largest third-party ROM compilation team, covering a very wide range of models, domestic well-known ROM such as MIUI, Hammer ROM are based on the CM implementation. In a strict sense, CM Rom belongs to the AOKP category. Although the CM ROM has always been in compliance with native
Monkeyrunner Tools Objective:Recently began to study the Android automated test method, some of the tools, methods and frameworks to do some simple collation, including Android test framework, CTS, Monkey, Monkeyrunner, benchmark, other test tool and so on. Because the contact time is very short, many places have the insufficiency, hoped can communicate with ev
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.