代码拉取完成,页面将自动刷新
本项目是基于开源项目RelativePopupWindow进行ohos化的移植和开发,可以通过项目标签以及github地址(https://github.com/kakajika/RelativePopupWindow )追踪到原项目版本
方法1.
repositories {
flatDir { dirs 'libs' }
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
implementation(name: 'RelativePopupWindow', ext: 'har')
....
}
方法2.
repositories {
maven {
url 'http://106.15.92.248:8081/repository/Releases/'
}
}
dependencies {
Implementation 'com.labo.kaji.ohos:relativepopupwindow:1.0.0'
}
Component content = LayoutScatter.getInstance(MainAbilitySlice.this).parse(ResourceTable.Layout_popup, null, false);
RelativePopupWindow popupWindow = new RelativePopupWindow(MainAbilitySlice.this, content, width, height);
popupWindow.setCustomComponent(content);
popupWindow.setBackColor(Color.TRANSPARENT);
popupWindow.setAutoClosable(true);
popupWindow.showOnAnchor(component, RelativePopupWindow.VerticalPosition.ABOVE, RelativePopupWindow.HorizontalPosition.LEFT, false);
支持:
相对于控件显示dialog,自由设置宽高。
不支持:
fit in screen相对于屏幕显示。
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。