This article and everyone to write an Android image Carousel control, for your reference, the specific contents are as follows
1. Components of a Carousel control
We analyze the main components of a carousel control as an example of a carousel
First, the problem: After Android startup will create a main thread in the new process, also known as the UI thread (not thread-safe) This thread is mainly responsible for monitoring screen click events and interface drawing. When the application
A good app exception handling mechanism I think it should contain at least the following features:
1. Can upload error messages to the server so that developers can continue to improve the app
2. The error message should at least contain
A simple demo, from aggregation data to apply for mobile phone number attribution to the data interface;
Enter the query number in the EditText, get the number and use HttpURLConnection to get the JSON data in the child thread, then parse;
After
It is said that the most recommended Android is the use of fragment in Viewpager, that is, Viewpager in the page is not like the previous use Layoutinflater directly from the layout file loading, but fragment. Pay attention to the fragment here.
It'
No more nonsense to say, first show you the custom view effect map, if you think it is good, please continue to read.
How, this kind of verification code is not very common, the following we do it ourselves to achieve this effect, do-it-yourself,
This article for you to share the Android Retrofit 2.0 frame upload picture solution, specific content as follows
1. Upload of single picture
/**
* Upload a picture
* @param description
* @param imgs
* @return * *
Self-implementing sliding indicator BarFirst up Effect chart:
1. XML layoutThe layout code is as follows:
With a linear vertical layout, add a small horizontal bar above the sliding page.
2, Java codeGive all the
First, Introduction want to implement a blank artboard, which can draw the trajectory of the slide, so a small demand. Generally speaking, there are two ways to implement, view or Surfaceview. Let's look at two ways to achieve this. Two,
A preliminary study on the life cycle of fragment
Because the fragment must be embedded in the acitivity, the fragment lifecycle is closely related to the activity in which it resides.
If the activity is paused, all of the fragment are paused, and
Now that we know that fragment is very useful, we need to know how it works. Fragment can only exist in (as a container) activity, each fragment has its own view structure that can be loaded into the layout as we did before. The life cycle of
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
1.Fragment Overviewin an activity, fragment represents a part of the UI or an action. An activity can combine multiple fragment objects or different objects corresponding to the same fragment byte code in multiple activity. A fragment object must be
The previous article briefly introduced the basic use of Surfaceview, this time on the introduction of Surfaceview and multithreading mix. Surfaceview is a multi-threaded application that is designed to prevent animation from flashing. The
This example describes the Surfaceview usage of Android programming. Share to everyone for your reference, specific as follows:
Related knowledge about Surfaceview:
The main differences between view and Surfaceview :
1. View can only be refreshed
The article will be based on the original foundation to do some extended functions:
1. Inertial sliding of pictures2. Picture scaling is less than the normal ratio, let go will automatically rebound into normal proportions3. Picture shrink enlarge
Activities provides an easy to manage dialog box mechanism for creating, saving, and replying, such as Oncreatedialog (int), onpreparedialog (int, Dialog), ShowDialog (int), Methods such as DismissDialog (int), which, if used, will return the
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
In Android development, there is often a need to hide the keyboard after a certain operation, so that the soft keyboard in Android is not displayed. Today, share with you how to use code to implement the hidden, displayed operation of the Android
In the Android development will inevitably appear program crash, commonly known as crash. Random access to the user when the test unknown bugs caused by our program crash, at this time we can not get directly to the error log, can not fix the bug.
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