去 caddy2 官方 github 下载和 Linux 系统对应的可执行文件 https://github.com/caddyserver/caddy/releases 尽可能下载最新的版本,因为 bug 少,下载完成后并移动到 /usr/bin/ 下 (如果你有能力也可以下载源码进行编译安装)
- 第一种:
{
experimental_http3
}
/** | |
* 多种方式重启应用自身 | |
*/ | |
public class RestartAppUtil | |
{ | |
/** | |
* 使用 AlarmManager 来帮助重启 |
// Project/keystore//keystore/xxxxxx.jks | |
// Project/keystore//keystore.properties | |
// < keystore.properties 内容> : | |
// storePassword=xxxxxxx | |
// keyPassword=xxxxxxx | |
// keyAlias=xxxxxxx | |
// storeFile=/keystore/xxxxxx.jks | |
import org.jetbrains.kotlin.konan.properties.Properties |
{ | |
"final_space": true, | |
"console_title": true, | |
"console_title_style": "folder", | |
"blocks": [ | |
{ | |
"type": "prompt", | |
"alignment": "left", | |
"horizontal_offset": 0, | |
"vertical_offset": 0, |
去 caddy2 官方 github 下载和 Linux 系统对应的可执行文件 https://github.com/caddyserver/caddy/releases 尽可能下载最新的版本,因为 bug 少,下载完成后并移动到 /usr/bin/ 下 (如果你有能力也可以下载源码进行编译安装)
{
experimental_http3
}
<application | |
<!--适配7.0+拍照返回 Start--> | |
<provider | |
android:name="android.support.v4.content.FileProvider" | |
android:authorities="${applicationId}.fileProvider" | |
android:exported="false" | |
android:grantUriPermissions="true"> | |
<meta-data | |
android:name="android.support.FILE_PROVIDER_PATHS" | |
android:resource="@xml/provider_path" /> |
public class MainActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
String str1 = "你有${ccccc}财产需要领"; | |
//String str1 = "${ccccc}你有财产需要领$"; | |
//String str1 = "你有财产需要领${ccccc}"; |
val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager | |
imm.hideSoftInputFromWindow(view.windowToken, 0) |
/* | |
* Copyright 2017 Google Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file | |
* except in compliance with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software distributed under the | |
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
方式1: | |
var resourceId = resources.getIdentifier("status_bar_height", "dimen", "android") | |
//修改高度 | |
return resources.getDimensionPixelSize(resourceId) | |
方式2: | |
myView.setOnApplyWindwoInsetListener{view,insets -> | |
val statusBarSize = insets.systemWindowInsetTop | |
return insets | |
} |