我在使用我许可的应用程序中有一个广播接收器 com.myexample.permission.MY_PERMISSION。
我可以使用发送广播
sendBroadcast(intent, "com.myexample.permission.MY_PERMISSION")
从活动。
要发送动作广播com.com.myexample.MY_ACTION和额外数据,MY_EXTRA可以使用如下命令:
$adb shell am broadcast -a com.com.myexample.MY_ACTION
--ez MY_EXTRA true
Run Code Online (Sandbox Code Playgroud)
但是如何com.myexample.permission.MY_PERMISSION使用 adb shell 命令从命令行向应用程序发送具有权限的广播?
我正在尝试使我的AppCompatActivity的Action Bar透明.我在找东西像这样(从这个程序).
我试过这样做:
getWindow().setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
但它唯一能做的就是让观点落后于行动吧.
我该怎么做才能使文本和导航抽屉按钮成为唯一可见的东西?
编辑:这是我的xml布局
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.SwipeRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/swipeRefresh"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="my.package.name"
android:id="@+id/relLayout">
<!-- My views are here -->
</RelativeLayout>
</ScrollView>
</android.support.v4.widget.SwipeRefreshLayout>
Run Code Online (Sandbox Code Playgroud) 在 Ubuntu 18.04 上设置 nodejs 项目时出现以下错误。安装的 npm 版本是 6.x,安装的 node 版本是 10.x。
bcrypt@3.0.3 install /home/ubuntu/reko_dev/web/backend/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.3/bcrypt_lib-v3.0.3-node-v64-linux-x64-glibc.tar.gz
node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.3 and node@10.15.0 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack at F …Run Code Online (Sandbox Code Playgroud)