Skip to content

Commit

Permalink
upload
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMelody committed Sep 17, 2023
1 parent dab207c commit 51e60a8
Show file tree
Hide file tree
Showing 59 changed files with 1,891 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/local.properties
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 34 additions & 1 deletion README.md
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 }
)
}
...
}
```
1 change: 1 addition & 0 deletions any_pop_dialog_library/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
56 changes: 56 additions & 0 deletions any_pop_dialog_library/build.gradle.kts
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")

}
Empty file.
21 changes: 21 additions & 0 deletions any_pop_dialog_library/proguard-rules.pro
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
4 changes: 4 additions & 0 deletions any_pop_dialog_library/src/main/AndroidManifest.xml
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>
Loading

0 comments on commit 51e60a8

Please sign in to comment.