Features:
1. SharedPreference
This storage method only supports simple storage, as its name is.
Advantages: simple and convenient, suitable for quick storage of simple data
Disadvantage: the stored files can only be in the same package and cannot
In the previous project, we needed to decode the h264 video, use ffmpeg, and decode yuv. The best display method is to display the video through opengl es 2.0, if opengl es 2.0 is not used, yuv2rgb must be used to draw the image. I only know two
Using ActionProvider in Android4.0 (API leverl 14) makes it easier to implement a user-friendly and efficient shared Action in the ActionBar. Once an ActionProvider is appended to the Intent ActionProvider menu, you only need to provide a shared
Drawing a UI is only one part of creating a custom view. you also need to make your view respond to user input in a way that closely resembles the real-world action you're mimicking. objects shoshould always act in the same way that real objects do.
Today, a custom AlertDialog dialog box is created. It is normal when you click it for the first time, but an error occurs during the second call: java. lang. illegalStateException: The specified child already has a parent. you must call removeView ()
Accessibility services are a feature of the Android framework designed to provide alternative navigation feedback to the user on behalf of applications installed on Android devices. an accessibility service can communicate to the user on the
To perform a query, create the CursorLoader, set up its query, and pass it to the loader framework. from then on, the framework manages everything. it runs the query on a background thread, returns the results to the foreground, and watches for
1. MotionEvent Functions
The following methods support multi-touch, that is, you can call the following methods for a single touch point.
1.1 getPressure ()
This api can be used to obtain the pressure when you touch the screen with your fingers, but
On android, you want to achieve local amplification, such as adding a magnifier to the screen.
It is found that ShapeDrawable is the best choice.
First, you can specify the drawing shape when ShapeDrawable is constructed,
Second, you can use shape.
Change the following true to false,
[PhoneWindowManager. java]
Public int finishPostLayoutPolicyLw (){
...
} Else {
If (DEBUG_LAYOUT) Log. v (TAG, "** SHOWING status bar: top is not fullscreen ");
-If (mStatusBar. showLw (true) changes | =
1. Create color. xml under res/values
#80 ffffff PS: #80 is the transparency value (80% transparency), and ffffff is the color value (black)2. Create style. xml under res/values
PS: parent = "android: style/Theme. dialog "sets activity as a
When I was a beginner in android, I felt that the ListView component was widely used and difficult. The following are my own problems:
1. array-based ListViewYou must use ArrayAdpter to provide table items.
[Java]...Array [I] = cursor. getString (1 )
Android engineering coding problems
1. Window | Preferences | General | Content Types | right select Text | Java Source File | Default encoding at the bottom enter the UTF-8 and click Update
Set all java files to UTF-8 by default
2. Window |
I found this control is quite useful and can control the progress bar by myself, and the control is very powerful. I will explain it later.
First, a simple
Package com. weizhu. lan. view;
Import com. weizhu. lan. util. MyprogressDialog;
Import
1. There are two ways to get a video Thumbnail (1) through the content provider (2) create a thumbnail manually
(1) The disadvantage is that you must update the media library to see the thumbnail of the latest video.
[Java]/*** @ Param context* @
There are many ways to implement ImageButton with text. Here I only list one method: Define a class inherited from ImageButton, and Override its onDraw (Canvas canvas) method.
? Public class MyImageButton extends ImageButton {Private String text =
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