2024年Android记录2--制作表格样式+由下往上动画弹出效果实现,2024年最新程序员面试自我介绍

最后

**要想成为高级安卓工程师,必须掌握许多基础的知识。**在工作中,这些原理可以极大的帮助我们理解技术,在面试中,更是可以帮助我们应对大厂面试官的刁难。


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

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

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

这篇博客要实现之前没有实现过的效果,制作表格样式,这是小巫在工作中要实现的效果,花了我不少实现才把效果给做出来。界面设计是一个很大的学问,不知道怎么布局的话是无法设计出漂亮的界面,还有一些控件的属性的使用会出现什么样的效果也是需要去考虑的,ListView可以是用得最多的控件,在这里也是用ListView来实现表格的界面。

看看效果图:

效果是这样的:点击按下弹出表格的按钮,会由下往上弹出右边的列表,按下返回按钮就由上往下退出界面。

布局文件:

activity_main.xml

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

android:layout_width=“match_parent”

android:layout_height=“match_parent” >

<Button

android:id=“@+id/btnPopup”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_alignParentBottom=“true”

android:layout_centerHorizontal=“true”

android:background=“@drawable/bg”

android:layout_marginLeft=“8dp”

android:layout_marginRight=“8dp”

android:layout_marginBottom=“8dp”

android:textColor=“@color/white”

android:text=“按下弹出表格” />

<LinearLayout

android:id=“@+id/ll_popupLayout”

android:layout_width=“match_parent”

android:layout_height=“wrap_content”

android:layout_alignParentBottom=“true”

android:visibility=“gone” >

/Demo1/res/layout/business_list_item.xml

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

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

android:layout_width=“300dp”

android:layout_height=“wrap_content”

android:layout_gravity=“center_horizontal”

android:orientation=“horizontal” >

<TextView

android:id=“@+id/tv_business”

android:layout_width=“wrap_content”

android:layout_height=“40dp”

android:layout_weight=“1”

android:gravity=“center”

android:text=“@string/tv_business”

android:textColor=“#ff000000”

android:textSize=“15sp” />

<TextView

android:id=“@+id/tv_business_pay”

android:layout_width=“90dp”

android:layout_height=“40dp”

android:layout_marginLeft=“9dp”

android:layout_marginRight=“9dp”

android:gravity=“center”

android:text=“@string/tv_business_pay”

android:textColor=“#ff000000”

android:textSize=“15sp” />

/Demo1/res/layout/business_list.xml

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

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

android:id=“@+id/ll_popupLayout”

android:layout_width=“match_parent”

android:layout_height=“match_parent”

android:background=“#ffffff”

android:orientation=“vertical” >

<TextView

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_gravity=“center_horizontal”

android:layout_marginBottom=“5dp”

android:layout_marginTop=“5dp”

android:text=“已开通查分业务列表”

android:textColor=“#ff000000”

android:textSize=“15sp” />

<FrameLayout

android:layout_width=“match_parent”

android:layout_height=“0dp”

android:layout_weight=“1” >

<LinearLayout

android:layout_width=“300dp”

android:layout_height=“wrap_content”

android:layout_gravity=“center_horizontal”

android:background=“@drawable/banner_bg”

android:orientation=“horizontal” >

<TextView

android:id=“@+id/tv_business”

android:layout_width=“wrap_content”

android:layout_height=“40dp”

android:layout_weight=“1”

android:gravity=“center”

android:text=“@string/tv_business”

android:textColor=“#ff000000”

android:textSize=“15sp” />

<TextView

android:id=“@+id/tv_business_pay”

android:layout_width=“90dp”

android:layout_height=“40dp”

android:layout_marginLeft=“9dp”

android:layout_marginRight=“9dp”

android:gravity=“center”

android:text=“@string/tv_business_pay”

android:textColor=“#ff000000”

android:textSize=“15sp” />

<ListView

android:id=“@+id/lv_business”

android:layout_width=“300dp”

android:layout_height=“match_parent”

android:layout_gravity=“center_horizontal”

android:layout_marginTop=“40dp”

android:background=“@drawable/score_list_bg”

android:cacheColorHint=“@color/transparent”

android:divider=“@drawable/horizontal_line”

android:listSelector=“@color/transparent” />

<ImageView

android:layout_width=“wrap_content”

android:layout_height=“match_parent”

android:layout_gravity=“center_horizontal”

android:layout_marginBottom=“2dp”

android:layout_marginLeft=“50dp”

android:layout_marginTop=“2dp”

android:background=“@drawable/vertical_line” />

<Button

android:id=“@+id/btnBack”

android:layout_width=“80dp”

android:layout_height=“48dp”

android:layout_gravity=“center_horizontal”

android:layout_marginBottom=“5dp”

android:layout_marginTop=“5dp”

android:background=“@drawable/back_btn_bg”

android:text=“返回”

android:textColor=“#ffffff” />

动画文件:

/Demo1/res/anim/score_business_query_enter.xml

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

<translate

android:fromYDelta=“100%p”

android:duration=“600”

最后

这里我特地整理了一份《Android开发核心知识点笔记》,里面就包含了自定义View相关的内容

除了这份笔记,还给大家分享 Android学习PDF+架构视频+面试文档+源码笔记,高级架构技术进阶脑图、Android开发面试专题资料,高级进阶架构资料这几块的内容。非常适合近期有面试和想在技术道路上继续精进的朋友。

分享上面这些资源,希望可以帮助到大家提升进阶,如果你觉得还算有用的话,不妨把它们推荐给你的朋友~

喜欢本文的话,给我点个小赞、评论区留言或者转发支持一下呗~

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

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

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

料,高级进阶架构资料这几块的内容。非常适合近期有面试和想在技术道路上继续精进的朋友。

[外链图片转存中…(img-3pd4bDx5-1714981490982)]

分享上面这些资源,希望可以帮助到大家提升进阶,如果你觉得还算有用的话,不妨把它们推荐给你的朋友~

喜欢本文的话,给我点个小赞、评论区留言或者转发支持一下呗~

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

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值