Alibabacloud.com offers a wide variety of articles about android getapplicationcontext, easily find your android getapplicationcontext information here online.
Android uses global variables to pass data. android global variables
In android, the Application is used to save global variables. It exists when the package is created and is released only after all the activities are destroy. So when we need global variables, we only need to implement them in the application, and obtain an Application object by calling the
(getApplicationContext (), "initialization failed, error code:" + code, Toast. LENGTH_SHORT). show ();}}};}
Not all the code above. I have uploaded all the Android code to GitHub:
Https://github.com/a396901990/3D_Sphere/tree/feature/Voice_Weather_3D_Sphere
In the project, the 3DVoiceWeather file is an Android project. You can import it to Eclipse to view it.
Android development step by step 32: Toast and androidtoast
Toast has the English name Tusi. In Android, this class is used to pop up the prompt information. I think the sdk author thinks that the prompt message is like a piece of Toast. We will not talk about this theory much, so we will start to practice it.Step 1: Design the pageHome Page toastview. xmlAndroid: orientation = "vertical"
Intermittent finally to the Android development and reverse of the two books, although there is no Java, and Android development of the basis, but the overall feeling is still relatively able to receive, after all, are analogy. Of course, it is necessary to dig into the details and Chine of the language.
Here are 2 books, and I personally think it's better for Android
How to check visibility of software keyboard in Android?
Configuration Change
Problems caused by Android Configuration change and how to solve them
Handling Runtime Changes
Context
Android Learning--context and Getapplicationcontext ()
Context in
The Notification in the top bar of the Android homepage can customize the style of the Notification message bar and click the Notification column to enter the people-oriented program ., Android custom message bar
Common Program notifications are displayed in the top bar of the home page.
1 package com. lixu. tongzhi; 2 3 import android. app. activity; 4 import
We are not familiar with the Listview grouping, because the contact information in the address book that comes with Android is the ListView grouping. This function has been used in recent projects. Therefore, we hope to be helpful when we have time to update the next blog over the weekend.
In fact, there is no big difference between the grouped ListView and the ListView we usually use, that is, we need to make a judgment in the getView method in the a
same object. In fact, this result is also very good understanding, because the previous has said, application itself is a context, so here to get Getapplicationcontext () The result is MyApplication itself instance.Then some friends may ask, since these two methods get the same results, then why should Android provide two ways to repeat the function? In fact, these two methods are quite different in scope.
(getApplicationContext (), the selected date is: + year + month + dayOfMonth + day, Toast. LENGTH_LONG ). show ();}});}}
:
Iv. Time Selector
TimePicker allows you to select a time. The component is more elegant. You can also set a time to change the listener. Once the time changes, the callback method is triggered;
Instance source code:
XML file:
Activity source code:
Package shuliang. han. time_date_test; i
Android mobile guard-md5 encryption process, android-md5
In the previous article, we stored the user's password using SharedPreferences, and opened/data/com. wuyudong. the config. import the xml file to the local device to view the content:
The password is in plain text, which is very insecure. Md5 encryption is used here
For more information, see http://www.cnblogs.com/wuyudong/p/5941131.html.
Compile the
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.