iosdialog

A IOS style dialog for Android developer

License

License

GroupId

GroupId

com.itlgl
ArtifactId

ArtifactId

iosdialog
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

aar
Description

Description

iosdialog
A IOS style dialog for Android developer
Project URL

Project URL

https://github.com/itlgl/iosdialog
Source Code Management

Source Code Management

https://github.com/itlgl/iosdialog

Download iosdialog

How to add to project

<!-- https://jarcasting.com/artifacts/com.itlgl/iosdialog/ -->
<dependency>
    <groupId>com.itlgl</groupId>
    <artifactId>iosdialog</artifactId>
    <version>1.0.1</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.itlgl/iosdialog/
implementation 'com.itlgl:iosdialog:1.0.1'
// https://jarcasting.com/artifacts/com.itlgl/iosdialog/
implementation ("com.itlgl:iosdialog:1.0.1")
'com.itlgl:iosdialog:aar:1.0.1'
<dependency org="com.itlgl" name="iosdialog" rev="1.0.1">
  <artifact name="iosdialog" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.itlgl', module='iosdialog', version='1.0.1')
)
libraryDependencies += "com.itlgl" % "iosdialog" % "1.0.1"
[com.itlgl/iosdialog "1.0.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

IOSDialog

A IOS style dialog for Android developer

How to use

Gradle

dependencies {
    compile 'com.itlgl:iosdialog:1.0.1'
}

Example

Default style Dialog

new IOSDialog.Builder(context)
    .setTitle("Tip")
    .setMessage("IOS style dialog").show();

The default style Dialog comes with a confirmation button with the following style:

IOS style dialog

CUstom Dialog without title

new IOSDialog.Builder(context)
    .setMessage("IOS style dialog,have no title").show();

The display is as follows:

IOS style dialog no title

Custom Dialog button

IOSDialog supports up to two buttons, such as the "confirm" and "cancel" buttons

new IOSDialog.Builder(context)
    .setTitle("title")
    .setMessage("message")
    .setPositiveButton("OK", null)
    .setNegativeButton("Cancel", null).show();

The display is as follows:

IOS style dialog2

IOS sheet style Dialog

IOSSheetDialog.SheetItem[] items = new IOSSheetDialog.SheetItem[2];
items[0] = new IOSSheetDialog.SheetItem("item1", IOSSheetDialog.SheetItem.RED);
items[1] = new IOSSheetDialog.SheetItem("item2", IOSSheetDialog.SheetItem.BLUE);
IOSSheetDialog dialog2 = new IOSSheetDialog.Builder(context)
        .setTitle("title").setData(items, null).show();

The display is as follows:

IOS style sheet

上传到远程仓库

本项目依赖Android Studio编译。

现在这个项目分别上传到了Maven和Jcenter仓库,默认情况下是上传到Maven仓库,项目不需要做修改。在Android Studio中运行uploadArchives的task即可上传到Maven仓库中。

如果上传到Jcenter仓库,需要修改./iosdialog/gradle.properties文件下的RELEASE_REPOSITORY_URL和SNAPSHOT_REPOSITORY_URL,都修改为https://api.bintray.com/maven/itlgl/maven/iosdialog/;publish=1即可(不知道Jcenter是否有SNAPSHOT仓库位置,都填写成正式位置仓库url),另外还需要修改USER_HOME/.gradle/gradle.properties中的用户名和密码。然后在Android Studio中运行uploadArchives的task即可上传到Jcenter仓库中。

如果想生成到本地,看一下生成的对不对,将RELEASE_REPOSITORY_URL和SNAPSHOT_REPOSITORY_URL修改为本地位置即可,比如file://D:/temp/

参考

IOS_Dialog_Library

关于我

一个Android开发者

邮箱: ligl6688@gmail.com

github Quick setup

Quick setup — if you’ve done this kind of thing before

HTTP or SSH

…or create a new repository on the command line

echo "# IOSDialog" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:ligl01/IOSDialog.git
git push -u origin master

…or push an existing repository from the command line

git remote add origin git@github.com:ligl01/IOSDialog.git
git push -u origin master

…or import code from another repository

You can initialize this repository with code from a Subversion, Mercurial, or TFS project.

Versions

Version
1.0.1
1.0.0