Android 常用API
2015-09-07 15:58
316 查看
1、onItemClick
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) 各项的意义:arg1是当前item的view,通过它可以获得该项中的各个组件。 例如arg1.textview.settext("asd"); arg2是当前item的ID。这个id根据你在适配器中的写法可以自己定义。 arg3是当前的item在listView中的相对位置!
2、shader
/** Create a shader that draws a radial gradient given the center and radius.@param centerX The x-coordinate of the center of the radius
@param centerY The y-coordinate of the center of the radius
@param radius Must be positive. The radius of the circle for this gradient
@param centerColor The color at the center of the circle.
@param edgeColor The color at the edge of the circle.
@param tileMode The Shader tiling mode
*/
public RadialGradient(float centerX, float centerY, float radius,
int centerColor, int edgeColor, @NonNull TileMode tileMode) {
if (radius <= 0) {
throw new IllegalArgumentException("radius must be > 0");
}
mType = TYPE_COLOR_CENTER_AND_COLOR_EDGE;
mX = centerX;
mY = centerY;
mRadius = radius;
mCenterColor = centerColor;
mEdgeColor = edgeColor;
mTileMode = tileMode;
init(nativeCreate2(centerX, centerY, radius, centerColor, edgeColor, tileMode.nativeInt));
}
相关文章推荐
- android中自定义View设置属性
- 正确使用SQLCipher来加密Android数据库
- Android内存泄露案例分析
- Android短信接口开发经验及具体开发实现
- Android 布局文件中出现两个framelayout布局重叠,如何让下层不响应事件
- Android Studio使用笔记
- android 全局activity跳转动画(自右向左)
- android shape属性及使用说明
- android:layout_gravity和android:gravity属性的区别
- Android大图片裁剪终极解决方案(上:原理分析)
- Android自定义ListView实现分页加载
- Android studio 多渠道打包
- 手机报错:android.view.InflateException: Binary XML file line
- Android百分比布局使用小坑一个
- ArcGIS for Android地图去除水印
- Android View.onMeasure方法的理解
- android自动化工具之--Monkey命令介绍
- Android Studio 中文乱码问题
- android binder
- Android Framework 记录之一