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

本文详细介绍了Android企业级应用中界面布局的设计,包括dimens.xml、ids.xml和colors.xml文件的内容,以及user_profile_layout.xml的具体实现。同时提到了如何准备大厂面试,分享了相关的面试真题和源码解析资源。
摘要由CSDN通过智能技术生成

在这里插入图片描述

在这里插入图片描述

二、实现前准备

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

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


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

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

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


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


#ffffffff

@color/jimeng_background_primary_light

#ff2e2e2e

@color/jimeng_text_primary_light

#ffff6c93

#ffcccccc

#ffdddddd

#fff5f5f5

#ffededed

@color/jimeng_separator_line_light

#ffffffff

@color/jimeng_text_quarternary_light

三、实现

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

1.user_profile_layout.xml(第一个模块)


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

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

android:id=“@id/user_profile_layout”

android:layout_width=“fill_parent”

android:layout_height=“100.0dip”

android:clickable=“true”

android:clipChildren=“false”>

<ImageView

android:id=“@id/profile_cover”

android:layout_width=“fill_parent”

android:layout_height=“fill_parent”

android:alpha=“1.0” />

<ImageView

android:id=“@id/image”

android:layout_width=“72.0dip”

android:layout_height=“72.0dip”

android:layout_marginLeft=“24.0dip”

android:layout_marginTop=“@dimen/jimeng_dp_32”

android:layout_marginRight=“15.0dip”

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

<ImageView

android:id=“@id/blog_tag”

android:layout_width=“22.0dip”

android:layout_height=“22.0dip”

android:layout_alignRight=“@id/image”

android:layout_alignBottom=“@id/image”

android:layout_marginTop=“2.0dip”

android:scaleType=“centerCrop” />

<RelativeLayout

android:id=“@id/user_data”

android:layout_width=“fill_parent”

android:layout_height=“72.0dip”

android:layout_marginTop=“36.0dip”

android:layout_toLeftOf=“@id/arrow”

android:layout_toRightOf=“@id/image”

<TextView

android:id=“@id/blog_name_text”

android:layout_width=“fill_parent”

android:layout_height=“wrap_content”

android:layout_marginTop=“4.0dip”

android:layout_marginRight=“15.0dip”

android:duplicateParentState=“true”

android:singleLine=“true”

android:text=“计蒙不吃鱼”

android:layout_centerVertical=“true”

android:textColor=“@color/jimeng_black”

android:textSize=“@dimen/jimeng_dp_20”

android:textStyle=“bold”/>

<RelativeLayout

android:id=“@id/arrow”

android:layout_width=“40.0dip”

android:layout_height=“72.0dip”

android:layout_marginTop=“36.0dip”

android:layout_alignParentRight=“true”

<ImageView

android:id=“@id/arrow_img”

android:layout_width=“16.0dip”

android:layout_height=“16.0dip”

android:layout_centerVertical=“true”

android:layout_marginRight=“24.0dip”

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

效果图:

在这里插入图片描述

2.include_user_profile_feature.xml(第二个模块)


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

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

android:layout_width=“fill_parent”

android:layout_height=“fill_parent”

android:background=“@color/white”

android:orientation=“horizontal”

android:paddingTop=“@dimen/jimeng_dp_16”

android:paddingBottom=“@dimen/jimeng_dp_16”>

<LinearLayout

android:id=“@id/user_focus_layout”

android:layout_width=“0.0dip”

android:layout_height=“fill_parent”

android:layout_weight=“1.0”

android:gravity=“center”

android:orientation=“vertical”>

<TextView

android:id=“@id/user_focus_num”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:text=“1024”

android:textColor=“@color/jimeng_text_primary_light”

android:textSize=“@dimen/jimeng_dp_17”

android:textStyle=“bold” />

<TextView

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_marginTop=“@dimen/jimeng_dp_2”

android:text=“关注”

android:textColor=“@color/jimeng_text_quarternary_light”

android:textSize=“@dimen/jimeng_dp_12”

android:textStyle=“bold” />

<RelativeLayout

android:id=“@id/user_fans_layout”

android:layout_width=“0.0dip”

android:layout_height=“fill_parent”

android:layout_weight=“1.0”

android:gravity=“center”>

<RelativeLayout

android:layout_width=“fill_parent”

android:layout_height=“wrap_content”>

<TextView

android:id=“@id/user_fans_num”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_centerHorizontal=“true”

android:text=“1024”

android:textColor=“@color/jimeng_text_primary_light”

android:textSize=“@dimen/jimeng_dp_17”

android:textStyle=“bold” />

<TextView

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_below=“@id/user_fans_num”

android:layout_centerHorizontal=“true”

android:layout_marginTop=“@dimen/jimeng_dp_2”

android:text=“粉丝”

android:textColor=“@color/jimeng_text_quarternary_light”

android:textSize=“@dimen/jimeng_dp_12”

android:textStyle=“bold” />

<TextView

android:id=“@id/new_fans_tip”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_marginLeft=“3.0dip”

android:layout_marginBottom=“3.0dip”

android:layout_toRightOf=“@id/user_fans_num”

android:text=“+0”

android:textColor=“@color/jimeng_red_light”

android:textSize=“10.0dip”

android:visibility=“gone” />

<LinearLayout

android:id=“@id/user_fav_num”

android:layout_width=“0.0dip”

android:layout_height=“fill_parent”

android:layout_weight=“1.0”

android:gravity=“center”

android:orientation=“vertical”>

<TextView

android:id=“@id/user_tv_recommend_num”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:text=“1024”

android:textColor=“@color/jimeng_text_primary_light”

android:textSize=“@dimen/jimeng_dp_17”

android:textStyle=“bold” />

<TextView

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_marginTop=“@dimen/jimeng_dp_2”

android:text=“推荐”

android:textColor=“@color/jimeng_text_quarternary_light”

android:textSize=“@dimen/jimeng_dp_12”

android:textStyle=“bold” />

效果图

在这里插入图片描述

3.user_profile_mylove_collect.xml(第三个模块)


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

<LinearLayout

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

android:background=“@drawable/user_profile_background_like”

android:layout_height=“@dimen/jimeng_dp_56”

android:layout_marginLeft=“@dimen/jimeng_dp_16”

android:layout_marginRight=“@dimen/jimeng_dp_16”

android:layout_width=“fill_parent”

最后

答应大伙的备战金三银四,大厂面试真题来啦!

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

《960全网最全Android开发笔记》

《379页Android开发面试宝典》

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

如何使用它?
1.可以通过目录索引直接翻看需要的知识点,查漏补缺。
2.五角星数表示面试问到的频率,代表重要推荐指数

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

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

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

腾讯、字节跳动、阿里、百度等BAT大厂 2020-2021面试真题解析

资料收集不易,如果大家喜欢这篇文章,或者对你有帮助不妨多多点赞转发关注哦。文章会持续更新的。绝对干货!!!
《Android学习笔记总结+移动架构视频+大厂面试真题+项目实战源码》点击传送门,即可获取!
出的知识点会大大增加通过前两轮技术面试的几率。

如何使用它?
1.可以通过目录索引直接翻看需要的知识点,查漏补缺。
2.五角星数表示面试问到的频率,代表重要推荐指数

[外链图片转存中…(img-Y7Etv1qx-1714711413962)]

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

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

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

[外链图片转存中…(img-4N5gtIWx-1714711413963)]

腾讯、字节跳动、阿里、百度等BAT大厂 2020-2021面试真题解析

[外链图片转存中…(img-aNMmDDMe-1714711413964)]

资料收集不易,如果大家喜欢这篇文章,或者对你有帮助不妨多多点赞转发关注哦。文章会持续更新的。绝对干货!!!
《Android学习笔记总结+移动架构视频+大厂面试真题+项目实战源码》点击传送门,即可获取!

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值