2024年Android最新Android-第一节基础知识及LinearLayout(线性布局),2024年最新学生会面试有趣的选择题

面试复习笔记:

这份资料我从春招开始,就会将各博客、论坛。网站上等优质的Android开发中高级面试题收集起来,然后全网寻找最优的解答方案。每一道面试题都是百分百的大厂面经真题+最优解答。包知识脉络 + 诸多细节。
节省大家在网上搜索资料的时间来学习,也可以分享给身边好友一起学习。

《960页Android开发笔记》

《1307页Android开发面试宝典》

包含了腾讯、百度、小米、阿里、乐视、美团、58、猎豹、360、新浪、搜狐等一线互联网公司面试被问到的题目。熟悉本文中列出的知识点会大大增加通过前两轮技术面试的几率。

《507页Android开发相关源码解析》

只要是程序员,不管是Java还是Android,如果不去阅读源码,只看API文档,那就只是停留于皮毛,这对我们知识体系的建立和完备以及实战技术的提升都是不利的。

真正最能锻炼能力的便是直接去阅读源码,不仅限于阅读各大系统源码,还包括各种优秀的开源库。

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化学习资料的朋友,可以戳这里获取

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!

android:layout_marginBottom=“10dp”

android:layout_marginLeft=“10dp”

android:layout_marginRight=“10dp”

1.3控件的内边距


统一设置上下左右内边距:

android:padding=“5dp”

各自设置内边距:

android:paddingTop=“5dp”

android:paddingBottom=“5dp”

android:paddingLeft=“5dp”

android:paddingRight=“5dp”

2.线性布局(Linear Layout)

====================================================================================

LinearLayout 核心属性:

​ (1) android:orientation:两个属性值:“vertical” 垂直 “horizontal”水平

​ (2) android:layout_weight 将父控件的剩余空间按照设置的权重比例再分配

2.1示例:


在这里插入图片描述

<LinearLayout

android:id=“@+id/linearLayout”

android:layout_width=“match_parent”

android:layout_height=“wrap_content”

android:orientation=“horizontal”

app:layout_constraintEnd_toEndOf=“parent”

app:layout_constraintStart_toStartOf=“parent”

app:layout_constraintTop_toTopOf=“parent”>

<Button

android:id=“@+id/button1”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:text=“button1”>

<Button

android:id=“@+id/button2”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:text=“button2”>

<Button

android:id=“@+id/button3”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:text=“button3”>

2.2微信界面实战


在这里插入图片描述

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android=“http://schemas.android.com/apk/res/android”

xmlns:app=“http://schemas.android.com/apk/res-auto”

xmlns:tools=“http://schemas.android.com/tools”

android:layout_width=“match_parent”

android:orientation=“vertical”

android:layout_height=“match_parent”

tools:context=“.MainActivity”>

<TextView

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:text=“×”

android:textSize=“50dp”

android:layout_marginLeft=“5dp”/>

<TextView

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_marginLeft=“20dp”

android:layout_marginTop=“5dp”

android:text=“微信号/QQ/邮箱登录”

android:textColor=“@color/black”

android:textSize=“30dp”/>

<LinearLayout

android:layout_width=“match_parent”

android:layout_height=“wrap_content”

android:layout_marginTop=“30dp”>

<LinearLayout

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_weight=“1”

android:layout_marginTop=“6dp”

android:orientation=“horizontal”>

<TextView

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_marginLeft=“25dp”

android:text=“账号”

android:textColor=“@color/black”

android:textSize=“25dp” />

<LinearLayout

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_weight=“0”>

<EditText

android:layout_width=“wrap_content”

android:layout_height=“match_parent”

android:text="请填写微信号/QQ号/邮箱 "/>

<LinearLayout

android:layout_width=“match_parent”

android:layout_height=“45dp”

android:layout_marginTop=“10dp”

android:orientation=“horizontal”>

<LinearLayout

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_weight=“1”>

<TextView

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_marginLeft=“25dp”

android:text=“密码”

android:textColor=“@color/black”

android:textSize=“25dp” />

<LinearLayout

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_weight=“0”>

<EditText

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:text="请填写密码 "/>

<TextView

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:text=“用手机号登录”

android:layout_marginTop=“20dp”

android:layout_marginLeft=“25dp”

android:textSize=“20dp”

android:textColor=“@color/purple_500”/>

<Button

android:layout_width=“match_parent”

android:layout_height=“wrap_content”

android:text=“登录”

android:textSize=“30dp”

android:layout_marginTop=“30dp”

/>

<LinearLayout

android:layout_width=“match_parent”

android:layout_height=“wrap_content”

android:layout_marginTop=“150dp”

android:orientation=“horizontal”>

<LinearLayout

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_weight=“2”>

<TextView

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:text=“找回密码”

android:layout_marginLeft=“80dp”

android:textColor=“@color/purple_500”

android:textSize=“15dp” />

<LinearLayout

android:layout_width=“122dp”

android:layout_height=“wrap_content”

android:layout_weight=“7”>

<TextView

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:text=“紧急冻结”

android:layout_marginLeft=“40dp”

android:textColor=“@color/purple_500”

android:textSize=“15dp” />

<LinearLayout

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_weight=“70”>

<TextView

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:text=“微信安全中心”

android:textColor=“@color/purple_500”/>

总结

首先是感觉自己的基础还是不够吧,大厂好像都喜欢问这些底层原理。

另外一部分原因在于资料也还没有看完,一面时凭借那份资料考前突击恶补个几天居然也能轻松应对(在这里还是要感谢那份资料,真的牛),于是自我感觉良好,资料就没有怎么深究下去了。

之前的准备只涉及了Java、Android、计网、数据结构与算法这些方面,面对面试官对其他基础课程的考察显得捉襟见肘。

下一步还是要查漏补缺,进行针对性复习。

最后的最后,那套资料这次一定要全部看完,是真的太全面了,各个知识点都涵盖了,几乎我面试遇到的所有问题的知识点这里面都有!希望大家不要犯和我一样的错误呀!!!一定要看完!

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化学习资料的朋友,可以戳这里获取

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!

droid、计网、数据结构与算法这些方面,面对面试官对其他基础课程的考察显得捉襟见肘。

下一步还是要查漏补缺,进行针对性复习。

最后的最后,那套资料这次一定要全部看完,是真的太全面了,各个知识点都涵盖了,几乎我面试遇到的所有问题的知识点这里面都有!希望大家不要犯和我一样的错误呀!!!一定要看完!
[外链图片转存中…(img-LZiy9OBs-1715653869758)]

[外链图片转存中…(img-gmW2r9Vy-1715653869759)]

[外链图片转存中…(img-DXVIe7hq-1715653869759)]

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化学习资料的朋友,可以戳这里获取

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!

  • 4
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值