首页 > 其他分享 >政策查询系统(安卓)6

政策查询系统(安卓)6

时间:2024-06-16 12:22:07浏览次数:9  
标签:layout parent 安卓 系统 查询 width android id match

编写安卓的界面

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg">

<!-- 使用垂直线性布局 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<!-- 标题 -->
<TextView
android:id="@+id/TitleText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:text="科技政策一点通"
android:gravity="center"
android:textStyle="italic"
android:textColor="@color/white"
android:textSize="30sp" />
<!-- 按钮区域 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- 政策分类按钮 -->
<Button
android:id="@+id/categoryButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_margin="10dp"
android:padding="6dp"
android:text="政策分类"
android:textColor="@color/black"
android:textSize="24sp"
android:background="@drawable/translucent_button" />
<!-- 政策概览按钮 -->
<Button
android:id="@+id/overviewButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_margin="10dp"
android:padding="6dp"
android:text="政策查询"
android:textColor="@color/black"
android:textSize="24sp"
android:background="@drawable/translucent_button" />
</LinearLayout>
<!-- 政策概览界面 -->
<LinearLayout
android:id="@+id/LL1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="visible">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- 输入框 -->
<AutoCompleteTextView
android:id="@+id/searchInput"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:hint="请输入政策关键词"
android:padding="10dp"
android:textSize="24sp"
android:background="@drawable/translucent_edit"
android:completionThreshold="1" />
<!-- 查询按钮 -->
<Button
android:id="@+id/searchButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:padding="6dp"
android:text="查询"
android:textColor="@color/black"
android:textSize="24sp"
android:background="@drawable/translucent_button" />
</LinearLayout>
<!-- 政策名称列表 -->
<ListView
android:id="@+id/policyListView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:textSize="18sp"
/>
</LinearLayout>
<!-- 政策分类界面 -->
<LinearLayout
android:id="@+id/LL2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
</LinearLayout>
<!-- 查询内容展示界面,包装在 ScrollView 中 -->
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/resultTextView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="0dp"
android:padding="0dp"
android:textColor="#000000"
android:textSize="20sp" />
<!-- 显示查询结果的 TextView -->
<TextView
android:id="@+id/resultTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:padding="5dp"
android:textColor="#000000"
android:textSize="20sp"/>
</LinearLayout>
</ScrollView>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">

<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp">

<TextView
android:id="@+id/policyDetailTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp" />
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

标签:layout,parent,安卓,系统,查询,width,android,id,match
From: https://www.cnblogs.com/pinganxile/p/18250463

相关文章

  • 政策查询系统(安卓)7
    配置plugins{id("com.android.application")}android{namespace="com.example.policyquery"compileSdk=34defaultConfig{applicationId="com.example.policyquery"minSdk=28targetSdk=34......
  • 五一冲刺(政策查询系统)1
    今日课上的政策查询系统极限测试寥寥草草将功能实现了,把内部代码进行完善一下完整代码:index.jsp<%@pagecontentType="text/html;charset=UTF-8"language="java"%><!DOCTYPEhtml><htmllang="en"xmlns:th="http://www.thymeleaf.org"><......
  • 五一冲刺(政策查询系统)2
    packageDao;importBean.Menu;importBean.bean;importBean.policy;importDBUtil.dbutil;importorg.apache.ibatis.io.Resources;importorg.apache.ibatis.session.SqlSession;importorg.apache.ibatis.session.SqlSessionFactory;importorg.apache.ibatis.ses......
  • 政策查询系统(安卓)1
    老师现在又要求将此系统功能实现在安卓端,正好最近学习了springboot相关知识,便用springboot做后端,安卓的页面做前端编写了此系统创建springboot项目做好数据库配置spring:datasource:driver-class-name:com.mysql.cj.jdbc.Driverurl:jdbc:mysql://localhost:3306/wu......
  • 政策查询系统(安卓)2
    controller层packagecom.leap.jixianceshiboot.controller;importcom.leap.jixianceshiboot.entity.Policy;importcom.leap.jixianceshiboot.entity.PolicyTypeCount;importcom.leap.jixianceshiboot.service.PolicyQueryService;importcom.leap.jixianceshiboot.util.P......
  • 5、Oracle的多表查询
    最近项目要用到Oracle,奈何之前没有使用过,所以在B站上面找了一个学习视频,用于记录学习过程以及自己的思考。视频链接:【尚硅谷】Oracle数据库全套教程,oracle从安装到实战应用如果有侵权,请联系删除,谢谢。本文主要讲解以下几点:使用等值和不等值连接在SELECT语句中查询多个表......
  • 【工具推荐】基于Win10系统自带软件Xbox Game Bar录屏后下载安装ffmpeg然后使用ffmpeg
    本文详细介绍了如何基于Win10系统自带软件XboxGameBar录屏,以及如何下载安装ffmpeg,然后如何使用ffmpeg将录屏得到的mp4视频转换为可用于博客中做功能演示用的gif动态图片,同时还提供了一个一键转换脚本,减少繁琐的操作步骤。......
  • 高通量表型组平台及系统列表
    全球主要可用的高通量表型分析设施列表参考1参考2来源:赵春江,植物表型组学大数据及其研究进展参考3来源:High-ThroughputPhenotyping:APlatformtoAccelerateCropImprovement......
  • FDRS | 一个开源的智慧农场中继系统
    分享一个智慧农业开源项目:农场数据中继系统(FarmDataRelaySystem,FDRS)。这是一个利用现代信息技术,如物联网(IoT)、大数据和云计算等,为农业生产提供数据支持和管理优化的系统。该系统的核心功能是收集、处理和分析农场相关数据,帮助农民更精准地进行作物种植和管理。两年前的项目,......
  • Breedbase | 一个现代植物育种的数字生态系统
    背景现代植物育种是一个数据密集型过程,需要整合和评估多种不同的数据集以支持决策制定。传统的植物育种通过有意的亲本杂交来产生具有优良表型特征的后代,而现代育种方法则结合了标记辅助选择和基因组选择(GS)来增强表型选择。随着高通量表型技术的出现,可以追踪的潜在表型数量大大增......