Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

初始化BubbleDialog,super(context)报错,java.lang.InstantiationException: java.lang.Class<com.android.internal.R$dimen> has no zero argument constructor #31

Closed
wuxiaoqiang625 opened this issue Apr 29, 2021 · 5 comments

Comments

@wuxiaoqiang625
Copy link

image

@wuxiaoqiang625
Copy link
Author

image
现目前 重新继承了, 把这个方法改了,就可以了

@xujiaji
Copy link
Owner

xujiaji commented Apr 29, 2021

重新提交了下代码,可以帮忙下载试试看能行了不?

@wuxiaoqiang625
Copy link
Author

我这边可以

@xujiaji
Copy link
Owner

xujiaji commented May 11, 2021

线上版本已更新

repositories {
  mavenCentral()
}

dependencies {
  implementation 'com.github.xujiaji:happy-bubble:1.2.4'
}

@xujiaji xujiaji closed this as completed May 11, 2021
@y110231
Copy link
Contributor

y110231 commented Nov 2, 2021

这个状态栏的获取方法 如果配合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;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants