Basic knowledge of Android [project training-achieve two-level navigation on the main interface] [3], android Training
[This project training is a comprehensive exercise of basic Android knowledge. Note: some pictures and materials will be used in the project and they will be organized at will. A resource will be uploa
Files \ Java \ without installation.
3. Run the Program C: \ Program Files \ Java \ eclipse \ eclipse.exe. In the displayed dialog box, configure the working directory:
Specify the working directory (which can be specified according to your habits) as follows:
Method 2:
1. Download adt bundle forwindows (no further Steps 3 and 4 are required)
Http://www.androi
+ "song =" + song );
Super. onCreate ();
}
/* 3. onDestroy Method
* When a visitor calls the Context. stopService method, call this method to disable the Service.
**/
Public void onDestroy (){
Super. onDestroy ();
}
/* 4. onUnbind Method
* When a visitor calls the Context. unBind () method, call this method to unBind it from the Service */
Public boolean onUnbind (Intent intent ){
Return false;
}
}
Note 1: When the client accesses the
coexist in multiple tasks at the same time.
2. singletask is only one of the mobile phones and must appear at the bottom of the stack of this task.
3. singleinstance indicates that this acitivity occupies the entire task, and this task has only such an activity.
4. singletop is a bit similar to standard. The difference is that he will reuse his own entity at the top layer of the task. For example, ABC is t
has not been found abnormal, return source code can find this line: intentintent =new Intent (Intent.action_all_apps , Uri.parse ("tel" +et.tostring ()); it's not hard to find the intent here. . Action_all_apps wrong code, dialer, of course, is intent.action_call, the most important is the most easily overlooked a problem is: "Tel:", remember that there is a colon behind the Tel, must not forget to add, I will keep reminding you that the activity has not been created. So the problem has been so
This section will be divided into five steps to complete the deployment of an Android development environment.First step: Install the JDK. Step Two: Configure the variable environment for the JDK on Windows. Step three: Download and install Eclipse. Fourth step: Download and install the Android SDK. Fifth step: Install the ADT plugin for Eclipse.(1) Installing the JDK: JDK (Java SE Development Kit Java Sta
Android cainiao study note 13 ---- Android controls (2) simple examples of custom controls, android Custom Controls
Sometimes, you may feel that the control provided by the system is too ugly, and you need to customize the control to achieve the desired effect.
The following is a reference to the first line of code.
1.
ImageView form a binding relationship between weak references !!!! BitmapDownloaderTask bitmapDownloaderTask = new BitmapDownloaderTask (imageView); // 2. Create a DownloadedDrawable. // you can see through the DownloadedDrawable construction method: // This DownloadedDrawable weak reference to this bitmapDownloaderTask DownloadedDrawable downloadedDrawable = new DownloadedDrawable (bitmapDownloaderTask); // 3
subclass, when the visitor successfully connects to the Service, the onServiceConnected (ComponentName, IBinder service) of the ServiceConnection object is called back) method to obtain the MyBinder object returned by the onBind method of the Service. The IBinder object can access the Service status data, that is, the value of count.3. Source Code practice(1)/com/exanple/android_service_bind/BindService. java: implements a Service subclass, and then
drawable and the container , when the control needs a * * background that is more than the actual borderSmall time * *, more suitable to use insetdrawable, such as using this can solve our custom dialog and screenA spacing problem, I believe that friends who have done know, even if we set up layout_margin words is useless, thisIt's time to use this insetdrawable! Simply set a insetxxx setting for insetdrawable to be differentThe direction of the margin, and then set the background to dialog!
Develop weather software for Android (3) and weather for android
It takes nearly half a month to develop the Android weather software together in the previous article. I am sorry that there has been no update due to something. It will speed up the update process recently, we strive to write this series of blog posts be
Summary of problems encountered during android development [2]. android Summary
36. Code specificationsHttp://liuzhichao.com/p/1781.html#more-1781
38. In pure layout, set weight to 1 for all Views except the bottom.
39. Add drawable to the left of editviewIf you only add images on the left or right, you can use an attribute of EditeView.
This article contains 3 kinds of hidden top status bar and title bar and a hidden Android 4.0 flat bottom status bar method, share for everyone to refer to, specific content as follows
Method One
public class Mainactivity extends activity
{
@Override
protected void onCreate (Bundle savedinstancestate)
{
super.oncreate (savedinstancestate);
Hide title bar
requestwindowfeature (window.feature
of the parent component, the second text box is located above the first text box, and the third text box is located at the left of the second text box.
Relativelayout
1 XML version = "1.0" encoding = "UTF-8" ?> 2 Relativelayout Xmlns: Android = "Http://schemas.android.com/apk/res/android" Android
Android development art Exploration Study Notes (3), android art Exploration
Chapter 3 View Event System
3. 1 basic View knowledge
3.1.1 what is view
View is the base class of all controls in Android. It is an abstraction of con
are activity, listactivity, expandablelistactivity.B. Android, when the application environment changes, the device configuration environment may change (such as screen rotation, keyboard usability changes, language changes). However, when these changes occur, the Android system restarts the activity (OnDestroy () is called, and then OnCreate () is called to create the activity). This is designed to load t
compilation is very time-consuming, we can use Log breakpoint to print logs.
Do not modify source code. You can view the printed logs on the console in the Debug window.
Method breakpoint: The method breakpoint is the same as the function name. It is the breakpoint at the function entry and end.
Exception breakpoint: Run-> View blockpoint-> javaException.
Attribute breakpoint: When an attribute is modified or accessed, it is hard to find out in a complex multi-threaded environment. Run-> View b
: sharedUserId refers to sharing a uid, that is, all projects with the same property share the same uid. In this way, the permission barriers are eliminated, dalvik will also be integrated into one. You can test it and write a few projects. If this attribute is not available and it is run at the same time, the current process will be listed and intuitively described.
The following code shows two parts: the main program Re_Skin and the skin program Re_Skin1.
First, the main application code:
1.
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.