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;
		}
		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;
		}
Beispiel #3
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Create your application here
               // SetContentView(Resource.Layout.wellReadingLayout);
        }
Beispiel #4
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Create your application here
            SetContentView(new SampleView(this));
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());
        }
Beispiel #6
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            if (!((GlobalvarsApp)this.Application).ISLOGON) {
                Finish ();
            }
            // Create your application here
            SetTitle (Resource.String.title_so);
            SetContentView (Resource.Layout.ListView);
            pathToDatabase = ((GlobalvarsApp)this.Application).DATABASE_PATH;
            rights = Utility.GetAccessRights (pathToDatabase);

            populate (listData);
            apara =  DataHelper.GetAdPara (pathToDatabase);
            listView = FindViewById<ListView> (Resource.Id.feedList);
            Button butNew= FindViewById<Button> (Resource.Id.butnewInv);
            butNew.Click += butCreateNewInv;
            Button butInvBack= FindViewById<Button> (Resource.Id.butInvBack);
            butInvBack.Click += (object sender, EventArgs e) => {
                StartActivity(typeof(MainActivity));
            };

            listView.ItemClick += OnListItemClick;
            listView.ItemLongClick += OnListItemLongClick;
            //listView.Adapter = new CusotmListAdapter(this, listData);
            SetViewDlg viewdlg = SetViewDelegate;
            listView.Adapter = new GenericListAdapter<SaleOrder> (this, listData, Resource.Layout.ListItemRow, viewdlg);
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView (Resource.Layout.Main);
        }
        public static RegisterUserFragment NewInstance(GoFragments go)
        {
            var fragment = new RegisterUserFragment ();
            var args = new Bundle ();
            switch (go) {

            case GoFragments.InitFragment:

                args.PutInt ("Go", 0);

                break;

            case GoFragments.SubastaFragment:

                args.PutInt ("Go", 1);

                break;
            default:
                args.PutInt ("Go", 0);
                break;
            }

            fragment.Arguments = args;
            return fragment;
        }
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			SetContentView (Resource.Layout.Splash);
			ThreadPool.QueueUserWorkItem (o => LoadActivity ());

		}
		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;
		}
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			SetContentView (Resource.Layout.Main);

			mCustomConfig = FindViewById <CheckBox> (Resource.Id.custom_app_limits);
		
			bool customChecked = 
				PreferenceManager.GetDefaultSharedPreferences (this).GetBoolean (
					CUSTOM_CONFIG_KEY, false);

			if (customChecked) mCustomConfig.Checked = true;

			mMultiEntryValue = FindViewById <TextView> (Resource.Id.multi_entry_id);
			mChoiceEntryValue = FindViewById <TextView> (Resource.Id.choice_entry_id);
			mBooleanEntryValue = FindViewById <TextView> (Resource.Id.boolean_entry_id);

			/**
    		* Saves custom app restriction to the shared preference.
    	 	*
    		* This flag is used by {@code GetRestrictionsReceiver} to determine if a custom app
    	 	* restriction activity should be used.
    	 	*
    	 	* @param view
    	 	*/
			mCustomConfig.Click += delegate (object sender, EventArgs e) {
				var editor = PreferenceManager.GetDefaultSharedPreferences (this).Edit ();
				editor.PutBoolean (CUSTOM_CONFIG_KEY, mCustomConfig.Checked).Commit ();
			};
		}
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Settings);
            ActionBar.SetDisplayHomeAsUpEnabled(true);

            counter = 0;
            var prefs =
                AndroidAppPreferences.Create(Application.Context.GetSharedPreferences(KeySndrApplication.AppPreferencesId, FileCreationMode.Private));

            editIpView = FindViewById<EditText>(Resource.Id.ipEditText);
            editPortView = FindViewById<EditText>(Resource.Id.portEditText);
            useCacheView = FindViewById<CheckBox>(Resource.Id.enableCache);

            if (!string.IsNullOrEmpty(prefs.Ip))
                editIpView.Text = prefs.Ip;
            if (prefs.Port > 0)
                editPortView.Text = prefs.Port.ToString();
            useCacheView.Checked = prefs.UseCache;

            probe = new Probe("KeySndrServer");
            probe.BeaconsUpdated += Probe_BeaconsUpdated;


            t = new Timer(1000);
            t.Elapsed += TimerOnElapsed;
            if (Intent.Extras == null || !Intent.Extras.ContainsKey("search"))
                return;
        }
Beispiel #13
0
		protected override async void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			SetContentView (Resource.Layout.Main);
            SetSupportActionBar(FindViewById<Toolbar>(Resource.Id.toolbar));
            this.CompatMode();

			// Initialize DataHolder if needed
			if (DataHolder.Current == null) {
				DataHolder.Current = new DataHolder ();

				// Load levels from JSON
				await DataHolder.Current.LoadLevelAsync(1);
                await DataHolder.Current.LoadLevelAsync(2);
                await DataHolder.Current.LoadLevelAsync(3);
                await DataHolder.Current.LoadLevelAsync(4);
                await DataHolder.Current.LoadLevelAsync(5);
                await DataHolder.Current.LoadLevelAsync(6);
                await DataHolder.Current.LoadLevelAsync(7);
                await DataHolder.Current.LoadLevelAsync(8);
                await DataHolder.Current.LoadLevelAsync(9);
			}

			var startButton = FindViewById<FloatingActionButton> (Resource.Id.btnStart);
			startButton.Click += StartButton_Click;
		}
		public override void OnCreate(Bundle bundle)
		{
			base.OnCreate(bundle);

			dirPath = Pref.WorkPath;
			Refresh(forced: true);
		}
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			// Set our view from the "main" layout resource
			SetContentView (Resource.Layout.Main);

			// Get our button from the layout resource,
			// and attach an event to it
			GetButton = FindViewById<Button> (Resource.Id.GetButton);
			ResultTextView = FindViewById<TextView> (Resource.Id.ResultTextView);
			ResultEditText = FindViewById<EditText> (Resource.Id.ResultEditText);
			DownloadedImageView = FindViewById<ImageView> (Resource.Id.DownloadedImageView);

			GetButton.Click += async (sender, e) => {
				
				Task<int> sizeTask = DownloadHomePageAsync();

				ResultTextView.Text = "Loading...";
				ResultEditText.Text = "Loading...\n";

				DownloadedImageView.SetImageResource ( Android.Resource.Drawable.IcMenuGallery);

				var length = await sizeTask;

				ResultTextView.Text = "length:  " + length;

			};

		}
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            var layout = new LinearLayout(this) {
                Orientation = Orientation.Vertical
            };
            this.AddContentView(layout, new ViewGroup.LayoutParams(-1, -1));

            this.T1 = new TextView(this);
            this.T2 = new TextView(this) {
                Text = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss")
            };

            layout.AddView(this.T1);
            layout.AddView(this.T2);

            var btn = new Button(this) {
                Text = "Search"
            };

            btn.Click += Btn_Click;
            layout.AddView(btn);

            this.HandleIntent(this.Intent);
        }
Beispiel #17
0
		public static WelcomeFragment NewInstance ()
		{
			var f = new WelcomeFragment ();
			var b = new Bundle ();
			f.Arguments = b;
			return f;
		}
Beispiel #18
0
		protected internal override void onCreate(Bundle savedInstanceState)
		{
			base.onCreate(savedInstanceState);
			ContentView = R.layout.uploader;

			mTargetDevicePicker = (DevicePicker) FragmentManager.findFragmentById(R.id.targetPicker);
			mTargetDevicePicker.DeviceType = SmcDevice.TYPE_PROVIDER;
			mTargetDevicePicker.DeviceSelectedListener = this;
			mUploadButton = (Button) findViewById(R.id.button);
			mUploadButton.OnClickListener = uploadClickListener;
			progressBar = (ProgressBar) findViewById(R.id.progress);


			SmcItem.LocalContent content = LocalContent;

			if (content == null)
			{
				Toast.makeText(this, "Content not supported", Toast.LENGTH_SHORT).show();
				this.finish();
			}
			else
			{
				itemToUpload = new SmcItem(content);
				((TextView)findViewById(R.id.header)).Text = "File: " + itemToUpload.Uri.ToString();
			}
		}
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            Log.Debug("Tag", "This is a test");

            // initialize the client using the context and game secret
            Com.Scoreloop.Client.Android.Core.Model.Client.Init(this, secret, null);

            var uri = ContactsContract.Contacts.ContentUri;

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            // Get our button from the layout resource,
            // and attach an event to it
            Button button_start_gane = FindViewById<Button>(Resource.Id.button_start_gane);
            button_start_gane.Click += delegate { StartActivity(typeof(GamePlayActivity)); };

            Button button_leaderboard = FindViewById<Button>(Resource.Id.button_leaderboard);
            button_leaderboard.Click += delegate { StartActivity(typeof(LeaderboardActivity)); };

            Button button_profile = FindViewById<Button>(Resource.Id.button_profile);
            button_profile.Click += delegate { StartActivity(typeof(ProfileActivity)); };
        }
		protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.Admin_Collection_CollectionManagementPage);
            SetViewModel(Container.Locator.AdminCollectionManagementViewModel);
        }
Beispiel #21
0
		public override void OnCreate (Bundle savedInstanceState)
		{
			base.OnCreate (savedInstanceState);

			// Create your fragment here
			tags = new List<Tag>();
		}
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			ActionBar.SetTitle (Resource.String.title_devices);

			mHandler = new Handler ();

			// Use this check to determine whether BLE is supported on the device.  Then you can
			// selectively disable BLE-related features.
			if (!PackageManager.HasSystemFeature (Android.Content.PM.PackageManager.FeatureBluetoothLe)) {
				Toast.MakeText (this, Resource.String.ble_not_supported, ToastLength.Short).Show ();
				Finish ();
			}

			// Initializes a Bluetooth adapter.  For API level 18 and above, get a reference to
			// BluetoothAdapter through BluetoothManager.
			BluetoothManager bluetoothManager = (BluetoothManager) GetSystemService (Context.BluetoothService);
			mBluetoothAdapter = bluetoothManager.Adapter;

			// Checks if Bluetooth is supported on the device.
			if (mBluetoothAdapter == null) {
				Toast.MakeText (this, Resource.String.error_bluetooth_not_supported, ToastLength.Short).Show();
				Finish();
				return;
			}
		}
        protected override void OnCreate(Bundle bundle)
        {
            Thread.Sleep (1500);
            base.OnCreate (bundle);

            StartActivity (typeof(Pay_Main));
        }
Beispiel #24
0
		protected override void OnCreate (Bundle bundle)
		{
			dice1 = new Dice(1, 1, 6);
			dice2 = new Dice(2, 1, 6);
			audio = new PlayAudio (this);
		
			base.OnCreate (bundle);

			game = LbManager.GetGame(Intent.GetIntExtra ("Battle", -1), Intent.GetIntExtra("Scenario", -1));

			// set our layout to be the home screen
			SetContentView(Resource.Layout.General);		

			imgBack = FindViewById<ImageView> (Resource.Id.titleSubLbBack);
			imgLb = FindViewById<ImageView> (Resource.Id.titleSubLb);

			// title
			txtBattleName = FindViewById<TextView>(Resource.Id.titleSubBattleName);
			txtScenarioName = FindViewById<TextView>(Resource.Id.titleSubScenarioName);
			
			imgGeneral2Die1 = FindViewById<ImageView> (Resource.Id.imgGeneral2Die1);
			imgGeneral2Die2 = FindViewById<ImageView> (Resource.Id.imgGeneral2Die2);
			btnGeneral2DiceRoll = FindViewById<Button>(Resource.Id.btnGeneral2DiceRoll);

			imgGeneral1Die1 = FindViewById<ImageView> (Resource.Id.imgGeneral1Die1);
			btnGeneral1DiceRoll = FindViewById<Button>(Resource.Id.btnGeneral1DiceRoll);
		}
		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;
		}
Beispiel #26
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            if (!((GlobalvarsApp)this.Application).ISLOGON) {
                Finish ();
            }
            pathToDatabase = ((GlobalvarsApp)this.Application).DATABASE_PATH;
            compCode = ((GlobalvarsApp)this.Application).COMPANY_CODE;
            branchCode = ((GlobalvarsApp)this.Application).BRANCH_CODE;
            SetContentView (Resource.Layout.ItemCodeList);
            populate (listData);
            listView = FindViewById<ListView> (Resource.Id.ICodeList);
            txtSearch= FindViewById<EditText > (Resource.Id.txtSearch);

            Button butInvBack= FindViewById<Button> (Resource.Id.butICodeBack);
            butInvBack.Click += (object sender, EventArgs e) => {
                base.OnBackPressed();
            };
            viewdlg = SetViewDelegate;
            //PerformFilteringDlg filterDlg=PerformFiltering;
            //listView.Adapter = new CusotmMasterItemListAdapter(this, listData);

            adapter = new GenericListAdapter<Item> (this, listData, Resource.Layout.ItemCodeDtlList, viewdlg);
            listView.Adapter = adapter;
            listView.ItemClick+= ListView_Click;
            txtSearch.TextChanged+= TxtSearch_TextChanged;
        }
		protected override void OnCreate (Bundle bundle)
		{
			
			base.OnCreate (bundle);
			//prerutas = new IList<string> ();
			SetContentView (Resource.Layout.SliderGaleria);
			this.Window.AddFlags(WindowManagerFlags.Fullscreen);

			paginador = FindViewById<Android.Support.V4.View.ViewPager> (Resource.Id.pager);

			rutas = new List<string> ();
			prerutas = Intent.GetStringArrayListExtra ("rutas");
			posicion = Intent.GetStringExtra ("posicion");

			Log.Debug ("SliderActivity", "La posición del intent es: "+posicion);

			for(int i=0; i<prerutas.Count; i++){
				Log.Debug ("SliderActivity", "Añadiendo: "+prerutas[i]);
				rutas.Add (prerutas [i]);
			}

			Log.Debug ("SliderActivity", "Se crea la galería");
			slidergaleria = new SliderGaleria (this, rutas);

			Log.Debug ("SliderActivity", "se setea el adaptador");
			paginador.Adapter = slidergaleria;

			paginador.SetCurrentItem (Int32.Parse(posicion), false);

			Log.Debug ("SliderActivity", "Acabamos!");
			// Create your application here
		}
		protected override void OnCreate(Bundle bundle)
		{
			base.OnCreate(bundle);

			// Set our view from the "main" layout resource
			SetContentView(Resource.Layout.MarkUp);

			// Get our buttonTransform from the layout resource,
			// and attach an event to it
			Button		buttonTransform = FindViewById<Button>(Resource.Id.Transform);
			Android.Webkit.WebView browser = FindViewById<Android.Webkit.WebView>(Resource.Id.webView1);
			
			string html = "";
			html = BusinessLogicObject.MarkUpHTML;

			if (Android.OS.Build.VERSION .Release.StartsWith("2."))
			{
			// http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
			// In 2.x platforms loadData() fails in some cases (it requires the html to be escaped), 
			// use loadDataWithBaseURL() instead and pass null for baseUrl and historyUrl:
			
				//html = Java.Net.URLEncoder.Encode(BusinessLogicObject.MarkUpHTML).Replace("\\+", " ");
				browser.LoadDataWithBaseURL(null, html, "text/html", "utf-8", null);

			}
			else
			{
				browser.LoadData(BusinessLogicObject.MarkUpHTML, mime, encoding);			
			}

			buttonTransform.Click += new EventHandler(buttonTransform_Click);

			return;
		}
        public override void OnViewCreated (View view, Bundle savedInstanceState)
        {
            base.OnViewCreated (view, savedInstanceState);

            ListView.SetClipToPadding (false);
            ListAdapter = new SettingsAdapter ();
        }
        protected override void OnCreate (Bundle bundle)
        {
            base.OnCreate (bundle);

            SetContentView (Resource.Layout.word);

            //ActionBar actionBar = ActionBar;
            ActionBar.SetDisplayHomeAsUpEnabled (true);
            
            var uri = Intent.Data;
            var cursor = ManagedQuery (uri, null, null, null, null);
           
            if (cursor == null) {
                Finish ();
            } else {
                cursor.MoveToFirst ();

                var word = FindViewById<TextView> (Resource.Id.word);
                var definition = FindViewById<TextView> (Resource.Id.definition);
                
                int wIndex = cursor.GetColumnIndexOrThrow (DictionaryDatabase.KEY_WORD);
                int dIndex = cursor.GetColumnIndexOrThrow (DictionaryDatabase.KEY_DEFINITION);
                
                word.Text = cursor.GetString (wIndex);
                definition.Text = cursor.GetString (dIndex);
            }
        }
Beispiel #31
0
 public void OnActivityCreated(Activity activity, Bundle savedInstanceState)
 {
     CrossCurrentActivity.Current.Activity = activity;
 }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                TabPage = inflater.Inflate(Resource.Layout.StickerFragment, container, false);
                StickerRecyclerView = (RecyclerView) TabPage.FindViewById(Resource.Id.stickerRecyler1);
                // Stickers.StickerList1

                MLayoutManager = new GridLayoutManager(Activity.ApplicationContext, AppSettings.StickersOnEachRow,
                    LinearLayoutManager.Vertical, false);
                StickerRecyclerView.SetLayoutManager(MLayoutManager);
                StickerAdapter = new StickerRecylerAdapter.StickerAdapter(Activity,Stickers.StickerList5);

                StickerRecyclerView.SetAdapter(StickerAdapter);

                StickerItemClickListener clickListener = new StickerItemClickListener(Activity, Type, StickerAdapter);
                Console.WriteLine(clickListener);
                return TabPage;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return null;
            }

        }
Beispiel #33
0
        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.UseCdn = true;

            var nullBuilder = new NullBuilder();
            var nullOrderer = new NullOrderer();

            // Replace a default bundle resolver in order to the debugging HTTP handler
            // can use transformations of the corresponding bundle
            BundleResolver.Current = new CustomBundleResolver();

            var commonStylesBundle = new CustomStyleBundle("~/Bundles/CommonStyles");

            commonStylesBundle.Include(
                "~/Content/Fonts.css",
                "~/Content/Site.css",
                "~/Content/BundleTransformer.css",
                "~/AlternativeContent/css/TestCssComponentsPaths.css",
                "~/Content/themes/base/jquery.ui.core.css",
                "~/Content/themes/base/jquery.ui.theme.css",
                "~/Content/themes/base/jquery.ui.resizable.css",
                "~/Content/themes/base/jquery.ui.button.css",
                "~/Content/themes/base/jquery.ui.dialog.css",
                "~/Content/TestTranslators.css",
                "~/Content/less/TestLess.less",
                "~/AlternativeContent/less/LessIcons.less",
                "~/Content/sass/TestSass.sass",
                "~/Content/scss/TestScss.scss");
            commonStylesBundle.Orderer = nullOrderer;
            bundles.Add(commonStylesBundle);

            var modernizrBundle = new CustomScriptBundle("~/Bundles/Modernizr");

            modernizrBundle.Include("~/Scripts/modernizr-2.*");
            modernizrBundle.Orderer = nullOrderer;
            bundles.Add(modernizrBundle);

            var jQueryBundle = new CustomScriptBundle("~/Bundles/Jquery",
                                                      "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.2.1.min.js");

            jQueryBundle.Include("~/Scripts/jquery-{version}.js");
            jQueryBundle.Orderer = nullOrderer;
            jQueryBundle.CdnFallbackExpression = "window.jquery";
            bundles.Add(jQueryBundle);

            var commonScriptsBundle = new CustomScriptBundle("~/Bundles/CommonScripts");

            commonScriptsBundle.Include(
                "~/Scripts/MicrosoftAjax.js",
                "~/Scripts/jquery-ui-{version}.js",
                "~/Scripts/jquery.validate.js",
                "~/Scripts/jquery.validate.unobtrusive.js",
                "~/Scripts/jquery.unobtrusive-ajax.js",
                "~/Scripts/knockout-3.*",
                "~/Scripts/coffee/TestCoffeeScript.coffee",
                "~/Scripts/coffee/TestLiterateCoffeeScript.litcoffee",
                "~/Scripts/coffee/TestCoffeeScriptMarkdown.coffee.md",
                "~/Scripts/ts/TranslatorBadge.ts",
                "~/Scripts/ts/ColoredTranslatorBadge.ts",
                "~/Scripts/ts/TestTypeScript.ts");
            commonScriptsBundle.Orderer = nullOrderer;
            bundles.Add(commonScriptsBundle);

            var commonTemplatesBundle = new CustomScriptBundle("~/Bundles/CommonTemplates");

            commonTemplatesBundle.Include(
                "~/Scripts/hogan/template-{version}.js",
                "~/Scripts/hogan/HoganTranslatorBadge.mustache",
                "~/Scripts/hogan/TestHogan.js",
                "~/Scripts/handlebars/handlebars.runtime.js",
                "~/Scripts/handlebars/HandlebarsHelpers.js",
                "~/Scripts/handlebars/HandlebarsTranslatorBadge.handlebars",
                "~/Scripts/handlebars/TestHandlebars.js");
            commonTemplatesBundle.Orderer = nullOrderer;
            bundles.Add(commonTemplatesBundle);

            var jqueryUiStylesDirectoryBundle = new Bundle("~/Bundles/JqueryUiStylesDirectory")
            {
                Builder = nullBuilder
            };

            jqueryUiStylesDirectoryBundle.IncludeDirectory("~/Content/themes/base/", "*.css");
            jqueryUiStylesDirectoryBundle.Transforms.Add(new StyleTransformer(
                                                             new[] { "*.all.css", "jquery.ui.base.css" }));
            bundles.Add(jqueryUiStylesDirectoryBundle);

            var scriptsDirectoryBundle = new Bundle("~/Bundles/ScriptsDirectory")
            {
                Builder = nullBuilder
            };

            scriptsDirectoryBundle.IncludeDirectory("~/Scripts/", "*.js", true);
            scriptsDirectoryBundle.Transforms.Add(new ScriptTransformer(
                                                      new[] { "*.all.js", "_references.js" }));
            bundles.Add(scriptsDirectoryBundle);
        }
Beispiel #34
0
		public override void OnCreate (Bundle savedInstanceState)
		{
			base.OnCreate (savedInstanceState);

			// Create your fragment here
		}
Beispiel #35
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var ignored = base.OnCreateView(inflater, container, savedInstanceState);
            var view    = inflater.Inflate(Resource.Layout.Main, null);

            mlistview = view.FindViewById <ListView>(Resource.Id.listViewStations);
            refresher = view.FindViewById <Android.Support.V4.Widget.SwipeRefreshLayout>(Resource.Id.refresher);

            adapter           = new MyStationListAdapter(this.Activity, true);
            mlistview.Adapter = adapter;


            refresher.Refresh += delegate
            {
                SyncData();
                refresher.Refreshing = false;
            };

            SyncData();

            return(view);
        }
Beispiel #36
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.Activity_Detail);

            SupportToolbar toolBar = FindViewById <SupportToolbar>(Resource.Id.toolbar);

            SetSupportActionBar(toolBar);
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);

            //Se obtiene el nombre del expediente a mostrar en el detalle
            string title = Intent.GetStringExtra(EXTRA_NAME);
            string info  = Intent.GetStringExtra(EXTRA_INFO);

            codigoNotificacionIn = Intent.GetStringExtra("EXTRA_CODIGO_NOTIFICACION");

            CollapsingToolbarLayout collapsingToolBar = FindViewById <CollapsingToolbarLayout>(Resource.Id.collapsing_toolbar);
            TextView detailTextView = FindViewById <TextView>(Resource.Id.txtNotificando);

            //Se le asigna el texto al TextView que se muestra en la pantalla de detalles
            detailTextView.Text = info.Split('@')[1];

            TextView sector = FindViewById <TextView>(Resource.Id.txtSector);

            //Se le asigna el texto al TextView que se muestra en la pantalla de detalles
            sector.Text = info.Split('@')[9];

            TextView fechaDocumento = FindViewById <TextView>(Resource.Id.txtFechaDocumento);

            //Se le asigna el texto al TextView que se muestra en la pantalla de detalles
            fechaDocumento.Text = info.Split('@')[7];

            TextView provincia = FindViewById <TextView>(Resource.Id.txtProvincia);

            //Se le asigna el texto al TextView que se muestra en la pantalla de detalles
            provincia.Text = info.Split('@')[2];

            TextView canton = FindViewById <TextView>(Resource.Id.txtCanton);

            //Se le asigna el texto al TextView que se muestra en la pantalla de detalles
            canton.Text = info.Split('@')[3];

            TextView distrito = FindViewById <TextView>(Resource.Id.txtDistrito);

            //Se le asigna el texto al TextView que se muestra en la pantalla de detalles
            distrito.Text = info.Split('@')[4];

            TextView direccion = FindViewById <TextView>(Resource.Id.txtDireccion);

            //Se le asigna el texto al TextView que se muestra en la pantalla de detalles
            direccion.Text = info.Split('@')[5];

            TextView despacho = FindViewById <TextView>(Resource.Id.txtBarrio);

            //Se le asigna el texto al TextView que se muestra en la pantalla de detalles
            despacho.Text = info.Split('@')[6];

            TextView fechaEmision = FindViewById <TextView>(Resource.Id.txtFechaEmision);

            //Se le asigna el texto al TextView que se muestra en la pantalla de detalles
            fechaEmision.Text = info.Split('@')[8];

            //se le asigna el titulo a la barra que colapsa la informacion
            collapsingToolBar.SetTitle(info.Split('@')[0]);

            LoadBackDrop();

            FloatingActionButton editFab = FindViewById <FloatingActionButton>(Resource.Id.editFab);

            editFab.Click += (o, e) =>
            {
                //Toast.MakeText(this, "Edit", ToastLength.Short).Show();

                if (MailBoxes.currentPage == 0)
                {
                    Toast.MakeText(this, "El registro de datos debe ser realizado en el buzon notificándose", ToastLength.Long).Show();
                }
                if (MailBoxes.currentPage == 1 && !(FragmentLogin.supervisor.Equals("true", StringComparison.Ordinal) || FragmentLogin.supervisor.Equals("True", StringComparison.Ordinal)))
                {
                    Intent intent = new Intent(this, typeof(MainActivity));
                    //intent.PutExtra(DetailActivity.EXTRA_NAME, detailActivityTitle[position]);
                    intent.PutExtra("EXTRA_INFO", "EditarNotificacion");
                    intent.PutExtra("EXTRA_CODIGO_NOTIFICACION", codigoNotificacionIn);
                    StartActivity(intent);
                }
                if (MailBoxes.currentPage == 2)
                {
                    //var dialog = ServiceDialog.NewInstance();
                    //dialog.Show(FragmentManager, "dialog");
                }
            };

            FloatingActionButton reintentoFab = FindViewById <FloatingActionButton>(Resource.Id.reintentoFab);

            reintentoFab.Click += (s, args) => {
                Intent intent = new Intent(this, typeof(MainActivity));
                //intent.PutExtra(DetailActivity.EXTRA_NAME, detailActivityTitle[position]);
                intent.PutExtra("EXTRA_INFO", "ReintentoNotificacion");
                intent.PutExtra("EXTRA_CODIGO_NOTIFICACION", codigoNotificacionIn);
                StartActivity(intent);
            };

            if (MailBoxes.currentPage == 0)
            {
                editFab.Visibility      = ViewStates.Invisible;
                reintentoFab.Visibility = ViewStates.Invisible;
            }
        }
Beispiel #37
0
 public void OnActivitySaveInstanceState(Activity activity, Bundle outState)
 {
 }
 public static Bundle ForceOrdered(this Bundle bundle)
 {
     bundle.Orderer = new AsIsBundleOrderer();
     return bundle;
 }
Beispiel #39
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            // Use this to return your custom view for this Fragment
            View view = inflater.Inflate(Resource.Layout.help, container, false);

            Button button = view.FindViewById <Button>(Resource.Id.btnHelpClose);

            button.Click += delegate {
                Dismiss();
            };
            return(view);
        }
        public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle state)
        {
            var view = inflater.Inflate (Resource.Layout.EditTimeEntryFragment, container, false);
            cont = container;
            DateTextView = view.FindViewById<TextView> (Resource.Id.DateTextView).SetFont (Font.Roboto);
            DurationTextView = view.FindViewById<TextView> (Resource.Id.DurationTextView).SetFont (Font.Roboto);
            StartTimeEditText = view.FindViewById<EditText> (Resource.Id.StartTimeEditText).SetFont (Font.Roboto);
            StopTimeEditText = view.FindViewById<EditText> (Resource.Id.StopTimeEditText).SetFont (Font.Roboto);
            DescriptionEditText = view.FindViewById<EditText> (Resource.Id.DescriptionEditText).SetFont (Font.RobotoLight);
            ProjectEditText = view.FindViewById<EditText> (Resource.Id.ProjectEditText).SetFont (Font.RobotoLight);
            TagsEditText = view.FindViewById<EditText> (Resource.Id.TagsEditText).SetFont (Font.RobotoLight);
            BillableCheckBox = view.FindViewById<CheckBox> (Resource.Id.BillableCheckBox).SetFont (Font.RobotoLight);
            DeleteImageButton = view.FindViewById<ImageButton> (Resource.Id.DeleteImageButton);

            DurationTextView.Click += OnDurationTextViewClick;
            StartTimeEditText.Click += OnStartTimeEditTextClick;
            StopTimeEditText.Click += OnStopTimeEditTextClick;
            DescriptionEditText.TextChanged += OnDescriptionTextChanged;
            DescriptionEditText.EditorAction += OnDescriptionEditorAction;
            DescriptionEditText.FocusChange += OnDescriptionFocusChange;
            ProjectEditText.Click += OnProjectEditTextClick;
            TagsEditText.Click += OnTagsEditTextClick;
            BillableCheckBox.CheckedChange += OnBillableCheckBoxCheckedChange;
            DeleteImageButton.Click += OnDeleteImageButtonClick;

            return view;
        }
 private string SerializeBundle(Bundle bundle)
 {
     return(Convert.ToBase64String(Marshall(bundle)));
 }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var view = base.OnCreateView(inflater, container, savedInstanceState);

            _goForwardButton = view.FindViewById <Button>(Resource.Id.button);

            Bind();

            return(view);
        }
Beispiel #43
0
        //public ListDialogFragment ApplyBindingItemTo(Expression<Func<MainViewModel, object>> propertyTo)
        //{
        //    _bindingItemTo = propertyTo;
        //    return this;
        //}

        //public ListDialogFragment ApplyBindingItemClickTo(Expression<Func<MainViewModel, object>> propertyTo)
        //{
        //    _bindingItemClickTo = propertyTo;
        //    return this;
        //}


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

            InnerListView = view.FindViewById <MvxListView>(Resource.Id.item_list);
            var headerTextView = view.FindViewById <TextView>(Resource.Id.list_header);

            //if (_bindingItemTo != null)
            //{
            //    this.CreateBindingSet<ListDialogFragment, MainViewModel>().Bind(InnerListView).For(m => m.SelectedItem).To(_bindingItemTo).Apply();
            //}
            //if (_bindingItemClickTo != null)
            //    this.CreateBindingSet<ListDialogFragment, MainViewModel>().Bind(InnerListView).For(m => m.ItemClick).To(_bindingItemClickTo).Apply();

            headerTextView.Text       = _header;
            InnerListView.ItemsSource = ItemSource;

            return(view);
        }
 public override void OnCreate(Bundle savedInstanceState, PersistableBundle persistentState)
 {
     base.OnCreate(savedInstanceState, persistentState);
 }
Beispiel #45
0
 public override void OnCreate(Bundle savedInstanceState, PersistableBundle persistentState)
 {
     base.OnCreate(savedInstanceState, persistentState);
     CrossCurrentActivity.Current.Init(this, savedInstanceState);
     Log.Debug(TAG, "SplashActivity.OnCreate");
 }
Beispiel #46
0
 public RandomForestLeastSquaresTreeLearner(Dataset trainData, int numLeaves, int minDocsInLeaf, Double entropyCoefficient, Double featureFirstUsePenalty,
                                            Double featureReusePenalty, Double softmaxTemperature, int histogramPoolSize, int randomSeed, Double splitFraction, bool allowEmptyTrees,
                                            Double gainConfidenceLevel, int maxCategoricalGroupsPerNode, int maxCategoricalSplitPointsPerNode, bool quantileEnabled, int quantileSampleCount, IParallelTraining parallelTraining,
                                            double minDocsPercentageForCategoricalSplit, Bundle bundling, int minDocsForCategoricalSplit, double bias)
     : base(trainData, numLeaves, minDocsInLeaf, entropyCoefficient, featureFirstUsePenalty, featureReusePenalty, softmaxTemperature, histogramPoolSize,
            randomSeed, splitFraction, false, allowEmptyTrees, gainConfidenceLevel, maxCategoricalGroupsPerNode, maxCategoricalSplitPointsPerNode, -1, parallelTraining,
            minDocsPercentageForCategoricalSplit, bundling, minDocsForCategoricalSplit, bias)
 {
     _quantileSampleCount = quantileSampleCount;
     _quantileEnabled     = quantileEnabled;
 }
Beispiel #47
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            // Dialog to display
            LinearLayout dialogView = null;

            // Get the context for creating the dialog controls
            Android.Content.Context ctx = Activity.ApplicationContext;
            ContextThemeWrapper ctxWrapper = new ContextThemeWrapper(ctx, Android.Resource.Style.ThemeMaterialLight);

            // Set a dialog title
            Dialog.SetTitle("Save map to Portal");

            try
            {
                base.OnCreateView(inflater, container, savedInstanceState);

                // The container for the dialog is a vertical linear layout
                dialogView = new LinearLayout(ctxWrapper)
                {
                    Orientation = Orientation.Vertical
                };
                dialogView.SetPadding(10,0,10,10);

                // Add a text box for entering a title for the new web map
                _mapTitleTextbox = new EditText(ctxWrapper)
                {
                    Hint = "Title"
                };
                dialogView.AddView(_mapTitleTextbox);

                // Add a text box for entering a description
                _mapDescriptionTextbox = new EditText(ctxWrapper)
                {
                    Hint = "Description"
                };
                dialogView.AddView(_mapDescriptionTextbox);

                // Add a text box for entering tags (populate with some values so the user doesn't have to fill this in)
                _tagsTextbox = new EditText(ctxWrapper)
                {
                    Text = "ArcGIS Runtime, Web Map"
                };
                dialogView.AddView(_tagsTextbox);

                // Add a button to save the map
                Button saveMapButton = new Button(ctxWrapper)
                {
                    Text = "Save"
                };
                saveMapButton.Click += SaveMapButtonClick;
                dialogView.AddView(saveMapButton);

                // If there's an existing portal item, configure the dialog for "update" (read-only entries)
                if (_portalItem != null)
                {
                    _mapTitleTextbox.Text = _portalItem.Title;
                    _mapTitleTextbox.Enabled = false;

                    _mapDescriptionTextbox.Text = _portalItem.Description;
                    _mapDescriptionTextbox.Enabled = false;

                    _tagsTextbox.Text = string.Join(",", _portalItem.Tags);
                    _tagsTextbox.Enabled = false;

                    // Change some of the control text
                    Dialog.SetTitle("Save changes to map");
                    saveMapButton.Text = "Update";
                }
            }
            catch (Exception ex)
            {
                // Show the exception message 
                AlertDialog.Builder alertBuilder = new AlertDialog.Builder(Activity);
                alertBuilder.SetTitle("Error");
                alertBuilder.SetMessage(ex.Message);
                alertBuilder.Show();
            }

            // Return the new view for display
            return dialogView;
        }
Beispiel #48
0
        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);
            //View view = new View(Activity);
            var progressDialog = ProgressDialog.Show(Activity, "", "Loading bet", true);

            progressDialog.SetProgressStyle(ProgressDialogStyle.Spinner);

            progressDialog.Show();

            View view = inflater.Inflate(Resource.Layout.ActiveBet, null);


            #region Task List method
            //Task<List<Team>> task1 = Task.Factory.StartNew(() => { return AWSDataAccess.GetBetTeam(0); }
            //);


            //Task task2 = task1.ContinueWith((antecedent) =>
            //{
            //    try
            //    {
            //        //progressDialog.Dismiss();

            //        betList.AddHeaderView(header, null, false);
            //        this.teams = task1.Result;
            //        betList.Adapter = new TeamListAdapter(Activity, teams);
            //        betList.ItemClick += ActiveBetFragment_ItemClick;

            //        progressDialog.Dismiss();
            //    }
            //    catch (AggregateException aex)
            //    {
            //        //Toast.MakeText(this, aex.InnerException.Message, ToastLength.Short).Show();
            //    }
            //}, TaskScheduler.FromCurrentSynchronizationContext()
            //);
            #endregion



            new Thread(new ThreadStart(delegate
            {
                this.teams = AWSDataAccess.GetBetTeam(0);
                Thread.Sleep(1000);
                Activity.RunOnUiThread(() => {
                    ListView betList = view.FindViewById <ListView>(Resource.Id.ActiveBetList);


                    ViewGroup header = (ViewGroup)inflater.Inflate(Resource.Layout.ActiveBetHeader, betList, false);
                    betList.AddHeaderView(header, null, false);
                    betList.Adapter    = new TeamListAdapter(Activity, this.teams);
                    betList.ItemClick += ActiveBetFragment_ItemClick;
                });
                //Activity.RunOnUiThread(() => { });
                //Activity.RunOnUiThread(() => { });
                //betList.AddHeaderView(header, null, false);
                //betList.Adapter = new TeamListAdapter(Activity, this.teams);
                //betList.ItemClick += ActiveBetFragment_ItemClick;

                Thread.Sleep(1000);
                progressDialog.Dismiss();
            })).Start();
            //this.teams = AWSDataAccess.GetBetTeam(0);

            //ViewGroup header = (ViewGroup)inflater.inflate(R.layout.header, myListView, false);
            //myListView.addHeaderView(header, null, false);

            //betList.AddHeaderView(header, null, false);
            //betList.Adapter = new TeamListAdapter(Activity, this.teams);
            //betList.ItemClick += ActiveBetFragment_ItemClick;

            //progressDialog.Dismiss();

            return(view);
            //AWSDataAccess.SelectActiveBetTeam()
            //return base.OnCreateView(inflater, container, savedInstanceState);
        }
Beispiel #49
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
        }
Beispiel #50
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            //Link UI element to ID
            testOutput = FindViewById<TextView>(Resource.Id.testOutputID);

            
            //Create type Person with constructor
            Person p1 = new Person
            {
                name = "Ryan",
                race = "Dwarf",
                age = 4
            };
            Person p2 = new Person
            {
                name = "Joseph",
                race = "Human",
                age = 24
            };
            Person p3 = new Person
            {
                name = "John",
                race = "Elf",
                age = 100
            };

            //Create a Village filled with people
            Village testVillage = new Village
            {
                government = "Monarchy",
                income = "Wealthy",
                people = new Person[]{ p1, p2, p3 }
            };

            //Convert the village object to a JSON string
            string json = JsonConvert.SerializeObject(testVillage, Formatting.Indented);

            //Convert a JSON string expected to be of type Village to a Village
            Village testVillage2 = JsonConvert.DeserializeObject<Village>(json);
            testOutput.Text = testVillage.people[1].name; //Access a variable of the JSON object

            //Create a database
            var databasePath = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "DatabaseName.txt");
            //Connect to said database
            var db = new SQLiteConnection(databasePath);

            //Create a table based on this Model .cs file
            db.CreateTable<PersonTable>();

            //Add a new element to the file much like with regular constructor
            db.Insert(new PersonTable()
            {
                name = "Trevor"
            });
            db.Insert(new PersonTable()
            {
                name = "Johannson"
            });

            //Query that table for information
            var query = db.Table<PersonTable>().Where(v => v.name.StartsWith("J"));
            foreach (var person in query)
                testOutput.Append(person.name);
        }
Beispiel #51
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var fragmentView   = inflater.Inflate(Resource.Layout.ChallengesOverviewLayout, container, false);
            var challengesGrid = fragmentView.FindViewById <GridLayout>(Resource.Id.challengesOverviewGrid);

            var nextChallengeBtn      = fragmentView.FindViewById <Button>(Resource.Id.nextChallengeCategory);
            var prevChallengeBtn      = fragmentView.FindViewById <Button>(Resource.Id.prevChallengeCategory);
            var challengeCategoryText = fragmentView.FindViewById <TextView>(Resource.Id.challengesOverviewText);

            nextChallengeBtn.Click += (o, e) =>
            {
                _selectedCategory = Enum.GetValues(typeof(ChallengeCategoryEnum)).Cast <ChallengeCategoryEnum>()
                                    .FirstOrDefault((c) => (int)c > (int)_selectedCategory);

                PopulateGridLayoutByCategory(challengesGrid, container.Context, _selectedCategory);
                challengeCategoryText.Text = _categoryNames[(int)_selectedCategory];
            };

            prevChallengeBtn.Click += (o, e) =>
            {
                _selectedCategory = _selectedCategory == ChallengeCategoryEnum.Art ? ChallengeCategoryEnum.Scouting :
                                    Enum.GetValues(typeof(ChallengeCategoryEnum)).Cast <ChallengeCategoryEnum>()
                                    .LastOrDefault((c) => (int)c < (int)_selectedCategory);

                PopulateGridLayoutByCategory(challengesGrid, container.Context, _selectedCategory);
                challengeCategoryText.Text = _categoryNames[(int)_selectedCategory];
            };

            challengesGrid.ColumnCount = 3;

            PopulateGridLayoutByCategory(challengesGrid, container.Context, _selectedCategory);
            challengeCategoryText.Text = _categoryNames[(int)_selectedCategory];

            return(fragmentView);
        }
Beispiel #52
0
 protected override void OnCreate(Bundle bundle)
 {
     base.OnCreate(bundle);
     SetContentView(Resource.Layout.SecondView);
 }
Beispiel #53
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            // Use this to return your custom view for this Fragment
            View rootView = inflater.Inflate(Resource.Layout.AddItem, container, false);

            edtCity        = rootView.FindViewById <EditText>(Resource.Id.edtAddItemCity);
            edtName        = rootView.FindViewById <EditText>(Resource.Id.edtAddItemName);
            edtDescription = rootView.FindViewById <EditText>(Resource.Id.edtAddItemDescription);
            edtPrice       = rootView.FindViewById <EditText>(Resource.Id.edtAddItemPrice);

            btnAddItem     = rootView.FindViewById <Button>(Resource.Id.btnAddItemSell);
            imgbtnAddImage = rootView.FindViewById <ImageButton>(Resource.Id.imgbtnAddItemImage);

            spinCategory  = rootView.FindViewById <Spinner>(Resource.Id.spinAddItemCategories);
            spinCondition = rootView.FindViewById <Spinner>(Resource.Id.spinAddItemCondition);



            btnAddItem.Click     += BtnAddItem_Click;
            imgbtnAddImage.Click += ImgbtnAddImage_Click;



            return(rootView);
        }
 public override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     viewModel = new CreateTagViewModel(WorkspaceId);
 }
Beispiel #55
0
 public override void OnViewCreated(View view, Bundle savedInstanceState)
 {
     textureView = (AutoFitTextureView)view.FindViewById(Resource.Id.texture);
 }
Beispiel #56
0
 public override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     Title = "Odborky";
 }
Beispiel #57
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            HasOptionsMenu = true;

            View view = inflater.Inflate(Resource.Layout.ManageInventoriesLayout, container, false);

            mProgressBar            = view.FindViewById <ProgressBar>(Resource.Id.progressBarManageInventories);
            mProgressBar.Visibility = Android.Views.ViewStates.Invisible;
            mButtonHistory          = view.FindViewById <ImageButton>(Resource.Id.imageButtonManageInventoriesLog);
            mButtonAdd           = view.FindViewById <ImageButton>(Resource.Id.imageButtonManageInventoriesAdd);
            mListViewInventories = view.FindViewById <RecyclerView>(Resource.Id.recylerInventories);
            mListViewInventories.SetLayoutManager(new LinearLayoutManager(Activity));
            LoadInventoriesData();
            mButtonHistory.Click += OnHistoryClicked;
            return(view);
        }
Beispiel #58
0
        //Tries to open a CameraDevice
        public void openCamera(int width, int height, Bundle savedInstanceState)
        {
            if (null == Activity || Activity.IsFinishing)
            {
                return;
            }

            manager = (CameraManager)Activity.GetSystemService(Context.CameraService);
            try
            {
                if (!cameraOpenCloseLock.TryAcquire(2500, TimeUnit.Milliseconds))
                {
                    throw new RuntimeException("Time out waiting to lock camera opening.");
                }

                string cameraId = GetCam(manager, CURRENTCAMERA);
                CameraCharacteristics characteristics = manager.GetCameraCharacteristics(cameraId);

                StreamConfigurationMap map = (StreamConfigurationMap)characteristics.Get(CameraCharacteristics.ScalerStreamConfigurationMap);

                videoSize = ChooseVideoSize(map.GetOutputSizes(Class.FromType(typeof(MediaRecorder))));

                previewSize = ChooseOptimalSize(map.GetOutputSizes(Class.FromType(typeof(MediaRecorder))), width, height, videoSize);

                int orientation = (int)Resources.Configuration.Orientation;
                if (orientation == (int)Android.Content.Res.Orientation.Landscape)
                {
                    textureView.SetAspectRatio(previewSize.Width, previewSize.Height);
                }
                else
                {
                    textureView.SetAspectRatio(previewSize.Height, previewSize.Width);
                }
                configureTransform(width, height);
                mediaRecorder = new MediaRecorder();
                if (stateListener == null)
                {
                    stateListener = new MyCameraStateCallback(this);
                }

                manager.OpenCamera(cameraId, stateListener, null);
                SetupComplete?.Invoke();
                max  = (Rect)characteristics.Get(CameraCharacteristics.SensorInfoActiveArraySize);
                size = (Size)characteristics.Get(CameraCharacteristics.SensorInfoPixelArraySize);

                controls          = new Camera2Controls(cameraDevice, size, max);
                controls.OnFocus += DoFocus;
                try
                {
                    ChildFragmentManager.BeginTransaction().Replace(Resource.Id.camera_controls, controls).Commit();
                }
                catch (System.Exception)
                {
                }
            }
            catch (CameraAccessException)
            {
                Toast.MakeText(Activity, "Cannot access the camera.", ToastLength.Short).Show();
                Activity.Finish();
            }
            catch (NullPointerException)
            {
                //var dialog = new ErrorDialog();
                //dialog.Show(ChildFragmentManager, "dialog");
            }
            catch (InterruptedException)
            {
                throw new RuntimeException("Interrupted while trying to lock camera opening.");
            }
        }
Beispiel #59
0
 public override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
 }
Beispiel #60
0
 public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
 {
     laststate = savedInstanceState;
     return(inflater.Inflate(Resource.Layout.Camera2Fragment, container, false));
 }