怎么把首页和功能两个搞到最下边

YXTS122 2021-01-03 11:16:37
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.express.MainActivity"
android:orientation="vertical" >
<FrameLayout
android:id="@+id/cont"
android:layout_width="match_parent"
android:layout_height="410dp">
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="54dp"
android:gravity="center_vertical"
android:baselineAligned="true" >
<LinearLayout
android:id="@+id/ask"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_horizontal"
android:background="#ffc0cb"
android:orientation="vertical" >
<TextView
android:id="@+id/tv1"
android:gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="首页"
android:textSize="17sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/me"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_horizontal"
android:orientation="vertical" >
<TextView
android:id="@+id/tv2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="功能"
android:textSize="17sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>


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

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="出发"
android:textSize="25sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@drawable/ic_launcher" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="创建配载" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="任务列表" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="封车列表" />

</LinearLayout>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="到达"
android:textSize="25sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@drawable/ic_launcher" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="到车解封" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="卸车任务" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="卸车暂存" />

</LinearLayout>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="常用"
android:textSize="25sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@drawable/ic_launcher" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="创建盘点" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="复称检查" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="叉车分拣" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="配送任务" />

</LinearLayout>

</LinearLayout>


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

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="场内功能"
android:textSize="25sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@drawable/ic_launcher" />
<GridLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:columnCount="3"
android:orientation="horizontal"
android:rowCount="3" >
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="盘点列表" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="盘点差异" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="分拨自提" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="问题件上报" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="无头件上报" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="同行卸车" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="配送退单" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="单独绑定" />
</GridLayout>


<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="辅助功能"
android:textSize="25sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@drawable/ic_launcher" />
<GridLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:columnCount="4"
android:orientation="horizontal"
android:rowCount="2" >
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运单入库"
android:textSize="12sp" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="场内分拣"
android:textSize="12sp" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="(旧)卸车扫描"
android:textSize="12sp" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="揽货扫描"
android:textSize="12sp" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="异常管理"
android:textSize="12sp" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="建包管理"
android:textSize="12sp" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="移库倒货"
android:textSize="12sp" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="签到管理"
android:textSize="12sp" />
</GridLayout>





</LinearLayout>


...全文
16641 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
外层布局可以用约束布局。 第二层嵌套线性布局。
JMSissi 2021-01-04
  • 打赏
  • 举报
回复
父布局用线性LinarLayout 然后用权重
头发还没秃a 2021-01-03
  • 打赏
  • 举报
回复

<FrameLayout 
               android:id="@+id/cont"
               android:layout_width="match_parent"
               android:layout_height="410dp">
            </FrameLayout>
改为
<FrameLayout
        android:id="@+id/cont"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1">
    </FrameLayout>

80,469

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧