public SphereLayout(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.SphereLayout);
mRadius = a.getDimensionPixelSize(R.styleable.SphereLayout_radius, 0);//球体半径
mOrientation = a.getInt(R.styleable.SphereLayout_snapOrientation, HORIZONTAL);//标记位于背面的视图是以Y轴水平翻转到达正面 或是以X轴竖直翻转可到达正面
mHideBack = a.getBoolean(R.styleable.SphereLayout_hideBack, false);//是否隐藏处在背面的布局
a.recycle();
mCenter = new Point();
mCamera = new Camera();
mDependencyOffset = new int[2];
//mCamera.setLocation(0, 0, -20);
mMatrix = new Matrix();
mPositiveChildren = new ArrayList<>();//depth为正的childview集合
mNegativeChildren = new ArrayList<>();//depth为负的childview集合
mDensity = getResources().getDisplayMetrics().density;
}
SphereLayout.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:SphereLayout
作者:
评论列表
文章目录