7 Star 0 Fork 1

Archermind-TI / HintPopupWindow

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

HintPopupWindow

简介

一个仿QQ的选项弹窗动画(PopupWindow自定义实现)

项目功能

  1. 仿QQ的选项弹窗,支持配置数据及数据对应的点击事件
  2. 显示和隐藏(动画效果)

演示效果

popwindow_demo2.gif

集成说明

在project的build.gradle中添加mavenCentral()的引用

repositories {   
 	...   
 	mavenCentral()   
	 ...           
 }

在entry的build.gradle中添加依赖

dependencies { 
... 
	implementation 'com.gitee.archermind-ti:hintpopupwindow:1.0.0-beta1'
... 
}

使用说明

  1. 实例化HintPopupWindow
 //下面的操作是初始化弹出数据
        ArrayList<String> strList = new ArrayList<>();
        strList.add("选项item1");
        strList.add("选项item2");
        strList.add("选项item3");

        ArrayList<Component.ClickedListener> clickList = new ArrayList<>();
        Component.ClickedListener clickListener = v -> new ToastDialog(this).setText("点击事件触发").show();
        clickList.add(clickListener);
        clickList.add(clickListener);
        clickList.add(clickListener);
        clickList.add(clickListener);
        
       HintPopupWindow hintPopupWindow = new HintPopupWindow(this, strList, clickList);
  1. 显示
Image imageView = (Image) findComponentById(ResourceTable.Id_imageView);
        imageView.setClickedListener(v -> {
            //弹出选项弹窗
            hintPopupWindow.showPopupWindow(v);
        });
  1. 判断是否正在显示
//true表示正在显示,false表示未显示
boolean isShow=hintPopupWindow.isShow();

编译说明

  1. 将项目通过git clone 至本地

  2. 使用DevEco Studio 打开该项目,然后等待Gradle 构建完成

  3. 点击Run运行即可(真机运行可能需要配置签名)

版权和许可信息

MIT License

Copyright (c) 2017 Zhaoss (838198688@qq.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

空文件

简介

一个仿QQ的选项弹窗动画(PopupWindow自定义实现) 展开 收起
Java
取消

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/archermind-ti/hintpopupwindow.git
git@gitee.com:archermind-ti/hintpopupwindow.git
archermind-ti
hintpopupwindow
HintPopupWindow
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891