
androidUI
克罗地亚狂想曲
Human is great,because they can use fire
展开
-
android自带的icon矢量图
原创 2020-06-04 19:45:38 · 1457 阅读 · 0 评论 -
VelocityTracker 滑动速度跟踪器 简介
简介可以用来监听手指移动改变的速度,一般用于滑动事件常用方法mVelocityTracker.obtain(); //创建mVelocityTracker.addMovement(event); //传入event事件mVelocityTracker.computeCurrentVelocity(1000); //计算滑动速度,传入速度的单位。值为1表示每毫秒像素数,1000表示每秒像素数mVelocityTracker.getXVelocity(); //X轴滑动速度m.原创 2020-06-03 17:10:00 · 869 阅读 · 0 评论 -
android 开源库 AndroidSlidingUpPanel 简单使用
1 简介AndroidSlidingUpPanel 可向上拖动的view官方展示:2 使用2.1 添加依赖repositories { mavenCentral()}implementation 'com.sothree.slidinguppanel:library:3.4.0'2.2 用法com.sothree.slidinguppanel.SlidingUpPanelLayout作为根布局。 根布局必须gravity设置为top或botto...原创 2020-05-23 01:35:57 · 1363 阅读 · 0 评论 -
约束布局ConstraintLayout
目录1.介绍 2.为什么要用ConstraintLayout 3.如何使用ConstraintLayout 3.1 添加依赖 3.2 相对定位 3.3 角度定位 3.4 边距 3.5 居中和偏移 3.6 尺寸约束 3.7 链 4.辅助工具 4.1 Optimizer 4.2 Barrier 4.3 Group 4.4 Placeholder 4.5.Guideline 5.总结1.介绍约束布局ConstraintLayout 是一个ViewGroup,可以在Api9转载 2020-05-22 17:07:05 · 556 阅读 · 0 评论 -
coordinaryLayout简单使用
层叠布局,各个大厂的App使用率还是很高的布局:<?xml version="1.0" encoding="utf-8"?><androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android原创 2020-05-15 22:40:04 · 2890 阅读 · 0 评论 -
简单封装RecycleView
封装通用RecycleAdapterpackage com.example.selfview.adapter;import android.util.SparseArray;import android.view.View;import android.view.ViewGroup;import java.util.List;import androidx.annotation.IdRes;import androidx.annotation.NonNull;import and.原创 2020-05-15 22:22:01 · 230 阅读 · 0 评论