吱吱叽 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 有赏,i卡绘世画不出
  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题
  • ¥15 COCOS的问题COCOS的问题
  • ¥15 FPGA-SRIO初始化失败
  • ¥15 MapReduce实现倒排索引失败
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码