Author: Sun Dongfeng 2010-01-07 (source must be noted for reprinting)
In my previous article "html" target = _ blank> two hours proficient in Android Development ", the author explains how to use Android interfaces to develop the Wrap package of j2e-
When developing android applications, you often press the return key (that is, keyCode = KeyEvent. KEYCODE_BACK) to close the program. In most cases, the application is still running in the task. In fact, this is not the result we want.
We can do
Preface
This chapter is the developer Guide/Developing/Tools/aapt, translated from "Mobile cloud _ 文bin", welcome to its blog: "http://blog.csdn.net/caowenbin ", thanks again for "Mobile cloud _ Wenbin "! We look forward to your participation in
Friends familiar with Windows programming may know that Windows programs are message-driven and have a global message loop system. Android applications are message-driven, and the message loop mechanism should also be provided. In fact, Google
Iterator Pattern Iterator ModeScenario ConjectureIf you write code frequently, you will encounter traversing an array. Use the for loop to obtain the array subscript and perform further operations. For example, the following code: Int [] array = new
A search on the Internet will create shortcuts for your own applications, but this article focuses on creating Desktop shortcuts for "specified applications.Common Desktop shortcuts have two elements: 1. Application name 2. Application icon.
The
The Widget is a small application. After the AppWidget framework is added to Android1.5, developers can use this framework to develop widgets. Widgets can be dragged to the user's desktop and interact with each other. It provides a full-featured
Browser controls are available in every development environment, which provides a foothold for vest magic. webbrowser for windows, webview for android and ios. However, their engines are different. Compared with Microsoft's webbrowser, android and
In the previous article, Android ApiDemo sample resolution (31): App-> Preferences-> Launching preferences uses the AdvancedPreferences defined in Advanced preferences.
This article describes AdvancedPreferences in detail. This example is called
Applications can also use external buckets such as SD cards to access resources. This example describes how to use an external bucket to create and delete files.
In this example, the SD card is used to create files in three locations. The two files
This article describes performance design. I estimate that many children's shoes have not seen the original article. Here we recommend that you see the article from the Android official website and the downloaded Android Docs Dev Guide. If you have
I encountered such a problem a few days ago.Our application customer saw that there was a problem with the UI. It was originally a Square area and the result was a rectangle, with some deviations.After that, I began to modify it. I felt that the UI
Android Application Test Questions enhanced on the basis of the enhanced versionSome Supplements are slightly bloated, just for learning1. lifecycle of the activity.Method
Description
Can be killed
Next
OnCreate ()
Called when the activity is
For example, the components added to the ScrollView cannot be automatically scaled to the screen height in any way.
Layout file.
[Html]Android: id = "@ + id/scrollView1"Android: layout_width = "fill_parent"Android: layout_height =
1. HeadersAt the top level of the customer side, our products consume too much power and we need to solve the power consumption problem.
2. IdeasFirst, determine whether the power consumption is required. The ZDbox software can be used to
1. Concepts and extensionsVideoView is a media playback display and Control control provided by the android system. Its structure is as follows:Prototype: VideoView extends SurfaceView implements MediaController. MediaPlayerControlClass
1. Open/closed (OCP)
Introduction: to scale, do not modify it. For example, I provide an external interface. If you want to update the API, do not modify it directly. Instead, provide another API and notify you when to switch to the new API.
For
Currently, we have seen two ways to adapt to changes in the screen direction. Now let's take a look at the changes in the Activity status when the screen direction changes.
1. Create a project: Orientations.
2. main. xml file.
[Html]Android:
So far, we have learned that when the screen direction is changed, the activity will be destroyed and then rebuilt. Remember that when an activity is rebuilt, its current information may disappear. When an activity is killed, one or two of the
1. Use the setAnimation of the View to implement animation (TextView, ImageView, ListView, and so on)
Java code:[Java]Public void UpdateViewContent (){TextView txtview = (TextView) findViewById (R. id. content_view );Txtview. setText (MyGetNextText (
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