public override View OnCreateView (LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle)
		{
			var frame = (FrameLayout)layoutInflater.Inflate(Resource.Layout.zxingscannerfragmentlayout, null);

			var layoutParams = new LinearLayout.LayoutParams (ViewGroup.LayoutParams.FillParent, ViewGroup.LayoutParams.FillParent);
							
			try
			{
				scanner = new ZXingSurfaceView (this.Activity, ScanningOptions, callback);
				frame.AddView(scanner, layoutParams);


				if (!UseCustomView)
				{
					zxingOverlay = new ZxingOverlayView (this.Activity);
					zxingOverlay.TopText = TopText ?? "";
					zxingOverlay.BottomText = BottomText ?? "";

					frame.AddView (zxingOverlay, layoutParams);
				}
				else if (CustomOverlayView != null)
				{
					frame.AddView(CustomOverlayView, layoutParams);
				}
			}
			catch (Exception ex)
			{
				Console.WriteLine ("Create Surface View Failed: " + ex);
			}
			return frame;
		}
		public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			RadCalendarView calendarView = new RadCalendarView (Activity);
			calendarView.ScrollMode = ScrollMode.Stack;

			return calendarView;
		}
		public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			// Use this to return your custom view for this Fragment
			// return inflater.Inflate(Resource.Layout.YourFragment, container, false);

			//	  Lich hoc theo HK
			var rootView = inflater.Inflate (Resource.Layout.LichHoc_HK, container, false);
			isfirst = true;
			listView_HK = rootView.FindViewById<ListView> (Resource.Id.listLH);
			lbl_HK = rootView.FindViewById<TextView> (Resource.Id.lbl_HK_LH);
			lbl_NH = rootView.FindViewById<TextView> (Resource.Id.lbl_NH_LH);
			progress = rootView.FindViewById<ProgressBar> (Resource.Id.progressLH);
			linear = rootView.FindViewById<LinearLayout>(Resource.Id.linear_HK_LH);
			linearLH = rootView.FindViewById<LinearLayout>(Resource.Id.linearLH);
			txtNotify = rootView.FindViewById<TextView>(Resource.Id.txtNotify_LT_HK);
		//	radioGroup = rootView.FindViewById<RadioGroup>(Resource.Id.radioGroup1);
		    bundle=this.Arguments;
			check = bundle.GetBoolean ("Remind");
			autoupdate = bundle.GetBoolean ("AutoUpdateData");

			//load data

			LoadData_HK ();
		
			// row click
			listView_HK.ItemLongClick += listView_ItemClick;
						

			return rootView;
		}
		public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			// Use this to return your custom view for this Fragment
			var view = inflater.Inflate(Resource.Layout.HeaderFragmentLayout, container, false);
			var homeBtn = view.FindViewById<ImageView>(Resource.Id.HeaderLogo);
			var overlayBtn = view.FindViewById<ImageView>(Resource.Id.HeaderOverlay);
			var animIn = AnimationUtils.LoadAnimation(Activity.BaseContext, Resource.Animation.Overlay_animIn);

			homeBtn.Click += delegate
			{
				if (!(Activity is MainActivity))
				{
					var i = new Intent(Activity, typeof(MainActivity));
					i.AddFlags(ActivityFlags.NewTask | ActivityFlags.ClearTop);
					Activity.StartActivity(i);
				}
			};

			overlayBtn.Click += delegate
			{
				overlay.View.StartAnimation(animIn);
				overlay.Initialize();
				overlay.View.Visibility = ViewStates.Visible;
			};

			return view;
		}
        /// <inheritdoc/>
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ZTnTrace.Trace(MethodBase.GetCurrentMethod());

            var view = inflater.Inflate(Resource.Layout.Home, container, false);

            var careerListView = view.FindViewById<ListView>(Resource.Id.AccountsListView);
            careerListView.ItemClick += (sender, args) =>
            {
                var viewCareerIntent = new Intent(Activity, typeof(ViewCareerActivity));
                D3Context.Instance.BattleTag = args.View.FindViewById<TextView>(Android.Resource.Id.Text1)
                    .Text;
                D3Context.Instance.Host = args.View.FindViewById<TextView>(Android.Resource.Id.Text2)
                    .Text;
                StartActivity(viewCareerIntent);
            };

            D3Context.Instance.DbAccounts = new AccountsDB(Activity);
            cursor = D3Context.Instance.DbAccounts.GetAccounts();
            Activity.StartManagingCursor(cursor);

            IListAdapter accountsAdapter = new SimpleCursorAdapter(Activity, Android.Resource.Layout.SimpleListItem2, cursor, accountsFromColumns, accountsToId);
            view.FindViewById<ListView>(Resource.Id.AccountsListView)
                .Adapter = accountsAdapter;

            return view;
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            RelativeLayout view = (RelativeLayout)inflater.Inflate (Resource.Layout.raffledetail_gettemppass, container, false);
            rootview = view;

            TextView hinttextview=(TextView)view.FindViewById (Resource.Id.gettemppass_hinttext_textview);
            hinttextview.Text = RequestTPScreenData.ProvideClientInfoTextViewText;

            emailorphone = (EditText)view.FindViewById (Resource.Id.gettemppass_emailorphone_edittext);
            emailorphone.Hint = RequestTPScreenData.ClientInfoTextFieldPlaceholder;

            requesttemppass = (Button)view.FindViewById (Resource.Id.gettemppass_requesttemppass_button);
            requesttemppass.Text = RequestTPScreenData.RequestTPBtnTitle;
            //send web request
            requesttemppass.Click+=OnRequestTempPassClick;

            TextView signuptextview=view.FindViewById<TextView> (Resource.Id.gettemppass_register_textview);
            nn_activity.SetClickAbleText (signuptextview,RequestTPScreenData.DontHaveAccountLabelText+RequestTPScreenData.SignUpBtnTitle,RequestTPScreenData.SignUpBtnTitle,()=>{

                if(FormatManager.chechinput(emailorphone.Text,FormatManager.FormatOption.Email)){
                    (nn_activity as HomeScreen).ShowBuyerSignUp(emailorphone.Text);
                }
                else{
                    (nn_activity as HomeScreen).ShowBuyerSignUp("");
                }

            });

            return view;
        }
 public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
 {
     var view = inflater.Inflate(Resource.Layout.BusinessCardFragmentLayout, container, false);
     var listView = view.FindViewById<ListView>(Resource.Id.listViewBusinessCards);
     listView.Adapter = new BusinessCardAdapter (this.Activity);
     return view;
 }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            rootview = new RelativeLayout (nn_activity);
            rootview.LayoutParameters = new RelativeLayout.LayoutParams (RelativeLayout.LayoutParams.MatchParent, RelativeLayout.LayoutParams.MatchParent);
            rootview.SetBackgroundColor (Resources.GetColor(Resource.Color.soarnix_bg_gray));
            rootview.Id = TapUtil.generateViewId ();

            //list to show event history

            historyeventlist = new ListView (nn_activity);
            historyeventlist.LayoutParameters= new RelativeLayout.LayoutParams (RelativeLayout.LayoutParams.MatchParent, RelativeLayout.LayoutParams.MatchParent);
            historyeventlist.Id = TapUtil.generateViewId ();

            adapter = new EventHistoryListAdapter (nn_activity,historylist);
            historyeventlist.Adapter = adapter;

            //add a relative layout to rootview to show no result event
            nohistorylayout=new RelativeLayout(nn_activity);
            nohistorylayout.LayoutParameters= new RelativeLayout.LayoutParams (RelativeLayout.LayoutParams.MatchParent, RelativeLayout.LayoutParams.MatchParent);
            nohistorylayout.SetBackgroundResource(Resource.Color.soarnix_bg_gray);
            nohistorylayout.Visibility = ViewStates.Gone;

            nohistorytext = new TextView (nn_activity);
            nohistorytext.Text = HistoryScreenData.NoRecordMessage;
            nohistorytext.Gravity = GravityFlags.Center;
            RelativeLayout.LayoutParams nohistorytextparam=new RelativeLayout.LayoutParams (RelativeLayout.LayoutParams.WrapContent, RelativeLayout.LayoutParams.WrapContent);
            nohistorytextparam.AddRule (LayoutRules.CenterInParent);
            nohistorytextparam.SetMargins (TapUtil.dptodx (10), 0, TapUtil.dptodx (10), 0);
            nohistorytext.LayoutParameters = nohistorytextparam;

            nohistorylayout.AddView (nohistorytext);
            rootview.AddView (historyeventlist);
            rootview.AddView (nohistorylayout);
            return rootview;
        }
		public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			SetStyle(DialogFragmentStyle.NoTitle, Android.Resource.Style.ThemeTranslucentNoTitleBar);
			Dialog.RequestWindowFeature((int)WindowFeatures.NoTitle);
			var view = inflater.Inflate(Resource.Layout.TrickSelectorPreMenuDialogFragmentLayout, container, false);

			Dialog.Window.SetBackgroundDrawableResource(Resource.Drawable.shape_roundedRect);

			var buttons = new Tuple<ImageView, TrickType>[typeof(TrickType).GetEnumNames().Length + 1];
			var trickFilterButtons = Resources.ObtainTypedArray(Resource.Array.TrickSortButtons_TrickSelector);
			var trickFilterButtonTexts = Resources.ObtainTypedArray(Resource.Array.TrickSortButtonTexts_TrickSelector);
			For(0, buttons.Length, (i) =>
			{
				buttons[i] = Tuple.Create(view.FindViewById<ImageView>(trickFilterButtons.GetResourceId(i, 0)), (TrickType)i);
				view.FindViewById<TextView>(trickFilterButtonTexts.GetResourceId(i, 0)).Typeface = Data.Bowlby_OneSC;
			});

			ForEach(buttons, (button) => button.Item1.Click += delegate
			{
				if (IsListEmpty(button.Item2))
				{
					Toast.MakeText(Activity.BaseContext, Resource.String.NoTricks, ToastLength.Long).Show();
				}
				else
				{
					args.PutInt(Flags.TricksToUse, (int)button.Item2);
					TrickSelectorDialogFragment.newInstance(args).Show(FragmentManager, "tag");
					Dismiss();
				}
			});

			return view;
		}
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var ignore = base.OnCreateView(inflater, container, savedInstanceState);

            var view = this.BindingInflate(FragmentId, null);

            _toolbar = view.FindViewById<Toolbar>(Resource.Id.toolbar);
            if (_toolbar != null)
            {
                ((MainActivity)Activity).SetSupportActionBar(_toolbar);
                ((MainActivity)Activity).SupportActionBar.SetDisplayHomeAsUpEnabled(true);

                _drawerToggle = new MvxActionBarDrawerToggle(
                    Activity,                               // host Activity
                    ((MainActivity)Activity).DrawerLayout,  // DrawerLayout object
                    _toolbar,                               // nav drawer icon to replace 'Up' caret
                    Resource.String.drawer_open,            // "open drawer" description
                    Resource.String.drawer_close            // "close drawer" description
                );
                _drawerToggle.DrawerOpened += (object sender, ActionBarDrawerEventArgs e) => ((MainActivity)Activity).HideSoftKeyboard ();
                ((MainActivity)Activity).DrawerLayout.SetDrawerListener(_drawerToggle);
            }

            return view;
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            base.OnCreateView (inflater, container, savedInstanceState);
            var view = inflater.Inflate (Resource.Layout.DocumentFragmentLayout, null, true);

            documentListView = view.FindViewById<ListView> (Resource.Id.documentsListView);
            if (Documents != null)
                documentListView.Adapter = new DocumentsAdapter (Activity, Resource.Layout.DocumentListItemLayout, Documents);

            documentListView.ItemClick += (sender, e) => {
                var textView = e.View.FindViewById<TextView> (Resource.Id.documentListItemDocTitle);

                var document = Documents.ElementAtOrDefault ((int)textView.Tag);

                //start intent with the uri path of the document
                var strings = document.Path.Split ('/');
                CopyReadAsset (strings [1]);
                var intent = new Intent (Intent.ActionView);
                var uri = Uri.FromFile (file);
                intent.SetDataAndType (uri, "application/pdf");
                intent.SetFlags (ActivityFlags.ClearTop);
                try {
                    Activity.StartActivity (intent);
                } catch (ActivityNotFoundException exc) {
                    Log.WriteLine (LogPriority.Error, Constants.LogTag, exc.Message);
                }
            };

            return view;
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            intent = new Intent(Activity, typeof(MenuFragment));

            tabHost = new FragmentTabHost(Activity);
            tabHost.Setup(Activity, ChildFragmentManager, Resource.Layout.FragmentTabHost);

            View tabIndicator1 = LayoutInflater.From(Activity).Inflate(Resource.Layout.TabIndicator, tabHost.TabWidget, false);
            ((TextView)tabIndicator1.FindViewById(Resource.Id.TabTitle)).Text = "Bible";
            ((ImageView)tabIndicator1.FindViewById(Resource.Id.TabIcon)).SetImageResource(Resource.Drawable.bible);

            View tabIndicator2 = LayoutInflater.From(Activity).Inflate(Resource.Layout.TabIndicator, tabHost.TabWidget, false);
            ((TextView)tabIndicator2.FindViewById(Resource.Id.TabTitle)).Text = "Pubs";
            ((ImageView)tabIndicator2.FindViewById(Resource.Id.TabIcon)).SetImageResource(Resource.Drawable.pubs);

            View tabIndicator3 = LayoutInflater.From(Activity).Inflate(Resource.Layout.TabIndicator, tabHost.TabWidget, false);
            ((TextView)tabIndicator3.FindViewById(Resource.Id.TabTitle)).Text = "Search";
            ((ImageView)tabIndicator3.FindViewById(Resource.Id.TabIcon)).SetImageResource(Resource.Drawable.search);

            tabHost.AddTab(tabHost.NewTabSpec("bible").SetIndicator(tabIndicator1), (new CanonHeaderGridFragment()).Class, null);
            tabHost.AddTab(tabHost.NewTabSpec("publications").SetIndicator(tabIndicator2), (new PublicationsFragment()).Class, null);
            tabHost.AddTab(tabHost.NewTabSpec("search").SetIndicator(tabIndicator3), (new SearchFragment()).Class, null);

            //tabHost.AddTab(tabHost.NewTabSpec("bible").SetIndicator("Bible", Resources.GetDrawable(Resource.Drawable.bible)), (new CanonHeaderGridFragment()).Class, null);
            //tabHost.AddTab(tabHost.NewTabSpec("publications").SetIndicator("Pubs", Resources.GetDrawable(Resource.Drawable.pubs)), (new PublicationsFragment()).Class, null);
            //tabHost.AddTab(tabHost.NewTabSpec("search").SetIndicator("Search", Resources.GetDrawable(Resource.Drawable.search)), (new SearchFragment()).Class, null);

             	        return tabHost;
        }
        // Workaround from Support.v4 v22.1.1 library:
        //
        // For APIs >= 11 && < 21, there was a framework bug that prevented a LayoutInflater's
        // Factory2 from being merged properly if set after a cloneInContext from a LayoutInflater
        // that already had a Factory2 registered. We work around that bug here. If we can't we
        // log an error.
        private static void ForceSetFactory2(LayoutInflater inflater, LayoutInflater.IFactory2 factory)
        {
            if (!_checkedField)
            {
                try
                {
                    Class layoutInflaterClass = Class.FromType(typeof(LayoutInflater));
                    _layoutInflaterFactory2Field = layoutInflaterClass.GetDeclaredField("mFactory2");
                    _layoutInflaterFactory2Field.Accessible = true;
                }
                catch (NoSuchFieldException e)
                {
                    Mvx.Error(
                        "ForceSetFactory2 Could not find field 'mFactory2' on class {0}; inflation may have unexpected results.",
                        Class.FromType(typeof(LayoutInflater)).Name);
                }
                _checkedField = true;
            }

            if (_layoutInflaterFactory2Field != null)
            {
                try
                {
                    _layoutInflaterFactory2Field.Set(inflater, (Java.Lang.Object)factory);
                }
                catch (IllegalAccessException e)
                {
                    Mvx.Error("ForceSetFactory2 could not set the Factory2 on LayoutInflater {0} ; inflation may have unexpected results.", inflater);
                }
            }
        }
		public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			var view = inflater.Inflate(Resource.Layout.ListViewWithSwipe, container, false);


			SwipeRefreshLayout = (SwipeRefreshLayout)view.FindViewById(Resource.Id.swipe_refresh_layout);
			SwipeRefreshLayout.SetColorSchemeColors(Resource.Color.tenBlue,
				Resource.Color.colorPrimary,
				Resource.Color.colorAccent,
				Resource.Color.colorPrimaryDark);
			SwipeRefreshLayout.Refresh += async delegate
			{
				await FetchTableData();
			};


			ListView = view.FindViewById<ListView>(Resource.Id.list);
			ListView.SetOnScrollListener(new TailFetchListViewListener(this));
			ListView.AddFooterView(FooterView, null, false);
			ListView.ItemClick += (object sender, AdapterView.ItemClickEventArgs e) =>
			{
				TenServiceHelper.GoToGuestProfile(FragmentManager, Master.Id, TableItems[e.Position]);
			};


			BackgroundTextView = (TextView)view.FindViewById<TextView>(Resource.Id.backgroundTextView);
			BackgroundTextView.Text = EmptyTableString;
			return view;
		}
    public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
    {
      var root = inflater.Inflate(Resource.Layout.fragment_contacts, container, false);

      refresher = root.FindViewById<SwipeRefreshLayout>(Resource.Id.refresher);
      refresher.SetColorScheme(Resource.Color.blue);

      refresher.Refresh += async delegate
      {
        if (viewModel.IsBusy)
          return;

        await viewModel.GetContactsAsync();
        Activity.RunOnUiThread(() => { ((BaseAdapter)listView.Adapter).NotifyDataSetChanged(); });

      };

      viewModel.PropertyChanged += PropertyChanged;

      listView = root.FindViewById<ListView>(Resource.Id.list);

      listView.Adapter = new ContactAdapter(Activity, viewModel);

      listView.ItemLongClick += ListViewItemLongClick;
      listView.ItemClick += ListViewItemClick;
      var fab = root.FindViewById<FloatingActionButton>(Resource.Id.fab);
      fab.AttachToListView(listView);
      fab.Click += (sender, args) =>
      {
        ContactDetailsActivity.ViewModel = null;
        var intent = new Intent(Activity, typeof(ContactDetailsActivity));
        StartActivity(intent);
      };
      return root;
    }
		public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
			view = inflater.Inflate(Resource.Layout.TeamsFragment, container, false);
			if(listTeams.Count == 0) {
				//display text that there are currently no events and hide list with events
				view.FindViewById(Resource.Id.teamsFragmentListTeams).Visibility = ViewStates.Gone;
			} else {
				//display list with events and hide the text
				view.FindViewById(Resource.Id.teamsFragmentNoTeams).Visibility = ViewStates.Gone;

				listView = view.FindViewById<ListView>(Resource.Id.teamsFragmentListTeams);
				listView.Adapter = new ListTeamsAdapter(this, listTeams);
				listView.ItemClick += OnListItemClick;
			}

			if(DB_Communicator.getInstance().isAtLeast(VBUser.GetUserFromPreferences().getUserType(), UserType.Coremember)) {
				view.FindViewById<LinearLayout>(Resource.Id.teamsFragmentBtnAddLine).Visibility = ViewStates.Visible;
			} else {
				view.FindViewById<LinearLayout>(Resource.Id.teamsFragmentBtnAddLine).Visibility = ViewStates.Gone;
			}

			view.FindViewById<Button>(Resource.Id.teamsFragmentBtnAdd).Click += (object sender, EventArgs e) => {
				ViewController.getInstance().mainActivity.switchFragment(ViewController.TEAMS_FRAGMENT, 
					ViewController.ADD_TEAM_FRAGMENT, new AddTeamFragment());
			};

			return view;
		}
Example #17
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            base.OnCreateView(inflater, container, savedInstanceState);
            var view = inflater.Inflate(Resource.Layout.CallVoice, container, false);

            return view;
        }
Example #18
0
 public PostAdapter(Context context, ObservableCollection<Post> posts) 
 {
     this.posts = posts;
     this.context = context;
     inflater = LayoutInflater.From(context);
     posts.CollectionChanged += (o,e) => this.NotifyDataSetChanged();
 }
       public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle p2)
	{
		var v = inflater.Inflate(Resource.Layout.hello_world, container, false);
           var tv = v.FindViewById<TextView>(Resource.Id.text);
           tv.Text = "This is an instance of MyDialogFragment";
           return v;
	}
		public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			View v = inflater.Inflate (Resource.Layout.WebViewDialog, container, false);

			txtTitle = v.FindViewById<TextView> (Resource.Id.txt_dialog_title);
			divider = v.FindViewById<View> (Resource.Id.title_divider);
			webView = v.FindViewById<WebView> (Resource.Id.dialog_web_view);

			if (title == null || title.Length < 1) {
				txtTitle.Visibility = divider.Visibility = ViewStates.Gone;
			} else {
				txtTitle.Text = title;
			}

			if (url != null && url.Length > 0) {
				webView.LoadUrl (url);
			}

			if (showOkay) {
				btnOk.Visibility = ViewStates.Visible;
				btnOk.Click += (object sender, EventArgs e) => {
					this.Dismiss ();
				};
			}

			return v;
		}
        public static MonthView Create(ViewGroup parent, LayoutInflater inflater, string weekdayNameFormat,
            DateTime today, ClickHandler handler, int dividerColor, int dayBackgroundResId,
            int dayTextColorResId, int titleTextColor, int headerTextColor)
        {
            var view = (MonthView) inflater.Inflate(Resource.Layout.month, parent, false);
            view.setDividerColor(dividerColor);
            view.setDayTextColor(dayTextColorResId);
            view.setTitleTextColor(titleTextColor);
            view.setHeaderTextColor(headerTextColor);

            if (dayBackgroundResId != 0) {
                view.setDayBackground(dayBackgroundResId);
            }

            var originalDay = today;

            var firstDayOfWeek = (int) CultureInfo.CurrentCulture.DateTimeFormat.FirstDayOfWeek;

            var headerRow = (CalendarRowView) view._grid.GetChildAt(0);

            for (int i = 0; i < 7; i++) {
                var offset = firstDayOfWeek - (int) today.DayOfWeek + i;
                today = today.AddDays(offset);
                var textView = (TextView) headerRow.GetChildAt(i);
                textView.Text = today.ToString(weekdayNameFormat);
                today = originalDay;
            }
            view._clickHandler = handler;
            return view;
        }
		public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			// Use this to return your custom view for this Fragment
			// return inflater.Inflate(Resource.Layout.YourFragment, container, false);
		
//  Lich hoc theo HK
//		    var rootView = inflater.Inflate(Resource.Layout.LichHoc_HK, container, false);
//			ListView listView = rootView.FindViewById<ListView>(Resource.Id.listLH);
//
//			var t= BLichHoc.MakeDataFromXml(SQLite_Android.GetConnection ());
//			List<LichHoc> listLH = BLichHoc.GetAll (SQLite_Android.GetConnection ());
//			List<chiTietLH> listCT = new List<chiTietLH> ();
//			foreach (var item in listLH) {
//				listCT.AddRange(BLichHoc.GetCTLH (SQLite_Android.GetConnection (), item.Id));
//
//			}
//	
//
//			LichHocHKAdapter adapter = new LichHocHKAdapter (Activity, listCT);
//			listView.Adapter  = adapter;


			//Theo Tuan
			var rootView = inflater.Inflate(Resource.Layout.LichHoc_Tuan, container, false);
			listView = rootView.FindViewById<ExpandableListView>(Resource.Id.listLH_Tuan);
			progress=rootView.FindViewById<ProgressBar>(Resource.Id.progressLHTuan);


			LoadData ();

		
			return rootView;
		}
Example #23
0
        public MvxLayoutInflater(LayoutInflater original, Context newContext, MvxBindingVisitor bindingVisitor, bool cloned)
            : base(original, newContext)
        {
            this._bindingVisitor = bindingVisitor ?? new MvxBindingVisitor();

            this.SetupLayoutFactories(cloned);
        }
		public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			RadCalendarView calendarView = new RadCalendarView (Activity);
			calendarView.CustomizationRule = new DisabledDatesRule (calendarView.Calendar);

			return calendarView;
		}
Example #25
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var ignore = base.OnCreateView(inflater, container, savedInstanceState);

            var view = this.BindingInflate(FragmentId, null);

            if (Title != string.Empty)
            {
                Activity.Title = Title;
            }

            //TODO: I guess this can be removed?
            toolbar = view.FindViewById<Toolbar>(Resource.Id.toolbar);
            if (toolbar != null)
            {
                ((MainActivity) Activity).SetSupportActionBar(toolbar);
                ((MainActivity) Activity).SupportActionBar.SetDisplayHomeAsUpEnabled(true);

                drawerToggle = new MvxActionBarDrawerToggle(
                    Activity, // host Activity
                    ((MainActivity) Activity).DrawerLayout, // DrawerLayout object
                    toolbar, // nav drawer icon to replace 'Up' caret
                    Resource.String.drawer_open, // "open drawer" description
                    Resource.String.drawer_close // "close drawer" description
                    );

                ((MainActivity) Activity).DrawerLayout.AddDrawerListener(drawerToggle);
            }

            return view;
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            // Use this to return your custom view for this Fragment
            return inflater.Inflate(Resource.Layout.TestFragment, container, false);

            return base.OnCreateView(inflater, container, savedInstanceState);
        }
		public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			if (container == null) {
				// Currently in a layout without a container, so no reason to create our view.
				return null;
			}

			var view = inflater.Inflate(Resource.Layout.speaker_screen, container, false);

			var speaker = EvolveData.SpeakerData [ShownSpeakerIndex];

			headshotImageView = view.FindViewById<ImageView> (Resource.Id.headshotImageView);
			var headshot = GetHeadShot (speaker.HeadshotUrl);
			headshotImageView.SetImageDrawable (headshot);

			speakerNameTextView = view.FindViewById<TextView> (Resource.Id.speakerNameTextView);
			speakerNameTextView.Text = speaker.Name;

			companyNameTextView = view.FindViewById<TextView> (Resource.Id.companyNameTextView);
			companyNameTextView.Text = speaker.Company;

			twitterHandleView = view.FindViewById<TextView> (Resource.Id.twitterTextView);
			twitterHandleView.Text = "@" + speaker.TwitterHandle;

			return view;
		}
Example #28
0
        public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var view = inflater.Inflate (Resource.Layout.FeedbackFragment, container, false);
            feedbackPositiveButton = view.FindViewById<ImageButton> (Resource.Id.FeedbackPositiveButton);
            feedbackNeutralButton = view.FindViewById<ImageButton> (Resource.Id.FeedbackNeutralButton);
            feedbackNegativeButton = view.FindViewById<ImageButton> (Resource.Id.FeedbackNegativeButton);

            feedbackPositiveButton.Click += (sender, e) => SetRating (ratingPositive);
            feedbackNeutralButton.Click += (sender, e) => SetRating (ratingNeutral);
            feedbackNegativeButton.Click += (sender, e) => SetRating (ratingNegative);

            feedbackMessageEditText = view.FindViewById<EditText> (Resource.Id.FeedbackMessageText).SetFont (Font.Roboto);
            feedbackMessageEditText.AfterTextChanged += OnEdit;

            submitFeedbackButton = view.FindViewById<Button> (Resource.Id.SendFeedbackButton).SetFont (Font.Roboto);
            submitFeedbackButton.Click += OnSendClick;

            feedbackContainer = view.FindViewById<LinearLayout> (Resource.Id.FeedbackContainer);
            disclaimerContainer = view.FindViewById<LinearLayout> (Resource.Id.FeedbackDisclaimer);
            noUserRegisterButton = view.FindViewById<Button> (Resource.Id.FeedbackRegisterButton);

            bool offline = ServiceContainer.Resolve<AuthManager> ().OfflineMode;
            disclaimerContainer.Visibility = offline ? ViewStates.Visible : ViewStates.Gone;
            feedbackContainer.Visibility = offline ? ViewStates.Gone : ViewStates.Visible;

            noUserRegisterButton.Click += OpenRegisterScreen;

            SetRating (userRating);

            return view;
        }
		public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
			View view = inflater.Inflate(Resource.Layout.ProfileFragment, container, false);

			VBUser user = VBUser.GetUserFromPreferences();
			TextView userType = view.FindViewById<TextView>(Resource.Id.profileUserTypeValue);
			EditText name = view.FindViewById<EditText>(Resource.Id.profileNameValue);
//			Spinner position = view.FindViewById<Spinner>(Resource.Id.profilePositionValue);
//			EditText number = view.FindViewById<EditText>(Resource.Id.profileNumberValue);
//			EditText team = view.FindViewById<EditText>(Resource.Id.profileTeamValue);
			EditText password = view.FindViewById<EditText>(Resource.Id.profilePasswordValue);

//			ArrayAdapter adapter = ArrayAdapter.CreateFromResource(this.Activity, Resource.Array.positions, Resource.Layout.SpinnerTextView);
//			adapter.SetDropDownViewResource(Resource.Layout.SpinnerCheckedLayout);
//			position.Adapter = adapter;

			if(user != null) {
				//UserType
				userType.Text = user.getUserType().ToString();

				//Name
				view.FindViewById(Resource.Id.profileNameLine).Visibility = ViewStates.Visible;
				name.Text = user.name;

//				//Position
//				if(DB_Communicator.getInstance().isAtLeast(user.listTeamRole[0].getUserType(), UserType.Coremember)) {
//					view.FindViewById(Resource.Id.profilePositionLine).Visibility = ViewStates.Visible;
//					position.SetSelection(getIdOfPosition(user.listTeamRole[0].position));
//				}
//
//				//Number
//				if(DB_Communicator.getInstance().isAtLeast(user.listTeamRole[0].getUserType(), UserType.Coremember)) {
//					view.FindViewById(Resource.Id.profileNumberLine).Visibility = ViewStates.Visible;
//					number.Text = user.listTeamRole[0].number.ToString();
//				}
					
//				view.FindViewById(Resource.Id.profilePasswordLine).Visibility = ViewStates.Visible;
//				password.Text = user.password;
				
				
				view.FindViewById<Button>(Resource.Id.profileBtnSave).Click += async delegate {
					DB_Communicator db = DB_Communicator.getInstance();
					JsonValue json = await db.UpdateUser(name.Text, "");
					
					//ändernungen im user speichern
					List<VBUser> list = db.createUserFromResponse(json, user.password);
					if(list.Count > 0) {
						VBUser updatedUser = db.createUserFromResponse(json, user.password)[0];
						updatedUser.StoreUserInPreferences(this.Activity, updatedUser);
					}
					
					Toast.MakeText(this.Activity, json["message"].ToString(), ToastLength.Long).Show();
				};
			} else {
				view.FindViewById(Resource.Id.profileErrorLine).Visibility = ViewStates.Visible;
				view.FindViewById<EditText>(Resource.Id.profileErrorValue).Text = "There was an error loading your profile information! " +
																					" Server may be down!";
			}

			return view;
		}
		public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			Dialog.SetTitle (GetString (Resource.String.sign_in));
			var v = inflater.Inflate (Resource.Layout.fingerprint_dialog_container, container, false);
			mCancelButton = (Button)v.FindViewById (Resource.Id.cancel_button);
			mCancelButton.Click += (object sender, EventArgs e) => Dismiss ();

			mSecondDialogButton = (Button)v.FindViewById (Resource.Id.second_dialog_button);
			mSecondDialogButton.Click += (object sender, EventArgs e) => {
				if (mStage == Stage.Fingerprint) {
					GoToBackup ();
				} else {
					VerifyPassword ();
				}
			};

			mFingerprintContent = v.FindViewById (Resource.Id.fingerprint_container);
			mBackupContent = v.FindViewById (Resource.Id.backup_container);
			mPassword = v.FindViewById<EditText> (Resource.Id.password);
			mPassword.SetOnEditorActionListener (this);
			mPasswordDescriptionTextView = v.FindViewById<TextView> (Resource.Id.password_description);
			mUseFingerprintFutureCheckBox = v.FindViewById<CheckBox> (Resource.Id.use_fingerprint_in_future_check);
			mNewFingerprintEnrolledTextView = v.FindViewById<TextView> (Resource.Id.new_fingerprint_enrolled_description);
			mFingerprintUiHelper = mFingerprintUiHelperBuilder.Build (
				(ImageView)v.FindViewById (Resource.Id.fingerprint_icon),
				(TextView)v.FindViewById (Resource.Id.fingerprint_status), this);
			UpdateStage ();

			// If fingerprint authentication is not available, switch immediately to the backup
			// (password) screen.
			if (!mFingerprintUiHelper.IsFingerprintAuthAvailable)
				GoToBackup ();

			return v;
		}