温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

大数据中仿照qq界面接收短信的界面效果图的示例代码怎么写

发布时间:2022-01-12 10:46:10 来源:亿速云 阅读:115 作者:柒染 栏目:移动开发


这篇文章跟大家分析一下“仿照qq界面接收短信的界面效果图的示例代码怎么写”。内容详细易懂,对“仿照qq界面接收短信的界面效果图的示例代码怎么写”感兴趣的朋友可以跟着小编的思路慢慢深入来阅读一下,希望阅读后能够对大家有所帮助。下面跟着小编一起深入学习“仿照qq界面接收短信的界面效果图的示例代码怎么写”的知识吧。

我这个布局主要采用Relativelayout实现的,因为RelativeLayou是一个用于设计用户界面的强大工具,因为它能消除嵌套视图组和保持我们布局为扁平结构,这可以提高运行时性能。如果我们采用了多个嵌套的LinearLayout组,我们应该采用一个单独的RelativeLayout来替代。

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

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

    android:layout_width="match_parent"

    android:layout_height="wrap_content"

    android:background="@color/color_white"

    android:orientation="vertical" >

    <ImageView

        android:id="@+id/img_head_portrait"

        android:layout_width="60dp"

        android:layout_height="60dp"

        android:layout_margin="@dimen/ten"

        android:src="@drawable/pic_avatar_tom3" />

    <TextView

        android:id="@+id/txt_name"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_marginTop="@dimen/ten"

        android:layout_toRightOf="@+id/img_head_portrait"

        android:text="@string/liuqiangdong"

        android:textColor="@color/color_dark_black"

        android:textSize="@dimen/fifteen" />

    <TextView

        android:id="@+id/txt_talk_content"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_below="@+id/txt_name"

        android:layout_marginTop="@dimen/fifteen"

        android:layout_toRightOf="@+id/img_head_portrait"

        android:text="刘强东投资人约谈"

        android:textColor="@color/color_search" />

    <TextView

        android:id="@+id/txt_talk_time"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_alignParentRight="true"

        android:layout_marginRight="@dimen/ten"

        android:layout_marginTop="@dimen/ten"

        android:text="11:10"

        android:textColor="@color/color_search" />

    <TextView

        android:id="@+id/txt_talk_num"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_alignParentRight="true"

        android:layout_below="@+id/txt_talk_time"

        android:layout_marginRight="@dimen/ten"

        android:layout_marginTop="@dimen/ten"

        android:background="@drawable/ico_remind"

        android:text="1"

        android:gravity="center"

        android:textColor="@color/color_white" />

</RelativeLayout>

关于仿照qq界面接收短信的界面效果图的示例代码怎么写就分享到这里啦,希望上述内容能够让大家有所提升。如果想要学习更多知识,请大家多多留意小编的更新。谢谢大家关注一下亿速云网站!

向AI问一下细节
推荐阅读:
  1. 仿QQ界面
  2. qq登陆界面

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI