public RectsView(Context context, IAttributeSet attrs, Bitmap[] bitmaps, Bitmap[] sbitmaps, Bitmap line, ShengDaoSelected shengDaoSelected) : base(context, attrs) { this.context = context; this.shengDaoSelected = shengDaoSelected; cacheBitMap = new Dictionary<Rect, Bitmap>(); mBitmaps = bitmaps; sBitmaps = sbitmaps; Line = line; mRect = new Rect[bitmaps.Length]; // ������λͼһ��λ�õ�Rect for (int i = 0; i < mRect.Length; i++) { mRect[i] = new Rect(0, 0, bitmaps[i].Width, bitmaps[i].Height); cacheBitMap.Add(mRect[i], mBitmaps[i]); } }
/// <summary> /// ��ʼ��View /// </summary> private void IntiView() { txtTitle = FindViewById<TextView>(Resource.Id.txtTitle); glShengList = FindViewById<GridLayout>(Resource.Id.glShengList); imgPeople = FindViewById<ImageView>(Resource.Id.imgPeople); imgStar1 = FindViewById<ImageView>(Resource.Id.imgStar1); imgStar2 = FindViewById<ImageView>(Resource.Id.imgStar2); imgStar3 = FindViewById<ImageView>(Resource.Id.imgStar3); //����ʡ��ѡ���¼� shengDaoSelected = new ShengDaoSelected(this); shengDaoSelected.ImgPeople = FindViewById<ImageView>(Resource.Id.imgPeople); shengDaoSelected.ImgRectShow = FindViewById<ImageView>(Resource.Id.imgRectShow); shengDaoSelected.LLRectShow = FindViewById<LinearLayout>(Resource.Id.llRectShow); //�˳� imgQuit = FindViewById<ImageView>(Resource.Id.imgQuit); //����������� llRects = FindViewById<LinearLayout>(Resource.Id.llRects); }