This commit is contained in:
coco
2026-07-15 16:57:36 +08:00
parent 723ce1af5c
commit 95aa018b8b
314 changed files with 8910 additions and 0 deletions
@@ -0,0 +1,16 @@
<!---
This is the API of version 1.2.0
-->
You can use LocalContext.current to receive the context of your Android App inside a Compose Function
```kotlin
@Composable
fun AndroidContextComposeDemo() {
val context = LocalContext.current
Text(text = "Read this string from Context: "+context.getString(R.string.app_name))
}
```
## See also:
* [Full Example Code]({{ site.samplefolder }}/other/AndroidContextComposeDemo.kt)