Android Application class:
Detailed explanation for the application class in Android:
In peacetime development, we may sometimes need some global data, so that all the activity and view in the application can be accessed, when you encounter this
Edit (shrink, doodle, etc.) the picture and save it to a picture of the specified format and size.
Post Code First:
Copy Code code as follows:
Bitmap bmp = Bitmap.createbitmap (config.argb_8888);
Canvas Canvas = new Canvas (BMP);
Paint Class
The *paint class represents a brush that describes the color and style of the graphic, such as line width, color, transparency, and fill effects.
* When using the paint class, you need to create an object of that class, which can be
Popupwindow can achieve a floating layer effect, the main methods are: Can customize view, through the Layoutinflator method, can appear and exit animation, you can specify the display location.In order to Popupwindow multiple functions and strive
First look at the general way to hide the status bar:
Method One:
@Override
protected void onCreate (Bundle savedinstancestate) {
super.oncreate (savedinstancestate);
Remove TITLE
requestwindowfeature (window.feature_no_title);
Remove the
Full is the pit, because the server lazy let customer service to write unified order, the server only gave the URL of the notification. Micro-letter Payment demo does not unify the order of the Code.
Read this article before reading:
1. Android Memory leak concept
Many people think that Java programs, because there is garbage collection mechanism, there should be no memory leaks. In fact, if we do not use an object in a program, but because there is still a reference to it, the
Everyone good, today to share is to resolve the problem of the resolution of the picture Oom, we can use bitmapfactory here a variety of decode methods, if the picture is very small, will not appear oom, but when the picture is very large
It is
In the project just completed, in a page, user experience Division to put forward the user operation of the stay button to remain in the page, no matter how long the page can be scrolled to stay in the visual area of the page. The final
This article describes the ListView to add an event to the button above each item as follows:
1. First look at the effect of the picture:Here for testing only, I write the data dead, as needed can be modified on their own, in addition to achieve
2 classes: 1 entity classes person.java,1 A class that inherits the activity
1.person.java
Copy Code code as follows:
Package com.mrzhu.work_1_sax;
public class Person {Private String personId;private String name;Private String
Copy Code code as follows:
public class
DBOPenhelper extends Sqliteopenhelper {
Class is not instantiated and cannot be used as a parameter to a parent class constructor and must be declared static
Public Dbopenhelper (context, int version) {
In applications, you may need to pass the data when you jump to another activity, and you may use the bundle object.
In the mainactivity, there is a intent that navigates to bactivity,
Intent
Copy Code code as follows:
{
Data storage and access common ways:FileSharedpreferences (preference parameter setting)SQLite databaseContents provider (content Provider)Internet
Activity (context)The Context.getcachedir () method is used to get the/data/data//cache
Program execution needs to read to the security sensitive item must declare the related permission request in Androidmanifest.xml, the complete list is as follows: 1. Android.permission.ACCESS_CHECKIN_PROPERTIESAllow read and Write access
The first thing to say is that users may regard this practice as rogue software. Most of the time, programmers do not want to make software rogue software, there is no way, the leadership to decide.
When we use some Android apps, we may find that
In an XML layout file, we can set either PX or a DP (or dip). In general, we would choose to use a DP, which would ensure a consistent layout on a machine with different screen resolutions. But in the code, how do you handle it? Many control methods
In the Android application development, we will use a variety of code debugging; In fact, after the development of Android, we may encounter some random problems, such as high CPU, memory leaks and so on, we can not easily debug the code, we need a
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