The effect is as follows, the finger on the phone to the left or right to achieve the corresponding page switch.
First look at the Activity_main.xml file, very simple, mainly three titles TextView and Viewpager
Let's see what the mainactivity
Today in doing the project to do the function of taking pictures, at that time was thinking Onresume and Onactivityresult these two methods who will be the first implementation of the test, and then print the System.currenttimemillis () look at the
Recently in the project has a lot of drop-down box, in order to realize the convenience of using the Android spinner, but the spinner style does not meet the requirements, and then learn the custom spinner. Here's the whole step:
1. Get the picture
Overview
First of all, to write the "Android compile-time annotation framework," the original intention, APT is not difficult, can be said to be simple and efficient, but the information on apt is not much, even many people do not know
This custom control can implement horizontal dynamic data loading, without saying much, the following code. (using the same method as normal listview)
1, in the layout with horizontalscrollview containing a listview;2, the use of the GridView, the
Fiddler is an HTTP protocol debugging Agent tool that can record and check all HTTP traffic between your computer and the Internet, set breakpoints, and see all the "in and Out" Fiddler data (referring to cookie,html,js,css and other files, These
First, select the appropriate image size
The view background image always fills the entire view area, and the image size is not suitable to cause the image to be scaled automatically, in order to avoid this situation, we can first zoom the picture
Of course, we can also define a value by the meta-data tag inside the menifest. Then in our application directly to read it, so that the next time if you need to modify the value, we do not have to find our code, but in the revision of our version
Imageview.setxxx can setSetbackgroundresource background,Layout Setlayoutparamsand Setscaletype,The source picture cannot be changed. Don't worry. If the picture is rotated, only another bitmap is generated
Solutions
First, create an XML file
Under the Android platform to develop and deal with the application of image clipping, if the logic of the realization is more troublesome, such as the need to write the type of this Win32 under the rubber band class CRectTracker to set the cutting
First clear the difference between several concepts:Padding margin is the meaning of the margin, the key question is to understand what the relative margin.Padding is the margin of the control's content relative to the edge of the control.Margin is
The principle is to download the image data from the Internet, while turning the data into drawable and loading to the specified ImageViewSave it as a download_image.jpg and open the picture with intent when clicked ImageViewI write the process of
The code is as follows
Copy Code
Package COM.RONGFZH.YC; Import Android.content.BroadcastReceiver;Import Android.content.Context;Import android.content.Intent; public class Bootreceiver extends broadcastreceiver{@Overridepublic void
Three kinds of page-flipping effects in the Android platform.
The first page-flipping effect is as follows:
Implementation principle:
the current finger touch point is a, the point a coordinates is (Ax,ay), the triangle ACB and the
Gridview:a view that shows items in two-dimensional scrolling grid. The items in the grid come from the listadapter associated and this view. To put it simply, the GridView is the icon display of files that we normally see in the explorer.
Ring progress bar, circular progress bar
Reference http://blog.csdn.net/jdsjlzx/article/details/42497135 for this article
First:
Custom Control: AttendanceProgressBar
The Code is as follows:
1 public class AttendanceProgressBar extends View {2 //
Android uses the open-source framework android-image-indicator to implement image carousel deployment,
The previous blog posts introduced the implementation methods for image carousel, including hyperlinks ):
1. Use ViewFlipper in Android to
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