Today, the gralloc out of memory error occurred while working on the project. After several days of testing and adjustment, it was determined that it was in AndroidManifest. android: theme = "@ android: style/Theme is used in xml. translucent. this
Recently, the BOSS decided to take a picture and then upload the image over FTP. When BOSS speaks, you can start it. According to the combination of HTML and CSS, you can make a beautiful photo frame. However, I suddenly found that the ImageView
Message mechanisms are mostly used for inter-thread communication and UI update.
Recently, I encountered an application scenario where I needed to update the UI by pressing the button. In this case, you only need to send a message by handler when
ViewStub is an invisible View with a size of 0. The best use is to implement delayed loading of the View and load the View as needed, the common performance optimization methods in Java are the same for delayed loading. When the setVisibility
Some time ago I studied the implementation of the graffiti function. In fact, the implementation of the graffiti function alone is quite simple. The key technical difficulty is the implementation of the withdrawal and redo functions. However, this
In Android, an Activity can be understood as a screen. Intent is used to switch a program from one Activity to another.
Intent is responsible for interaction and communication between Android programs and between activities and services in the
During Android development, you can always meet the Context class or its instances. Context instances are often used to provide reference for "Applications. For example, in the following code snippet, the first parameter of the Toast class accepts a
SharedPreferences is a lightweight storage class on the Android platform. It mainly stores some common configurations, such as window status. Generally, reload the window status onSaveInstanceState in the Activity and save it using SharedPreferences,
To use Gallery in a recent project, the function of GridView must be available because of business needs. [Java]1. package com. easymorse. grid. demo;2.3. import java. util. ArrayList;4. import java. util. HashMap;5.6. import android. app.
Before introducing how to change the animation effect, we will first introduce the tool classes provided by the Android SDK.AlphaAnimation: controls the transparency of animation objects and fades in and out.TranslateAnimation: controls the position
Because it is a learning test for the use of ContentProviderTherefore, two android projects are created.However, the package names of the two projects are the same.That is, manifest package = "com. test"
The contentProvider implementation is
When the phone call recording, photography, recorder, etc. all need to use the size of the T-card Hu judgment:[Java]Public static boolean isAvaiableSpace (int sizeMb ){If (android. OS. Environment. getExternalStorageState (). equals (android. OS.
Recently, I have been playing the rtmp protocol on android and compiled ffmpeg into several. after dynamically linking the so Library (how to compile ffmpeg source code in android later), you can reference the header file and directly write your own
The ContextMenu context menu is equivalent to the shortcut menu displayed by right-clicking on the computer, that is, the shortcut menu that appears by a certain item (about 2 seconds) in Android,
ContextMenu context menu creation method:
1.
The basics of the basic, the Code has a detailed explanation,
[Java] public class DrawingActivity extends Activity {/** Called when the activity is first created .*/@ OverridePublic void onCreate (Bundle savedInstanceState ){Super. onCreate
[Java] The effects written in xml can all be implemented using code. The following code is used to implement the switching effect of view States through code writing.The effects written in xml can all be implemented using code. The following code is
Proportional scaling of the image. The first parameter is the image path, and the second parameter is the maximum value of the final image (the largest value in width and height ).[Java] // The limit value MaxSize * (2/3) = the actual use value of
Android game development generally uses the view or surfaceView chapter to learn how to use the view or surfaceView. Let's first look at the ViewThe view class is a superclass of android. This class contains all screen types. Each View has a canvas
Embed printable Resources
Defines a plotting resource in XML, which can be embedded into another plotting resource with a specified distance. This type of resource can be used when the View object requires a lower background than its actual boundary.
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