Customize the masking layer to help you do a simple guided operation

Source: Internet
Author: User

Reprint please indicate the source: Wang 亟亟 's way of Daniel

The recent busy take-off, originally wanted to write something on the weekend results dragged to today, but nothing. In the afternoon to spare some time to do the work, open source to everyone.

Not much to say, first Amway: https://github.com/ddwhan0123/Useful-Open-Source-Android (Each module has been basically dismantled, but also left the animation/custom control/Troubleshooting/Data section)

First look at the effect of the implementation

Look at the project directory (very rarely an implementation class, a tool Class)

Simply tell me what's here and how to use it:

This is a custom view that inherits from the Relativelayout

publicclass GuiderLayout extends RelativeLayout

Can do 2 styles, round and square

respectively is

publicstaticfinalint1;publicstaticfinalint2;

There are 3 position relationships, respectively below above right-top (i.e. the arrow in the diagram and the relationship of the text to the circle)

So how do you go to show this attempt?

 guiderLayout."common", GuiderLayout.publicvoidStringtag, int clipMode)传入3个参数:1,被“圈”的View2,"身份证"tag以及位置关系(为了易用没做自定义attrs.xml的行为)3,“圈类型”,上面有提到,圆/方 两种样式

So how do you get rid of this bunch of "boot content"? (That's the arrow, the text.)

guiderLayout.showNoGuide();这边有一点没做好,没封装彻底,还要多写一行来隐藏“灰色的底板”,之后的会做2期提升,完善这部分guiderLayout.setVisibility(View.GONE);

Use is not complicated, mainly by the tag this part
Need show layout (arrow, text that) to set a tag, like this

   android:tag="common,below"

Pass in 2 parameters, split with ","

The first parameter is "id" (write yourself, the only one)

The second parameter is the "positional relationship" (the 3 mentioned above)

How to use can see the source code, the address is as follows

Project Address: Https://github.com/ddwhan0123/GuiderLayout

The last Gaussian blur of the dialog did some updates, interested can also look at the address as follows: Https://github.com/ddwhan0123/BlurPopupWindow

Then post an open-source library with similar overlay implementations:

Https://github.com/iammert/MaterialIntroView

Https://github.com/hongyangAndroid/Highlight

Customize the masking layer to help you do a simple guided operation

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.