Sample code:
This is a code that reads the contact person:
Copy Code code as follows:
Package com.ui.domain;
Import java.util.ArrayList;
Import java.util.List;
Import android.app.Activity;
Import Android.database.Cursor;
Import
Functional Requirements:
(1) For example, each page display 2x2, a total of 2XN, each item display picture + text (click on the link).
If a single line scrolls horizontally, it can be implemented with Horizontalscrollview.
If multiple lines are
When you use Uc-webbrowser, you will find that its pop-up menu is different from the one that comes with the system. It implements more menu options for display and columns. In fact, it is Popupwindow or Alertdialog dialog box, add two GridView
First look at the effect, as shown in figure:
1. Since tablayout is a control of the official library of Android design Support libraries, it is necessary to add dependencies to the library when using Tablayout
Compile '
Search on the Internet a lot of information, roughly the same, we are copying each other, looking very laborious, not understanding, their own summary, keep the need to see the words to find.The example in the code is as follows:
Copy Code
First, the effect chart
Implementation principle
To complete a carousel picture, the first thought should be ViewPager to use to achieve. ViewPagerThere's already a sliding function, we just let it roll itself. Plus the small dots below. So our
Copy Code code as follows:
public class Mainactivity extends activity {
declaring controls
Path and number of threads
Private EditText Et_url, Et_num;
Progress bar
public static ProgressBar Pb_thread;
Actions that show progress
Private
Usually we use service to communicate with it, when we want to communicate with the service, then the service to be in a binding state. The client can then get a binder to communicate with the server, a process that is natural.
Do you really know
These two days accidentally saw a park friend blog to achieve Path2.0 in the gorgeous rotating menu, feel good, but found that the author does not deal with thread safety issues, so here I fixed, and improve the next part of the function. The
Android Broadcastreceiver is often used in Android development applications, so take time to tidy up, the province's follow-up in the use of the time to go to Baidu.
Broadcastreceiver several common monitoring
1.BroadcastReceiver Listening dialing
The example of this article describes the Android implementation of the tab to add menu method. Share to everyone for your reference, specific as follows:
In Android, a menu-related method is not available in the Tabactivity class, so you cannot
The example of this article for everyone to share the impact of the Android scraping card, for your reference, the specific content as follows
Android to achieve the bottom of a picture, the upper layer of a mask, touch slip by the finger sliding
This article describes the development of Android to achieve a picture fillet method. Share to everyone for your reference, specific as follows:
Bitmap Mycoolbitmap = ...;
Or:
public static Bitmap Getroundedcornerbitmap (Bitmap
1 How to obtain MediaPlayer example:You can use the direct new method:MediaPlayer MP = new MediaPlayer ();You can also use the method of create, such as:MediaPlayer MP = Mediaplayer.create (this, r.raw.test);/Then you don't have to call
Android on the screen to solve the problem should be two: first. Layout problems; Reload the problem. 1. Layout problem: If you don't want the software to switch between the two screens, the easiest way to do this is to find the activity you
This paper uses the matrix to realize the image scaling and rotation of Android. The sample code is as follows:
Copy Code code as follows:
Package Com.android.matrix;
Import android.app.Activity;
Import Android.graphics.Bitmap;
Import
Circleimageview to achieve circular head code sharing, for your reference, the specific content as follows
First, create a property file (Attrs.xml)
Specific actions:1, under the project Values file to create a new property file, file name is
Imitation Millet Safety Center detection effect
Cut the crap, let's go ahead. Effect Chart:
GitHub Address: Https://github.com/niniloveyou/GradeProgressView
This effect of the use of the scene is not much, mainly a variety of testing time, such
Implementation effect:
Picture material:
--> first, write down the refresh layout when you refresh Pull_to_refresh.xml:
PullToRefreshTest dropdown can refresh Release immediately refresh is refreshing ... has not been updated
Look at the Android version of QQ custom Avatar function, decided to achieve their own, casually familiar with the Android drawing and image processing this piece of knowledge.
First look at the effect:
Thinking Analysis:
This effect can be
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