# Android-CircleDialog: an iOS styled DialogFragment library for Android apps

> Android-CircleDialog wraps DialogFragment to give Android apps rounded, iOS looking dialogs, list boxes, input boxes and progress dialogs, all built from code created shape and selector drawables. The catch is where it is published: JCenter is gone and new versions go through JitPack.

**mylhyl/Android-CircleDialog** — 仿IOS圆角对话框、进度条、列表框、输入框，ad广告框，支持横竖屏切换

- Repository: https://github.com/mylhyl/Android-CircleDialog
- Stars: 1,052 · Forks: 158
- Language: Java
- License: not declared
- Published: 2026-10-20 · Updated: 2026-10-20 · Language: en
- Canonical page: https://hysenlabs.com/projects/mylhyl-android-circledialog

## The library exists to avoid hand written shape and selector drawables

Android-CircleDialog is a Java library for Android that provides iOS styled rounded dialogs, and the author is explicit about the reason it was written. The stated initial goal was to master the underlying knowledge, with a note that the library may not suit the overall style of your product even if it suits your project.

That tells you the shape of the thing. It is not a design system and it does not try to be. It is a set of dialogs whose corner radius, background opacity, font size and font colour you configure per dialog type, covering the regular dialog, the list box, the input box and the progress box. The repository's own description also mentions an ad banner dialog and support for switching between screen orientations.

The knowledge point it targets is stated too, and it is the useful part. All the shapes, selectors and layouts are created in code rather than in XML resources, using the drawable classes ShapeDrawable, RoundRectShape, GradientDrawable, ClipDrawable, LayerDrawable and StateListDrawable. If you have ever hand built a rounded gradient background with pressed and disabled states, this library is a packaged answer to that specific chore.

The API surface is documented separately, with a parameters directory under circledialog/src/main/java/com/mylhyl/circledialog/params and a generated api reference hosted at mylhyl.github.io/Android-CircleDialog.

## JCenter is gone, so the repository line in your build.gradle decides the outcome

The most consequential part of the README is a migration note at the very top, and it is the first thing an integrator has to act on. The JCenter service has been announced as discontinued, so the README splits the instructions into two cases depending on which version you want.

For older versions it points at an Aliyun mirror of the JCenter repository, added to the repositories block of the root build.gradle:

```gradle
allprojects {
    repositories {
        maven { url 'https://maven.aliyun.com/repository/jcenter' }
    }
}
```

For newer versions it points at JitPack instead:

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

The distinction is not cosmetic. An artifact that only ever existed on JCenter is not on JitPack, and one published to JitPack is not on the Aliyun mirror of JCenter, so choosing the wrong block gives you a resolution failure rather than a working dependency. A project that has already migrated to JitPack for other libraries can add the block once and use the newer line.

The dependency itself is declared as a single line, and the README explains the version suffix convention:

```gradle
implementation 'com.github.mylhyl:Android-CircleDialog:5.3.8'
```

A version ending in -alpha is a preview build that may contain bugs and should be used carefully, while a version without that suffix is a stable release. The example coordinates for the older line are written as com.mylhyl:circleDialog:x.x.x, so the group id differs between the JitPack style and the older style, and the transitive resolution rules of a JitPack coordinate differ from a plain Maven artifact too.

## Every dialog extends a transparent base class, so your layout needs its own background

The usage notes are terse and one of them will bite you if you skip it. The library is built on DialogFragment, and the note about the base class AbsBaseCircleDialog says its background is transparent, so a custom layout has to set its own background as needed.

That is a deliberate design choice rather than an oversight. If the library painted a background, a custom layout could not supply its own, and the corner radius and opacity that the library exposes would be second class. The cost is that a developer who copies a custom layout from anywhere and forgets the background line gets a dialog with no visible surface.

The other notes in the same section are version migration warnings, and together they describe four breaking changes over the life of the library. From version 3.0.9 the method for refreshing a dialog changed from create to refresh. From version 4, font size kept its sp unit and offsets kept px, but widths, heights and spacing all became dp. From version 5 the library was adapted to androidx. And from version 3 the project gave up percentage based adaptation, which is the change most likely to alter a layout you ported from a version 2 branch.

The repository keeps v2 and v3 branches alongside master, with a wiki and a tutorial linked from the README, and a linked APK for trying the experience without wiring it into a project.

## The dependency list is short, but the coordinates are not

The README names the libraries this one expects: appcompat-v7, cardview-v7 and recyclerview-v7. Those are the classic support library artifacts rather than their AndroidX equivalents, which is consistent with a library whose v5 line was the migration point to androidx.

There is a subtlety here that matters for a modern project. If your app is on AndroidX, pulling in a library that depends on the old support artifacts can force the Jetifier step or a dependency conflict, and the README does not document a version that depends on androidx- prefixed artifacts directly. The build files at the repository root, build.gradle, config.gradle, gradle.properties and settings.gradle, are the place to check what a given tag actually resolves to.

The repository also has an app/ directory, which is the sample application, plus a docs/ directory and a preview/ directory holding the animated preview image. The build uses the standard Gradle wrapper with gradlew and gradlew.bat checked in, so a clone can be built without a local Gradle install.

The compatibility floor is low: the badge states API 16 and above, which covers Android 4.1 onward. The other badge points at JCenter 5.0.0, which is a historical marker of where the library was published rather than a statement about the current distribution channel.

## Release history and last push tell two different stories

The release list in this repository is old: 5.3.11 published on 2022-08-16, 5.3.10 on the same day earlier, and 5.3.9 on 2021-07-19. The last push to the repository was on 2026-10-17, and the project is not archived.

So the code is being touched while the tagged releases have not moved in a while. That combination is common for a library whose maintainer keeps the repository alive without cutting new artifacts, and it has direct consequences. The version you can add through JitPack is the one the author published, and the documentation links inside the README point at the historical coordinates rather than a currently published one.

The repository is on the master branch by default, and it maintains separate v2 and v3 branches with their own documentation, so the history is a record of at least three incompatible lines. Choosing a version is therefore a decision with more than one axis: which major line, which distribution channel, and which naming of the group id.

There is no changelog in the top level listing, no release notes beyond the version numbers themselves, and the README does not describe a deprecation timeline for older lines. For a library whose only ongoing work is not visible in the tag history, plan on pinning a version and testing it yourself.

## Compared with a hand written dialog, the trade is dependency and control

The alternative is what most Android teams actually do: write the shape drawable and the layout yourself, or reach for the platform AlertDialog and accept its styling. The difference in approach is where the corner radius and the styling live.

A hand written implementation gives you total control and no third party dependency, at the cost of repeating the same boilerplate in every project that needs a rounded dialog. This library moves that boilerplate into a packaged dependency whose behaviour you configure through parameter classes rather than resources, which is faster to adopt and consistent across screens.

The other alternative is a general purpose dialog library that ships many dialog types. This project deliberately keeps a small set: the regular, list, input and progress boxes, plus the ad banner variant mentioned in the description. There is no bottom sheet, no date picker, no custom layout gallery. The topic tags list dialogsheet and progress-dialog, but the README's own enumeration of the packaged types is the four above, and the parameters directory is the authoritative list of what can be configured.

Choose accordingly. If your app needs one rounded confirmation dialog, writing the drawable is cheaper than a dependency. If your app needs consistent rounded dialogs across many screens and several team members, the library pays for itself.

## Conclusion

Android-CircleDialog fits an Android team that wants rounded dialogs with an iOS feel without writing shape and selector drawables by hand, and it does not fit a team that needs a maintained release train, because the newest tagged release in the list is 5.3.11 from 2022-08-16 even though the last push was on 2026-10-17. Verify three things before depending on it: that the coordinate you add resolves, since the README routes new versions to JitPack and older ones to an Aliyun mirror of the retired JCenter, that the appcompat-v7, cardview-v7 and recyclerview-v7 dependencies are already in your build, and that your own layouts set a background because the AbsBaseCircleDialog base class is transparent. The project states the Apache 2.0 licence in its README.

## FAQ

### How do I add Android-CircleDialog to my Gradle project?

Add implementation 'com.github.mylhyl:Android-CircleDialog:5.3.8' to your dependencies, and add the JitPack repository maven { url 'https://jitpack.io' } to the repositories block of the root build.gradle. For older versions the README routes you to an Aliyun mirror of the retired JCenter instead.

### Why is my custom CircleDialog layout invisible?

The base class AbsBaseCircleDialog has a transparent background, so the README instructs you to set a background on your custom layout as needed. Without it the dialog surface has nothing to draw.

### Which dependencies does Android-CircleDialog require?

The README lists appcompat-v7, cardview-v7 and recyclerview-v7 as the required dependencies. Version 5 of the library was adapted to androidx, and version 3 dropped percentage based adaptation.

### What is the difference between a stable and an alpha Android-CircleDialog version?

A version number with an -alpha suffix is a preview build that may contain bugs and the README advises caution with it, while a version without the suffix is a stable release.

### How do I refresh an open Android-CircleDialog?

From version 3.0.9 the method for refreshing a dialog changed from create to refresh, so on a current version you call refresh rather than create to update the displayed content.

## Sources

- [Issues](https://github.com/mylhyl/Android-CircleDialog/issues)
- [mylhyl/Android-CircleDialog on GitHub](https://github.com/mylhyl/Android-CircleDialog)
- [README](https://github.com/mylhyl/Android-CircleDialog/blob/master/README.md)
- [Releases](https://github.com/mylhyl/Android-CircleDialog/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/mylhyl-android-circledialog
