-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/local.properties |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,35 @@ | ||
# AnyPopDialog-Compose | ||
AnyPopDialog-Compose | ||
=============== | ||
<a href="https://xiaozhuanlan.com/u/halifax"><img alt="小专栏" src="https://img.shields.io/badge/%E5%B0%8F%E4%B8%93%E6%A0%8F-FF7055" ></a> | ||
<a href="https://juejin.cn/user/8451824316670/posts"><img alt="稀土掘金" src="https://img.shields.io/badge/稀土掘金-056DE8" ></a> | ||
<a href="https://www.zhihu.com/people/fq_halifax"><img src="https://img.shields.io/badge/%E7%9F%A5%E4%B9%8E-056DE8" alt="知乎"></a> | ||
<a href="https://blog.csdn.net/logicsboy"><img src="https://img.shields.io/badge/CSDN-fc5531" alt="CSDN"> | ||
|
||
可控制Compose Dialog弹出的方向,支持上下左右,自由定制,真Dialog哦🔥 | ||
|
||
# 效果 | ||
|
||
<img src="screenshot/preview.gif" width="30%"/> | ||
|
||
# 用法 | ||
```kotlin | ||
@Composable | ||
fun TestXXXX() { | ||
var showDialog by remember { mutableStateOf(false) } | ||
if (showDialog) { | ||
var isActiveClose by remember { mutableStateOf(false) } | ||
AnyPopDialog( | ||
modifier = Modifier.fillMaxWidth().background(...), | ||
isActiveClose = isActiveClose, | ||
// 根据你自己的功能,调整进入方向即可,支持:TOP/LEFT/RIGHT/BOTTOM | ||
properties = AnyPopDialogProperties(direction = DirectionState.BOTTOM), | ||
content = { | ||
// 这里放你自己的Dialog内容 | ||
// 如果你需要在你自己的组件中想动画关闭Dialog,请更新isActiveClose | ||
}, | ||
onDismiss = { showDialog = false } | ||
) | ||
} | ||
... | ||
} | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
plugins { | ||
id("com.android.library") | ||
id("org.jetbrains.kotlin.android") | ||
} | ||
afterEvaluate { | ||
apply(from = "../gradle/release/lib_publish.gradle") | ||
} | ||
|
||
android { | ||
namespace = "com.melody.dialog.any.pop" | ||
compileSdk = 33 | ||
|
||
defaultConfig { | ||
minSdk = 21 | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
consumerProguardFiles("consumer-rules.pro") | ||
} | ||
buildTypes { | ||
release { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
buildFeatures { | ||
compose = true | ||
} | ||
composeOptions { | ||
kotlinCompilerExtensionVersion = "1.4.3" | ||
} | ||
packaging { | ||
resources { | ||
excludes += "/META-INF/{AL2.0,LGPL2.1}" | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation("androidx.core:core-ktx:1.9.0") | ||
implementation("androidx.activity:activity-compose:1.7.2") | ||
implementation("com.google.android.material:material:1.8.0") | ||
implementation(platform("androidx.compose:compose-bom:2023.03.00")) | ||
implementation("androidx.compose.ui:ui") | ||
implementation("androidx.compose.material3:material3") | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
</manifest> |