当前位置:   article > 正文

Android企业级实战-界面篇-4

Android企业级实战-界面篇-4

以下是本篇文章正文内容

提示:此文章部分工具类需借鉴第一,二,三篇文章。

一、先看看实现的效果

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

请添加图片描述

请添加图片描述

请添加图片描述

二、实现前准备

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

1.dimens.xml文件内容(与第一个案例为同文件)


不占字了,请于第一篇自取

2.ids.xml文件内容(此案例可用)


3.colors.xml文件内容(此案例可用)


#fff8f8f8

#ffeeeeee

#ff999999

#ff333333

4.ic_arrows_selector.xml


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

<selector

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

5.edit_bottom_line_bg.xml


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

<layer-list

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

三、实现

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

1.修改图片区域(一个为例)


<RelativeLayout

android:id=“@id/avator_line”

android:layout_width=“fill_parent”

android:layout_height=“80.0dip”

android:layout_marginTop=“20.0dip”

android:layout_marginBottom=“20.0dip”

android:background=“@color/color_f8f8f8”

android:focusable=“true”

android:orientation=“horizontal”

android:paddingLeft=“15.0dip”>

<ImageView

android:id=“@id/avator”

android:layout_width=“50.0dip”

android:layout_height=“50.0dip”

android:layout_centerVertical=“true”

android:src=“@drawable/venda_default_icon_jimeng”/>

<TextView

android:id=“@id/avator_edit_hint”

android:layout_width=“wrap_content”

android:layout_height=“fill_parent”

android:layout_marginLeft=“15.0dip”

android:layout_toRightOf=“@id/avator”

android:gravity=“center”

android:text=“编辑头像”

android:textColor=“@color/color_999999”

android:textSize=“16.0dip” />

<ImageView

android:id=“@id/right_arrow”

android:layout_width=“40.0dip”

android:layout_height=“40.0dip”

android:layout_alignParentRight=“true”

android:layout_centerVertical=“true”

android:paddingLeft=“15.0dip”

android:paddingRight=“15.0dip”

android:src=“@drawable/ic_arrows_selector” />

效果图:

请添加图片描述

2.个人信息部分(一个为例)


<RelativeLayout

android:id=“@id/nick_line”

android:layout_width=“fill_parent”

android:layout_height=“50.0dip”

android:background=“@color/color_f8f8f8”

android:paddingLeft=“15.0dip”

android:paddingRight=“15.0dip”>

<TextView

android:id=“@id/nick_hint”

android:layout_width=“62.0dip”

android:layout_height=“fill_parent”

android:gravity=“center|left”

android:text=“昵称”

android:textColor=“@color/color_999999”

android:textSize=“16.0dip” />

<EditText

android:id=“@id/nick_edit”

android:layout_width=“fill_parent”

android:layout_height=“fill_parent”

android:layout_toRightOf=“@id/nick_hint”

android:background=“@drawable/edit_bottom_line_bg”

android:ellipsize=“end”

android:gravity=“center|left”

android:inputType=“textAutoCorrect|textCapSentences”

android:maxLength=“30”

android:paddingRight=“25.0dip”

android:singleLine=“true”

android:text=“计蒙不吃鱼”

android:textColor=“@color/color_333333”

android:textSize=“16.0dip” />

<ImageButton

android:id=“@id/nick_clear_btn”

android:layout_width=“45.0dip”

android:layout_height=“45.0dip”

android:layout_alignParentRight=“true”

android:layout_gravity=“center_vertical”

android:layout_marginRight=“-10.0dip”

android:background=“@null”

android:src=“@drawable/search_common_clear”

android:visibility=“gone” />

效果图

请添加图片描述

四、源码

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

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

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

android:layout_width=“fill_parent”

android:layout_height=“fill_parent”

android:background=“@color/color_f8f8f8”

android:orientation=“vertical”>

<ScrollView

android:id=“@id/bs_scrollview”

android:layout_width=“fill_parent”

android:layout_height=“fill_parent”

android:layout_marginTop=“44.0dip”

android:background=“@color/color_eeeeee”

android:fadingEdge=“none”>

<LinearLayout

android:id=“@id/container”

android:layout_width=“fill_parent”

android:layout_height=“wrap_content”

android:focusable=“true”

android:focusableInTouchMode=“true”

android:gravity=“center_vertical”

android:orientation=“vertical”>

<RelativeLayout

android:id=“@id/avator_line”

android:layout_width=“fill_parent”

android:layout_height=“80.0dip”

android:layout_marginTop=“20.0dip”

android:layout_marginBottom=“20.0dip”

android:background=“@color/color_f8f8f8”

android:focusable=“true”

android:orientation=“horizontal”

android:paddingLeft=“15.0dip”>

<ImageView

android:id=“@id/avator”

android:layout_width=“50.0dip”

android:layout_height=“50.0dip”

android:layout_centerVertical=“true”

android:src=“@drawable/venda_default_icon_jimeng”/>

<TextView

android:id=“@id/avator_edit_hint”

android:layout_width=“wrap_content”

android:layout_height=“fill_parent”

android:layout_marginLeft=“15.0dip”

android:layout_toRightOf=“@id/avator”

android:gravity=“center”

android:text=“编辑头像”

android:textColor=“@color/color_999999”

android:textSize=“16.0dip” />

<ImageView

android:id=“@id/right_arrow”

android:layout_width=“40.0dip”

android:layout_height=“40.0dip”

android:layout_alignParentRight=“true”

android:layout_centerVertical=“true”

android:paddingLeft=“15.0dip”

android:paddingRight=“15.0dip”

android:src=“@drawable/ic_arrows_selector” />

<RelativeLayout

android:id=“@id/id_line”

android:layout_width=“fill_parent”

android:layout_height=“50.0dip”

android:background=“@color/color_f8f8f8”

android:paddingLeft=“15.0dip”

android:paddingRight=“15.0dip”>

<TextView

android:id=“@id/id_hint”

android:layout_width=“62.0dip”

android:layout_height=“fill_parent”

android:gravity=“center|left”

android:text=“ID”

android:textColor=“@color/color_999999”

android:textSize=“16.0dip” />

<TextView

android:id=“@id/id_edit”

android:layout_width=“fill_parent”

android:layout_height=“fill_parent”

android:layout_toRightOf=“@id/id_hint”

android:background=“@drawable/edit_bottom_line_bg”

android:gravity=“center|left”

android:maxLength=“50”

android:paddingRight=“25.0dip”

android:singleLine=“true”

android:text=“jimengbuchiyu”

android:textColor=“@color/color_999999”

学习福利

【Android 详细知识点思维脑图(技能树)】

其实Android开发的知识点就那么多,面试问来问去还是那么点东西。所以面试没有其他的诀窍,只看你对这些知识点准备的充分程度。so,出去面试时先看看自己复习到了哪个阶段就好。

虽然 Android 没有前几年火热了,已经过去了会四大组件就能找到高薪职位的时代了。这只能说明 Android 中级以下的岗位饱和了,现在高级工程师还是比较缺少的,很多高级职位给的薪资真的特别高(钱多也不一定能找到合适的),所以努力让自己成为高级工程师才是最重要的。

这里附上上述的面试题相关的几十套字节跳动,京东,小米,腾讯、头条、阿里、美团等公司19年的面试题。把技术点整理成了视频和PDF(实际上比预期多花了不少精力),包含知识脉络 + 诸多细节。

由于篇幅有限,这里以图片的形式给大家展示一小部分。

网上学习 Android的资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。希望这份系统化的技术体系对大家有一个方向参考。

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

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

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

就能找到高薪职位的时代了。这只能说明 Android 中级以下的岗位饱和了,现在高级工程师还是比较缺少的,很多高级职位给的薪资真的特别高(钱多也不一定能找到合适的),所以努力让自己成为高级工程师才是最重要的。

这里附上上述的面试题相关的几十套字节跳动,京东,小米,腾讯、头条、阿里、美团等公司19年的面试题。把技术点整理成了视频和PDF(实际上比预期多花了不少精力),包含知识脉络 + 诸多细节。

由于篇幅有限,这里以图片的形式给大家展示一小部分。

[外链图片转存中…(img-EJ9hgNrb-1714198922178)]

网上学习 Android的资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。希望这份系统化的技术体系对大家有一个方向参考。

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

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

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

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/人工智能uu/article/detail/821887
推荐阅读
相关标签
  

闽ICP备14008679号