zoukankan      html  css  js  c++  java
  • BubblePopupWindow

    Android 实现各个方向的气泡弹窗,可控制气泡尖角偏移量。

    https://github.com/smuyyh/BubblePopupWindow

    截图

    使用:

    BubblePopupWindow leftTopWindow = new BubblePopupWindow(MainActivity.this);
    View bubbleView = inflater.inflate(R.layout.layout_popup_view, null);
    TextView tvContent = (TextView) bubbleView.findViewById(R.id.tvContent);
    tvContent.setText("HelloWorld");
    leftTopWindow.setBubbleView(bubbleView); // 设置气泡内容
    leftTopWindow.show(view, Gravity.BOTTOM, 0); // 显示弹窗
    

    自定义弹窗 使用气泡布局:

    <?xml version="1.0" encoding="utf-8"?>
    <com.yuyh.library.BubbleRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:id="@+id/brlBackground"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@android:color/transparent"
        app:cornerRadius="10"
        app:halfBaseOfLeg="18dp"
        app:padding="18dp"
        app:shadowColor="#64000000"
        app:strokeWidth="5">
        
        <!-- add view  -->
    
    </com.yuyh.library.BubbleRelativeLayout>
    

      

  • 相关阅读:
    大三寒假生活19
    大三寒假生活18
    大三寒假生活17
    大三寒假生活16
    大三寒假生活15
    大三寒假生活14
    MySQL 字符集与比较规则
    Python ord & chr
    CentOS7 通过 devstack 安装 OpenStack
    Python *args & **kwargs
  • 原文地址:https://www.cnblogs.com/ganchuanpu/p/7602192.html
Copyright © 2011-2022 走看看