├── .gitignore ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── ando │ │ └── dialog │ │ └── sample │ │ ├── BottomDialogActivity.kt │ │ ├── ConfigurationActivity.kt │ │ ├── EditTextActivity.kt │ │ ├── LinearItemDecoration.kt │ │ ├── MainActivity.kt │ │ ├── ModalActivity.kt │ │ ├── OptionViewActivity.kt │ │ ├── Utils.kt │ │ └── utils │ │ ├── OnceReadValue.java │ │ ├── QMUIDeviceHelper.java │ │ └── QMUIStatusBarHelper.java │ └── res │ ├── drawable-xhdpi │ ├── umeng_socialize_fav.png │ ├── umeng_socialize_qq.png │ ├── umeng_socialize_qzone.png │ ├── umeng_socialize_sina.png │ ├── umeng_socialize_wechat.png │ └── umeng_socialize_wxcircle.png │ ├── drawable │ ├── circle_ando_dialog_loading.xml │ └── ic_launcher_background.xml │ ├── layout │ ├── activity_dialog_configuration.xml │ ├── activity_dialog_edittext.xml │ ├── activity_main.xml │ ├── activity_modal.xml │ ├── activity_option_view.xml │ ├── layout_bottom_sheet_classify.xml │ ├── layout_bottom_sheet_custom.xml │ ├── layout_bottom_sheet_custom_head.xml │ ├── layout_bottom_sheet_fragment_header.xml │ ├── layout_bottom_sheet_fragment_item.xml │ ├── layout_dialog_bottom.xml │ ├── layout_dialog_bottom_activity.xml │ └── layout_dialog_edittext.xml │ ├── menu │ └── options.xml │ ├── mipmap-xhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xxxhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── values-night │ └── themes.xml │ └── values │ ├── colors.xml │ ├── strings.xml │ └── themes.xml ├── build.gradle ├── dialog_bottom_sheet ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── ando │ │ └── dialog │ │ └── bottomsheet │ │ ├── AbsBottomSheetDialogFragment.kt │ │ └── ModalBottomSheetDialogFragment.kt │ └── res │ ├── drawable │ └── bg_bottom_sheet_dialog_fragment.xml │ ├── layout │ └── bottom_sheet_fragment_recycler.xml │ └── values │ └── values_bottom_sheet.xml ├── dialog_core ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── ando │ └── dialog │ └── core │ ├── BaseDialogFragment.kt │ └── DialogManager.kt ├── dialog_usage ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── ando │ │ └── dialog │ │ └── usage │ │ ├── BaseDialog.kt │ │ ├── BottomDialog.kt │ │ ├── DateTimePickerDialog.kt │ │ └── DialogUsage.kt │ └── res │ ├── anim │ ├── anim_ando_dialog_bottom_in.xml │ ├── anim_ando_dialog_bottom_out.xml │ └── anim_ando_dialog_loading.xml │ ├── drawable-xhdpi │ ├── ic_ando_dialog_loading_line.png │ └── ic_ando_dialog_loading_point.png │ ├── drawable │ ├── rectangle_ando_dialog_bottom.xml │ ├── rectangle_ando_dialog_datetime.xml │ ├── rectangle_ando_dialog_loading.xml │ └── rotate_ando_dialog_loading.xml │ ├── layout │ ├── layout_ando_dialog_datetime.xml │ └── layout_ando_dialog_loading.xml │ ├── values-en │ └── values.xml │ └── values │ └── values.xml ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── publish.gradle ├── screenshot └── func.gif ├── settings.gradle └── widget_option_list ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src └── main ├── AndroidManifest.xml ├── java └── ando │ └── widget │ └── option │ └── list │ ├── EasyAdapter.java │ ├── OptionGlobal.kt │ ├── OptionItem.java │ └── OptionView.kt └── res ├── drawable ├── ic_ando_option_check_checked.xml ├── ic_ando_option_check_normal.xml └── sel_ando_option_checkbox.xml ├── layout ├── option_item_layout_header.xml ├── option_item_layout_horizontal.xml └── option_item_layout_vertical.xml └── values └── values_option_view.xml /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea 5 | .DS_Store 6 | /build 7 | /captures 8 | .externalNativeBuild 9 | .cxx 10 | bintrayUpload.bat -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | > **Ando 项目汇总**👉 2 | 3 | # DialogManager 4 | 5 | - [**GitHub**](https://github.com/javakam/DialogManager)👉 6 | 7 | - [**Blog**](https://juejin.cn/post/6916791502161051656/) 8 | 👉 9 | 10 | ## 一、预览(Preview) 11 | 12 | 13 | 14 | ## 二、导入(Import) 15 | 16 | 🍎🍎🍎 很轻量的框架, 可根据不同的需求, 选取不同的导入方式: 17 | 18 | 1. 基于`Dialog/DialogFragment`实现, 主要包括`Dialog`开发过程中的基本用法并处理了一些常见的问题。 19 | ```groovy 20 | implementation 'com.github.javakam:dialog.core:7.6.0@aar' //核心库, 2个类 21 | implementation 'com.github.javakam:dialog.usage:7.6.0@aar' //常用样式(如: 加载中弹窗) 22 | ``` 23 | 24 | 2. 基于`BottomSheetDialogFragment`, 包括网格弹窗, 可用于第三方分享, 支持标题、顶部圆角和滑动设置; 列表样式弹窗, 支持单选和多选。 25 | 26 | > 支持单选/多选的RecyclerView框架'com.github.javakam:widget.optionview:xxx@aar'可以独立使用, 可依附于任何`ViewGroup`。 27 | 28 | ```groovy 29 | implementation 'com.github.javakam:dialog.bottomsheet:7.6.0@aar' //底部弹窗(必需下面的 widget.optionview 框架) 30 | implementation 'com.github.javakam:widget.optionview:7.6.0@aar' //单选/多选的RecyclerView,基于EasyAdapter实现 31 | ``` 32 | 33 | ## 三、用法(Usage) 34 | 35 | ```kotlin 36 | //1. 创建并显示弹窗 37 | fun showLoadingDialog() {//以加载中弹窗为例 38 | DialogManager.with(this, R.style.AndoLoadingDialog)//建议设置主题样式(It is recommended to set the theme style) 39 | .useDialogFragment()//默认为`DialogFragment`实现, useDialog()表示由`Dialog`实现 40 | .setContentView(R.layout.layout_ando_dialog_loading) { v -> //设置显示布局 (Set display layout) 41 | v.findViewById(R.id.progressbar_ando_dialog_loading).visibility = View.VISIBLE 42 | } 43 | .setTitle("Title")//Need Config `false` 44 | .setWidth(200)//设置宽 45 | .setHeight(200)//设置高 46 | .setSize(200, 200)//设置宽高(Set width and height) 47 | .setAnimationId(R.style.AndoBottomDialogAnimation)//设置动画(Set up animation) 48 | .setCancelable(true) 49 | .setCanceledOnTouchOutside(true) 50 | .setDimAmount(0.7F) //设置背景透明度, 0 ~ 1 之间,0为透明,1为不透明. 只要该值不是 -1, 就会应用该值 51 | .setDimmedBehind(false) //设置背景透明, false透明, true不透明 52 | .addOnGlobalLayoutListener { width, height -> }//获取显示后的真实宽高 53 | .setOnCancelListener {} //取消监听 54 | .setOnDismissListener {}//关闭监听 55 | .setOnKeyListener { dialog, keyCode, event -> true }//按键监听 56 | .setOnShowListener {}//显示监听 57 | .apply { 58 | //显示之前配置,如: 59 | //Display the previous configuration, such as: 60 | //dialog?.window?.requestFeature(Window.FEATURE_NO_TITLE) 61 | } 62 | .show() 63 | .apply { 64 | //显示之后配置, 效果和`setOnShowListener`相同 65 | //Configure after display, the effect is the same as `setOnShowListener` 66 | } 67 | 68 | //Dialog是否正在显示 69 | //Whether Dialog is showing 70 | DialogManager.isShowing() 71 | 72 | //Dialog显示后动态改变展示效果 73 | //The Dialog display dynamically changes the display effect 74 | findViewById(R.id.bt_loading_progressbar_imageview).postDelayed({ 75 | //实用性用法, 动态改变窗口文本: "加载中" -> "已完成" 76 | DialogManager.contentView?.findViewById(R.id.xxx)?.text = "已完成" 77 | 78 | //实用性用法, 动态改变转圈儿图片 79 | DialogManager.contentView?.findViewById(R.id.xxx)?.visibility = View.GONE 80 | val image: ImageView? = DialogManager.contentView?.findViewById(R.id.xxx) 81 | image?.visibility = View.VISIBLE 82 | val anim = AnimationUtils.loadAnimation(this, ando.dialog.usage.R.anim.anim_ando_dialog_loading) 83 | image?.startAnimation(anim) 84 | 85 | //改变弹窗宽高(Change the width and height of the dialog) 86 | DialogManager.setWidth(280) 87 | DialogManager.setHeight(280) 88 | DialogManager.applySize() 89 | 90 | //控制背景亮度(Control background brightness) 91 | DialogManager.setDimAmount(0.3F) 92 | DialogManager.applyDimAmount() 93 | //or 直接移除背景变暗(Directly remove the background darkening) 94 | //DialogManager.dialog?.window?.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND) 95 | }, 6000) 96 | } 97 | 98 | 2. 关闭弹窗 99 | override fun onDestroy() { 100 | super.onDestroy() 101 | DialogManager.dismiss() 102 | } 103 | ``` 104 | 105 | - 同时支持`Dialog`和`DialogFragment`(Support both `Dialog` and `Dialog Fragment`): 106 | 107 | ```kotlin 108 | Dialog: useDialog(); DialogFragment: useDialogFragment() 109 | ``` 110 | 111 | - 控制背景变暗(Control the darkening of the background) 112 | 113 | ```kotlin 114 | Window.addFlags / clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND) 115 | ``` 116 | 117 | ## 四、`Dialog.Window Setting` 118 | 119 | ### 1. `show()`之前设置(Set before `Dialog.show`) 120 | 121 | ```kotlin 122 | Dialog / Window.requestWindowFeature(Window.FEATURE_LEFT_ICON) 123 | ``` 124 | 125 | ### 2. `show()`之后设置(Set after `Dialog.show`) 126 | 127 | - `Window`相关属性(`WindowManager.LayoutParams`), 如动态改变`Dialog`的位置、宽高、动画、背景等 128 | 129 | - `setFeatureXXX` 相关方法, 130 | 如: `setFeatureDrawable/setFeatureDrawableResource/setFeatureDrawableUri/setFeatureDrawableAlpha` 131 | 132 | - `setFeatureXXX` 方法必须在`Dialog.show`之前设置`requestWindowFeature`才能生效, 133 | 否则出现BUG:java.lang.RuntimeException: The feature has not been requested 134 | 135 | - 🍎 通常在`show`执行后或者`setOnShowListener`中设置`window`属性 136 | 137 | ```kotlin 138 | setOnShowListener { 139 | //对`Window`的设置需要在`Dialog`显示后才有效果 140 | //The setting of `Window` needs to be effective after `Dialog` is displayed 141 | val attributes = DialogManager.getDialog().window?.attributes 142 | attributes?.apply { 143 | width = 800 144 | height = 500 145 | gravity = Gravity.CENTER //居中显示 (Center display) 146 | dimAmount = 0.5f //背景透明度 (Background transparency) 0 ~ 1 147 | } 148 | DialogManager.getDialog().window?.attributes = attributes 149 | } 150 | ``` 151 | 152 | ## 五、`Dialog`设置动画(`Dialog` set animation) 153 | 154 | ### 1. 准备配置文件(Prepare configuration file) 155 | 156 | `anim_ando_dialog_bottom_in.xml` 157 | 158 | ```xml 159 | 160 | 163 | ``` 164 | 165 | `anim_ando_dialog_bottom_out.xml` 166 | 167 | ```xml 168 | 169 | 172 | ``` 173 | 174 | `styles.xml` 175 | 176 | ```xml 177 | 178 | 182 | ``` 183 | 184 | ### 2. 设置动画(Set animation) 185 | 186 | ```kotlin 187 | Dialog.window.setWindowAnimations(R.style.AndoBottomDialogAnimation) 188 | ``` 189 | 190 | > 注意: `Dialog`设置动画在`new BottomDialog(context, R.style.AndoBottomDialogAnimation)`时设置是无效的, 必须在`show` 191 | > 之后再对`Window` 192 | > 设置动画(`setWindowAnimations`)才能生效。经实际测试发现 API 5.0~11都是如此。 193 | 194 | ## 六、`Dialog`设置圆角(`Dialog` set rounded corners) 195 | 196 | > 在`Dialog`的`setContentView`之后(即`show`之后) 197 | > 设置`window.setBackgroundDrawableResource(R.drawable.rectangle_ando_dialog_bottom)` 198 | 199 | `rectangle_ando_dialog_bottom.xml` 200 | 201 | ```xml 202 | 203 | 204 | 205 | 206 | 207 | 208 | ``` 209 | 210 | 就是给`Window`加上个`background`, 详见👉[Dialog 圆角问题](https://juejin.cn/post/6915323090620645389) 211 | 212 | ## 七、`Dialog`设置宽高(`Dialog` set width and height) 213 | 214 | > 要在`setContentView`外包一层`FrameLayout`防止宽高设置无效问题 215 | 216 | 🍎 `LoadingDialog`样式的弹窗提供了两种实现方案,一种是`animated-rotate`/`rotate` 217 | 直接配置动画方式,另一种是`android.view.animation.AnimationUtils`; 218 | 其中的布局文件需要包一层`FragmeLayout` 219 | 220 | ```xml 221 | 222 | 225 | 226 | 228 | ... 229 | 230 | 231 | ``` 232 | 233 | > `Dialog`的`setContentView(layoutId)`和`setContentView(view)`是不一样的, 如果使用的是`layoutId:Int` 234 | > 则不需要外面套一层`FrameLayout`, 235 | > 但如果是用的`view:View`, 则必须在自定义布局的最外层在套一层其它布局,如`FrameLayout` 236 | > 。前者用的是`LayoutInflater.inflate(layoutId,mContentParent,true)` 237 | > 而后者用的是`mContentParent.addView(view)`即`LayoutInflater.inflate(view,null,false)` . 我们看下`inflate`方法的特性: 238 | 239 | ### inflate(view, null);/inflate(resource, null, true/false); 240 | 241 | 只创建`view`,`view`没有`LayoutParams`值,然后直接返回`view` 242 | 布局中最外层的`layout_width`、`layout_height`将失效 243 | 244 | ### inflate(resource, mContentParent);/inflate(resource, root, true); 245 | 246 | 创建`view`, 然后执行`mContentParent.addView(view, params)`, 最后返回`mContentParent` 247 | 248 | > 综上所述, `Dialog`宽高无效问题, 本质上就是`LayoutInflater.inflate`不同方法之间差异的问题. 249 | > 其中的`mContentParent:ViewGroup`由`PhoneWindow.installDecor()`创建. 详见: `PhoneWindow.setContentView` 250 | 251 | ### `DialogManager`中已处理该问题(This issue has been dealt with in `Dialog Manager`) 252 | 253 | ```kotlin 254 | fun setContentView( 255 | layoutId: Int, 256 | block: ((Dialog?, View) -> Unit)? = null 257 | ): DialogManager { 258 | FrameLayout(mContext ?: return this).apply { 259 | layoutParams = ViewGroup.LayoutParams( 260 | ViewGroup.LayoutParams.MATCH_PARENT, 261 | ViewGroup.LayoutParams.MATCH_PARENT 262 | ) 263 | contentView = LayoutInflater.from(mContext).inflate(layoutId, this, true) 264 | ... 265 | } 266 | return this 267 | } 268 | ``` 269 | 270 | ## 八、总结(Summary) 271 | 272 | 1. DialogFragment源码中加载视图用的是 Dialog.setContentView(View) 273 | 274 | 2. 如果要改变`Window`属性, 可以在`onStart`中处理。因为`DialogFragment.onStart`中执行了`Dialog.show()` 275 | 276 | ## 九、感谢(Thanks) 277 | 278 | `Android源码在线阅读` 279 | 280 | `Android Dialog - Rounded Corners and Transparency` 281 | 282 | `LayoutInflater的正确使用姿势` 283 | 284 | `LayoutInflater中inflate方法的区别` 285 | 286 | ## 十、遇到的BUG(BUG encountered) 287 | 288 | - java.lang.RuntimeException: The feature has not been requested 289 | 290 | Fixed: `see above` 291 | 292 | - android.util.AndroidRuntimeException: requestFeature() must be called before adding content 293 | 294 | Fixed: `setContentView(...)`之前设置即可 295 | 296 | - `java.lang.IllegalStateException: Fragment xxx not associated with a fragment manager.` 297 | 298 | - `java.lang.IllegalArgumentException: View not attached to window manager` 299 | 300 | Fixed: 301 | 302 | - WindowManager: android.view.WindowLeaked: Activity ando.dialog.sample.MainActivity 303 | has leaked window DecorView@54f9439[MainActivity] that was originally added here 304 | 305 | 如果只是处理`Dialog`在`Acticity.onConfigurationChanged`出现的问题 306 | 307 | EN: If you just deal with the problem of `Dialog` in `Activity.onConfigurationChanged` 308 | 309 | ```kotlin 310 | //若`AndroidManifest.xml`中已经配置了`android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize"`则不需要设置该项 311 | Acticity / Context.registerComponentCallbacks(object : ComponentCallbacks { 312 | override fun onConfigurationChanged(newConfig: Configuration) { 313 | dialog?.dismiss() 314 | } 315 | override fun onLowMemory() { 316 | } 317 | }) 318 | ``` 319 | 320 | 在`onDestroy`中也加上销毁 321 | 322 | ```kotlin 323 | override fun onDestroy() { 324 | super.onDestroy() 325 | DialogManager.dismiss() 326 | } 327 | ``` 328 | 329 | - java.lang.IllegalStateException: This ViewTreeObserver is not alive, call getViewTreeObserver() again 330 | 331 | Fixed: 332 | 333 | ```kotlin 334 | fun addOnGlobalLayoutListener(onGlobalLayout: (width: Int, height: Int) -> Unit): DialogManager { 335 | contentView?.viewTreeObserver?.addOnGlobalLayoutListener(object : 336 | ViewTreeObserver.OnGlobalLayoutListener { 337 | override fun onGlobalLayout() { 338 | contentView?.viewTreeObserver?.removeOnGlobalLayoutListener(this) 339 | onGlobalLayout.invoke(contentView?.width ?: 0, contentView?.height ?: 0) 340 | } 341 | }) 342 | return this 343 | } 344 | ``` 345 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.application' 3 | id 'kotlin-android' 4 | id 'kotlin-kapt' 5 | id 'org.jetbrains.kotlin.android' 6 | } 7 | 8 | android { 9 | compileSdkVersion rootProject.ext.compileSdkVersion 10 | buildToolsVersion rootProject.ext.buildToolsVersion 11 | defaultConfig { 12 | minSdkVersion rootProject.ext.minSdkVersion 13 | targetSdkVersion rootProject.ext.targetSdkVersion 14 | versionCode rootProject.ext.versionCode 15 | versionName rootProject.ext.versionName 16 | 17 | applicationId rootProject.ext.applicationId 18 | 19 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 20 | } 21 | 22 | buildTypes { 23 | release { 24 | minifyEnabled false 25 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 26 | } 27 | } 28 | //https://www.jianshu.com/p/4933ab2f3599 29 | configurations.all { 30 | resolutionStrategy { 31 | force 'androidx.appcompat:appcompat:1.6.1' 32 | force 'com.google.android.material:material:1.8.0' 33 | } 34 | } 35 | } 36 | 37 | dependencies { 38 | implementation 'androidx.appcompat:appcompat:1.6.1' 39 | implementation 'com.google.android.material:material:1.8.0' 40 | implementation 'androidx.constraintlayout:constraintlayout:2.1.4' 41 | 42 | implementation project(':dialog_core') 43 | implementation project(':dialog_usage') 44 | implementation project(':dialog_bottom_sheet') 45 | implementation project(':widget_option_list') 46 | 47 | // implementation 'com.github.javakam:dialog.core:x.0.0@aar' 48 | // implementation 'com.github.javakam:dialog.usage:x.0.0@aar' 49 | // implementation 'com.github.javakam:dialog.bottomsheet:x.0.0@aar' 50 | // implementation 'com.github.javakam:widget.optionview:x.0.0@aar' 51 | 52 | } -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 14 | 18 | 21 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 33 | 36 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/java/ando/dialog/sample/BottomDialogActivity.kt: -------------------------------------------------------------------------------- 1 | package ando.dialog.sample 2 | 3 | import ando.dialog.sample.utils.QMUIStatusBarHelper 4 | import android.os.Bundle 5 | import android.util.DisplayMetrics 6 | import android.view.WindowManager 7 | import androidx.appcompat.app.AppCompatActivity 8 | 9 | /** 10 | * 弹窗且不改变状态栏字体颜色方案 11 | */ 12 | class BottomDialogActivity : AppCompatActivity() { 13 | override fun onCreate(savedInstanceState: Bundle?) { 14 | super.onCreate(savedInstanceState) 15 | setContentView(R.layout.layout_dialog_bottom_activity) 16 | 17 | setDisplay() 18 | } 19 | 20 | private fun setDisplay() { 21 | val dm = DisplayMetrics() 22 | window.windowManager.defaultDisplay.getMetrics(dm) 23 | val p = window.attributes 24 | p.height = WindowManager.LayoutParams.MATCH_PARENT 25 | p.width = WindowManager.LayoutParams.MATCH_PARENT 26 | //window.setWindowAnimations(ando.dialog.usage.R.style.AndoBottomDialogAnimation) 27 | window.attributes = p 28 | 29 | QMUIStatusBarHelper.translucent(this) 30 | QMUIStatusBarHelper.setStatusBarLightMode(this) 31 | } 32 | } -------------------------------------------------------------------------------- /app/src/main/java/ando/dialog/sample/ConfigurationActivity.kt: -------------------------------------------------------------------------------- 1 | package ando.dialog.sample 2 | 3 | import ando.dialog.core.DialogManager 4 | import android.content.res.Configuration 5 | import android.os.Bundle 6 | import android.util.Log 7 | import android.view.View 8 | import android.widget.Button 9 | import android.widget.TextView 10 | import android.widget.Toast 11 | import androidx.appcompat.app.AppCompatActivity 12 | import androidx.fragment.app.DialogFragment 13 | 14 | /** 15 | * Title: ConfigurationActivity 16 | *

17 | * Description: 18 | *

19 | * @author javakam 20 | * @date 2021/1/8 14:43 21 | */ 22 | class ConfigurationActivity : AppCompatActivity() { 23 | 24 | companion object { 25 | const val TAG = "123" 26 | } 27 | 28 | private lateinit var mBtShowDialog: Button 29 | private lateinit var mBtShowDialogFragment: Button 30 | override fun onCreate(savedInstanceState: Bundle?) { 31 | super.onCreate(savedInstanceState) 32 | setContentView(R.layout.activity_dialog_configuration) 33 | title = "旋屏测试(Rotating Screen Test)" 34 | 35 | mBtShowDialog = findViewById(R.id.bt_dialog_show_dialog) 36 | mBtShowDialogFragment = findViewById(R.id.bt_dialog_show_dialog_fragment) 37 | mBtShowDialog.setOnClickListener { showDialog() } 38 | mBtShowDialogFragment.setOnClickListener { showDialogFragment() } 39 | 40 | Log.e(TAG, "Activity onCreate...") 41 | } 42 | 43 | override fun onDestroy() { 44 | super.onDestroy() 45 | Log.e(TAG, "Activity onDestroy... ") 46 | DialogManager.dismiss() 47 | } 48 | 49 | override fun onConfigurationChanged(newConfig: Configuration) { 50 | Log.e(TAG, "屏幕方向: ${newConfig.orientation} isShowing= ${DialogManager.isShowing()}") 51 | super.onConfigurationChanged(newConfig) 52 | } 53 | 54 | private fun showDialog() { 55 | DialogManager.with(this, R.style.AndoLoadingDialog) 56 | .setContentView(R.layout.layout_ando_dialog_loading) { v -> 57 | v.findViewById(R.id.progressbar_ando_dialog_loading).visibility = 58 | View.VISIBLE 59 | 60 | v.findViewById(R.id.tv_ando_dialog_loading_text).text = 61 | getText(R.string.str_ando_dialog_loading_text) 62 | } 63 | .setCancelable(true) 64 | .setCanceledOnTouchOutside(true) 65 | .setOnCancelListener { 66 | Log.e(TAG, "Dialog Cancel... ") 67 | } 68 | .setOnDismissListener { 69 | Log.e(TAG, "Dialog Dismiss... ") 70 | Toast.makeText(this, "Dialog Dismiss", Toast.LENGTH_SHORT).show() 71 | } 72 | .show() 73 | 74 | } 75 | 76 | private fun showDialogFragment() { 77 | DialogManager.with(this, R.style.AndoLoadingDialog) 78 | .useDialogFragment() 79 | .setContentView(R.layout.layout_ando_dialog_loading) { v -> 80 | v.findViewById(R.id.progressbar_ando_dialog_loading).visibility = 81 | View.VISIBLE 82 | v.findViewById(R.id.tv_ando_dialog_loading_text).text = 83 | getText(R.string.str_ando_dialog_loading_text) 84 | } 85 | .setCancelable(true) 86 | .setCanceledOnTouchOutside(false) 87 | .setOnCancelListener { 88 | Log.e(TAG, "DialogFragment Cancel... ") 89 | } 90 | .setOnDismissListener { 91 | Log.e(TAG, "DialogFragment Dismiss... ") 92 | Toast.makeText(this, "DialogFragment Dismiss", Toast.LENGTH_SHORT).show() 93 | } 94 | .show() 95 | } 96 | 97 | } -------------------------------------------------------------------------------- /app/src/main/java/ando/dialog/sample/EditTextActivity.kt: -------------------------------------------------------------------------------- 1 | package ando.dialog.sample 2 | 3 | import ando.dialog.core.DialogManager 4 | import android.os.Bundle 5 | import android.util.Log 6 | import android.view.View 7 | import android.widget.Button 8 | import android.widget.EditText 9 | import android.widget.Toast 10 | import androidx.appcompat.app.AppCompatActivity 11 | 12 | /** 13 | * # EditTextActivity 14 | * 15 | * @author javakam 16 | * @date 2021/1/11 16:32 17 | */ 18 | class EditTextActivity : AppCompatActivity() { 19 | 20 | private val mBtDialog: Button by lazy { findViewById(R.id.bt_dialog_show_dialog) } 21 | private val mBtDialogFragment: Button by lazy { findViewById(R.id.bt_dialog_show_dialog_fragment) } 22 | 23 | override fun onCreate(savedInstanceState: Bundle?) { 24 | super.onCreate(savedInstanceState) 25 | setContentView(R.layout.activity_dialog_edittext) 26 | title = "输入框(EditText)" 27 | 28 | mBtDialog.setOnClickListener { showDialog() } 29 | mBtDialogFragment.setOnClickListener { showDialogFragment() } 30 | } 31 | 32 | private fun showDialog() { 33 | DialogManager.with(this, R.style.EditTextDialogStyle) 34 | .useDialog() 35 | .setContentView(R.layout.layout_dialog_edittext) { v: View -> 36 | val edtDialog: EditText = v.findViewById(R.id.edt_dialog) 37 | val btCancel: Button = v.findViewById(R.id.bt_dialog_cancel) 38 | val btConfirm: Button = v.findViewById(R.id.bt_dialog_confirm) 39 | 40 | btCancel.setOnClickListener { DialogManager.dismiss() } 41 | btConfirm.setOnClickListener { 42 | val msg = edtDialog.text.toString() 43 | Log.e("123", "msg=$msg") 44 | Toast.makeText(this, msg, Toast.LENGTH_SHORT).show() 45 | } 46 | } 47 | .setTitle("Dialog EditText") 48 | .setCanceledOnTouchOutside(false) 49 | .setOnShowListener { 50 | val edtDialog: EditText? = DialogManager.contentView?.findViewById(R.id.edt_dialog) 51 | edtDialog?.isFocusable = true 52 | edtDialog?.requestFocus() 53 | edtDialog?.requestFocusFromTouch() 54 | } 55 | .show() 56 | .apply { 57 | } 58 | } 59 | 60 | private fun showDialogFragment() { 61 | DialogManager.with(this, R.style.EditTextDialogStyle) 62 | .useDialogFragment() 63 | .setContentView(R.layout.layout_dialog_edittext) { v: View -> 64 | val edtDialog: EditText = v.findViewById(R.id.edt_dialog) 65 | val btCancel: Button = v.findViewById(R.id.bt_dialog_cancel) 66 | val btConfirm: Button = v.findViewById(R.id.bt_dialog_confirm) 67 | 68 | btCancel.setOnClickListener { DialogManager.dismiss() } 69 | btConfirm.setOnClickListener { 70 | val msg = edtDialog.text.toString() 71 | Log.e("123", "msg=$msg") 72 | Toast.makeText(this, msg, Toast.LENGTH_SHORT).show() 73 | } 74 | } 75 | .setTitle("DialogFragment EditText") 76 | .setCanceledOnTouchOutside(true) 77 | .setOnShowListener { 78 | val edtDialog: EditText? = DialogManager.contentView?.findViewById(R.id.edt_dialog) 79 | edtDialog?.isFocusable = true 80 | edtDialog?.requestFocus() 81 | edtDialog?.requestFocusFromTouch() 82 | } 83 | .show() 84 | .apply { 85 | } 86 | } 87 | 88 | override fun onDestroy() { 89 | super.onDestroy() 90 | DialogManager.dismiss() 91 | } 92 | 93 | } -------------------------------------------------------------------------------- /app/src/main/java/ando/dialog/sample/LinearItemDecoration.kt: -------------------------------------------------------------------------------- 1 | package ando.dialog.sample 2 | 3 | import android.graphics.Canvas 4 | import android.graphics.Color 5 | import android.graphics.Rect 6 | import android.graphics.drawable.ColorDrawable 7 | import android.graphics.drawable.Drawable 8 | import androidx.recyclerview.widget.RecyclerView 9 | import android.view.View 10 | import androidx.annotation.ColorInt 11 | import androidx.annotation.Px 12 | import androidx.collection.ArraySet 13 | import androidx.recyclerview.widget.LinearLayoutManager 14 | 15 | /** 16 | * @author zyyoona7 17 | * @version v1.0 18 | * @since 2018/12/13. 19 | */ 20 | class LinearItemDecoration internal constructor(builder: Builder) : RecyclerView.ItemDecoration() { 21 | 22 | private val isSpace: Boolean = builder.isSpace 23 | private val isHideLastDivider: Boolean = builder.isHideLastDivider 24 | private val divider: Drawable = builder.divider 25 | private val dividerSize: Int = builder.dividerSize 26 | private val marginStart: Int = builder.marginStart 27 | private val marginEnd: Int = builder.marginEnd 28 | private val hideDividerItemTypeSet: ArraySet = builder.hideDividerItemTypeSet 29 | private val hideAroundDividerItemTypeSet: ArraySet = builder.hideAroundDividerItemTypeSet 30 | 31 | /** 32 | * add item decoration to [recyclerView] 33 | */ 34 | fun addTo(recyclerView: RecyclerView) { 35 | removeFrom(recyclerView) 36 | recyclerView.addItemDecoration(this) 37 | } 38 | 39 | /** 40 | * remove item decoration from [recyclerView] 41 | */ 42 | fun removeFrom(recyclerView: RecyclerView) { 43 | recyclerView.removeItemDecoration(this) 44 | } 45 | 46 | override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State) { 47 | super.getItemOffsets(outRect, view, parent, state) 48 | val itemCount = parent.adapter?.itemCount ?: 0 49 | if (itemCount == 0) { 50 | return 51 | } 52 | 53 | val itemPosition = parent.getChildAdapterPosition(view) 54 | if (itemPosition == RecyclerView.NO_POSITION) { 55 | return 56 | } 57 | 58 | val layoutManager = parent.layoutManager as? LinearLayoutManager ?: return 59 | 60 | val size = calculateDividerSize(layoutManager) 61 | 62 | if (layoutManager.orientation == RecyclerView.VERTICAL) { 63 | //LinearLayoutManager vertical 64 | if ((isHideLastDivider && isLastItem(itemPosition, itemCount)) 65 | || nextIsHideItemType(itemPosition, itemCount, parent) || isHideItemType(itemPosition, parent) 66 | ) { 67 | outRect.setEmpty() 68 | } else { 69 | outRect.set(0, 0, 0, size) 70 | } 71 | } else { 72 | //LinearLayoutManager horizontal 73 | if ((isHideLastDivider && isLastItem(itemPosition, itemCount)) 74 | || nextIsHideItemType(itemPosition, itemCount, parent) || isHideItemType(itemPosition, parent) 75 | ) { 76 | outRect.setEmpty() 77 | } else { 78 | outRect.set(0, 0, size, 0) 79 | } 80 | } 81 | } 82 | 83 | override fun onDraw(c: Canvas, parent: RecyclerView, state: RecyclerView.State) { 84 | super.onDraw(c, parent, state) 85 | 86 | val itemCount = parent.adapter?.itemCount ?: 0 87 | if (isSpace || itemCount == 0) { 88 | return 89 | } 90 | 91 | val layoutManager = parent.layoutManager as? LinearLayoutManager ?: return 92 | 93 | if (layoutManager.orientation == RecyclerView.VERTICAL) { 94 | //LinearLayoutManager vertical 95 | drawVertical(c, parent, layoutManager, itemCount) 96 | } else { 97 | drawHorizontal(c, parent, layoutManager, itemCount) 98 | } 99 | } 100 | 101 | private fun drawVertical(canvas: Canvas, parent: RecyclerView, layoutManager: LinearLayoutManager, itemCount: Int) { 102 | 103 | val left = parent.paddingLeft + marginStart 104 | val right = parent.width - parent.paddingRight - marginEnd 105 | val size = calculateDividerSize(layoutManager) 106 | 107 | val childCount = parent.childCount 108 | for (i in 0 until childCount) { 109 | val childView = parent.getChildAt(i) 110 | val itemPosition = parent.getChildAdapterPosition(childView) 111 | if (itemPosition == RecyclerView.NO_POSITION) { 112 | return 113 | } 114 | 115 | if ((isHideLastDivider && isLastItem(itemPosition, itemCount)) 116 | || nextIsHideItemType(itemPosition, itemCount, parent) || isHideItemType(itemPosition, parent) 117 | ) { 118 | continue 119 | } 120 | 121 | val params = childView.layoutParams as RecyclerView.LayoutParams 122 | val top = childView.bottom + params.bottomMargin 123 | val bottom = top + size 124 | 125 | divider.setBounds(left, top, right, bottom) 126 | divider.draw(canvas) 127 | } 128 | } 129 | 130 | private fun drawHorizontal( 131 | canvas: Canvas, 132 | parent: RecyclerView, 133 | layoutManager: LinearLayoutManager, 134 | itemCount: Int 135 | ) { 136 | 137 | val top = parent.paddingTop + marginStart 138 | val bottom = parent.height - parent.paddingBottom - marginEnd 139 | val size = calculateDividerSize(layoutManager) 140 | 141 | val childCount = parent.childCount 142 | for (i in 0 until childCount) { 143 | val childView = parent.getChildAt(i) 144 | val itemPosition = parent.getChildAdapterPosition(childView) 145 | if (itemPosition == RecyclerView.NO_POSITION) { 146 | return 147 | } 148 | 149 | if ((isHideLastDivider && isLastItem(itemPosition, itemCount)) 150 | || nextIsHideItemType(itemPosition, itemCount, parent) || isHideItemType(itemPosition, parent) 151 | ) { 152 | continue 153 | } 154 | 155 | val params = childView.layoutParams as RecyclerView.LayoutParams 156 | val left = childView.right + params.rightMargin 157 | val right = left + size 158 | 159 | divider.setBounds(left, top, right, bottom) 160 | divider.draw(canvas) 161 | } 162 | } 163 | 164 | /** 165 | * [itemPosition] is last item 166 | */ 167 | private fun isLastItem(itemPosition: Int, itemCount: Int): Boolean { 168 | return itemCount > 0 && itemPosition == itemCount - 1 169 | } 170 | 171 | /** 172 | * [itemPosition]+1 is the hide divider itemType 173 | */ 174 | private fun nextIsHideItemType(itemPosition: Int, itemCount: Int, parent: RecyclerView): Boolean { 175 | return if (itemPosition + 1 < itemCount) hideAroundDividerItemTypeSet.contains( 176 | parent.adapter?.getItemViewType(itemPosition + 1) ?: -1 177 | ) else false 178 | } 179 | 180 | /** 181 | * [itemPosition] is the hide divider itemType 182 | */ 183 | private fun isHideItemType(itemPosition: Int, parent: RecyclerView): Boolean { 184 | val itemType = parent.adapter?.getItemViewType(itemPosition) ?: -1 185 | return hideAroundDividerItemTypeSet.contains(itemType) || hideDividerItemTypeSet.contains(itemType) 186 | } 187 | 188 | /** 189 | * [divider] type calculate size 190 | */ 191 | private fun calculateDividerSize(layoutManager: LinearLayoutManager): Int { 192 | return if (layoutManager.orientation == RecyclerView.VERTICAL) { 193 | if (divider is ColorDrawable) dividerSize else divider.intrinsicHeight 194 | } else { 195 | if (divider is ColorDrawable) dividerSize else divider.intrinsicWidth 196 | } 197 | } 198 | 199 | class Builder { 200 | 201 | internal var isSpace: Boolean = false 202 | internal var isHideLastDivider: Boolean = false 203 | internal var divider: Drawable = ColorDrawable(Color.TRANSPARENT) 204 | internal var dividerSize: Int = 0 205 | internal var marginStart: Int = 0 206 | internal var marginEnd: Int = 0 207 | internal val hideDividerItemTypeSet: ArraySet = ArraySet(1) 208 | internal val hideAroundDividerItemTypeSet: ArraySet = ArraySet(1) 209 | 210 | fun asSpace() = apply { isSpace = true } 211 | 212 | fun hideLastDivider() = apply { isHideLastDivider = true } 213 | 214 | fun color(@ColorInt color: Int) = apply { divider = ColorDrawable(color) } 215 | 216 | fun drawable(drawable: Drawable) = apply { divider = drawable } 217 | 218 | fun dividerSize(@Px size: Int) = apply { dividerSize = size } 219 | 220 | fun marginStart(@Px marginStart: Int) = apply { this.marginStart = marginStart } 221 | 222 | fun marginEnd(@Px marginEnd: Int) = apply { this.marginEnd = marginEnd } 223 | 224 | /** 225 | * hide divider of [itemTypes] 226 | */ 227 | fun hideDividerForItemType(vararg itemTypes: Int) = apply { 228 | if (itemTypes.isNotEmpty()) { 229 | itemTypes.forEach { hideDividerItemTypeSet.add(it) } 230 | } 231 | } 232 | 233 | /** 234 | * hide current position divider and hide position-1 divider of [itemTypes] 235 | */ 236 | fun hideAroundDividerForItemType(vararg itemTypes: Int) = apply { 237 | if (itemTypes.isNotEmpty()) { 238 | itemTypes.forEach { hideAroundDividerItemTypeSet.add(it) } 239 | } 240 | } 241 | 242 | fun build() = LinearItemDecoration(this) 243 | } 244 | } -------------------------------------------------------------------------------- /app/src/main/java/ando/dialog/sample/OptionViewActivity.kt: -------------------------------------------------------------------------------- 1 | package ando.dialog.sample 2 | 3 | import ando.widget.option.list.* 4 | import ando.widget.option.list.OptionView.Companion.LAYOUT_ITEM_HORIZONTAL 5 | import android.app.Activity 6 | import android.content.Intent 7 | import androidx.appcompat.app.AppCompatActivity 8 | import android.os.Bundle 9 | import android.util.Log 10 | import android.widget.Button 11 | import android.widget.Toast 12 | import androidx.core.content.ContextCompat 13 | 14 | class OptionViewActivity : AppCompatActivity() { 15 | companion object { 16 | fun open(activity: Activity, isMultiChoiceMode: Boolean) { 17 | val intent = Intent(activity, OptionViewActivity::class.java) 18 | intent.putExtra("isMultiChoiceMode", isMultiChoiceMode) 19 | activity.startActivity(intent) 20 | } 21 | } 22 | 23 | private var isMultiChoiceMode: Boolean = false 24 | private val mBtShowResult: Button by lazy { findViewById(R.id.bt_show_check) } 25 | private val mOptionView: OptionView by lazy { findViewById(R.id.optionView) } 26 | 27 | override fun onCreate(savedInstanceState: Bundle?) { 28 | super.onCreate(savedInstanceState) 29 | setContentView(R.layout.activity_option_view) 30 | this.isMultiChoiceMode = intent.getBooleanExtra("isMultiChoiceMode", false) 31 | initView() 32 | } 33 | 34 | private fun initView() { 35 | mOptionView.obtain( 36 | OptConfig( 37 | itemLayoutResource = LAYOUT_ITEM_HORIZONTAL, 38 | setting = OptSetting( 39 | checkMode = if (isMultiChoiceMode) MODE_CHECK_MULTI else MODE_CHECK_SINGLE, 40 | isItemViewHorizontal = true, isCheckTriggerByItemView = true 41 | ) 42 | ), 43 | data = null, onItemViewCallBack = null, 44 | onItemClickListener = object : OptionView.OnItemClickListener { 45 | override fun onItemSelected(item: OptionItem) { 46 | super.onItemSelected(item) 47 | Toast.makeText(this@OptionViewActivity, "selectedPosition: $item", Toast.LENGTH_SHORT).show() 48 | } 49 | } 50 | ) 51 | 52 | //模拟网络延迟加载数据 53 | mOptionView.postDelayed({ 54 | val list = mutableListOf( 55 | OptionItem( 56 | 1, "QQ", ContextCompat.getDrawable(this, R.drawable.umeng_socialize_qq), false 57 | ), 58 | OptionItem( 59 | 2, "QQ空间", ContextCompat.getDrawable(this, R.drawable.umeng_socialize_qzone), false 60 | ), 61 | OptionItem( 62 | 3, "微信", ContextCompat.getDrawable(this, R.drawable.umeng_socialize_wechat), false 63 | ), 64 | OptionItem( 65 | 4, "朋友圈", ContextCompat.getDrawable(this, R.drawable.umeng_socialize_wxcircle), false 66 | ), 67 | OptionItem(5, "张三", null, false), 68 | OptionItem(6, "李四", null, false), 69 | OptionItem(7, "王五", null, false), 70 | OptionItem(8, "赵六", null, false), 71 | ) 72 | setData(list) 73 | }, 1200) 74 | 75 | //展示结果 76 | mBtShowResult.setOnClickListener { 77 | val sb = StringBuilder() 78 | mOptionView.getData().forEach { 79 | if (it.isChecked) sb.append(it.title).append(",") 80 | } 81 | val str = sb.toString() 82 | val result = if (str.isBlank()) return@setOnClickListener else str.subSequence(0, str.length - 1) 83 | Toast.makeText(this, "选择结果: $result", Toast.LENGTH_SHORT).show() 84 | Log.w("123", "选择结果: $result") 85 | } 86 | } 87 | 88 | private fun setData(data: List) { 89 | mOptionView.setData(data = data) 90 | } 91 | } -------------------------------------------------------------------------------- /app/src/main/java/ando/dialog/sample/Utils.kt: -------------------------------------------------------------------------------- 1 | package ando.dialog.sample 2 | 3 | import android.content.Context 4 | 5 | /** 6 | * @author javakam 7 | * @date 2021-05-11 15:30 8 | */ 9 | fun Context.dp2px(value: Int): Int = (value * resources.displayMetrics.density).toInt() 10 | 11 | fun Context.dp2px(value: Float): Int = (value * resources.displayMetrics.density).toInt() 12 | -------------------------------------------------------------------------------- /app/src/main/java/ando/dialog/sample/utils/OnceReadValue.java: -------------------------------------------------------------------------------- 1 | package ando.dialog.sample.utils; 2 | 3 | public abstract class OnceReadValue { 4 | 5 | private volatile boolean isRead = false; 6 | private T cacheValue; 7 | 8 | public T get(P param){ 9 | if(isRead){ 10 | return cacheValue; 11 | } 12 | synchronized (this){ 13 | if(!isRead){ 14 | cacheValue = read(param); 15 | isRead = true; 16 | } 17 | } 18 | return cacheValue; 19 | } 20 | 21 | protected abstract T read(P param); 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/umeng_socialize_fav.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javakam/DialogManager/4738866ca1e4262595c1df845be5c7e8bb18e347/app/src/main/res/drawable-xhdpi/umeng_socialize_fav.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/umeng_socialize_qq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javakam/DialogManager/4738866ca1e4262595c1df845be5c7e8bb18e347/app/src/main/res/drawable-xhdpi/umeng_socialize_qq.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/umeng_socialize_qzone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javakam/DialogManager/4738866ca1e4262595c1df845be5c7e8bb18e347/app/src/main/res/drawable-xhdpi/umeng_socialize_qzone.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/umeng_socialize_sina.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javakam/DialogManager/4738866ca1e4262595c1df845be5c7e8bb18e347/app/src/main/res/drawable-xhdpi/umeng_socialize_sina.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/umeng_socialize_wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javakam/DialogManager/4738866ca1e4262595c1df845be5c7e8bb18e347/app/src/main/res/drawable-xhdpi/umeng_socialize_wechat.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/umeng_socialize_wxcircle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javakam/DialogManager/4738866ca1e4262595c1df845be5c7e8bb18e347/app/src/main/res/drawable-xhdpi/umeng_socialize_wxcircle.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/circle_ando_dialog_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 13 | 14 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 | 55 | 60 | 65 | 70 | 75 | 80 | 85 | 90 | 95 | 100 | 105 | 110 | 115 | 120 | 125 | 130 | 135 | 140 | 145 | 150 | 155 | 160 | 165 | 170 | 171 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_dialog_configuration.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_dialog_edittext.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 21 | 22 | 28 | 29 | 35 | 36 | 37 | 48 | 49 | 56 | 57 | 64 | 65 | 77 | 78 | 84 | 85 | 91 | 92 | 104 | 105 | 111 | 112 | 118 | 119 | 131 | 132 | 138 | 139 | 145 | 146 | 152 | 153 | 159 | 160 | 166 | 167 | 173 | 174 | 180 | 181 | 182 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_modal.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 15 | 16 |