https://github.com/dkmeteor/Bubble-Notification   感谢这位作者,本例子只是封装了一下源码

 

这是jar下载地址 下载之后只要引用就好。下面是一个最简单的Demo,先看布局文件

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:andro>
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="lyf.com.bubblenotificationdemo.Main2Activity">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginBottom="10dp"
        android:orientation="horizontal">
        <TextView
            android:text="推荐"
            android:layout_gravity="bottom"
            android:layout_weight="1"
            android:gravity="center"
            android:textSize="18sp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <TextView
            android:text="热播"
            android:layout_gravity="bottom"
            android:layout_weight="1"
            android:gravity="center"
            android:textSize="18sp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <TextView
            android:text="订阅"
            android:layout_gravity="bottom"
            android:layout_weight="1"
            android:gravity="center"
            android:textSize="18sp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <TextView
            android:text="消息"
            android:layout_gravity="bottom"
            android:layout_weight="1"
            android:gravity="center"
            android:textSize="18sp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    </LinearLayout>

    <com.dk.view.drop.WaterDrop
        android:id="@+id/waterdrop"
        android:layout_gravity="bottom|end"
        android:layout_width="25dp"
        android:layout_height="25dp"
        android:layout_marginRight="20dp"
        android:layout_marginBottom="30dp"
        android:gravity="center_vertical" />

</FrameLayout>
View Code

相关文章:

  • 2021-12-24
  • 2022-12-23
  • 2022-02-24
  • 2021-10-21
  • 2021-10-29
  • 2021-05-23
  • 2021-11-12
  • 2021-06-29
猜你喜欢
  • 2021-06-08
  • 2022-01-19
  • 2021-06-22
  • 2021-11-07
  • 2021-11-01
  • 2021-06-06
  • 2022-12-23
相关资源
相似解决方案