Use the vibrator vibrate () to adjust the vibration time; cancel () Remove the vibration.
Copy Code code as follows:
Vibrator Instantiation
Private vibrator MVibrator1;
mvibrator1= (Vibrator) getapplication (). Getsystemservice
This paper develops a service based music player, the music is run by the background of the service is responsible for playback, when the background of the playback status changes, the program will be sent to notify the front desk Activity update
Recently in doing a multilingual switching function, similar to the micro-letter language switch, search the data are basically the following:
1. Effect of implementation
Similar to the micro-letter, in the settings interface to open the switch
First, call the Android Lint command to find out which resources are not used and generate a list of listings:
Command:lint–check "Unusedresources" [Project_path] > Result.txtafter execution, a manifest file is generated, which reads as follows:
The examples in this article describe the three kinds of menus for Android. Share to everyone for your reference. The specific analysis is as follows:
The Android menu is divided into three types: Option menu, context menu, submenu (Sub menu)
A
The effect chart is as follows
First step: new Dragview inheritance relativelayout
Package com.rong.activity;
Import COM.RONG.TEST.R;
Import Android.content.Context;
Import Android.graphics.Color;
Import
First of all, to give you the idea of realization
There are two main listening:
One is Addonpagechangelistener (); second is Setontouchlistener ();
Addonpagechangelistener () is mainly to obtain the position (slide to the first few pages)
This example describes the dynamic addition of Android dynamic layouts to TextView and ListView. Share to everyone for your reference. The implementation method is as follows:
Package Org.guoshi;
Import java.util.ArrayList;
Import
This example describes the Sqliteopenhelper usage of Android development. Share to everyone for your reference. The specific analysis is as follows:
If you use Openorcreatedatabase (name, mode, factory) in an activity directly in Android
This article is an example of the Android Development button event listener usage. Share to everyone for your reference. Specifically as follows:
There are several ways to listener event monitoring:
1, declare a common class, implement the
Now the smartphone dare not say hundred are touch screen, it should be more than 99% for touch screen, touch screen for us to operate without a keyboard, no mouse mobile phone system has brought a lot of convenience. When the user touches the screen,
1. Concept: (1). Service can be said to be a running activity in the background. It's not a separate process, it just needs to be applied to tell it what to do in the background. (2). If it implements the interaction with the user, it needs to
one: In Android development , we often use shape to define a variety of shapes, and first we know what labels are underneath shape, and what they mean:
(1). Solid: FillingAndroid:color Specify the color of the fill(2). Gradient: Gradient
1. When the Android project is developed, you often see a nice UI interface, such as when you click on a picture to be selected, and a transparent picture is covered. The expression is selected, distinguished from those that are not selected. How is
1. the principle of file reading and writing in Android:(1). All files are stored in bytes.(2). The characters that are not files are reserved on the disk, but the characters are encoded into bytes before they are stored to disk.(3). When reading a
Detailed explanation of the Android broadcast (Broadcastreceiver).
1. Broadcastreceiver Registration Process:(1). Once the broadcast message is sent out, only the object that subscribes to the broadcast receives the broadcast message and makes the
Sneak into the app to share the functions of a micro-trust friend or circle of friends is a common occurrence, such as Android sharing a Web page information (URL) to the micro-client code:
/** * Micro-credit sharing: Sharing Web page *
This article describes in detail how to implement the micro-letter initiation interface in the following figure. The starting interface of this class is characterized by the lifetime of the entire application, which occurs only when the first entry
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.