回复
鸿蒙开源组件——气泡弹窗
jacksky
发布于 2021-8-17 17:44
浏览
0收藏
BubblePopupWindow
项目介绍
- 实现各个方向的气泡弹窗,可控制气泡尖角偏移量
安装教程
在entry的build.gradle中添加依赖
dependencies {
...
implementation 'com.gitee.archermind-ti:bubble-popup-window-ohos:1.0.0-beta'
...
}
截图
使用说明
- 默认弹窗
BubblePopupWindow leftTopWindow = new BubblePopupWindow(MainActivity.this); Component bubbleView = LayoutScatter.getInstance(getContext()).parse(ResourceTable.Layout_popup_layout,null,false); leftTopWindow = new BubblePopupWindow(MainAbilitySlice.this,null); leftTopWindow.setBubbleView(bubbleView); leftTopWindow.show(component, LayoutAlignment.BOTTOM);
<com.yuyh.library.BubbleRelativeLayout
ohos:height="match_content"
ohos:width="match_content"
app:cornerRadius="10"
app:halfBaseOfLeg="18vp"
app:padding="18vp"
app:shadowColor="#64000000"
app:strokeWidth="5"
ohos:center_in_parent="true"
ohos:background_element="$graphic:bubble">
<Text
ohos:height="match_content"
ohos:width="match_content"
ohos:text="欢迎欢迎"
ohos:text_size="20fp"
ohos:multiple_lines="true"
ohos:id="$+id:mytext"
/>
</com.yuyh.library.BubbleRelativeLayout>
版本迭代
- v1.0
版权和许可信息
bubble-popup-window-master.zip 166.35K 21次下载
已于2021-8-17 17:44:24修改
赞
收藏
回复
相关推荐