If an object only has soft references, the garbage collector will not recycle it if the memory space is sufficient. If the memory space is insufficient, the memory of these objects will be recycled. The object can beProgram. Soft references can be
RelatedArticleAndroid popwindow implementation left-side pop-up menu LayerHttp://www.jb51.net/article/33533.htm
13 essentials of mobile app DesignHttp://www.jb51.net/article/33534.htm
This article describes the future mobile app design trends in 20
Edit (scale down, graffiti, etc.) the image and save it as an image of the specified format and size.
Post firstCode :
Copy code The Code is as follows: bitmap BMP = bitmap. createbitmap (480,800, config. argb_8888 );
Canvas canvas = new canvas
Set full screen and no title bar for activity. Use andorid. View. Window and Android. View. windowmanager. Window. feature_no_title indicates that no title bar exists.
Windowmanager. layoutparams. flag_fullscreen indicates full screen.
The usage
In Android development, Sam can process resource files in two ways. One is to place all resource files and JNI programs in a separate resource package. When they are used, they are read using files. Alternatively, you can directly use the C ++ Layer
An application has only one thread.By default, a process has only one thread, which is consistent with other languages, such as C/C ++ and Java. That is to say, in the Android Application, a process has only one thread, and all components run in one
I checked a lot of information and found that it is still incomplete. Simply sort it out, at least make sure that my practice is correct, so as not to mislead readers, but also to record myself!
Introduction
Android provides three menu types:
SharedPreferencesIt is used to provide software parameter settings when developing software. The xml file is used to store data, and the file is stored in the/data//shared_prefs directory;
Copy codeThe Code is as follows:Public void savePreferences (
Override the following two methods in the Activity:
Copy codeThe Code is as follows: // create a menu
@ Override
Public boolean
OnCreateOptionsMenu(Menu menu ){
Menu. add (0, 0, 0, "about ");
// Menu. add (int groupId, int itemId, int order,
First, create a layout for displaying an item named item. xml.
Copy codeThe Code is as follows:
Android: layout_width = "match_parent"
Android: layout_height = "match_parent"
Android: orientation = "horizontal">
Android: id = "@ + id/name"Android:
When weEditTextEnter the phone number or URL orEmailWhen we enter a phone number, we click the input content to call the call program. When we enter a Web site, click to open the browser program.LinkifySolved this problem.
Steps:
1. layout UI
Copy
To create a child View with a proportional size, you can set the width and height of LinearLayout to fill_parent, set the width or height of the Child View to 0, and then set different weights (weight) for the child View ), in this way, the size of
The TextView font support is limited in the Android operating system. By default, the typeface attribute of TextView supports three fonts: "Sans", "serif", and "monospace, if no font is specified, the system uses "Sans" as the text display font by
Hello everyone, today we are going to talk about the collection of commonly used naming commands in android development. Android commands will inevitably be used in our development. Some commands are indeed very useful.
This is especially true for
Fragment
Android introduced Fragment in Android 3.0 (API level 11.
You can think of Fragment as a module in the Activity. This module has its own layout, lifecycle, and processing of its own input. The Fragment module can be loaded or removed when
In the past, ireader has also achieved the effect of bookshelves, but it is not easy to use using listview. Most of them are implemented using the gridview, and there is little information on the Internet. Some open-source e-books focus on reading,
The screen length obtained in android is longer than the width. According to the code on the Internet, the result is inconsistent with the actual value. For example, if my mobile phone is i9000 and the screen size is 480 * 800px, the result is 320*53
To monitor the status of a mobile phone, we mainly rely on two types: TelephoneManger and PhoneStateListener.
TelephonseManger provides a way to obtain information about basic mobile phone services. Therefore, applications can use TelephonyManager
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