Implementation of the tutorial function when Android first uses the app

Source: Internet
Author: User

As the title says, the first installation is required.ProgramThen, the guideline for the first run guides you to use the features of the program. In fact, it is nothing more than making a judgment on the homepage and judging the corresponding logo of the database. I have created a new table here, but there is no data in the table at first. If no data is detected, it is used for the first time, then go to guideview and insert a data item in this table. Then, it will not be called next time. However, this will cause a problem. Because the database is used to store the judgment mark, the corresponding table is also cleared after the program clears the data in the settings, this will lead to the appearance of guideview when the program is opened again, but I don't think it is a major problem.

My guideview is just a few images. you can slide between the left and right, and add a button at the last one as the entrance.

1,To implement guideview, a file on GitHub was found at the beginning, and the great god inherited the viewgroup and implementedOntouchevent, onscreenswitchlistener, and other methods to achieve this effect. You can download it directly and make some modifications to use it. Address https://github.com/fabischmid/Android-Swipe-view-with-pager

 

2. Android. Support. v4.view. viewpager

Google will not be indifferent to this friendly effect due to sliding switching of the screen. Therefore, the viewpage control was available in later APIs. ADT and SDK tools were updated two days ago. I found that there were several more templates (I felt like the xcode template function ). There isSwipe views + title strip. You can directly create a new template to achieve horizontal screen switching. I don't know the source code of the new SDK.How viewpager and pagertitlestrip are implemented, but they should be redefined and encapsulated like the method above. The implementation method in it is actually the use of fragmentactivity. Every view is a fragment. Just set the corresponding fragmentpageradapter for the corresponding viewpage. Related can also refer to http://blog.csdn.net/billpig/article/details/6650097

Supplement: there are two other ideas: horizontalscrollview horizontal scroll bar and gallery. I have not tried these two methods, but I can imagine the above results.

 

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.