刚开始学android,要做一个简单的界面,界面布局大致如下:

主要分为A、B、C三个部分,其中:

A是一个ViewFlipper,用来显示广告;

B是四个标签,分别对应四个子页面,在下部显示;

C是四个子页面,通过ViewPager实现

A、B、C三个部分在同一个LinearLayout下

现在的问题是,本人的ViewPager的每个page中内容很长,一个屏幕显示不全,所以希望它可以通过下拉来显示完全;

同时,在屏幕下滑的时候 ,B部分的位置也需要向上移动。

但是C部分并不能滑动,即使下面还有内容未显示完全。

代码如下:

activity_main.xml:

xmlns:tools="http://schemas.android.com/tools"

android:id="@+id/linearLayout1"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:orientation="vertical"

android:scrollbarAlwaysDrawVerticalTrack="true"

tools:context="com.dearlhd.helloworld.MainActivity">

android:id="@+id/adFlipper"

android:layout_width="match_parent"

android:layout_height="65dp"

android:background="#f3e2f4"

android:flipInterval="3000"

android:inAnimation="@anim/right_in"

android:outAnimation="@anim/right_out">

android:layout_width="fill_parent"

android:layout_height="48dp"

android:background="#FFFFFF">

android:id="@+id/menu_tab1"

android:layout_width="0dp"

android:layout_height="fill_parent"

android:layout_weight="1"

android:gravity="center"

android:text="@string/tab_name1"

android:textColor="#000000" />

android:id="@+id/menu_tab2"

android:layout_width="0dp"

android:layout_height="fill_parent"

android:layout_weight="1"

android:gravity="center"

android:text="@string/tab_name2"

android:textColor="#000000" />

android:id="@+id/menu_tab3"

android:layout_width="0dp"

android:layout_height="fill_parent"

android:layout_weight="1"

android:gravity="center"

android:text="@string/tab_name3"

android:textColor="#000000" />

android:id="@+id/menu_tab4"

android:layout_width="0dp"

android:layout_height="fill_parent"

android:layout_weight="1"

android:gravity="center"

android:text="@string/tab_name4"

android:textColor="#000000" />

android:id="@+id/img_cursor"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:contentDescription="@string/app_name"

android:scaleType="matrix"

android:src="@mipmap/line" />

android:id="@+id/vpager"

android:layout_width="fill_parent"

android:layout_height="0dp"

android:layout_gravity="center"

android:layout_weight="1"

android:flipInterval="30"

android:persistentDrawingCache="animation" />

ViewPager中的某一个page

view1.xml:

android:orientation="vertical"

android:layout_width="match_parent"

android:layout_height="match_parent">

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="@string/text1"

android:textColor="#000000"

android:textSize="18sp"

android:textStyle="bold" />

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="@string/text1"

android:textColor="#000000"

android:textSize="18sp"

android:textStyle="bold" />

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="@string/text1"

android:textColor="#000000"

android:textSize="18sp"

android:textStyle="bold" />

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="@string/text1"

android:textColor="#000000"

android:textSize="18sp"

android:textStyle="bold" />

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="aaaaaaaaaa"

android:textColor="#000000"

android:textSize="18sp"

android:textStyle="bold" />

这个问题怎么解决呢…

假如和未贴出的部分有关,请一同告诉本人!

可运行的项目在github上也上传了一份,假如需要的话,git地址为

https://github.com/dearlhd/Android.git

android linearlayout 自动滚动,Android开发,LinearLayout无法滚动问题相关推荐

  1. QT Android wifi自动重连开发

    QT Android wifi自动重连开发 配置安卓wifi操作权限 通过监听QNetworkConfigurationManager信号判断WiFi是否失去连接 Java代码 QT代码 小米平板连接 ...

  2. android notification自动消失,Android开发 -- 状态栏通知Notification、NotificationManager详解...

    本想自己写一个的,但是看到这篇之后,我想还是转过来吧,实在是非常的详细: 在Android系统中,发一个状态栏通知还是很方便的.下面我们就来看一下,怎么发送状态栏通知,状态栏通知又有哪些参数可以设置? ...

  3. android 应用自动重启,Android:如何在“强制关闭”后自动重启应用程序?

    Android:如何在"强制关闭"后自动重启应用程序? 在Android应用程序中,如果我们没有得到正确的例外,我们通常会收到"强制关闭"错误. 如果强行关闭, ...

  4. android 键盘 自动消失,android 键盘状态,获取键盘显示和隐藏

    要设置弹出键盘是否覆盖Activity的view,或者软键盘的显示隐藏状态,需要用到Activity的一个属性: android:windowSoftInputMode 该属性在AndroidMani ...

  5. android 实现自动拍照,android实现定时拍照功能

    在手机上面实现,设置一段时间(以秒计时)之后,自动拍照,适用于摄影师建立一个场景,之后设置时间,再进入场景. 界面主要就是一个设置时间的EditText和启动倒计时的Button,设置完时间之后,点击 ...

  6. android设置自动亮度,Android亮度调节的几种实现方法

    最近在做一个App的设置项,亮度调节.真正做时,发现Android亮度调节比预想要复杂一些.其实目前网上已有不少这方面的资料,但有些博文具有一定误导性.在此将这块内容按照自己理解整理一下. 整体上看, ...

  7. android edittext自动获取焦点,Android取消EditText自动获取默认焦点

    Android取消EditText自动获取默认焦点 发布时间:2020-10-02 14:08:30 来源:脚本之家 阅读:142 作者:ganchuanpu 最近在通讯录新建联系人=中,一进入一个页 ...

  8. android 实现自动拍照,android实现定时拍照并发送微博功能

    最近在做android方面的开发,下面是android自动对焦并拍照的小例子: package com.comnvi.camera; import java.io.File; import java. ...

  9. android 360自动更新,Android应用自动更新功能的实现!!!

    大家好,发现半年没有更新博客了,最近一直都比较忙,决定在凌晨 英超 阿森纳VS富勒姆 中场休息的时候,给大家分享Android里应用版本更新功能这一块的实现. 一个好的应用软件都是需要好的维护,从初出 ...

  10. android+tv+自动切换,Android TV 重写GridView,实现焦点放大效果

    关于缩放,使用了view.setScaleX/Y 方法,api11以上即可. 重写dispatchDraw(),绘制选中项的焦点效果.(注意带阴影的焦点图需要微调偏移量) 要将选中项绘制显示在顶层,所 ...

最新文章

  1. 关于OGNL表达式中的%,$,#
  2. P3242 [HNOI2015] 接水果(整体二分、扫描线、dfs序)
  3. 五、操作系统——内存相关基础知识 和 进程运行的基本原理(详解)
  4. String length must be a multiple of four.
  5. 终于有人把计算机视觉讲明白了。。。
  6. Matlab箱线图Boxplot横坐标x轴设置
  7. Linux查看安装了哪些软件
  8. 阿里表结构设计mysql_阿里华为P8级架构师教你MySQL数据库设计三范式与反范式
  9. realtekrtl8139网卡驱动 linux,Realtek网卡驱动官方版-瑞昱网卡驱动下载-PC下载网
  10. 三星s7562刷android+2,三星s7562 4.1.2 rom刷机包(精简省电版)
  11. 互联网“围猎”老年人
  12. Android通知栏-Notification(通知消息)
  13. 25个能够激发灵感的暗色调CSS Web设计欣赏
  14. Spring Boot中mybatis:Field peopleInfoMapper in ‘**’that could not be found.
  15. 关于Navicat 连接 RDS数据库
  16. 怎么将静图变动图?用这个网站就够了
  17. php 怎么验证邮箱验证码,PHP实现邮箱验证码验证功能
  18. 如何在 FlowUs、Notion 等笔记软件中进行时间管理?
  19. css3空中飘浮的气球动画
  20. 静态成员-静态成员变量

热门文章

  1. Java教程:百度开发者平台注册人脸信息至百度账号中
  2. 当数字化遇见开源,无限可能跃上新生
  3. 支付系统设计四:支付核心设计03-快捷短信确认(失败转代扣)
  4. Trust Swiftly推出强大以加强电子商务欺诈的身份验证预防系统
  5. 虚幻引擎图文笔记:设置游戏的输入控制
  6. linux桌面主题下载软件,桌面应用|Ubuntu 14.04 下的MAC OS X 主题安装
  7. Win7 32位安装.net framework 4失败的解决过程
  8. [java]PixelShader:2d骨骼动画图帧编辑器
  9. ELK | 本地启动多台elasticsearch实例
  10. 期货市场技术分析03_主要反转形态