Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

신고하기 기능 추가 #275

Merged
merged 9 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package team.ppac.common.android.extension

import android.app.Activity
import android.content.Intent
import android.net.Uri
import androidx.core.app.ActivityCompat
import kotlin.system.exitProcess

Expand All @@ -16,4 +17,13 @@ inline fun <reified T : Activity> Activity.getIntent(
fun Activity.forceKillApplication() {
ActivityCompat.finishAffinity(this)
exitProcess(0)
}

fun Activity.openExternalWebView(url: String) {
val webUrl = if (url.startsWith("http")) url else "https://$url"

val intent = Intent()
intent.action = Intent.ACTION_VIEW
intent.data = Uri.parse(webUrl)
startActivity(intent)
}
1 change: 1 addition & 0 deletions core/designsystem/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ dependencies {
implementation(platform(libs.compose.bom))
implementation(libs.bundles.compose)
implementation(libs.timber)
implementation(libs.google.material)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package team.ppac.designsystem.component.dialog

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.unit.dp
import team.ppac.designsystem.FarmemeTheme
import team.ppac.designsystem.foundation.FarmemeRadius

@Composable
fun FarmemeBottomSheetDialog(
modifier: Modifier = Modifier,
canceledOnTouchOutside: Boolean = true,
isDraggable: Boolean = false,
bottomSheetProperties: BottomSheetDialogProperties = BottomSheetDialogProperties(
dismissOnClickOutside = canceledOnTouchOutside,
dismissOnBackPress = canceledOnTouchOutside,
navigationBarProperties = NavigationBarProperties(
color = FarmemeTheme.backgroundColor.white
),
behaviorProperties = BottomSheetBehaviorProperties(
isDraggable = isDraggable
)
),
onBottomSheetDismiss: () -> Unit,
content: @Composable () -> Unit,
) {
BottomSheetDialog(
onDismissRequest = onBottomSheetDismiss,
properties = bottomSheetProperties,
) {
Column(
modifier = modifier
.clip(FarmemeRadius.RadiusTop20.shape)
.fillMaxWidth()
.background(FarmemeTheme.backgroundColor.white)
.padding(top = 16.dp, bottom = 10.dp)
) {
content()
}
}
}
Loading
Loading