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

《Android学习笔记总结+最新移动架构视频+大厂安卓面试真题+项目实战源码讲义》

完整开源地址:https://docs.qq.com/doc/DSkNLaERkbnFoS0ZF

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

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


计蒙创作不易,未入驻的其他平台搬运请按协议规则搬运。

文章目录

  • 文章目录

  • 前言(大佬请直接跳转至第三步)

  • 一、先看看实现的效果

  • 二、实现前准备(简单讲解以及辅助文件代码,以及取名借鉴规范)

    • 1.莫大厂规范(为例)
  • 2.dimens.xml文件内容(此案例可用)

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

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

  • 5.strings.xml文件内容(此案例可用)

  • 三、实现

  • 四、注意

  • 五、使用

  • 总结


前言(大佬请直接跳转至第三步)

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

计蒙从上班再次回到学校生活后,认识的很多学校软件系朋友通过校招拿到了大厂Android开发岗位的offer,计蒙因为学习是专科起点,到本科后算法部分缺陷极大,仅拿到一家大厂offer,由于个人好不容易回到校园生活,不想太早再次回到上班的日子,于是继续准备升学,为了不将Android遗忘,还是偶尔写写代码,也就有了此文章。


以下是本篇文章正文内容

一、先看看实现的效果

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

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

二、实现前准备(简单讲解以及辅助文件代码,以及取名借鉴规范)

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

1.莫大厂规范(为例)


在这里插入图片描述

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


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

0.0dip

0.5dip

1.0dip

10.0dip

100.0dip

11.0dip

115.0dip

12.0dip

120.0dip

123.0dip

13.0dip

135.0dip

14.0dip

140.0dip

15.0dip

16.0dip

169.0dip

17.0dip

18.0dip

183.0dip

2.0dip

20.0dip

22.0dip

225.0dip

24.0dip

246.0dip

250.0dip

28.0dip

280.0dip

30.0dip

32.0dip

34.0dip

375.0dip

38.0dip

4.0dip

40.0dip

43.0dip

44.0dip

45.0dip

46.0dip

48.0dip

49.0dip

5.0dip

50.0dip

54.0dip

55.0dip

56.0dip

58.0dip

6.0dip

60.0dip

64.0dip

65.0dip

68.0dip

7.0dip

70.0dip

75.0dip

76.0dip

8.0dip

84.0dip

86.0dip

90.0dip

1.0px

10.0dip

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


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


#ffffffff

@color/jimeng_background_primary_light

#ff2e2e2e

@color/jimeng_text_primary_light

#ffff6c93

5.strings.xml文件内容(此案例可用)


收到的喜欢

评论

聊天

通知

帮助与反馈

提问箱

草稿箱

足迹

三、实现

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

<?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”

android:id=“@id/user_profile_all_msg_layout”

android:layout_width=“fill_parent”

android:layout_height=“wrap_content”

android:layout_marginTop=“@dimen/jimeng_dp_16”

android:orientation=“vertical”>

<LinearLayout

android:id=“@id/ll_msg_layout1”

android:layout_width=“fill_parent”

android:layout_height=“wrap_content”

android:layout_marginLeft=“@dimen/jimeng_dp_16”

android:layout_marginRight=“@dimen/jimeng_dp_16”

android:background=“@color/jimeng_white”

android:orientation=“horizontal”>

<RelativeLayout

android:id=“@id/my_msg_like”

android:layout_width=“0.0dip”

android:layout_height=“wrap_content”

android:layout_weight=“1.0”

android:orientation=“vertical”>

<TextView

android:id=“@id/like_txt”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_below=“@id/like_icon”

android:layout_centerHorizontal=“true”

android:text=“@string/str_they_like_me”

android:textColor=“@color/jimeng_black”

android:textSize=“12.0dip” />

<ImageView

android:id=“@id/like_icon”

android:layout_width=“44.0dip”

android:layout_height=“44.0dip”

android:layout_alignParentTop=“true”

android:layout_centerHorizontal=“true”

android:scaleType=“centerCrop”

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

<TextView

android:id=“@id/like_num”

android:layout_width=“wrap_content”

android:layout_height=“18.0dip”

android:layout_alignLeft=“@id/like_icon”

android:layout_marginLeft=“26.0dip”

android:background=“@drawable/profile_notification_count_bg”

android:gravity=“center”

android:paddingLeft=“6.0dip”

android:paddingRight=“6.0dip”

android:text=“11”

android:textColor=“@color/white”

android:textSize=“10.0dip”

android:visibility=“gone” />

<RelativeLayout

android:id=“@id/my_msg_comment”

android:layout_width=“0.0dip”

android:layout_height=“wrap_content”

android:layout_weight=“1.0”

android:orientation=“vertical”>

<TextView

android:id=“@id/comment_txt”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_below=“@id/comment_icon”

android:layout_centerHorizontal=“true”

android:text=“@string/str_comment”

android:textColor=“@color/jimeng_black”

android:textSize=“12.0dip” />

<ImageView

android:id=“@id/comment_icon”

android:layout_width=“44.0dip”

android:layout_height=“44.0dip”

android:layout_alignParentTop=“true”

android:layout_centerHorizontal=“true”

android:scaleType=“centerCrop”

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

<TextView

android:id=“@id/comment_num”

android:layout_width=“wrap_content”

android:layout_height=“18.0dip”

android:layout_alignLeft=“@id/comment_icon”

android:layout_marginLeft=“26.0dip”

android:background=“@drawable/profile_notification_count_bg”

android:gravity=“center”

android:paddingLeft=“6.0dip”

android:paddingRight=“6.0dip”

android:text=“999+”

android:textColor=“@color/white”

android:textSize=“10.0dip”

android:visibility=“gone” />

<RelativeLayout

android:id=“@id/my_msg_chat”

android:layout_width=“0.0dip”

android:layout_height=“wrap_content”

android:layout_weight=“1.0”

android:orientation=“vertical”>

<TextView

android:id=“@id/chat_txt”

android:layout_width=“wrap_content”

android:layout_height=“wrap_content”

android:layout_below=“@id/chat_icon”

android:layout_centerHorizontal=“true”

android:text=“@string/str_chat”

android:textColor=“@color/jimeng_black”

android:textSize=“12.0dip” />

<ImageView

android:id=“@id/chat_icon”

android:layout_width=“44.0dip”

android:layout_height=“44.0dip”

android:layout_alignParentTop=“true”

android:layout_centerHorizontal=“true”

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

<TextView

android:id=“@id/chat_num”

android:layout_width=“wrap_content”

android:layout_height=“18.0dip”

android:layout_alignLeft=“@id/chat_icon”

android:layout_marginLeft=“26.0dip”

android:background=“@drawable/profile_notification_count_bg”

android:gravity=“center”

android:paddingLeft=“6.0dip”

android:paddingRight=“6.0dip”

android:text=“999+”

android:textColor=“@color/white”

android:textSize=“10.0dip”

android:visibility=“gone” />

<RelativeLayout

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值