We usually have this requirement when developing the UI. The following section shows the size of the screen.CodeYou can get the screen size on the Android platform. The code is as follows:
1. Display display = getwindowmanager (). getdefadisplay
In Android, the basic class for processing images is bitmap, which, as its name suggests, is bitmap. Memory usageAlgorithmThe image width is as follows:HeightConfig. If config is set to argb_8888, the above config is 4. One 480The memory occupied by
1: There are two ways to fl:
1) follow the source code/device/Ti/panda/readme file to flash the machine. It is difficult to start bootloader. Bin on the host PC through USB boot! It's not always time to start bootloader. bin. It feels like luck!
We all know that the upper-layer applications of Android are based on Dalvik virtual machine. The Dalvik VM is characterized by registers. Compared with Sun's JVM (based on stacks, there are no registers), theoretically there are fewer instructions
Summary of problems with the android file. createnewfile () method
Http://my.oschina.net/AlexZhuang/blog/55764
Today, a series of problems occurred while creating folders and saving files in sdcard:
1. Pay attention to permission issues first
Textview is used to display text. Sometimes you need to set individual words in textview as hyperlinks, or set the color and font of individual words. Then you need to use the spannable object, you can use the spannable object to implement the above
Android edittext has an attribute set Android: inputtype = "? "Is used to set the text type to help the input method display the appropriate keyboard type.
The following settings are available:
None,
Text,
Textcapcharacters Letter size,
Size of the
Intent instance call:
1. Call an external program:
Parameter 1: process name
Parameter 2: Application class
try{ Intent eth = new Intent(); eth.setClassName("com.android.settings", "com.android.settings.EthernetSettings"); startActivity(
In the Development Project, threads can help us increase the running speed. In Android development, I know that there are four threads: The old thread, the second thread is asynctask, and the third thread is timettask, the fourth is logoff. The four
Define related variables
private Handler uHandler;private TimerTask task;private Timer timer = new Timer();;
Implementation Code
Handler part: used to process received messages. messages are processed according to MSG.
uHandler = new
This content is quite useful, especially for programs that need to adjust the brightness. This code can not only change the current activity, but also the brightness of the entire system.
Code:
Package com. Jimmy;
Import Android. App.
In fact, extracting and packing boot. IMG is easy to understand !!1. First, add the attachment: tool. Click Open Link6.0 kb, downloads: 60)Decompress the package to the bin folder for future use.2. decompress the boot. imgfileGo to the folder where
Some time-consuming operations are often used in applications, and users need to wait, such as loading webpage content ......
At this time, you need a prompt to tell the user that the program is being executed, and there is no false or real death ...
Android uses a Linux-based file system. With the concept that everything in Linux is a file, we can create and access private files of programs, you can also access the original and XML files stored in the Resource Directory.
You can also access and
Today, I encountered a very headache in the project, mainly because I did the framework for the first time and did not know anything about the underlying compilation.
This is the case. We need to compile the framework and run it on Galaxy S. Other
1. How do I classify logs and logs in a program?
Verbose, debug, info, warning, and error
2. Give you a log file. How can I locate the problem?
1) if it is an ANR problem, search for the "ANR" keyword. Quickly locate critical events.
2) If it is
1. the following method applies to the real machine: Download the android source code, compile the modified framwork code, generate framework. jar, push it to the system/framework directory, and restart the machine! Ok2, the following method is
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