android 微信缩小通话界面_安卓如何做出微信那样的界面仿微信“我”的界面2/5...
生活随笔
收集整理的這篇文章主要介紹了
android 微信缩小通话界面_安卓如何做出微信那样的界面仿微信“我”的界面2/5...
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
本系列目標
通過安卓編程仿寫微信“我”的界面,讓大家也能做出類似微信界面.效果圖如下:
本文目標
做出支付部分(其他部分在后續文章中逐步分享).效果圖如下:
實現方案
通過截圖工具或者下載一張微信支付照片,放到工程的src/main/res/drawable目錄下,命名為pay.png;同樣獲取一張向右的箭頭,命名為right_arrow.png;
添加一個線性布局(LinearLayout,從左到右排列);
加入一個圖片控件,設置圖片為微信支付圖片;
加入一個文本控件(TextView),內容為:支付,盡可能占滿水平方向上空間.
加入一個圖片控件,設置圖片為向右的箭頭.
實現方案圖:
代碼:
<LinearLayoutandroid:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="8dp"
android:background="#FFFFFF"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="39dp"
android:layout_height="22dp"
android:layout_marginEnd="10dp"
android:src="@drawable/pay" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_weight="1"
android:text="支付"
android:textColor="#18191A" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:src="@drawable/right_arrow" />
LinearLayout>
工程截圖
完整源代碼
https://gitee.com/cxyzy1/android_ui_development/tree/master/wechatDemo
總結
以上是生活随笔為你收集整理的android 微信缩小通话界面_安卓如何做出微信那样的界面仿微信“我”的界面2/5...的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: PLSQL注册码,亲测,可用
- 下一篇: java学习(4):第一个java程序