我想知道是否可以滚动整个状态栏(图标和背景),而不仅仅是背景.几乎就好像它是工具栏的一部分.
我遇到了与下面问题相同的情况,不同之处在于我想知道我是否可以滚动整个状态栏以使背景变得不透明 - 这就是我认为以下查询的理想结果
Android状态栏以协调器布局向上滚动,使状态图标与工具栏标题重叠
这是一张图
这是我的代码
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="me.hugopretorius.wishlizt.MainActivity">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay"
app:contentScrim="#000">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/AppTheme.PopupOverlay"
/>
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_below="@id/tabs"/>
<io.github.yavski.fabspeeddial.FabSpeedDial
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
app:fabGravity="bottom_end"
app:fabMenu="@menu/menu_fab"
app:miniFabBackgroundTint="@android:color/white"
app:miniFabDrawableTint="?attr/colorPrimaryDark"
app:miniFabTitleTextColor="?attr/colorPrimaryDark" />
</android.support.design.widget.CoordinatorLayout>
Run Code Online (Sandbox Code Playgroud) android android-toolbar android-coordinatorlayout android-appbarlayout
在我的 iOS 目录中的 React Native 项目react-native@60.5 中,我在运行 pod install 时遇到此问题
[!] Invalid `Podfile` file: No such file or directory - ./node_modules/.bin/react-native.
# from /Users/username/appname/ios/Podfile:44
# -------------------------------------------
#
> use_native_modules!
# end
# -------------------------------------------
Run Code Online (Sandbox Code Playgroud)
这是来自 >@60.0 的 React Native 全新 init;一切都很完美,直到我清除了缓存并使用以下命令安装了 node_modules - 这可能不是必要的,或者对我来说是一个好的举动。
watchman watch-del-all &&
rm -rf $TMPDIR/react-native-packager-cache-* &&
rm -rf $TMPDIR/metro-bundler-cache-* &&
rm -rf node_modules/
&& npm cache clean --force &&
npm install &&
npm start -- --reset-cache
Run Code Online (Sandbox Code Playgroud)
这是我的 Podfile
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
target 'XXX' do …
Run Code Online (Sandbox Code Playgroud) 我已经成功地为一个使用 react-navigation 和 react-native-firebase/analytics 的 react native 项目实现了屏幕跟踪。
查看事件下的仪表板,我看到以下事件(下图)。如您所见,前 2 个事件会被自动跟踪 1. MainActivity、2. UIViewController 并且它们占据了总数的大部分。我想从跟踪中删除这些屏幕,只显示应用程序 JS 端的屏幕(反应导航)。
这可能吗?我怎样才能做到这一点?
先感谢您 ?????
analytics firebase react-native react-navigation react-native-firebase