@@ -379,7 +379,7 @@ defaultConfig {
379
379
//4.显示依旧报错,但编译可以通过。
380
380
```
381
381
* View类中的getDrawingCache()等一系列方法可以用于获取View显示的Bitmap对象。
382
- * ouchSlop ,系统所能识别出的被认为是最小的滑动距离,ViewConfiguration.get(context).getScaledTouchSlop()。常用于自定义View。
382
+ * TouchSlop ,系统所能识别出的被认为是最小的滑动距离,ViewConfiguration.get(context).getScaledTouchSlop()。常用于自定义View。
383
383
* Context的作用域</br >
384
384
![ ] ( https://github.com/RealMoMo/Android-Tips/blob/master/img/context.png )
385
385
* 修改Toast字体大小。
@@ -432,6 +432,51 @@ SparseBooleanArray 替代 HashMap<Integer,Boolean> </br>
432
432
SparseIntArray 替代 HashMap<Integer,Integer> </br >
433
433
SparseLongArray 替代 HashMap<Integer,Long> </br >
434
434
LongSparseArray<V > 替代 HashMap<Long,V> </br >
435
+ * UncaughtExceptionHandler接口,利用此接口可以对未捕获的异常善后。
436
+ * ValueAnimator.reverse() 这个方法可以很顺利地取消正在运行的动画。
437
+ * ViewParent.requestDisallowInterceptTouchEvent()——Android系统触摸事件机制大多时候能够默认处理,不过有时候你需要使用这个方法来剥夺父级控件的控制权。
438
+ * 设置布局动画属性android: animateLayoutChanges ="true",需要更炫的可以自定义动画添加android: layoutAnimation ="@anim /your_animation"。
439
+ ```
440
+ <!--Button点击事件只是对TextView.setVisibility-->
441
+ <!--开启布局默认动画-->
442
+ <LinearLayout
443
+ android:animateLayoutChanges="true"
444
+ android:layout_width="match_parent"
445
+ android:layout_height="200dp">
446
+
447
+ <TextView
448
+ android:text="666"
449
+ android:id="@+id/tv1"
450
+ android:layout_width="wrap_content"
451
+ android:layout_height="wrap_content" />
452
+
453
+ <Button
454
+ android:text="with Animation"
455
+ android:onClick="one"
456
+ android:layout_width="wrap_content"
457
+ android:layout_height="wrap_content" />
458
+ </LinearLayout>
459
+
460
+
461
+ <LinearLayout
462
+
463
+ android:layout_width="match_parent"
464
+ android:layout_height="200dp">
465
+
466
+ <TextView
467
+ android:text="666"
468
+ android:id="@+id/tv2"
469
+ android:layout_width="wrap_content"
470
+ android:layout_height="wrap_content" />
471
+
472
+ <Button
473
+ android:text="none Animation"
474
+ android:onClick="two"
475
+ android:layout_width="wrap_content"
476
+ android:layout_height="wrap_content" />
477
+ </LinearLayout>
478
+ ```
479
+ ![ ] ( https://github.com/RealMoMo/Android-Tips/blob/master/img/animateLayoutChanges.gif )
435
480
436
481
437
482
### Development tools
0 commit comments