XPopup

国内Gitee镜像地址:https://gitee.com/lxj_gitee/XPopup

好站推荐

  1. 国内真正免费使用ChatGPT大模型的网站 https://www.hermchats.com?code=0D27F4D8
  2. 稳定科学上网工具:https://panel.dg1.top/#/register?code=59H7dLR3

中文 | English

设计思路: 综合常见的弹窗场景,我将其分为几类:

演示

|内置弹窗(支持复用已有布局)|列表Center弹窗| |:—:|:—:| |||

Bottom列表弹窗(手势拖拽,横竖滚动) 自定义Bottom弹窗(天然支持嵌套滚动,多层弹窗)
Attach弹窗(动画优雅,智能定位,长按支持) 自定义Attach弹窗(任意方向支持,灵活易用)
Drawer弹窗(手势拖拽,状态栏阴影) 全屏弹窗(可作为Activity替代品,搭配十几个动画使用更佳)
Position自由定位弹窗(放在屏幕任意地方) 自定义贴在输入法之上的弹窗
PartShadow局部阴影弹窗 向上向下都可以
ImageViewer大图浏览弹窗(拖拽自然,如丝般顺滑) 超长图片,永不OOM(图像渐变过渡,优雅从容)
大图浏览弹窗,支持界面自定义 配合ViewPager使用
自定义弹窗和自定义动画 内置优雅美观的动画器,可搭配弹窗结合使用
应用后台弹出(一行代码实现权限申请) 联想搜索实现,轻而易举
气泡弹窗,横向和竖向已准备好!

快速体验

Gif录制的有些卡顿,真机预览效果更佳。扫描二维码下载Demo:

如果二维码图片不可见,点我下载Demo体验

Gradle

implementation 'com.github.li-xiaojun:XPopup:版本号看上面'

jitpack还要求在工程根目录的build.gradle中添加如下:

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

其中编译版本必须 >= 29:

compileSdkVersion 29

必须添加的依赖库,版本不用和我一致:

implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'

xpopup依赖了subsampling-scale-image-view, 如果你也依赖了这个库并且版本冲突,可以做个exclude即可:

implementation ('com.github.li-xiaojun:XPopup:版本号看上面'){
  exclude group: "com.davemorrissey.labs", module: "subsampling-scale-image-view-androidx"
}

使用文档

具体使用方法全在WIKI中,请查看下面各个章节:

混淆

-dontwarn com.lxj.xpopup.widget.**
-keep class com.lxj.xpopup.widget.**{*;}

谁在用XPopup

我本人很希望您能点击这里附上使用这个库的App名或者公司名,这样会给我更大的动力和热情去维护这个类库。

根据热心朋友提供的信息,目前使用XPopup的产品和公司有(70+):

打个赏

如果你觉得我帮助到了你,节省了你的时间,可以对我进行打赏(打赏时可以附上自己的大名和Github地址),金额随意,以表支持。

名字 Github地址
Alfred
LOPER7 https://github.com/loperSeven
microshow(RxFFmpeg作者) https://github.com/microshow

阿里云链接

如果有朋友购买阿里云服务器,可以点我的链接进入:

https://www.aliyun.com/minisite/goods?userCode=bak7qpav

有大量的代金券和折扣!!!

ECS-1核2G40G硬盘1M带宽 : 91元/年

ECS-2核4G40G硬盘1M带宽 : 414元/年

ECS-4核8G40G硬盘5M带宽 : 1046元/年

更多产品点击链接进入查看。。。

联系方式

Android开发交流群:783659607

QQ Email: 16167479@qq.com

QQ: 16167479

Licenses

 Copyright 2019 li-xiaojun

 Licensed 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.0

 Unless required by applicable law or agreed to in writing, software
 distributed 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 and
 limitations under the License.