- 博客(6)
- 收藏
- 关注
原创 dialog在activity销毁时崩溃
问题代码:java.lang.IllegalArgumentException: View not attached to window manager at android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:425) at android.view.WindowManagerGlobal.remov...
2019-04-19 17:59:59
1341
原创 android:自定义dialog高度问题
自定义dialog高度无法通过xml重设解决办法:dialog.show(); WindowManager m1 = this.getWindowManager(); int height = ll_dialog.getMeasuredHeight(); WindowManager.LayoutParams params = dialog.getWi...
2019-02-26 17:02:20
3064
1
原创 不同类之间onTouch的传递
@SuppressLint(“ClickableViewAccessibility”)public boolean onTouchEvent(MotionEvent event){}this.setOnTouchListener(this);@Overridepublic boolean onTouch(View v, MotionEvent event) {}onTouchLis...
2019-01-17 15:49:22
185
原创 布局的居中
首先要分两种不同情况,在两种不同的布局方式下:LinearLayout 和RelativeLayout1.LinearLayouta). android:layout_gravity="center_horizontal"表示该布局在父布局里水平居中,此时其父布局必须拥有android:orientation="vertical"属性;b). android:layout_gravity="...
2019-01-17 15:36:31
189
原创 as旧版本与新版本兼容问题
as旧版本与新版本兼容问题配置http取代httpsrepositories { maven{ url'http://maven.aliyun.com/nexus/content/groups/public/' } maven{ url'http://maven.aliyun.com/nexus/content/repositories/jcenter'} googl...
2019-01-17 10:39:06
488
原创 Android Studio一直不停Indexing
问题:Android Studio一直不停Indexing即频繁Indexing,而不是一直Indexing.解决办法:File–> Invalidate Caches/Restart–> Invalidate and Restart.做的记录:怕忘记...
2019-01-17 10:36:00
509
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人