初始化BubbleDialog,super(context)报错,java.lang.InstantiationException: java.lang.Class<com.android.internal.R$dimen> has no zero argument constructor
wuxiaoqiang625 opened this issue · 5 comments
wuxiaoqiang625 commented
wuxiaoqiang625 commented
xujiaji commented
重新提交了下代码,可以帮忙下载试试看能行了不?
wuxiaoqiang625 commented
我这边可以
xujiaji commented
线上版本已更新
repositories {
mavenCentral()
}
dependencies {
implementation 'com.github.xujiaji:happy-bubble:1.2.4'
}
y110231 commented
这个状态栏的获取方法 如果配合me.jessyan:autosize:1.2.1 全局适配用的话 有些屏幕的手机(1080*1919)会造成气泡上移4dp 现在换成这种状态栏方法 正常
/**
* 通过Activity的内容距离顶部高度来获取状态栏高度,该方法获取需要在onWindowFocusChanged回调之后
*
* @param activity
* @return
*/
public static int getStatusBarByTop(Activity activity) {
Rect rect = new Rect();
Window window = activity.getWindow();
window.getDecorView().getWindowVisibleDisplayFrame(rect);
return rect.top;
}