zoukankan      html  css  js  c++  java
  • 怎么做QQ、微信等消息气泡

    主XML:

     1 <?xml version="1.0" encoding="utf-8"?>
     2 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     3     android:layout_width="wrap_content"
     4     android:layout_height="wrap_content" >
     5 
     6     <ImageView
     7         android:layout_width="wrap_content"
     8         android:layout_height="wrap_content"
     9         android:layout_margin="10dp"
    10         android:background="@drawable/round"
    11         android:src="@drawable/ic_launcher" />
    12 
    13     <TextView
    14         android:layout_width="wrap_content"
    15         android:layout_height="wrap_content"
    16         android:layout_gravity="right"
    17         android:layout_margin="3dp"
    18         android:background="@drawable/smallyuan"
    19         android:text="10"
    20         android:textColor="@android:color/white" />
    21 
    22 </FrameLayout>

    橘黄色的圆圈:

     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <shape xmlns:android="http://schemas.android.com/apk/res/android" 
     3     android:shape="oval"
     4     android:useLevel="false">
     5     
     6     <!-- 背景填充颜色值 -->
     7     <solid android:color="#FFA500" />
     8 
     9     <!-- radius值越大,越趋于圆形 -->
    10     <corners android:radius="20dip" />
    11 
    12     <!-- 圆角图像内部填充四周的大小 ,将会以此挤压内部布置的view -->
    13     <padding
    14         android:bottom="3dip"
    15         android:left="3dip"
    16         android:right="3dip"
    17         android:top="3dip" />
    18 
    19 </shape>

    上方气泡圆圈:

     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <shape xmlns:android="http://schemas.android.com/apk/res/android"
     3     android:shape="oval"
     4     android:useLevel="false" >
     5 
     6     <!-- 背景填充颜色值 -->
     7     <solid android:color="#FF0000" />
     8 
     9     <!-- radius值越大,越趋于圆形 -->
    10     <corners android:radius="20dip" />
    11 
    12     <!-- 圆角图像内部填充四周的大小 ,将会以此挤压内部布置的view -->
    13     <padding
    14         android:bottom="3dip"
    15         android:left="3dip"
    16         android:right="3dip"
    17         android:top="3dip" />
    18 
    19 </shape>
  • 相关阅读:
    sqlserver中函数和存储过程的区别
    sql 经典面试题
    sqlserver 时间处理函数
    在GROUP BY中"做文章"(五种中简答方法!)
    SQL 非等价连接
    GROUP BY 两个字段(或者多个字段的时候)
    WCF-错误集合001
    DOM
    DOM的排他功能及显示隐藏功能
    预解析
  • 原文地址:https://www.cnblogs.com/zzw1994/p/4950706.html
Copyright © 2011-2022 走看看