- 在View Layout完成后获取 控件大小
1 | final TextView tv = (TextView) findViewById(R.id.myTextView); |
- 关键帧插值器
1 | public static float calculateValue(float[] values, float time, float def) { |
- 给图片叠加渐变
1 | private void addShadow(Bitmap bitmap, int color) { |
- ListView 或者 GridView 去除滑动特性 (即固定高度)
1 |
|
- 获取系统长按时间,自定义View会用到
1 | getSystemLongPressTime |
- 判断设备是否有网
1 | public static boolean isOnline(Context context) { |