Viewpager introduction and simple implementation of guidance interface for Android UI design and development

It's almost more than a year to do Android development. I always want to write some of my experience in development, share with you and make common progress. I don't know how to start writing at the beginning. After thinking about it carefully, since I've just started writing, I'll start writing from the most intuitive feeling of a software - UI design, step by step. The blogger is here to study with you. I hope you can give more support. I don't say much. Let's start to explain the first article of UI design.

Before explaining how to achieve the effect of the boot interface, I want to introduce the use and description of the viewpager class in detail, because it is one of the most important classes for developing the boot interface.

1、 Effect diagram of viewpager implementation

2、 Functions implemented by viewpager

Seeing the above rendering, you must have guessed what this class is used for. The viewpager class provides a new effect of multi interface switching. The new effect has the following characteristics: < 1 > one of a group of interfaces is currently displayed< 2> When the user slides the interface left and right, the current screen displays part of the current interface and the next interface< 3> After sliding, the interface will automatically jump to the currently selected interface.

3、 Viewpager details

This is a software package compatible with low version Android devices officially provided by Google, which contains APIs that can only be used above Android 3.0. Viewpager is one of them. With it, we can do many things, from the simplest navigation to page menu and so on. How to use it? Similar to lisstview, we also need an adapter, which is pageradapter. Take a look at the API picture:

4、 Use of viewpager

Now that we know the functions and introduction of the viewpager class, how to use this class? Here we use it in three steps: 1. Add it to the living layout file.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>