标签: navigationbar

如何更改导航栏图标的颜色?(安卓工作室)

为了避免混淆实际navigationbar是什么,这里有一个图片

正如您所看到的,我使用以下方法添加了一种新颜色而不是标准黑色:

<item name="android:navigationBarColor">@color/colorBackground</item>
Run Code Online (Sandbox Code Playgroud)

但图标现在几乎看不见,所以我想将它们更改为黑色,或者至少更暗。我已经搜索过 SO 和 webb 但空手而归。有任何想法吗?

colors navigationbar android-studio

4
推荐指数
1
解决办法
7208
查看次数

如何更改导航栏中的背景或颜色?

目前我找不到任何方法来更改 SwiftUI 中导航栏的颜色/背景。有小费吗?

navigationbar swiftui

4
推荐指数
1
解决办法
1万
查看次数

如何在颤动的BottomNavigationBar中使用命名路由?

我正在使用BottomNavigationBar和单击导航栏中的任何图标时。我希望它进入下一个屏幕。这就是我在这里使用命名路由的原因。

main.dart 代码


import 'package:flutter/material.dart';

import 'Screens/profilePage1/profilePage1.dart';


void main() => runApp(MyStatefulWidget());

class MyStatefulWidget extends StatefulWidget {
  @override
  _MyStatefulWidgetState createState() => _MyStatefulWidgetState();
}

class _MyStatefulWidgetState extends State<MyStatefulWidget> {
  int _selectedIndex = 0;



  void _onItemTapped(int index) {
    setState(() {
      _selectedIndex = index;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
            routes: {
        // When navigating to the "/" route, build the FirstScreen widget.
        '/first': (context) => ProfilePage1(),
        // When navigating to the "/second" route, build the SecondScreen widget.
        '/second': …
Run Code Online (Sandbox Code Playgroud)

list navigationbar flutter

4
推荐指数
1
解决办法
6278
查看次数

如何消除这些与使用 SwiftUI 相关的常见 Firebase 警告?

我在 SwiftUI/Combine 应用程序中使用 Firebase,并且注意到一些警告,我想对其进行故障排除。他们没有破坏事情,但我想解决它们。我使用带有最新 Swift 包依赖项的 Xcode 12.4 时收到这些警告:GoogleUtilities 7.2.2 和 Firebase 7.7.0。

这是控制台中出现的第一个警告:

[GoogleUtilities/AppDelegateSwizzler][I-SWZ001014] App Delegate does not conform to UIApplicationDelegate protocol.
Run Code Online (Sandbox Code Playgroud)

作为参考,这是我配置 Firebase 的方式:

import SwiftUI
import Firebase

@main
struct MyApp: App {
    
    @StateObject var authState = AuthState()
    
    init() {
        FirebaseApp.configure()
    }
    
    var body: some Scene {
        
        WindowGroup {
            RootView()
                .environmentObject(authState)
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

这是第二个警告,在我使用修饰符设置导航栏标题后出现.navigationBarTitle

[LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't …
Run Code Online (Sandbox Code Playgroud)

navigationbar ios firebase swiftui

4
推荐指数
1
解决办法
1011
查看次数

RelativeLayout,ScrollView和底部的导航栏

我想要做的是,使这样的布局:

标题

日期

滚动的长文本

导航栏粘在底部

好吧,我已经做了一切,但滚动有一点问题.我只想滚动文字.标题和日期应该贴在顶部,导航栏应该放在活动的底部.是的,它可以工作,但我的导航栏重叠文本:/

我尝试了一切,我发现有一个解决方案,为Scrollview设置固定高度,但这不适用于每个设备,不是吗?我可能可以在代码中进行一些计算,并在其上改变高度,但我想保留XML.

有人有什么建议吗?

这是我的XML文件:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_marginLeft="5dp"
    android:layout_marginRight="5dp"
    android:orientation="vertical" >

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" >

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="0.6"
            android:orientation="vertical" >

            <TextView
                android:id="@+id/feed_title"
                style="@style/h1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center_vertical" />

            <TextView
                android:id="@+id/feed_info"
                style="@style/h2"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />
        </LinearLayout>

        <ImageView
            android:id="@+id/feed_fav_ico"
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:layout_alignParentRight="true"
            android:layout_gravity="center_vertical|right"
            android:background="@drawable/ic_fav_off" />
    </LinearLayout>


    <ScrollView
        android:layout_width="fill_parent"
        android:layout_height="match_parent"
        android:fillViewport="true"
        android:scrollY="20dp" >

        <TextView
            android:id="@+id/feed_text"
            style="@style/text"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="Loren ipsum full tekst" />
    </ScrollView>
</LinearLayout>

<!-- Buttons -->

<LinearLayout …
Run Code Online (Sandbox Code Playgroud)

android scrollview relativelayout navigationbar

3
推荐指数
1
解决办法
7406
查看次数

如何让导航栏(以及其他东西)在右边结束

所以我的导航栏出了问题.我把它的宽度设置为100%.但我希望看到结束,因为它有圆角......

所以这样:| (=======)|

不像现在这样:| (========== |

    #nav {

      height: 60px;

      font-size: 30px;

      line-height: 60px;

      vertical-align: middle;

      text-align: center;

      background-color: #0080FF;

      width: 100%;

      border: 10px solid #16044E;

      border-radius: 20px;

      z-index: 1;

    }

    #nav ul {} #nav li {

      display: inline;

      text-align: center;

      margin: 20px;

    }

    #nav a {

      color: white;

      text-decoration: none;

    }
Run Code Online (Sandbox Code Playgroud)
<ul id="nav">
  <li><a href="">Home</a>
  </li>
  <li><a href="">Courses</a>
  </li>
  <li><a href="">Subjects</a>
  </li>
  <li><a href="">Sign Up</a>
  </li>
  <li><a href="">Log In</a>
  </li>
</ul>
Run Code Online (Sandbox Code Playgroud)

html css nav navigationbar

3
推荐指数
1
解决办法
52
查看次数

如何在反应原生中停止默认导航栏弹出滑动

我正在努力解决这个问题如何停止导航栏弹出滑动,如果可能的话可以任何人给我建议如何解决它 在此输入图像描述

如上图所示,当我在"属性"页面中时,当我从该页面滑动时,它会转到上一页,这是在滑动时,它显示当我从Property滑动时,它会转到结果屏幕.我想阻止它,任何帮助非常感谢

navigationbar react-native

3
推荐指数
1
解决办法
1493
查看次数

在我的Android应用程序导航栏上方的浅蓝色线条

我正在建立一个应用程序的问题.我正在使用xamarin与Visual Studio 2015社区,当我部署我的应用程序时,我得到了这个结果: 在此输入图像描述

我想要的是将浅蓝色线条与我的导航栏相匹配.我需要知道如何做到这一点.提前致谢

navigation android navigationbar xamarin xamarin.forms

3
推荐指数
1
解决办法
739
查看次数

导航栏-React Native

我正在使用React Native创建一个移动应用程序,我决定使用来自网站“ https://github.com/beefe/react-native-navigation-bar ” 的导航栏,但我不知道如何使用它在我的代码中。

我希望您向我发送网站“ https://github.com/beefe/react-native-navigation-bar ” 的导航栏示例。

navigationbar react-native react-native-android

3
推荐指数
1
解决办法
1万
查看次数

如何在Android的Xamarin.Forms中的NavigationBar的左侧添加ToolbarItem?

我需要一个密切的按钮(在这种特殊情况下),左侧导航栏,如下图所示。我仅在弹出窗口中需要它,因此其他元素/导航没有潜在的问题。

在此处输入图片说明

Google对此提出了一些建议,但我只看到了iOS示例(这并不是要处理的大事iOS custom renderer),但没有提示如何使用Android轻松)处理它。

需要明确的是,它需要使用它来Xamarin.Forms定义与此(或代码隐藏)类似的内容:

<ContentPage.ToolbarItems>
    <ToolbarItem Text="X" Priority="-1" Command="{Binding GoCancel}"/>
    <ToolbarItem Icon="icon_save" Command="{Binding GoSave}"/>
</ContentPage.ToolbarItems>
Run Code Online (Sandbox Code Playgroud)

有什么想法吗?

android custom-renderer navigationbar xamarin.forms

3
推荐指数
1
解决办法
2174
查看次数