Android provides a large number of UI controls, and this article describes how to use TextView, ImageView, Button, EditView, ProgressBar, SeekBar, ScrollView, WebView. Before introducing the various controls, let's briefly introduce the most basic
In fact, the mobile phone in the network monitoring is also more important, sometimes we must real-time monitoring of the program's real-time network status, Android in the network disconnect and connect the time will be broadcast, we through the
Broadcastreceiver means "broadcast receiver", which is used to receive broadcasts from the system and applications.
In Android, broadcast is a widely used mechanism for transmitting information between applications. And Broadcastreceiver is a kind
This article describes the Android implementation of the activity, service and broadcaster of the three major components of the method of calling each other. Share to everyone for your reference, specific as follows:
We look at two problems,
1,
Android has five broad layouts:
Linear layout (liearlayout): screen vertical or horizontal layout.
Frame layout (framelayout): Controls start the layout from the upper-left corner of the screen.
Relative layout (relativelayout): With
It's simple, there's no database, and there's no handling of exceptions.Login: Enter user name click on login.Send message: Specific format->touser:message1. Server: Save online users
public class Online {
private static online monline =
Switch the picture control left and right, we all use Viewpager, Viewfipper more, I also used viewpager to achieve, using the viewpager to achieve around the circular sliding picture, interested can go to see, Introduction today is based on
This article introduces the Android realization ImageView picture Double click enlarge and reduce the related skill, share to everybody for everybody reference, the concrete content is as follows
public class Doublescaleimageview extends
Usually we need to store on the phone for audio, video and so on large files, previously learned to use file for storage (using the file operation to store); Because of the small storage space of the phone itself, we need to store the file in SDcard,
Now in the app, the picture preview function must be indispensable, the user has basically formed conditioned reflex, see Small map, click to see big picture, see big figure two fingers begin to enlarge, enlarge, begin to move to the designated part.
This article has launched two kinds of Android gestures to realize ImageView scale picture size method, share for everybody reference, the concrete content is as follows
Method One:write the following code into Mulitpointtouchlistener.java, and
Sideslip menu in many applications will be seen, the recent QQ5.0 Sideslip also played a bit of tricks ~ ~ for the Sideslip menu, the General people will customize ViewGroup, and then hide the menu bar, when the fingers slide, through the scroller
Learn to slide the android gesture, Multi-Touch Zoom to reduce the picture, share for everyone to refer to, the specific code as follows1. The layout file is as follows Main.xml
2. Custom zoom Picture Control
The example of this article summarizes the common code snippets for Android development. Share to everyone for your reference, specific as follows:
1. Picture rotation
Bitmap bitmaporg = Bitmapfactory.decoderesource (This.getcontext ().
The Android phone or tablet will have the ability to switch on and off, usually by physical gravity sensors, but sometimes it's not, and it's usually in the setup that we can turn off the screen switch on the phone.
Androidmanifest.xml
To develop the Android app micro-credit payment function, you need to complete three steps: The first step is to generate a pre-payment order, a second step to generate a micro-credit payment parameter, and a third pace of micro-mail app payment. In
Experimental environment
OS X 10.9Eclipse (ADT)Android Source version: API level (Android 4.4)
Android Event composition
In Android, events include Dots, long press, drag, slide, etc., click and double-click, and also include a single point of
Nonsense not to say more, directly to everyone to paste the code, the specific code as follows:
Package com.example.yanlei.yl4;
Import Android.graphics.Color;
Import Android.os.Bundle;
Import android.support.v7.app.AppCompatActivity;
Import
This article is an example of Android using Broadcastreceiver to realize the function of displaying the screen after the phone is powered on. Share to everyone for your reference, specific as follows:
In this example, how to use Broadcastrececiver
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.