android - 状态栏上的Android默认返回操作
问题描述
我正在做一个项目,在屏幕上我想要一个标题而不是默认情况下在android中的后退按钮我尝试了以下但无法解决它。
static navigationOptions = {
title: 'Please sign in',
};
&&
static navigationOptions = {
headerTitle: 'Your Bmi details',
headerRight: (
<Button
onPress={() => alert('This is a button!')}
title="Info"
color="#fff"
/>
),
}}
我想要标题栏上的标题和按钮。我已附上屏幕截图,请检查并帮助我解决问题。
有人可以帮我吗?
谢谢。
解决方案
在您声明活动的 AndroidManifest.xml 文件中,例如:
<activity android:name=".SecondAvtivity"
android:parentActivityName=".MainActivity">
只需删除父活动名称
<activity android:name=".SecondAvtivity">
它应该解决问题
推荐阅读
- adobe-indesign - How to show and hide standard InDesign panels through scripting?
- powershell - 在 PowerShell 中调用静态类方法
- rust - 比较 Rust 中的字符串长度
- entity-framework - 使用 asp.net core 和 EF core 构建可定制的报告生成向导
- selenium - Jenkins 在 Firefox 上的无头测试执行
- python - 如何从 HFS 分割图像中提取轮廓
- python - 我如何轻松找到一个数字是否是 2 的幂?
- c# - 在 VS Code 中将函数名称(函数头)变为粗体
- python - 在 jupyter notebook 中使用 opencv 时出错:
- react-native - 处理父组件之外的触摸