The following code is the processing code in the Android music:
Copy Code code as follows:
Mediaplayer.onerrorlistener Errorlistener = new Mediaplayer.onerrorlistener () {
public Boolean onError (MediaPlayer MP, int what, int extra) {
Copy Code code as follows:
public class Pulltoloadlistview extends ListView implements Onscrolllistener {
private static final String TAG = PullToLoadListView.class.getSimpleName ();
private static final int state_non = 0;private static
Popupwindow is a pop-up window that can display arbitrary view. He will float above the current window to show it.
Look at the code below:
Copy Code code as follows:
public class MyActivity extends activity{
Private Popupwindow menu;
, Android implements the default Progress prompt dialog box, ProgressDialog, which can be used with instantiation and some simple settings.
Copy Code code as follows:
Private class Downloaddbtask extends Asynctask {
Variable-length
Service Lifecycle (applies to 2.1 and above)
1. The StartServiceRegardless of whether any activity is bound to the service, it runs in the background. OnCreate (if required)-> onStart (int id, Bundle args). Multiple StartService, the onstart is
The first is the layout file, where two layout files are required, one is the layout file Main.xml for the activity that placed the list control, and the other is the layout corresponding to each line of information in the ListView List_item.xml The
Let's take a look at the effect chart.
When you click on the menu can change the icon, such as Click Happy, Home will change a smiley face, the implementation of the process is super simple
You need to use the toolbar and drawablelayout two to
Android Draw9patch picture making and using
Understand 4 words:
Top decided to pull left and right not deformed
Left, up and down, not deformed.
Right set content height area
Bottom Set Content width area
Below I take 6 pictures to
Imitation beauty Mito Move the mouse to adjust the Seekbar, adjust the color of the picture
The project layout is as follows:
The effect is as follows:
The logical part of the code is as follows:
Package com.
Effect Chart:
The implementation of this effect here is a custom ExpandableListView , to give it an indication of the layout, in the sliding process to monitor whether the current should be suspended display classification to achieve. Take the
Expandablelistview Introduction
Introduction of Expandablelistview
Expandablelistview can display a view to scroll vertically to show entries in the level two list, which is different from the list view (ListView). Expandablelistview allows two
Intent should be considered something peculiar to Android. You can specify in intent the action to be performed by the program (for example, view,edit,dial), and the data that the program needs to perform to the action. is specified, the Android
The following topics are the landlord in the Android Communication group interview when you met, if you have a good title or good ideas to share, the landlord will maintain this post for a long time.
A company's Advanced Level test (2015-03-14)
This week's Google I/O conference brought a lot of exciting news about Android. It may take us a long time to digest the new things introduced by Android L.
I have been studying recyclerview these days and would like to share with you my
A few days ago in the "fade animation of the Android Graphics" in the text to achieve the fade animation, but there is a problem, the brush is thicker (greater than 1) when there will be cracks between the line, I have improved a bit. The effect is
Using the Android Audiorecord to record PCM files, the Android SDK ensures that the sample frequencies supported on all devices are only 44100HZ,So if you want to get PCM data for other sampling frequencies, there are several ways:1. Try the
The following is an operation that is performed at regular intervals until the timed operation is turned off:
Copy Code code as follows:
Final Handler Handler = new Handler ();
Runnable Runnable = new Runnable () {
@Override
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