Original blog
Part 1 Android thread
Android thread model
Each process in Android has a
Main
"Main thread (also called UI thread. In addition to distributing and processing all events, it is also responsible for calling the lifecycle
Sometimes you want to use a Custom font file in an application.CodeIt can be used as a reference.
1. Put the font file in the assert folder, Which is fonts/xxx. TTF.
2. Use the fontmanager. changefonts () method to change the font in the
In multimedia applications, image is the most basic function module. Next we will look at how to obtain and store images in Android. The image acquisition and storage function embedded in Android gives us a comprehensive understanding of the entire
Understanding common open-source projects can broaden our horizons and know which resources can be used, which is of great benefit to our usual design and development. Of course, if you have more time, you can also study an open-source project to
I think everyone in Android is familiar with contextmenu. During this time, I registered contextmenu for a component in the activity and found that the contextmenu component cannot be long pressed. Because the contextmenu principle is equivalent to
Blog migration-I have migrated my blog to www.ijavaboy.com to better manage it. We are sorry for the inconvenience caused by no updates! New address of this article: Click me
Here, our launcher can run, and the effect is similar to that of the
This article Reprinted from: http://blog.csdn.net/dekunchenivan/article/details/6718678 #
The Chinese meaning of gravity is "Center of Gravity", indicating the horizontal and vertical parking position of the view.
Android: gravity: The view control
When a user receives a call, a small icon appears in the top Status Bar of Android. The system prompts you whether there are any processed news. You can view these news when you drag the status bar. Android provides icationicationmanager to manage
Like image and audio, video information is also managed by mediastore in Android.
Each video corresponds to a thumbnail, which is usually the first frame of the image.
See the code below:
Package demo. camera; Import Java. util. arraylist;
The system evaluates the importance of processes and presents the importance in the value "oom_adj" to each process. (The system determines which processes need to be terminated based on "oom_adj, in general, the larger the value of "oom_adj", the
We know that after entering the Baidu image and entering a keyword, we first see a lot of thumbnails. When we click a thumbnail, we can go to the big image display page.
The big picture display page contains an image gallery. The current big picture
In actual application development, we sometimes need to set the activity to full screen display. Generally, we can set the full screen display effect in two ways:
First, you can set it in the code,
Second, set full screen through the manifest
The onmeasure method is called when the parent element of the control is about to place its child control. It will ask a question: "How much do you want to use ?", Then two parameters -- widthmeasurespec and heightmeasurespec are input.
They
In an application, there are usually multiple activities, each of which corresponds to a UI layout file. In general, in order to maintain a uniform style between different windows, many identical la s will be used in these UI layout files. If we
Generally, programs are written under the pressure of the Project Plan. The Code completed at this time can complete the specific business logic, but the performance is not necessarily optimized. Generally, excellent programmers constantly rebuild
IOS-style UIS are popular. Many Android UI designers are also willing to design Android UI into a UI style similar to IOS. The following is an example to illustrate how to use shape to define an iOS-style button.
Define an ios_button_grouped.xml
Today, a colleague came to consult about memory leaks. So with this blog, let's make a simple record.
He said that their app, checking memory usage, found that it will grow rapidly and will not decrease, come and ask about the reasons. I thought it
Blog migration-I have migrated my blog to www.ijavaboy.com to better manage it. We are sorry for the inconvenience caused by no updates! New address of this article: Click me
In the previous article, we mentioned that the first function needs to
After my experiments, we can achieve horizontal and vertical scrolling perfectly. Let's not talk much about it. First, let's look at the layout file:
Specify the width of linearlayout
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