吱吱叽 2016-10-10 04:11 采纳率: 10.5%
浏览 845

安卓 布局 蠢新 看一眼 看一眼 (ρ_・).。

午 好
局部代码:
<?xml version="1.0" encoding="utf-8"?>
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/background_user"
android:orientation="vertical" >

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

                        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:orientation="horizontal" >

            <LinearLayout
                android:id="@+id/shipperL2"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:layout_weight="1" >

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:background="@drawable/shipper" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="5"
                android:orientation="vertical" >

                <TextView
                    android:layout_width="fill_parent"
                    android:layout_height="0dp"
                    android:layout_weight="1"
                    android:gravity="center_vertical"
                    android:text="班级"
                    android:textColor="@color/black" />

                <TextView
                    android:layout_width="fill_parent"
                    android:layout_height="0dp"
                    android:layout_weight="1"
                    android:gravity="center_vertical"
                    android:text="学生信息"
                    android:textColor="@color/black" />
            </LinearLayout>
        </LinearLayout>
                    ...

                    就这样 重复很多个 
                    结果 滑动的效果是左右滑动的 而且图标和文字之间距离很大 很大 T_T
                    我 该怎么调整 让它变成上下滑动的效果
                    而且 写了十几个linearlayout
                    界面上就显示了7个 为啥???
                    在线 等等等
  • 写回答

7条回答 默认 最新

  • cLoveStudyc 2016-10-10 04:53
    关注

    ScrollView布局应该是最外层布局,这样才能对这个页面来进行上下滑动

    评论

报告相同问题?

悬赏问题

  • ¥15 Python时间序列如何拟合疏系数模型
  • ¥15 求学软件的前人们指明方向🥺
  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services