Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

a dialog with arrow indicator in the location where you want

NotificationsYou must be signed in to change notification settings

jiang111/IndicatorDialog

Repository files navigation

a dialog with arrow indicator in the location where you want [minSdkVersion 9]
download apk

Demo:

Depend:

Step 1. Add the JitPack repository to your build fileAdd it in your root build.gradle at the end of repositories:

allprojects {    repositories {...maven { url 'https://jitpack.io' }    }}

Step 2. Add the dependency

dependencies {    compile 'com.github.jiang111:IndicatorDialog:2.1.0'}

Usage:

最终内部是通过RecyclerView来实现,详细用法请参考see the demo ordownload apk

IndicatorDialog dialog = new IndicatorBuilder(this)  //must be activity                .width(dp2px(400))                                      .height(-1)                                        .animator(R.style.dialog_exit)                 .ArrowDirection(IndicatorBuilder.BOTTOM)     .bgColor(Color.parseColor("#49484b"))                  .dimEnabled(true)                                     .gravity(GRAVITY_LEFT)                                .radius(8)                                            .ArrowRectage(0.2f)                                  .layoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false))  //the LayoutManager of RecyclerView                .adapter(adapter).create();           dialog.setCanceledOnTouchOutside(true);               dialog.show(v);                                                                     dialog.dismiss();                                    dialog.getDialog();                                 //方法解释width()     //宽,单位px,必填height()    //高,单位px,推荐传-1 可以自动适配ArrowDirection()   //箭头方向 TOP BOTTOM LEFT RIGHTbgColor()          //背景颜色dimEnabled()      //背景模糊,默认truegravity()         //对话框的权重 GRAVITY_LEFT  GRAVITY_RIGHT  GRAVITY_CENTERradius()          //圆角ArrowRectage()    //箭头距离左边或者右边的偏移量 取值 0-1, 左右依据gravity来判断是左边偏移还是右边//高级方法animator()  //dialog显示消失的动画arrowDrawable()   //自定义箭头样式,可以自定义成任何形状dialog.show(v,x,y);    //x为向左右偏移,y为上下偏移

Other

If you found this library helpful or you learned something today and want to thank me,buying me a cup of ☕️ with paypal

License

Copyright 2016 NewTabLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at    http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.

About

a dialog with arrow indicator in the location where you want

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp