- 博客(4)
- 资源 (2)
- 收藏
- 关注
原创 recyclerview左滑删除item
1.新建文件 SwipeItemLayout.kt import android.content.Context;import android.util.AttributeSet;import android.util.Log;import android.view.MotionEvent;import android.view.VelocityTracker;import ...
2019-03-20 16:22:47 498
原创 LiveData使用 navigation中activity fragment共享数据
使用LifeData需要添加依赖 // ViewModel and LiveData implementation "android.arch.lifecycle:extensions:1.1.1" // alternatively, just ViewModel implementation "android.arch.lifecycle:viewmodel...
2019-03-16 16:06:39 1371
原创 nestscrollview 嵌套两个recyclerview,recyclerview抢焦点会自己定位的问题
在nestscrollview添加一行android:focusableInTouchMode="true"然后在nestscrollview的下一层布局添加 (是在scrollview的子节点,而不是recyclerview)android:descendantFocusability="blocksDescendants"如果scrollview有edittext,可能ed...
2019-03-06 19:01:15 517
原创 动态添加radioButton ,改变字体选中颜色
java代码中动态添加radioButton,要改变字体选中颜色,调用getColor是没效果的需要用getColorStateList(), selector_focus_condition是一个selectorradioBtn.setTextColor(ContextCompat.getColorStateList(context!!, R.color.selector_focu...
2019-03-06 18:19:55 1471
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人