# HintPopupWindow_ohos **Repository Path**: fengrenjie/hint-popup-window_ohos ## Basic Information - **Project Name**: HintPopupWindow_ohos - **Description**: 一个仿QQ的选项弹窗动画(PopupWindow自定义实现) - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2021-05-31 - **Last Updated**: 2021-05-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # HintPopupWindow 本项目是基于开源项目HintPopupWindow进行openharmony的移植和开发的,可以通过项目标签以及github地址([https://github.com/Zhaoss/HintPopupWindow](https://github.com/Zhaoss/HintPopupWindow))追踪到原安卓项目版本。 ### 项目介绍 * 项目名称:HintPopupWindow(一个仿QQ的选项弹窗动画) * 所属系列:openharmony的第三方组件适配移植 * 功能:一个仿QQ的选项弹窗动画 * 项目移植状态:完成 * 调用差异:无 * 开发版本:SDK5,DevEco Studio 2.1 Beta 4 * 项目作者和维护人:冯仁杰 * 联系方式:fengrenjie@uniontech.com * 原项目Doc地址:[https://github.com/Zhaoss/HintPopupWindow](https://github.com/Zhaoss/HintPopupWindow) ### 项目介绍 * 编程语言:Java * 外部库依赖: 无 #### 演示效果 ![popwindow_demo2.gif](popwindow_demo2.gif) ### 安装教程 非三方库,请直接参考`HintPopupWindow`的使用方式 ### 使用说明 1. 实例化HintPopupWindow ```java //下面的操作是初始化弹出数据 ArrayList strList = new ArrayList<>(); strList.add("选项item1"); strList.add("选项item2"); strList.add("选项item3"); ArrayList 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); ``` 2. 显示 ```java Image imageView = (Image) findComponentById(ResourceTable.Id_imageView); imageView.setClickedListener(v -> { //弹出选项弹窗 hintPopupWindow.showPopupWindow(v); }); ``` 3. 判断是否正在显示 ```java //true表示正在显示,false表示未显示 boolean isShow=hintPopupWindow.isShow(); ``` #### Sample 示例代码在`entry` module 中。 ### 版本迭代 * v1.0.0 ### 版权和许可信息 ```MIT License 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. ```