XPopup

The 2.0.0 version is coming with a big bang, the bottom layer has been changed to Dialog implementation, and brings significant animation performance improvements, interactive details improvements, and dozens of Bug fixes!!

Powerful, simple UI, interactive elegant universal popover! Can replace Dialog, PopupWindow, PopupMenu, BottomSheet, DrawerLayout, Spinner and other components, with more than ten kinds of good animation, support full UI and animation customization! It has the following characteristics:

  • Powerful, internal encapsulation of the commonly used popover, built-in more than a dozen good animation, popover and animation custom design is very simple; There are no popovers that XPopup can’t do. The built-in popup UI is fixed, but allows you to use your project’s existing layout or your own, while also taking advantage of the animation, interaction and logic encapsulation provided by XPopup.
  • The UI and animation are simple and follow the Material Design. A lot of details, transitions and hierarchy changes were considered in the Design of animation. Or an animation that simulates system components, as you can see in the Demo
  • Elegant interaction, to achieve elegant gesture interaction, intelligent nested scrolling, intelligent input method interaction, see Demo
  • Adapted to the full screen, currently adapted to xiaomi, Huawei, Google, OPPO, VIVO, Samsung, Meizu, One Plus all series of full screen mobile phones
  • Automatically listens to the Activity lifecycle and automatically releases resources. Memory leaks are also avoided in scenarios where the Activity directly finishes
  • Ease of use, all custom pop-ups just need to inherit the corresponding class, implement your layout, and then, like an Activity, inonCreateMethod write logic can be
  • Excellent performance, smooth animation; The carefully optimized animation makes it difficult to encounter caton scenes
  • Can pop up in the background of the application (need to apply for suspension window permission, one line of code)
  • Support androidx

Design idea: Based on common popover scenes, I divide them into several categories:

  • Center: pop-ups in the middle, such as confirm and cancel pop-ups and Loading pop-ups
  • The Bottom type, which pops up from the Bottom of the page, such as the share form that pops up from the Bottom of the page, the comment list that pops up from the Bottom of the page for Zhihu, I will handle gesture dragging and nested scrolling internally
  • Attach type means that the position of popup should be attached to a View or a touch point, just like the effect of PopupMenu in the system. However, the customization of PopupMenu is poor, and so is the drop-down popup of commodity list screening on Taobao, and the “like” popup of wechat circle of friends.
  • The DrawerLayout type pops up from the sitting or right side of the form and supports gesture drag and drop. The advantage is that it is decoupled from the interface and can display DrawerLayout on any interface
  • The ImageViewer large view type, like a gold digger image view popup, has a nice drag-and-drop interactive experience and an improved PhotoView embedded inside
  • A full screen popover, a full screen popover, like an Activity, can be set to any animator; Suitable for login, selective interface effects.
  • Position free popover, popover is free, you can put in the top left corner of the screen, the bottom right corner of the screen, or anywhere, combined with powerful animator, can achieve a variety of effects.

demo

Built-in popover (support reuse of existing layout) List Center pops up
Bottom List popover (gesture drag, vertical scroll) Custom Bottom popover (naturally supports nested scrolling, multi-layer popover)
Attach popup window (elegant animation, intelligent positioning, long press support) Customize Attach popup window (support in any direction, flexible and easy to use)
Drawer popup (gesture drag, status bar shadow) Full screen popover (can be used as a substitute for Activity, with more than a dozen animation use better)
Position Free Position popover (placed anywhere on the screen) Custom popovers pasted over input methods
PartShadow Local shadow popover You can go up or down
ImageViewer Large view popover (drag natural, silky smooth) Super long picture support (image gradient transition, elegant and easy)
Large view view pop-up window, support interface customization Use with ViewPager
Custom popovers and custom animations Built-in elegant and beautiful animator, can be used with popover
Application background pop-up (one line of code to implement permission application) Lenovo search implementation, easy

Rapid experience

Gif recording advantages of the card, the real machine preview effect is better. Download Demo

If the QR code image is not visible, click me to download the Demo experience

Gradle

implementation 'com.lxj:xpopup: latest version '
Copy the code

The required version of the dependency library is 26 or above, the version need not be the same as mine:

implementation 'com. Android. Support: appcompat - v7:28.0.0'
implementation 'com. Android. Support: recyclerview - v7:28.0.0'
implementation 'com. Android. Support: design: 28.0.0'
Copy the code

If you are androidX, then the above three corresponding AndroidX dependencies need not be the same as my version:

implementation 'androidx. Appcompat: appcompat: 1.1.0'
implementation 'com. Google. Android. Material: material: 1.3.0 - alpha01'
implementation 'androidx. Recyclerview: recyclerview: 1.1.0'
Copy the code

Using document

For details on how to use it, see the following sections in WIKI:

  • How to use the built-in popover
  • How to customize popovers
  • How to customize animation
  • Common Settings for pop-ups
  • Q&A
  • Maybe you want these effects
  • A line of code pops up in the background of the application

confusion

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

Who is using XPopup

I sincerely hope that you can click here to attach the App name or company name that uses this library, which will give me more motivation and enthusiasm to maintain this class library.

According to the information provided by warm-hearted friends, currently the products and companies using XPopup are as follows:

  • Map of seagulls
  • Mazda Car Test (mainly a car test APP used by the staff of an automobile manufacturer)
  • F man App
  • Entry Beef Cattle Quarantine Traceability System (App end)
  • Tai chi (, three-dimensional art works of the great god, VirtualXposed author, download address: www.coolapk.com/apk/me.weis.)
  • Love can be (ican) App
  • Medical beauty consumption guide (www.pgyer.com/yimeiandroi.)
  • Mi Shang (APP name, Guangzhou Fashion Commercial City Co., LTD. (Fashion Group))
  • Love island
  • Close by (download address: www.coolapk.com/apk/com.rai…
  • Thousands of microphone
  • Easy fruit easy
  • Moo diary, download address www.wandoujia.com/apps/804475…
  • Zhihua Berth (Chongqing Jiiting Technology Co., LTD.)
  • Meizhou Xiaobai Technology Co., LTD sj.qq.com/myapp/detai…
  • Mushroom picking (a.app.qq.com/o/simple.js…
  • Hummingbird House APP, Hummingbird House SAAS tablet
  • Tea by choosing (android.myapp.com/myapp/detai…
  • Fan screen client app
  • EdifierConnect Rambler Headset product APP
  • Spotted Pig (Guangzhou Huisu Chuanglian Technology Co., LTD.)
  • Night Scout (Chengdu Persian Cat)
  • Aurora Cinema (individual developer, can be downloaded from the official account aurora Terminal)
  • Wanma (Shenzhen Kupu Software Co., LTD.)
  • Aiduo Road (Changzhou Xituo Software Co., LTD a.app.qq.com/o/simple.js…
  • (company: zhejiang have replayed with science and technology co., LTD android.myapp.com/myapp/detai…
  • Wexun Mutual Aid (APP)
  • Rice Bag Chuxing, Rice Bag Automobile (Shanghai Rice Bag Investment Group Co., LTD. (Rice Bag Group))
  • Happy moving coil (download address: www.51yund.com/down?from=d…)
  • Road caravan App
  • Coconut Sister App(English Learning App)
  • Orange Apricot Health App, Orange Apricot Guardian App (Beijing Orange Apricot Youdao Co., LTD.)
  • Red Star Live (Red Star Macalline’s live streaming App)
  • Peanuts agent App (www.appchina.com/app/com.qi..)

A reward

If you feel THAT I have helped you and saved your time, you can send me a reward (with your name and Github address), and the amount is free to show your support. Exceptional list

contact

Github address: github.com/li-xiaojun/…

XPopup AC group: 783659607

Gmail: [email protected]

QQ Email: [email protected]

QQ: 16167479