コード例 #1
0
        public override Android.Views.View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle p2)
        {
            mRootView = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_session_detail, null);
            mTabHost  = mRootView.FindViewById <TabHost> (Android.Resource.Id.TabHost);
            mTabHost.Setup();

            mTitle    = mRootView.FindViewById <TextView> (Resource.Id.session_title);
            mSubtitle = mRootView.FindViewById <TextView> (Resource.Id.session_subtitle);
            mStarred  = mRootView.FindViewById <CompoundButton> (Resource.Id.star_button);


            mStarred.CheckedChange += HandleCheckedChange;
            mStarred.Focusable      = true;
            mStarred.Clickable      = true;

            // Larger target triggers star toggle
            View starParent = mRootView.FindViewById <View> (Resource.Id.header_session);

            FractionalTouchDelegate.SetupDelegate(starParent, mStarred, new RectF(0.6f, 0f, 1f, 0.8f));

            mAbstract     = mRootView.FindViewById <TextView> (Resource.Id.session_abstract);
            mRequirements = mRootView.FindViewById <TextView> (Resource.Id.session_requirements);

            SetupSummaryTab();
            SetupNotesTab();
            SetupLinksTab();

            return(mRootView);
        }
コード例 #2
0
        public override Android.Views.View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle p2)
        {
            mRootView = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_vendor_detail, null);
            mName     = mRootView.FindViewById <TextView> (Resource.Id.vendor_name);
            mStarred  = mRootView.FindViewById <CompoundButton> (Resource.Id.star_button);

            mStarred.Focusable = true;
            mStarred.Clickable = true;

            // Larger target triggers star toggle
            View starParent = mRootView.FindViewById(Resource.Id.header_vendor);

            FractionalTouchDelegate.SetupDelegate(starParent, mStarred, new RectF(0.6f, 0f, 1f, 0.8f));

            mLogo        = mRootView.FindViewById <ImageView> (Resource.Id.vendor_logo);
            mUrl         = mRootView.FindViewById <TextView> (Resource.Id.vendor_url);
            mDesc        = mRootView.FindViewById <TextView> (Resource.Id.vendor_desc);
            mProductDesc = mRootView.FindViewById <TextView> (Resource.Id.vendor_product_desc);

            return(mRootView);
        }