2024年Android最新Android布局实现圆角边框,音视频开发工程师面试题

【附】相关架构及资料

往期Android高级架构资料、源码、笔记、视频。高级UI、性能优化、架构师课程、NDK、混合式开发(ReactNative+Weex)微信小程序、Flutter全方面的Android进阶实践技术,群内还有技术大牛一起讨论交流解决问题。

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

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

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

下面看下布局文件

  1. <?xml version\="1.0" encoding\="utf-8"?>  
  2. <LinearLayout xmlns:Android=“http://schemas.android.com/apk/res/android”

  3. android:layout_width=“fill_parent”

  4. android:layout_height=“fill_parent”

  5. android:background=“#FFFFFF”

  6. android:orientation=“vertical” >

  7. <TableLayout

  8. android:layout_width=“fill_parent”

  9. android:layout_height=“wrap_content”

  10. android:padding=“10dip” >

  11. <TableRow

  12. android:layout_width=“fill_parent”

  13. android:layout_height=“wrap_content”

  14. android:background=“@drawable/shape_top_corner_no_bottom_line”

  15. android:padding=“10dip” >

  16. <TextView

  17. android:layout_width=“wrap_content”

  18. android:layout_height=“wrap_content”

  19. android:layout_gravity=“center_vertical”

  20. android:layout_marginRight=“10dip”

  21. android:text=“姓名:” >

  22. </TextView>

  23. <EditText

  24. android:id=“@+id/bankingYourNameEditText”

  25. android:layout_width=“wrap_content”

  26. android:layout_height=“wrap_content”

  27. android:layout_gravity=“center_vertical”

  28. android:layout_weight=“1”

  29. android:background=“@null”

  30. android:singleLine=“true” >

  31. </EditText>

  32. </TableRow>

  33. <TableRow

  34. android:layout_width=“fill_parent”

  35. android:layout_height=“wrap_content”

  36. android:background=“@drawable/shape_no_corner_without_bottom”

  37. android:padding=“10dip” >

  38. <TextView

  39. android:layout_width=“wrap_content”

  40. android:layout_height=“wrap_content”

  41. android:layout_gravity=“center_vertical”

  42. android:layout_marginRight=“10dip”

  43. android:text=“联系电话:” >

  44. </TextView>

  45. <EditText

  46. android:id=“@+id/bankingContactTelEditText”

  47. android:layout_width=“wrap_content”

  48. android:layout_height=“wrap_content”

  49. android:layout_gravity=“center_vertical”

  50. android:layout_weight=“1”

  51. android:background=“@null”

  52. android:inputType=“phone”

  53. android:singleLine=“true” >

  54. </EditText>

  55. </TableRow>

  56. <TableRow

  57. android:layout_width=“fill_parent”

  58. android:layout_height=“wrap_content”

  59. android:background=“@drawable/shape_bottom_corner_no_top_line”

  60. android:padding=“10dip” >

  61. <TextView

  62. android:layout_width=“wrap_content”

  63. android:layout_height=“wrap_content”

  64. android:layout_gravity=“center_vertical”

  65. android:layout_marginRight=“10dip”

  66. android:text=“联系电话:” >

  67. </TextView>

  68. <EditText

  69. android:id=“@+id/bankingContactTelEditText”

  70. android:layout_width=“wrap_content”

  71. android:layout_height=“wrap_content”

  72. android:layout_gravity=“center_vertical”

  73. android:layout_weight=“1”

  74. android:background=“@null”

  75. android:inputType=“phone”

  76. android:singleLine=“true” >

  77. </EditText>

  78. </TableRow>

  79. </TableLayout>

  80. <Button

  81. android:id=“@+id/button1”

  82. android:layout_width=“wrap_content”

  83. android:layout_height=“wrap_content”

  84. android:layout_gravity=“center”

  85. android:text=“Button” />

  86. </LinearLayout>

表格布局中每个TableRow表示一行,TableRow中的每个基本控件都是一列,这是一个三行两列的布局

这里的表格背景是自定义的shape,下面分别看一下三个shape的代码。

shape_top_corner_no_bottom_line.xml文件:顶部带圆角 白色背景 灰色边框 无下边框 长方体

  1. <?xml version\="1.0" encoding\="UTF-8"?>  
  2.   
  3. <layer-list xmlns:android=“http://schemas.android.com/apk/res/android”>

  4. <item>

  5. <shape>

  6. <solid android:color=“#FFFFFF” />

  7. <corners android:topLeftRadius=“10dp” android:topRightRadius=“10dp”

  8. android:bottomRightRadius=“0.1dp” android:bottomLeftRadius=“0.1dp” />

  9. <stroke android:width=“1dp” android:color=“#ffa8abad” />

  10. </shape>

  11. </item>

  12. <item android:top=“1dp” android:left=“1dp” android:right=“1dp”>

题外话

我们见过很多技术leader在面试的时候,遇到处于迷茫期的大龄程序员,比面试官年龄都大。这些人有一些共同特征:可能工作了7、8年,还是每天重复给业务部门写代码,工作内容的重复性比较高,没有什么技术含量的工作。问到这些人的职业规划时,他们也没有太多想法。

其实30岁到40岁是一个人职业发展的黄金阶段,一定要在业务范围内的扩张,技术广度和深度提升上有自己的计划,才有助于在职业发展上有持续的发展路径,而不至于停滞不前。

不断奔跑,你就知道学习的意义所在!

注意:我们之前因为秋招收集的二十套一二线互联网公司Android面试真题(含BAT、小米、华为、美团、滴滴)和我自己整理Android复习笔记(包含Android基础知识点、Android扩展知识点、Android源码解析、设计模式汇总、Gradle知识点、常见算法题汇总。)

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

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

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

TtqWiKn-1715657693198)]

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

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

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

  • 5
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值