将 TabLayout 固定到工具栏 Scrollview 的顶部和下方

2024-05-06

我想在滚动时固定 TabLayout

我已经尝试过...代码。但无法将 TabLayout 固定在工具栏下方

在这个我有工具栏,下面有滚动视图,在滚动视图内我有很多布局......

我想固定位于 ViewPager 上方(底部)的 TabLayout。当我向下滚动时,tabLayout 被固定并显示视图寻呼机(看起来像 tabLayout 被固定在工具栏下方)。

这是示例图像: https://i.stack.imgur.com/Md13C.jpg https://i.stack.imgur.com/Md13C.jpg

示例视频: https://drive.google.com/open?id=146UaY89cgxQ3XJyZb1Uos-JQjurDL2hW https://drive.google.com/open?id=146UaY89cgxQ3XJyZb1Uos-JQjurDL2hW

活动主文件

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:background="#EAEAEA"
    android:orientation="vertical"
    tools:context=".MainActivity">

    <androidx.appcompat.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="#03A9F4"
        android:elevation="3dp" />

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fillViewport="true"
        android:padding="4dp"
        android:scrollbars="none">

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


            <androidx.cardview.widget.CardView
                android:layout_width="match_parent"
                android:layout_height="180dp"
                android:elevation="2dp"
                app:cardCornerRadius="20dp"
                app:cardUseCompatPadding="true" />

            <androidx.cardview.widget.CardView
                android:id="@+id/live_wallpaper_card"
                android:layout_width="match_parent"
                android:layout_height="120dp"
                android:elevation="2dp"
                app:cardCornerRadius="20dp"
                app:cardUseCompatPadding="true" />


            <!--Todo: horizontal card scroll-->
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="8dp">

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentStart="true"
                        android:text="Category"
                        android:textColor="#000"
                        android:textSize="16sp"
                        android:textStyle="bold" />

                    <TextView
                        android:id="@+id/more_textTv"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentEnd="true"
                        android:text="More"
                        android:textStyle="bold" />


                </RelativeLayout>

                <HorizontalScrollView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:scrollbars="none">


                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal">

                        <androidx.cardview.widget.CardView
                            android:layout_width="100dp"
                            android:layout_height="100dp"
                            app:cardCornerRadius="15dp"
                            app:cardUseCompatPadding="true" />

                        <androidx.cardview.widget.CardView
                            android:layout_width="100dp"
                            android:layout_height="100dp"
                            app:cardCornerRadius="15dp"
                            app:cardUseCompatPadding="true" />

                        <androidx.cardview.widget.CardView
                            android:layout_width="100dp"
                            android:layout_height="100dp"
                            app:cardCornerRadius="15dp"
                            app:cardUseCompatPadding="true" />

                        <androidx.cardview.widget.CardView
                            android:layout_width="100dp"
                            android:layout_height="100dp"
                            app:cardCornerRadius="15dp"
                            app:cardUseCompatPadding="true" />


                    </LinearLayout>


                </HorizontalScrollView>


            </LinearLayout>

            <!--Todo: Featured Album horizontal scroll view-->
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">


                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="Featured Albums"
                        android:textColor="#000"
                        android:textSize="16sp"
                        android:textStyle="bold" />

                </RelativeLayout>


                <HorizontalScrollView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal">

                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal">

                        <androidx.cardview.widget.CardView
                            android:layout_width="300dp"
                            android:layout_height="220dp"
                            app:cardCornerRadius="20dp"
                            app:cardUseCompatPadding="true" />

                        <androidx.cardview.widget.CardView
                            android:layout_width="300dp"
                            android:layout_height="220dp"
                            app:cardCornerRadius="20dp"
                            app:cardUseCompatPadding="true" />

                        <androidx.cardview.widget.CardView
                            android:layout_width="300dp"
                            android:layout_height="220dp"
                            app:cardCornerRadius="20dp"
                            app:cardUseCompatPadding="true" />

                        <androidx.cardview.widget.CardView
                            android:layout_width="300dp"
                            android:layout_height="220dp"
                            app:cardCornerRadius="20dp"
                            app:cardUseCompatPadding="true" />


                    </LinearLayout>

                </HorizontalScrollView>

            </LinearLayout>


            <com.google.android.material.tabs.TabLayout
                android:id="@+id/tabLayout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@android:color/holo_blue_bright"
                app:tabIndicatorColor="@color/colorPrimary"
                app:tabIndicatorHeight="3dp"
                app:tabSelectedTextColor="@color/black"
                app:tabTextColor="@android:color/darker_gray" />


            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent">

                <androidx.viewpager.widget.ViewPager
                    android:id="@+id/pager"
                    android:layout_width="match_parent"
                    android:layout_height="650dp"
                    android:background="@color/colorPrimaryDark" />


            </LinearLayout>

            <!--
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:descendantFocusability="blocksDescendants"
                android:orientation="vertical">



            </LinearLayout>
            -->

        </LinearLayout>


    </ScrollView>

</LinearLayout>



这是答案

<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.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:id="@+id/main_content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@android:color/white"
        android:fitsSystemWindows="true"
        tools:context=".MainActivity">


        <com.google.android.material.appbar.AppBarLayout
            android:id="@+id/appbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="#FAFAFA"
            android:fitsSystemWindows="true"
            android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

            <com.google.android.material.appbar.CollapsingToolbarLayout
                android:id="@+id/collapsing_toolbar"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:fitsSystemWindows="true"
                app:contentScrim="#03A9F4"
                app:expandedTitleTextAppearance="@android:color/transparent"
                app:layout_scrollFlags="scroll|exitUntilCollapsed">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="100dp"
                    android:orientation="vertical"
                    app:layout_collapseMode="parallax">


                    <androidx.cardview.widget.CardView
                        android:layout_width="match_parent"
                        android:layout_height="180dp"
                        android:elevation="2dp"
                        app:cardCornerRadius="20dp"
                        app:cardUseCompatPadding="true" />

                    <androidx.cardview.widget.CardView
                        android:id="@+id/live_wallpaper_card"
                        android:layout_width="match_parent"
                        android:layout_height="120dp"
                        android:elevation="2dp"
                        app:cardCornerRadius="20dp"
                        app:cardUseCompatPadding="true" />


                    <!--Todo: horizontal card scroll-->
                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="vertical">

                        <RelativeLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:padding="8dp">

                            <TextView
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_alignParentStart="true"
                                android:text="Category"
                                android:textColor="#000"
                                android:textSize="16sp"
                                android:textStyle="bold" />

                            <TextView
                                android:id="@+id/more_textTv"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_alignParentEnd="true"
                                android:text="More"
                                android:textColor="#BF000000"
                                android:textStyle="bold" />


                        </RelativeLayout>

                        <HorizontalScrollView
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:scrollbars="none">


                            <LinearLayout
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:orientation="horizontal">

                                <androidx.cardview.widget.CardView
                                    android:layout_width="100dp"
                                    android:layout_height="100dp"
                                    app:cardCornerRadius="15dp"
                                    app:cardUseCompatPadding="true" />

                                <androidx.cardview.widget.CardView
                                    android:layout_width="100dp"
                                    android:layout_height="100dp"
                                    app:cardCornerRadius="15dp"
                                    app:cardUseCompatPadding="true" />

                                <androidx.cardview.widget.CardView
                                    android:layout_width="100dp"
                                    android:layout_height="100dp"
                                    app:cardCornerRadius="15dp"
                                    app:cardUseCompatPadding="true" />

                                <androidx.cardview.widget.CardView
                                    android:layout_width="100dp"
                                    android:layout_height="100dp"
                                    app:cardCornerRadius="15dp"
                                    app:cardUseCompatPadding="true" />


                            </LinearLayout>


                        </HorizontalScrollView>


                    </LinearLayout>

                    <!--Todo: Featured Album horizontal scroll view-->
                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="vertical">


                        <RelativeLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content">

                            <TextView
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="Featured Albums"
                                android:textColor="#000"
                                android:textSize="16sp"
                                android:textStyle="bold" />

                        </RelativeLayout>


                        <HorizontalScrollView
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:orientation="horizontal"
                            android:scrollbars="none">

                            <LinearLayout
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:orientation="horizontal">

                                <androidx.cardview.widget.CardView
                                    android:layout_width="300dp"
                                    android:layout_height="220dp"
                                    app:cardCornerRadius="20dp"
                                    app:cardUseCompatPadding="true" />

                                <androidx.cardview.widget.CardView
                                    android:layout_width="300dp"
                                    android:layout_height="220dp"
                                    app:cardCornerRadius="20dp"
                                    app:cardUseCompatPadding="true" />

                                <androidx.cardview.widget.CardView
                                    android:layout_width="300dp"
                                    android:layout_height="220dp"
                                    app:cardCornerRadius="20dp"
                                    app:cardUseCompatPadding="true" />

                                <androidx.cardview.widget.CardView
                                    android:layout_width="300dp"
                                    android:layout_height="220dp"
                                    app:cardCornerRadius="20dp"
                                    app:cardUseCompatPadding="true" />


                            </LinearLayout>

                        </HorizontalScrollView>

                    </LinearLayout>


                </LinearLayout>

                <androidx.appcompat.widget.Toolbar
                    android:id="@+id/toolbarMain"
                    android:layout_width="match_parent"
                    android:layout_height="?attr/actionBarSize"
                    app:layout_collapseMode="pin"
                    android:theme="@style/ThemeOverlay.AppCompat.Dark" />


            </com.google.android.material.appbar.CollapsingToolbarLayout>

        </com.google.android.material.appbar.AppBarLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:scrollbars="vertical"
            app:layout_behavior="@string/appbar_scrolling_view_behavior">

            <androidx.core.widget.NestedScrollView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:fillViewport="true"
                android:scrollbars="none">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="vertical">

                    <com.google.android.material.tabs.TabLayout
                        android:id="@+id/tabLayout"
                        app:tabIndicatorFullWidth="false"
                        app:tabIndicatorColor="#FFEB3B"
                        app:tabSelectedTextColor="#FFEB3B"
                        android:layout_width="match_parent"
                        android:layout_height="?attr/actionBarSize"
                        app:tabTextColor="@color/colorPrimaryDark" />

                    <androidx.viewpager.widget.ViewPager
                        android:id="@+id/pager"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        app:layout_behavior="@string/appbar_scrolling_view_behavior" />



                </LinearLayout>


            </androidx.core.widget.NestedScrollView>

        </LinearLayout>


</androidx.coordinatorlayout.widget.CoordinatorLayout>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

将 TabLayout 固定到工具栏 Scrollview 的顶部和下方 的相关文章

  • 为什么将函数参数声明为最终的?

    我目前正在阅读 Sams 出版的 24 小时自学 Android 应用程序开发 一书 我对 Java Android 或其他方面还比较陌生 我对 ActionScript 3 有非常扎实的背景 它与 Java 有足够的相似之处 因此该语言本
  • 使用 XProc 进行 XML 流处理

    我正在玩xproc http www w3 org TR xproc XML 管道语言和http xmlcalabash com http xmlcalabash com 我想找到一个流式传输大型 xml 文档的示例 例如 给定以下内容hu
  • 在自定义对象中创建时粘性服务不会重新启动

    我有一个具有绑定服务的单例对象 我希望它重新启动 当我从启动器启动应用程序时 单例对象将初始化并绑定到这个现有的服务实例 以下是在单例中创建和绑定服务的代码 public class MyState private static MySta
  • 菜单未显示在应用程序中

    由于某种原因 我的操作菜单在我的 Android Studio 应用程序中消失了 我正在按照教程学习如何创建 Android 应用程序 但最终遇到了这个问题 我正在使用 atm 的教程 http www raywenderlich com
  • 在 Google Analytics 中跟踪应用程序版本

    我正在使用谷歌分析模块 https marketplace appcelerator com apps 5081 2014113336 https marketplace appcelerator com apps 5081 2014113
  • 在 Android 中使用 DataOutputStream 在 POST 正文中发送特殊字符 (ë ä ï)

    我目前正在开发一个具有大量服务器端通信的 Android 应用程序 昨天 我收到一份错误报告 称用户无法发送 简单 特殊字符 例如 我搜索过但没有找到任何有用的东西 可能重复 没有答案 https stackoverflow com que
  • 如何查找 Android 设备中的所有文件并将它们放入列表中?

    我正在寻求帮助来列出 Android 外部存储设备中的所有文件 我想查找所有文件夹 包括主文件夹的子文件夹 有办法吗 我已经做了一个基本的工作 但我仍然没有得到想要的结果 这不起作用 这是我的代码 File files array file
  • 请求位置更新参数

    这就是 requestLocationUpdates 的样子 我使用它的方式 requestLocationUpdates String provider long minTime float minDistance LocationLis
  • minHeight 有什么作用吗?

    在附图中 我希望按钮列与图像的高度相匹配 但我也希望按钮列有一个最小高度 它正确匹配图像的高度 但不遵守 minHeight 并且会使按钮向下滑动 我正在为按钮列设置这些属性
  • MediaCodec 创建输入表面

    我想使用 MediaCodec 将 Surface 编码为 H 264 使用 API 18 有一种方法可以通过调用 createInputSurface 然后在该表面上绘图来对表面中的内容进行编码 我在 createInputSurface
  • 如何在C(Linux)中的while循环中准确地睡眠?

    在 C 代码 Linux 操作系统 中 我需要在 while 循环内准确地休眠 比如说 10000 微秒 1000 次 我尝试过usleep nanosleep select pselect和其他一些方法 但没有成功 一旦大约 50 次 它
  • Android Webview 图像未加载

    我制作了一个简单的应用程序WebView 但有些图片无法加载 正确 在我的电脑上 错误 在模拟器中 Correct 错误 没有横幅 于是我用Chrome debug进行调试 发现我的代码被改变了 我不添加像noscript or style
  • 材质设计图标颜色

    应该是哪种颜色 暗 材质图标 在官方文档上 https www google com design spec style icons html icons system icons https www google com design s
  • 调节麦克风录音音量

    我们正在尝试调整录音时的音量级别 麦克风似乎非常敏感 会接收到很多静电 我们查看了 setVolumeControlStream 但找不到传入其中来控制麦克风的流 将您的音频源设置为 MIC using MediaRecorder Audi
  • 如何将设备连接到Eclipse?

    我无法解决这个简单的问题 我正在尝试通过 USB 电缆将我的设备连接到 Eclipse 在我的 PC 上 我已经安装了 Eclipse 和 Android SDK 并且在模拟器上运行该程序运行良好 我已在我的电脑上下载并安装了 Samsun
  • 应用程序关闭时的倒计时问题

    我制作了一个 CountDownTimer 代码 我希望 CountDownTimer 在完成时重新启动 即使应用程序已关闭 但它仅在应用程序正在运行或重新启动应用程序时重新启动 因此 如果我在倒计时为 00 10 分钟 秒 时关闭应用程序
  • 保护 APK 中的字符串

    我正在使用 Xamarin 的 Mono for Android 开发一个 Android 应用程序 我目前正在努力使用 Google Play API 添加应用内购买功能 为此 我需要从我的应用程序内向 Google 发送公共许可证密钥
  • 为什么Android的ImageReader类这么慢?

    我尝试了适用于 Android 3 4 1 的全新 OpenCVJavaCamera2View但它太慢了 仅显示相机视图约 15 fps 当我尝试较旧的JavaCameraView相反 它给了我很好的结果 30fps 这是我相机的极限 我想
  • 无法将 admob 与 firebase iOS/Android 项目链接

    我有两个帐户 A 和 B A 是在 Firebase 上托管 iOS Android unity 手机游戏的主帐户 B 用于将 admob 集成到 iOS Android 手机游戏中 我在尝试将 admob 分析链接到 Firebase 项
  • 由于 play-services-base-17.1.0.aar 转换错误,无法构建项目

    所以基本上我已经快一年没有打开我的 Android Studio 项目了 这次是打开和构建它的时候了 更新 Android Studio 和项目的所有插件后 我终于遇到了这个错误 Execution failed for task app

随机推荐

  • 程序如何在Python中的两个函数之间进行选择?

    我有一个 Python 3 2 程序 可以计算未来任意时间段内的投资价值 它可以处理单利和复利 问题是我定义了两个函数 main 和 main2 第一个是简单函数 第二个是复利函数 现在我想做的是 根据用户的一些输入 程序在运行 main
  • 为什么在 ruby​​ 中创建元类?

    我正在尝试了解 Ruby 对象模型 我知道实例方法保存在类中而不是类的对象中 因为它消除了冗余 我读到 每当创建一个类时 也会为新创建的类创建一个元类 元类存储类方法 即该类的单例方法位于元类中 例如 class MyClass def h
  • 这个程序中的“this”是什么意思?

    我正在编写一个程序 然后我在一些使用this这段代码中的关键字 我想知道它的目的是什么 它可以处理 Jbutton 或 JTextField 它可以使用 this 关键字显示消息 发生了什么getSource 这是代码 import jav
  • 如何使用 Selenium Webdriver 自动化验证码? [关闭]

    Closed 这个问题需要多问focused help closed questions 目前不接受答案 我正在为登录页面编写脚本 但我有一个验证码需要处理 Selenium 无法处理验证码 虽然网站出于同样的原因使用验证码 所以没有人可以
  • 导致链接平移并打开地图中的标记

    JSFiddle http jsfiddle net megatimes NVDLf 7 http jsfiddle net megatimes NVDLf 7 我有一张地图 它从数组创建多个标记 地图下方是一些链接 单击这些链接时 我想让
  • 更改 iOS 地图中的图钉方向

    环球银行金融电信协会3 0 MKMAP视图 iOS Note 融合的AppleMap 不与GoogleMap 我做了以下事情 实现地图并将自定义图像添加到用户位置注释 当地图打开时 它会在正确的位置显示用户位置 我的要求 当用户移动到不同方
  • Laravel 5.2 CORS,GET 不适用于预检选项

    可怕的 CORS 错误 跨源请求被阻止 同源策略不允许读取 远程资源位于http localhost mysite api test http localhost mysite api test 原因 CORS 标头 Access Cont
  • 如何防止查询字符串被篡改?

    Hii 我有一个像 http project page1 aspx userID 5 http project page1 aspx userID 5 如果手动更改 userID 参数 该操作将无法执行 这怎么可能 大家好 谢谢您的帮助 我
  • 如何在 Angular 6 单元测试中调试 HeadlessChrome 0.0.0 (Linux 0.0.0) ERROR { "isTrusted": true } ?

    当我运行测试套件时 我在与我一直在使用的单元测试完全不同的单元测试中遇到错误 我做错了什么 HeadlessChrome 0 0 0 Linux 0 0 0 ERROR isTrusted true 然后是一些构建步骤 并在测试执行期间出现
  • 动态创建结构的List<>

    在 C 中 我想创建一个基于动态值类型的列表 例如 void Function1 TypeBuilder tb tb is a value type Type myType tb CreateType List
  • 使用“旧”对象引用使用构建器模式创建新对象

    我正在尝试构建器模式 并陷入如何向新创建的对象添加新 属性 的困境 public class MsProjectTaskData private boolean isAlreadyTransfered private String req
  • CMake 错误:CMake 无法找到与“MinGW Makefiles”对应的构建程序

    我正在尝试使用 cmake 为 c 构建 Box2D 库 当我运行 cmake gui 时出现错误 CMake Error CMake was unable to find a build program corresponding to
  • svn 本地副本中修改的文件列表

    我使用 Tortoise 客户端签出 提交我对 SVN 的更改 但我发现这有点困难 因为我无法找到本地副本中更改的所有文件的列表 有什么捷径或者我忽略的东西吗 我是 SVN 新手 供参考 我不熟悉乌龟 但是对于 linux 的颠覆我会输入
  • 在 Laravel 中记录用户操作

    我正在尝试将用户执行的所有操作 登录 注销 CRUD 记录到我的数据库中的日志表中 并且从我所看到的事件看来是执行此操作的正确方法 我添加了一个did action User 模型的方法 它将给定用户的操作记录到数据库中 这是我到目前为止所
  • 使用 TinyXml2 提取子树 XML 字符串

    我想做和里面那个人完全相同的事情这个问题 https stackoverflow com questions 11935689 how to convert an xmlelement to string in tinyxml2 我想将 X
  • 将yield语句转换为Python中的生成器表达式

    我有一个关于将yield语句转换为生成器表达式的问题 所以我有一个小的yield方法 它获取一个函数和一个起始数字作为其输入 并且基本上为每个先前被调用的数字调用该函数 即 第一次调用返回初始号码 第二次调用返回函数 初始编号 第三次调用返
  • 如何处理 Android Fragment 中的后按

    我的应用程序中有 3 个片段 例如HomePage Frag1 Frag2 Frag3 Frag4 那么发生了什么 我在我的应用程序中使用了导航抽屉 在主页上 我有一个网格视图 其中包含所有四个片段的链接 如果用户从Homepage gt
  • 使用自定义验证器进行 ASP.Net 字数统计

    我正在处理的 ASP Net 2 0 项目的要求将某个字段限制为最多 10 个单词 不是字符 我当前正在使用带有以下 ServerValidate 方法的 CustomValidator 控件 Protected Sub TenWordsT
  • maven 的 was6 插件可以与 WAS 7 一起使用吗

    据我所知 WAS 7 没有特定的 Maven 插件 所以我想知道 was6 maven plugin 是否可以与较新版本的服务器一起使用 我问了 IBM 同样的问题 官方是的 实际上 Jar Hell 会给你带来一些问题 如果我是你 我会花
  • 将 TabLayout 固定到工具栏 Scrollview 的顶部和下方

    我想在滚动时固定 TabLayout 我已经尝试过 代码 但无法将 TabLayout 固定在工具栏下方 在这个我有工具栏 下面有滚动视图 在滚动视图内我有很多布局 我想固定位于 ViewPager 上方 底部 的 TabLayout 当我