feat(android): edge to edge in init template (#13780)

* feat(android): edge to edge in init template

* Add androidx.activity:activity-ktx

* androidx.webkit:webkit:1.14.0
This commit is contained in:
Tony 2025-07-09 10:05:27 +08:00 committed by GitHub
parent 916aeaa486
commit cfc5bb8196
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 4 deletions

View File

@ -0,0 +1,5 @@
---
'tauri-cli': 'patch:changes'
---
Enable edge to edge in `tauri android init` template

View File

@ -64,9 +64,10 @@ dependencies {
implementation(platform("{{this}}")){{/each}}
{{~#each android-app-dependencies}}
implementation("{{this}}"){{/each}}
implementation("androidx.webkit:webkit:1.6.1")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.8.0")
implementation("androidx.webkit:webkit:1.14.0")
implementation("androidx.appcompat:appcompat:1.7.1")
implementation("androidx.activity:activity-ktx:1.10.1")
implementation("com.google.android.material:material:1.12.0")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.4")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0")

View File

@ -1,3 +1,11 @@
package {{escape-kotlin-keyword app.identifier}}
class MainActivity : TauriActivity()
import android.os.Bundle
import androidx.activity.enableEdgeToEdge
class MainActivity : TauriActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
enableEdgeToEdge()
super.onCreate(savedInstanceState)
}
}