添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Android官方

1
2
3
4
5
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'

我的常用组件

Kotlin

Kotlin & anko

anko

project - build.gradle

1
2
3
4
5
6
7
8
buildscript {
ext.kotlin_version = '1.1.51'
//....
dependencies {
//...
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

app - build.gradle

1
2
3
4
5
6
7
8
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
compile "org.jetbrains.anko:anko-commons:0.10.4"
}

UI

UI框架

QMUI https://qmuiteam.com/android

1
implementation 'com.qmuiteam:qmui:2.0.0-alpha02'

图片圆角&背景圆角

图片圆角 RoundedImageView

背景圆角 FlycoRoundView

1
2
3
4
//图片圆角
implementation 'com.makeramen:roundedimageview:2.3.0'
//背景圆角
implementation 'com.flyco.roundview:FlycoRoundView_Lib:1.1.4@aar'

消息提示

Toasty

1
implementation 'com.github.GrenderG:Toasty:1.2.8'

弹出窗口

Material Dialogs

1
implementation 'com.afollestad.material-dialogs:core:0.9.6.0'

圆状进度

CircleProgressBar

1
2
//圆状进度
implementation 'com.dinuscxj:circleprogressbar:1.1.1'

Github: https://github.com/youth5201314/banner

1
implementation 'com.youth.banner:banner:2.0.11'

BGABanner-Android

1
2
//Banner
implementation 'cn.bingoogolapple:bga-banner:2.2.4@aar'

标签云

TagCloudView

1
2
//标签云
implementation 'com.github.kingideayou:tagcloudview:1.0.2'

多条件筛选菜单

DropDownMenu

1
2
3
4
5
6
7
8
9
10
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}

dependencies {
compile 'com.github.dongjunkun:DropDownMenu:1.0.4'
}

仿iOS Segment

SHSegmentControl

1
implementation 'com.7heaven.widgets:segmentcontrol:1.17'

加载HTML的TextView

html-textview

1
2
3
dependencies {
implementation 'org.sufficientlysecure:html-textview:3.5'
}

自定义弹出层

CustomPopwindow

1
2
3
4
5
6
7
8
9
10
11
allprojects {
epositories {
//...
maven {
url 'https://jitpack.io'
}
}

dependencies {
compile 'com.github.pinguo-zhouwei:CustomPopwindow:2.1.1'
}

MaterialDialog

设置主题

1
2
3
4
5
6
7
8
9
MaterialDialog.Builder(mContext)
.title("温馨提示")
.theme(Theme.LIGHT)
.content("您确定要删除吗?")
.positiveText("确认")
.negativeText("取消")
.onPositive { dialog, which ->
}
.show()

不设置主题的话,在不同的系统下有的是亮色有的是暗色

设置自定义View

1
2
3
4
5
6
7
8
9
10
11
12
dialog = MaterialDialog.Builder(this)
.theme(Theme.LIGHT)
.title("加入群")
.customView(R.layout.s_dialog_input, true)
.positiveText("加入")
.negativeText("取消")
.onPositive { dialog, which ->

}
.show()

(dialog?.findViewById(R.id.input_edittext) as EditText).hint = "请输入要加入的群号"

功能

权限