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
Engaged in Android development, it is inevitable that some advertisement sdks will be embedded in the application. After many sdks are embedded, almost every requirement is found in AndroidManifest. the xml declarative Activity advertisement SDK
For details, see http://developer.android.com/tools/debugging/ddms.html. DDMS is a bridge between IDE, emultor, and real android devices. Developers can view the running process/ready-to-use status on the target machine through DDMS. They can go to
1) View switching control-Overview of ViewFlipper
The ViewFilpper class inherits from the ViewAnimator class. The ViewAnimator class inherits from FrameLayout.
View the source code of the ViewAnimator class. We can see that this class is mainly used
The main purpose is to enable the program to exit when you press the back key.
Implementation ideas:1. The event is triggered when the back key event is captured.
Copy codeThe Code is as follows: @ Override
Public boolean onKeyDown (int keyCode,
Copy codeThe Code is as follows:
Linear layout configuration. In this label, all components are lined up from top to bottom.
-->
Xmlns: android = "http://schemas.android.com/apk/res/android"
Android: orientation = "vertical"
Android: layout_width =
Common data storage and access methods:FileSharedPreferences (preference parameter settings)SQLite DatabaseContent provider)Network
Activity (Context)The Context. getCacheDir () method is used to obtain/data//cache directory.The Context. getFilesDir
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 (
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
There is a need. We click to exit the application in the menu item, and the application exits without returning to MainActivity.
Design:
There are two application interfaces: MainActivity and BActivity, and the general class ExitUtil for the program.
AIDL: Android Interface Definition Language, which is a description Language of the android internal process communication Interface. Through this Language, we can define the communication interfaces between processes.
ICP: Interprocess
1. scale down an image
Copy codeThe Code is as follows: // zoom
Public static Bitmap zoomBitmap (Bitmap bitmap, int w, int h ){
Int width = bitmap. getWidth ();
Int height = bitmap. getHeight ();
Matrix matrix = new Matrix ();
Float scaleWidth = w/
The Android platform has provided many standard components, such as TextView, EditView, Button, ImageView, and Menu, as well as many layout controls. common components include: absoluteLayout, LinerLayout, RelativeLayout, and TableLayout. However,
First, we need to introduce LayoutAnimationController:
* 1. LayoutAnimationController is used as a control in layout or a ViewGroup.* Set the animation effect (that is, the entire layout) for the controls in it)* 2. Each control has the same
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
The project encountered a problem where the file name to be downloaded is Chinese and there are spaces. If the connection is not processed for download, an error will be reported. To solve this problem, you only need to encode your url and then
The default Toast for Android is very simple and easy to use. However, sometimes our program uses the default Toast instead of the overall style of the program. In this case, we need to customize Toast to make it more integrated with our
1. sax Method
Copy codeThe Code is as follows :/**
* Use sax for parsing
*/
Public class SaxParse {
/**
* Sax Parser
*/
Private SAXParser parser;
Public SaxParse (){
Try {
SAXParserFactory f = SAXParserFactory. newInstance ();
Parser = f.
We all know that Programmers sometimes spoof things, just like in android, programmers hide this item in setting:
We can find "about mobile phones" in which there is "android version,
When we click "android version", an image (spoof typeThis is the 2
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