-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from TalhaFaki/feature/architecture_changes
normal functions update with composable
- Loading branch information
Showing
6 changed files
with
48 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
app/src/main/java/com/android/composablesweettoast/MainScreen.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.android.composablesweettoast | ||
|
||
import androidx.compose.material.Button | ||
import androidx.compose.material.Text | ||
import androidx.compose.runtime.* | ||
import com.talhafaki.composablesweettoast.util.SweetToastUtil.SweetSuccess | ||
|
||
/** | ||
* Created by stekinarslan on 02,December,2021 | ||
*/ | ||
|
||
@Composable | ||
fun MainScreen() { | ||
var openDialogSuccess by remember { mutableStateOf(false) } | ||
|
||
Button(onClick = { | ||
openDialogSuccess = true | ||
}) { | ||
Text("Sweet Toast Success") | ||
} | ||
|
||
if (openDialogSuccess) { | ||
SweetSuccess(message = "Success Text!") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
buildscript { | ||
ext { | ||
compose_version = '1.0.5' | ||
lifecycle_version = "2.4.0" | ||
} | ||
repositories { | ||
google() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters