Skip to content

Commit

Permalink
Merge pull request #8 from icanerdogan/release/1.0.2
Browse files Browse the repository at this point in the history
Release/1.0.2
  • Loading branch information
icanerdogan authored Oct 24, 2024
2 parents 1cb83e7 + 1d75e7c commit 6e07e52
Show file tree
Hide file tree
Showing 9 changed files with 308 additions and 81 deletions.
1 change: 1 addition & 0 deletions .idea/gradle.xml

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

1 change: 0 additions & 1 deletion .idea/misc.xml

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

17 changes: 17 additions & 0 deletions .idea/runConfigurations.xml

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

4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
}
def versionMajor = 1
def versionMinor = 0
def versionPatch = 1
def versionPatch = 2
android {
namespace 'com.canerdogan.jetnews'
compileSdk 34
Expand Down Expand Up @@ -69,7 +69,7 @@ dependencies {
implementation 'androidx.compose.ui:ui'
implementation 'androidx.compose.ui:ui-graphics'
implementation 'androidx.compose.ui:ui-tooling-preview'
implementation 'androidx.compose.material3:material3'
implementation 'androidx.compose.material3:material3-android:1.3.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ fun SearchBar(
)
},
shape = MaterialTheme.shapes.medium,
colors = TextFieldDefaults.textFieldColors(
containerColor = colorResource(id = R.color.input_background),
textColor = if (isSystemInDarkTheme()) Color.White else Color.Black,
colors = TextFieldDefaults.colors(
focusedContainerColor = colorResource(id = R.color.input_background),
unfocusedContainerColor = colorResource(id = R.color.input_background),
focusedTextColor = if (isSystemInDarkTheme()) Color.White else Color.Black,
unfocusedTextColor = if (isSystemInDarkTheme()) Color.White else Color.Black,
cursorColor = if (isSystemInDarkTheme()) Color.White else Color.Black,
disabledIndicatorColor = Color.Transparent,
errorIndicatorColor = Color.Transparent,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
package com.canerdogan.jetnews.ui.screen.contact

import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Add
import androidx.compose.material3.Button
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.ExtendedFloatingActionButton
import androidx.compose.material3.FloatingActionButton
import androidx.compose.material3.Icon
import androidx.compose.material3.ModalBottomSheet
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.material3.rememberModalBottomSheetState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import kotlinx.coroutines.launch

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun ContactBottomDialog(
onClick: (Boolean) -> Unit,
isShowDialog: Boolean
) {
val sheetState = rememberModalBottomSheetState()
val scope = rememberCoroutineScope()
var showBottomSheet by remember { mutableStateOf(isShowDialog) }

if (showBottomSheet) {
ModalBottomSheet(
onDismissRequest = {
showBottomSheet = false
},
sheetState = sheetState
) {
// Sheet content
Button(onClick = {
scope.launch { sheetState.hide() }.invokeOnCompletion {
if (!sheetState.isVisible) {
showBottomSheet = false
}
}
}) {
Text("Hide bottom sheet")
}
}
}

/* val sheetState = rememberModalBottomSheetState()
val scope = rememberCoroutineScope()
var showBottomSheet by remember { mutableStateOf(false) }
Scaffold(
floatingActionButton = {
ExtendedFloatingActionButton(
text = { Text("Show bottom sheet") },
icon = { Icon(Icons.Filled.Add, contentDescription = "") },
onClick = {
showBottomSheet = true
}
)
}
) { contentPadding ->
// Screen content
if (showBottomSheet) {
ModalBottomSheet(
modifier = Modifier.padding(contentPadding),
onDismissRequest = {
showBottomSheet = false
},
sheetState = sheetState
) {
// Sheet content
Button(onClick = {
scope.launch { sheetState.hide() }.invokeOnCompletion {
if (!sheetState.isVisible) {
showBottomSheet = false
}
}
}) {
Text("Hide bottom sheet")
}
}
}
}*/

}
Loading

0 comments on commit 6e07e52

Please sign in to comment.