我搜索了文档,但只找到了这个:
链接.哪个用来使酒吧半透明?我要做的是让状态栏完全透明(如下图所示),并使其向后兼容APK <19:

我的styles.xml:
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="AppTheme" parent="Theme.AppCompat.Light">
<item name="android:actionBarStyle">@style/ThemeActionBar</item>
<item name="android:windowActionBarOverlay">true</item>
<!-- Support library compatibility -->
<item name="actionBarStyle">@style/ThemeActionBar</item>
<item name="windowActionBarOverlay">true</item>
</style>
<style name="ThemeActionBar" parent="Widget.AppCompat.Light.ActionBar.Solid">
<item name="android:background"> @null </item>
<!-- Support library compatibility -->
<item name="background">@null</item>
<item name="android:displayOptions"> showHome | useLogo</item>
<item name="displayOptions">showHome|useLogo</item>
</style>
</resources>
Run Code Online (Sandbox Code Playgroud)
我能做什么:

我有一个带小部件的手电筒应用程序.小部件用于打开和关闭手电筒,不显示主要活动或任何内容.然而,几个小时后,小部件什么都不做.我的意思是如果你点击它,没有任何反应.我有两个课来完成这个a Provider和a Receiver.
Provider:
public class WidgetProvider extends AppWidgetProvider {
@
Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager,
int[] appWidgetIds) {
Intent receiver = new Intent(context, FlashlightWidgetReceiver.class);
receiver.setAction("COM_FLASHLIGHT");
receiver.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, appWidgetIds);
PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, receiver, 0);
RemoteViews views = new RemoteViews(context.getPackageName(),
R.layout.appwidget_layout);
views.setOnClickPendingIntent(R.id.imageButton, pendingIntent);
appWidgetManager.updateAppWidget(appWidgetIds, views);
}
}Run Code Online (Sandbox Code Playgroud)
Receiver:
public class FlashlightWidgetReceiver extends BroadcastReceiver {
private static boolean isLightOn = false;
private static Camera camera;
MediaPlayer mp;@
Override
public void onReceive(Context context, Intent intent) { …Run Code Online (Sandbox Code Playgroud)我创建了一个C#应用程序,我在整个开发阶段一直在我的另一台计算机上进行测试.但是现在我已经完成了我添加的最近几件事的应用程序,该应用程序被检测为病毒(AVG没有显示什么样的病毒).以下是我做的一些更改:
该应用程序只是一个简单的天气应用程序 它从XML读取数据并显示它.在我做这些改变之前,我从来没有误报过.那么这里会出现什么问题,如何解决呢?
我添加了以下设置:
RegistryKey rk = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
if (startupCheck.Checked) {
rk.SetValue("WeTile", "\"" + Application.ExecutablePath.ToString() + "\"");
} else {
rk.DeleteValue("WeTile", false);
}
Run Code Online (Sandbox Code Playgroud) 我正在使用 ReactJS 发出放置请求,但是,当我输入错误的电子邮件/密码组合时,即使我试图捕获所有错误并将它们显示在 Chrome 上,我也会将其登录errorDiv:
async connect(event) {
try {
const userObject = {
username: this.state.userName,
password: this.state.password
};
if (!userObject.username || !userObject.password) {
throw Error('The username/password is empty.');
}
let response = await fetch(('someurl.com'), {
method: "PUT",
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify(userObject)
});
let resJSON = await response.json();
if (!response.ok) {
throw Error(resJSON.message);
}
console.info(resJSON.message);
console.info(resJSON.message.auth_token);
window.location = "/ledger/home";
} catch (e) {
document.getElementById("errorDiv").style.display = 'block';
document.getElementById("errorDiv").innerHTML = e;
}
}Run Code Online (Sandbox Code Playgroud)
我在部署时不断收到这些警告:
WARNING in ./node_modules/@angular/core/fesm5/core.js
4996:15-36 Critical dependency: the request of a dependency is an expression
@ ./node_modules/@angular/core/fesm5/core.js
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/main.ts
WARNING in ./node_modules/@angular/core/fesm5/core.js
5008:15-102 Critical dependency: the request of a dependency is an expression
@ ./node_modules/@angular/core/fesm5/core.js
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/main.ts
Run Code Online (Sandbox Code Playgroud)
我试过的:
https://github.com/angular/angular/issues/20357
我的项目结构:
我的 webpack.config.js:
WARNING in ./node_modules/@angular/core/fesm5/core.js
4996:15-36 Critical dependency: the request of a dependency is an expression
@ ./node_modules/@angular/core/fesm5/core.js
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/main.ts
WARNING in …Run Code Online (Sandbox Code Playgroud)