An Intent is something that is used right now; a PendingIntent is something that may create an Intent in the future. You will use a PendingIntent with Notifications, AlarmManager, etc.Notification n = new Notification (R. drawable. face_1, "Service
When the same variable is often used in multiple activities, use Bundle to set each call to the Activity. In android, you can use Application context to conveniently use the same variables repeatedly for different activities in the entire
I went to the movie yesterday. The Titanic, after reading it, I couldn't say anything in my heart ~~~~.Haha ~~~ I haven't written a blog for a few days. I have learned 3 Dmax for two days over the past few days. Because bip and model are downloaded
To inject a parameterized type, such as List :
[Java] class Example {@ InjectVoid setList (List list ){...}}Class Example {@ InjectVoid setList (List list ){...}}
You can use TypeLiteral to create this binding. TypeLiteral is a special type that
An efficient list adapter demo is provided in the Android api demo, which contains two recommended efficient principles. 1. In the getView method, use convertView again. convertView is the old View. We recommend that you first determine whether it
Android: launchMode
This attribute defines a command to start the Activity. There are four working modes that will be combined with the Activity tag (FLAG_ACTIVITY _ * constant) in the Intent object to determine what should happen when the called
During the development process, tens of thousands of pieces of data are parsed in xml, and it is found that it takes a lot of time to insert data in sqlite because transactions are not used. By default, transactions are inserted every time.
In this
This article records two minor issues encountered during development.1. In many cases, you need to use java code to change the font color and password display mode, and use java code to create a control and layout, the problem encountered this time
Find two encryption algorithms, one MD5 encryption, which is applicable to password encryption, because this algorithm is irreversible; the other is RSA encryption, Which is reversible: 1. MD5 Encryption Import java. security. MessageDigest; Public
There are two types of Android dialogs: PopupWindow and AlertDialog. Their differences are:The position of AlertDialog is fixed, while the position of PopupWindow can be random.AlertDialog is a non-blocking thread, while PopupWindow is a blocking
First look at the code[Java]TextView. setLayoutParams (new TextSwitcher. LayoutParams (LayoutParams. FILL_PARENT, LayoutParams. FILL_PARENT ));
Why use LayoutParams of TextSwitcher. Check the API and you will see These supply parameters to the
1. Data is not reloaded during landscape/portrait switching. You only need to add the following to menifest:
Android: configChanges = "keyboardHidden | orientation"
2. When switching between the portrait and landscape screens, the program will
Many netizens may find that the mobile QQ Android version launched by Tencent recently contains an opening Screen Splash Screen loading effect. Generally, a game or a large software may need a process to release resolution resources, it requires the
Public void onCreateContextMenu (ContextMenu menu, View v, ContextMenu. ContextMenuInfo menuInfo)
This method is called when the context menu of the View object is displayed. Unlike onCreateOptionMenu (Menu, MenuInflater), this method is called
First, you can only enter numbers:
[Html] Android: id = "@ + id/edit_digit_input"Android: layout_width = "wrap_content"Android: layout_height = "wrap_content"Android: digits = "1234567890 ."Android: singleLine = "true"/>Android: id = "@ +
This course series is short, which is a basic explanation of Android, and has a long history. It seems that the platform used in the video is still Android2.1. Therefore, if you have higher requirements, for more information, see the SDK
First, obtain the album image:Private final String IMAGE_TYPE = "image /*";Private final int IMAGE_CODE = 0; // The IMAGE_CODE here is defined by yourself.// Use intent to call the album function provided by the system. startActivityForResult is
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