Skip to content
This repository has been archived by the owner on Jul 14, 2024. It is now read-only.

Commit

Permalink
加错清单了,fix了一下
Browse files Browse the repository at this point in the history
  • Loading branch information
ArcticFoxPro committed Jul 29, 2023
1 parent 6e227f2 commit 29c0de8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ android {
minSdk 26
targetSdk 33
versionCode 1
versionName "1.0.3"
versionName "1.0.3-fix"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Expand Down
4 changes: 0 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.LAUNCHER" />
<data android:scheme="http"/>
<data android:scheme="https"/>
</intent-filter>
</activity>
</application>
Expand Down
9 changes: 4 additions & 5 deletions app/src/main/java/com/dev/a8080/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ class MainActivity : AppCompatActivity() {

@RequiresApi(Build.VERSION_CODES.R) if (!Environment.isExternalStorageManager()) {
val builder = MaterialAlertDialogBuilder(
this,
com.google.android.material.R.style.ThemeOverlay_Material3_MaterialAlertDialog_Centered
this
)
builder.setTitle("请求所有文件访问权限").setIcon(R.drawable.database_2_line)
.setMessage("Android WebView 可能调用文件,是否给予所有文件访问权限?")
Expand Down Expand Up @@ -233,8 +232,7 @@ class MainActivity : AppCompatActivity() {

myWebView.setDownloadListener { url, _, _, _, _ ->
val builder = MaterialAlertDialogBuilder(
this,
com.google.android.material.R.style.ThemeOverlay_Material3_MaterialAlertDialog_Centered
this
)
builder.setTitle("下载文件?").setIcon(R.drawable.download_line).setMessage(url)
.setPositiveButton("下载") { _, _ ->
Expand Down Expand Up @@ -337,7 +335,8 @@ class MainActivity : AppCompatActivity() {
myWebView.loadUrl("http://127.0.0.1:8080")

//软键盘动画
ViewCompat.setWindowInsetsAnimationCallback(rootLayout,
ViewCompat.setWindowInsetsAnimationCallback(
rootLayout,
object : WindowInsetsAnimationCompat.Callback(DISPATCH_MODE_STOP) {
var startBottom = 0f

Expand Down

0 comments on commit 29c0de8

Please sign in to comment.