首页 > 其他分享 >第六周星期四每日总结

第六周星期四每日总结

时间:2023-03-23 22:12:30浏览次数:35  
标签:总结 layout parent app 距离 第六周 星期四 android match

    今日在地铁查询app时学会了如何在页面中添加垂直和水平滚动条,并且学会如何控制组件布局距离底部的距离。

代码举例:

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<!--ScrollView可控制页面添加一个垂直的滚动条,支持上下滑动查看数据    -->
 3     xmlns:app="http://schemas.android.com/apk/res-auto"
 4     xmlns:tools="http://schemas.android.com/tools"
 5     android:layout_width="match_parent"
 6     android:layout_height="match_parent"
 7     android:background="@drawable/dp2"
 8     >
 9     `
10     <LinearLayout
11         android:layout_width="match_parent"
12         android:layout_height="match_parent"
13         android:orientation="vertical"
14         android:layout_marginTop="70dp">
15         <TextView
16             android:layout_width="wrap_content"
17             android:layout_height="wrap_content"
18             android:text="线路查询"
19             android:textSize="40dp"
20             android:textColor="@color/black"
21             android:layout_gravity="center"
22             />
23         <EditText
24             android:id="@+id/search"
25             android:layout_marginTop="40dp"
26             android:layout_width="match_parent"
27             android:layout_height="match_parent"
28             android:hint="线路查询"
29             />
30         <Button
31             android:id="@+id/btn_choice1"
32             android:layout_width="300dp"
33             android:layout_gravity="center"
34             android:layout_height="50dp"
35             android:layout_marginTop="20dp"
36             android:padding="10dp"
37             android:background="@drawable/but_on"
38             android:text="查            询"/>
39         <HorizontalScrollView
<!--
HorizontalScrollView可添加水平的滚动条
-->
40 41 android:layout_width="wrap_content" 42 43  android:layout_height="match_parent"> 44 <LinearLayout 45 android:layout_width="match_parent" 46  android:layout_height="wrap_content" 47  android:orientation="horizontal" 48  android:layout_marginBottom="100dp"
<!--
android:layout_marginBottom="100dp"可控制组件距离底部的距离,适当调整可让数据显示完全
-->

49 > 50 <TextView 51 android:layout_width="wrap_content" 52 android:layout_height="wrap_content" 53 android:layout_weight="1" 54 android:id="@+id/tv_show" 55 android:textSize="20sp" 56 android:gravity="center_horizontal"/> 57 <TextView 58 android:layout_width="wrap_content" 59 android:layout_height="wrap_content" 60 android:layout_weight="1" 61 android:id="@+id/tv_showx" 62 android:textSize="20sp" 63 android:gravity="center_horizontal" 64 /> 65 <TextView 66 android:layout_width="wrap_content" 67 android:layout_height="wrap_content" 68 android:layout_weight="1" 69 android:id="@+id/tv_showy" 70 android:textSize="20sp" 71 android:gravity="center_horizontal" 72 /> 73 </LinearLayout> 74 </HorizontalScrollView> 75 </LinearLayout> 76 77 </ScrollView>

 

标签:总结,layout,parent,app,距离,第六周,星期四,android,match
From: https://www.cnblogs.com/sgle0722/p/17249685.html

相关文章

  • 每日总结2023/3/23
    今天完成了最优化的线路查询,应用了BFS算法,广度优先遍历使用了队列的算法,实现最短路径的算法。下面是算法部分代码:Rea.javapackageContrl;importline.Tool;import......
  • 今日总结-32
    今日打卡所花时间(包括上课):5h代码量(行):260发表博客:5篇(不包括本篇)学习进度和了解到的知识点:今天完成了Android的最短路径查询,能够输出所有可能的路线,依然使用sql......
  • 3.23 每日总结
    今天完成了最优化的线路查询,应用了BFS算法,广度优先遍历使用了队列的算法,实现最短路径的算法。下面是算法部分代码:Rea.javapackageContrl;importline.Tool;importj......
  • 2023.3.23每日总结
    privateintxianshilianxu(intyear,intmonth,intday,Stringuser){intjianchishijian=0;TextViewtextView1=findViewById(R.id.hunong);......
  • 每日总结-23.3.23
    关于数据库操作packagecom.example.daka1;importandroid.content.ContentValues;importandroid.content.Context;importandroid.database.Cursor;importandroi......
  • 3.23总结
    <?xmlversion="1.0"encoding="utf-8"?><LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"androi......
  • 每日双人总结
    CREATETABLEbj_subway(station_idINTNOTNULLPRIMARYKEY,line_nameVARCHAR(20)NOTNULL,station_nameVARCHAR(50)NOTNULL,next_stationVARCHAR(......
  • 3.23每日总结
    <%@pagelanguage="java"contentType="text/html;charset=UTF-8"pageEncoding="UTF-8"%><!DOCTYPEhtml><htmlxmlns="http://www.w3.org/1999/html">......
  • 【Java】关于Queue的用法总结
    【Java】关于Queue的用法总结原文链接:https://blog.csdn.net/qq_25353433/article/details/88016369之前对Queue只有一知半解,常用它的某几个方法,却不知道其中的区别,看了......
  • 今日总结
    今天把android端的北京地铁查询系统给完成了,主要功能实现了。学习时长:3小时,代码:360行,其中遇到了不少问题,在子线程设置settext会报错,再重写相同方法就可以了。toast也会报错......