alwaystest / Blog

24 stars 2 forks source link

杂七杂八的一些记录 #55

Open alwaystest opened 7 years ago

alwaystest commented 7 years ago

Android requestLayout

标签(空格分隔): Android Layout


  1. EditText在ScrollView中,在Focus状态,滑出可视范围。
  2. 调用requestLayout的时候
  3. 会自动ScrollTo到这个EditText处。

FloatingActionButton取消layoutDependsOnSnackBar

Support 24.2.0 中:

CoordinatorLayout now supports defining inset views, and specifying that other views should dodge the inset views. This allows apps to replicate behavior patterns similar to the way FloatingActionButton moves out of the way of a Snackbar, but for any arbitrary view children. For more information, see the LayoutParams.insetEdge and LayoutParams.dodgeInsetEdges reference documentation.

FloatingActionButton默认的Behavior没有layoutDepends,但是实现了根据Anchor是AppBarLayoutBottomSheet时的UpdateVisibility方法。是在android.support.design.widget.CoordinatorLayout#offsetChildToAnchor中直接调用b.onDependentViewChanged(this, child, lp.mAnchorView);来起作用的。


Android Module 依赖库版本冲突

IndexableRecyclerView的build.gradle中看到一个声明依赖的关键字provided 'com.xxx.xxx:xxx'

这样就可以解决大部分的依赖Lib版本冲突的问题了。


Android 无障碍功能打开会导致SnackBar动画消失。