
Android bug
DawnYu9
这个作者很懒,什么都没留下…
展开
-
PopupWindow 滑动时背景失效bug
接手的代码中 PopupWindow 的布局是外面一个 LinearLayout , 内部嵌套一个 ListView ,根布局 LinearLayout 设置了 background 为气泡点九图。在 5.0 及以下手机没有问题,但是在 6.0 系统滑动时整个 PopupWindow 背景会变成透明,在 7.0 系统只是气泡背景变成透明,ListView 保留默认的白色背景(显示为矩形)。原创 2017-09-19 17:39:19 · 729 阅读 · 0 评论 -
Android 自定义 Dialog 布局设置高度 wrap_content 无效
在以前的一个 Dialog 的布局里加了几行内容后,发现内容总是显示不全,高度没有自适应,可是明明在 Dialog 的根布局设置了是高度 wrap_content。我的根布局是一个 LinearLayout,最下面一行内容是一个 RelativeLayout,RelativeLayout 的高度设为的 wrap_content,但是运行后高度被截断了,内容显示不全。后来把 RelativeLayo...原创 2018-05-30 16:52:44 · 7378 阅读 · 1 评论 -
Android ListView 中 item 设置固定高度无效
Android ListView 中 item 设置固定高度无效给 item 设置 minHeight 属性为指定的高度就可以了android:layout_width="match_parent"android:layout_height="70dp"android:minHeight="70dp" ...原创 2019-01-15 11:23:34 · 838 阅读 · 1 评论 -
【Android】ScrollView 嵌套 ListView 显示不全以及最后一个item显示不全的问题
1. ListView 数据只显示一条ScrollView 里直接嵌套 ListView 时,数据只能显示一条,通常会重写 ListView 的 onMeasure() 方法,也可以重新计算高度。1.1 ListView 中的 item 高度固定1.1.1 继承 ListView 重写 onMeasure() 方法@Overrideprotected void onMeasure(int...原创 2019-08-15 23:46:49 · 2062 阅读 · 0 评论 -
【Android】报错:Can't create handler inside thread that has not called Looper.prepare()
在项目一个回调接口里使用 new Handler() 时出现报错:java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()new Handler(Looper.getMainLooper()).post(new Runnable() { @Ove...原创 2019-09-03 10:46:27 · 5028 阅读 · 0 评论 -
【Android】org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed
项目更新代码后无法运行,会报如下错误:org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed; see the compiler error output for details.at com.android.build.gradle.tasks.factory.AndroidJ...原创 2019-10-11 20:09:55 · 1044 阅读 · 0 评论