protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); Xamarin.Essentials.Platform.Init(this, savedInstanceState); SetContentView(Resource.Layout.activity_main); Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar); SetSupportActionBar(toolbar); DrawerLayout drawer = FindViewById <DrawerLayout>(Resource.Id.drawer_layout); ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawer, toolbar, Resource.String.navigation_drawer_open, Resource.String.navigation_drawer_close); drawer.AddDrawerListener(toggle); toggle.SyncState(); navigationView = FindViewById <NavigationView>(Resource.Id.nav_view); navigationView.SetNavigationItemSelectedListener(this); viewFlipper = FindViewById <ViewFlipper>(Resource.Id.viewFlipper); Window.SetBackgroundDrawableResource(Resource.Drawable.background); Window.AddFlags(WindowManagerFlags.LayoutNoLimits); Window.AddFlags(WindowManagerFlags.LayoutInScreen); Window.DecorView.SetFitsSystemWindows(true); Initialize(); }
protected async override void OnCreate(Bundle bundle) { base.OnCreate(bundle); viewFlipper = FindViewById<ViewFlipper>(Resource.Id.bookingflipper); ActionBar.SetDisplayHomeAsUpEnabled(true); ActionBar.SetDisplayShowHomeEnabled(true); InitRefreshers(); InitLists(); workshopSetListView.ItemClick += (sender, e) => { FindViewById<TextView>(Resource.Id.noWorkshops).Visibility = ViewStates.Gone; FindViewById<ProgressBar>(Resource.Id.workshopLoading).Visibility = ViewStates.Visible; InitWorkshopList((int)e.Id, e.Position); }; workshopListView.ItemClick += (sender, e) => { ViewWorkshop((int)e.Id); }; FindViewById<RelativeLayout>(Resource.Id.mainLayout).Invalidate(); //Get Local Data First, then update later await Task.Factory.StartNew(() => LoadSets(true)); //Do a background Sync now await Task.Factory.StartNew(() => LoadSets(false, false)); NotifyListUpdate(); }
public override Dialog OnCreateDialog(Bundle savedInstanceState) { Dialog dialog = new Dialog(Activity); dialog.SetContentView(Resource.Layout.layout_dialog_device_scan); rvMain = dialog.FindViewById <RecyclerView>(Resource.Id.rvMain); vfMain = dialog.FindViewById <ViewFlipper>(Resource.Id.vfMain); srMain = dialog.FindViewById <SwipeRefreshLayout>(Resource.Id.srMain); rvAdapter = new DeviceScanAdapter(rvMain); rvAdapter.OnItemClicked += OnItemSelected; rvManager = new LinearLayoutManager(Application.Context); rvMain.SetLayoutManager(rvManager); rvMain.SetAdapter(rvAdapter); srMain.Refresh += OnRefresh; deviceDiscoverHelper = new Discover(); deviceDiscoverHelper.OnStatusChanged += OnScanStatusChanged; deviceDiscoverHelper.OnDeviceFound += OnScanDeviceFound; deviceDiscoverHelper.Open(); vfMain.PostDelayed(() => { if (vfMain.DisplayedChild == 0) { vfMain.DisplayedChild = 1; } }, 5000); return(dialog); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); _flipper = FindViewById <ViewFlipper>(Resource.Id.viewFlipper); btnNext = FindViewById <Button>(Resource.Id.btnNext); btnPrev = FindViewById <Button>(Resource.Id.btnPrev); // Use button clicks to cycle through views btnNext.Click += (sender, e) => { // Use custom animations _flipper.SetOutAnimation(this, Resource.Animation.slideout_left); _flipper.SetInAnimation(this, Resource.Animation.slidein_right); // Use Android built-in animations //_flipper.SetInAnimation(this, Android.Resource.Animation.SlideInLeft); //_flipper.SetOutAnimation(this, Android.Resource.Animation.SlideOutRight); _flipper.ShowNext(); }; btnPrev.Click += (sender, e) => { // Use custom animations _flipper.SetOutAnimation(this, Resource.Animation.slideout_right); _flipper.SetInAnimation(this, Resource.Animation.slidein_left); // Use Android built-in animations //_flipper.SetInAnimation(this, Android.Resource.Animation.SlideInLeft); //_flipper.SetOutAnimation(this, Android.Resource.Animation.SlideOutRight); _flipper.ShowPrevious(); }; }
protected async override void OnCreate(Bundle bundle) { base.OnCreate(bundle); viewFlipper = FindViewById <ViewFlipper>(Resource.Id.bookingflipper); ActionBar.SetDisplayHomeAsUpEnabled(true); ActionBar.SetDisplayShowHomeEnabled(true); InitRefreshers(); InitLists(); workshopSetListView.ItemClick += (sender, e) => { FindViewById <TextView>(Resource.Id.noWorkshops).Visibility = ViewStates.Gone; FindViewById <ProgressBar>(Resource.Id.workshopLoading).Visibility = ViewStates.Visible; InitWorkshopList((int)e.Id, e.Position); }; workshopListView.ItemClick += (sender, e) => { ViewWorkshop((int)e.Id); }; FindViewById <RelativeLayout>(Resource.Id.mainLayout).Invalidate(); //Get Local Data First, then update later await Task.Factory.StartNew(() => LoadSets(true)); //Do a background Sync now await Task.Factory.StartNew(() => LoadSets(false, false)); NotifyListUpdate(); }
protected void InitComponents() { title = FindViewById <TextView>(Resource.Id.title); notifications = FindViewById <TextView>(Resource.Id.textViewnotification); flipper = FindViewById <ViewFlipper>(Resource.Id.flipper); editTxtNotes = FindViewById <EditText>(Resource.Id.editTxtNotes); fab = FindViewById <FloatingActionButton>(Resource.Id.fab); if (!HideEdit) { fab.Visibility = ViewStates.Visible; } }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.simple_flipper); flippy = FindViewById <ViewFlipper>(Resource.Id.flippy); var buttony = FindViewById <Button>(Resource.Id.buttony); buttony.SetOnClickListener(this); flippy.SetInAnimation(this, R.Animation.SlideInLeft); flippy.SetOutAnimation(this, R.Animation.SlideOutRight); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.simple_flipper); flippy = FindViewById<ViewFlipper>(Resource.Id.flippy); var buttony = FindViewById<Button>(Resource.Id.buttony); buttony.SetOnClickListener(this); flippy.SetInAnimation(this, R.Animation.SlideInLeft); flippy.SetOutAnimation(this, R.Animation.SlideOutRight); }
private void InitComponents() { name = FindViewById <TextView>(Resource.Id.textViewNameValue); name.Text = CurrentUser.FirstName + " " + CurrentUser.LastName; country = FindViewById <Spinner>(Resource.Id.country); country.Adapter = GetCountries(); language = FindViewById <Spinner>(Resource.Id.language); language.Adapter = GetLanguages(); date = FindViewById <EditText>(Resource.Id.studentDateDOB); month = FindViewById <EditText>(Resource.Id.studentMonthDOB); year = FindViewById <EditText>(Resource.Id.studentYearDOB); degree = (RadioGroup)FindViewById(Resource.Id.radioGroupDegree); status = (RadioGroup)FindViewById(Resource.Id.radioGroupStatus); viewFlipper = FindViewById <ViewFlipper>(Resource.Id.welcomeviewflipper); Populate(); }
private void InitComponents() { name = FindViewById<TextView>(Resource.Id.textViewNameValue); name.Text = CurrentUser.FirstName + " " + CurrentUser.LastName; country = FindViewById<Spinner>(Resource.Id.country); country.Adapter = GetCountries(); language = FindViewById<Spinner>(Resource.Id.language); language.Adapter = GetLanguages(); date = FindViewById<EditText>(Resource.Id.studentDateDOB); month = FindViewById<EditText>(Resource.Id.studentMonthDOB); year = FindViewById<EditText>(Resource.Id.studentYearDOB); degree = (RadioGroup)FindViewById(Resource.Id.radioGroupDegree); status = (RadioGroup)FindViewById(Resource.Id.radioGroupStatus); viewFlipper = FindViewById<ViewFlipper>(Resource.Id.welcomeviewflipper); Populate(); }
private void ResetProps() { Number = new EntryPage { Panel = new StackLayout { IsVisible = true }, BorderSpot = new Frame { BorderColor = Color.Yellow } }; Name = new EntryPage { Panel = new StackLayout { IsVisible = false } }; Valid = new EntryPage { Panel = new StackLayout { IsVisible = false } }; Cvv = new EntryPage { Panel = new StackLayout { IsVisible = false } }; ButtonText = new Label { Text = "Next" }; CardSimulationInfo = new ViewFlipper(); LogoCreditCard = new Image(); }
public void InitializeLayoutParadigm(View view) { primaryWebview = view.FindViewById <ObservableWebView>(Resource.Id.primaryWebView); secondaryWebview = view.FindViewById <ObservableWebView>(Resource.Id.secondaryWebView); flipper = view.FindViewById <ViewFlipper>(Resource.Id.view_flipper); text = view.FindViewById <TextView>(Resource.Id.chapterTitle); gridView = view.FindViewById <HeaderFooterGridView>(Resource.Id.chapterGridView); flipper.SetInAnimation(Activity, Resource.Animation.push_down_in_no_alpha); flipper.SetOutAnimation(Activity, Resource.Animation.push_down_out_no_alpha); // Style views Typeface face = Typeface.CreateFromAsset(Activity.Assets, "fonts/Roboto-Regular.ttf"); text.SetTypeface(face, TypefaceStyle.Normal); // WebView setup InitializeWebView(primaryWebview); InitializeWebView(secondaryWebview); primaryWebview.Tag = "primary"; secondaryWebview.Tag = "secondary"; ((LinearLayout)primaryWebview.Parent).LayoutParameters = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.MatchParent, App.STATE.WebviewWeights[0]); ((LinearLayout)secondaryWebview.Parent).LayoutParameters = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.MatchParent, App.STATE.WebviewWeights[1]); if (App.STATE.WebviewWeights[0] == 0) { primaryWebview.IsDeflated = true; } if (App.STATE.WebviewWeights[1] == 0) { secondaryWebview.IsDeflated = true; } // GridView setup if (Build.VERSION.SdkInt >= BuildVersionCodes.Honeycomb) { gridView.ChoiceMode = ChoiceMode.Single; } gridView.ItemClick += SelectChapter; }
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.all_statistics_view, container, false); viewFlipper = view.FindViewById <ViewFlipper>(Resource.Id.viewFlipper1); var viewSwitchGroup = view.FindViewById <MultiLineRadioGroup>(Resource.Id.viewSwitchGroup); viewSwitchGroup.CheckedChanged += ViewSwitchGroup_CheckedChanged; myViewModel.CurrentStatisticViewModel.CurrentZoneToShowFilter = Enums.EZoneFunction.None; view.FindViewById(Resource.Id.header).FindViewById <TextView>(Resource.Id.headerText).Text = "Team statistieken overzicht"; view.FindViewById(Resource.Id.header).FindViewById <TextView>(Resource.Id.teamName).Visibility = ViewStates.Invisible; LoadStats(); return(view); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate (savedInstanceState); SetContentView(Resource.Layout.NewJourneyCalendar); /************************************************| * DECLARING VARIABLES | * for global class use | * | *************************************************/ // Date Picker dateStart = (DatePicker)FindViewById (Resource.Id.DatePickerStart); dateEnd = (DatePicker)FindViewById (Resource.Id.DatePickerEnd); // Buttons - Next Buttons nextButtonDateStart = (Button)FindViewById (Resource.Id.nextButtonDateStart); nextButtonDateEnd = (Button)FindViewById (Resource.Id.nextButtonDateEnd); // Buttons - Back Buttons backButtonDateStart = (Button)FindViewById (Resource.Id.backButtonDateStart); backButtonDateEnd = (Button)FindViewById (Resource.Id.backButtonDateEnd); // View Flipper flipper = (ViewFlipper) FindViewById (Resource.Id.viewFlipper1); /*backButtonDateEnd.Click += delegate { flipper.ShowPrevious(); };*/ /************************************************| * INVOKING METHODS | * | * | *************************************************/ // Listener for Date onDateChanged (dateStart); onDateChanged (dateEnd); // Transitions Transitions (backButtonDateEnd); Transitions (backButtonDateStart); }
protected override void OnCreate(Bundle bundle) { base.OnCreate (bundle); // Set our view from the "main" layout resource SetContentView (Resource.Layout.Main); //var viewGroup = ((ViewGroup)FindViewById<TextView> (Resource.Id.InstructionStep1).Parent); //viewGroup.SetOnTouchListener(new OnSwipeListener(this)); _viewFlipper = FindViewById<ViewFlipper>(Resource.Id.ViewFlipper); // Button _button = FindViewById<Button>(Resource.Id.button1); _button.SetOnClickListener(this); var onSwipeListener = new OnSwipeListener (_viewFlipper, this); FindViewById(Resource.Id.step1View).SetOnTouchListener (onSwipeListener); FindViewById(Resource.Id.step2View).SetOnTouchListener (onSwipeListener); FindViewById(Resource.Id.step3View).SetOnTouchListener (onSwipeListener); FindViewById(Resource.Id.step4View).SetOnTouchListener (onSwipeListener); }
protected override void OnCreate(Bundle bundle) { Console.WriteLine("MainActivity - OnCreate"); base.OnCreate(bundle); _messengerHub = Bootstrapper.GetContainer().Resolve<ITinyMessengerHub>(); _messengerHub.Subscribe<MobileLibraryBrowserItemClickedMessage>(MobileLibraryBrowserItemClickedMessageReceived); RequestWindowFeature(WindowFeatures.ActionBar); SetContentView(Resource.Layout.Main); _actionBarSpinnerAdapter = ArrayAdapter.CreateFromResource(this, Resource.Array.action_list, Resource.Layout.actionbar_spinner_item); ActionBar.NavigationMode = ActionBarNavigationMode.List; ActionBar.Title = string.Empty; ActionBar.SetListNavigationCallbacks(_actionBarSpinnerAdapter, this); ActionBar.SetSelectedNavigationItem(1); _viewFlipper = FindViewById<ViewFlipper>(Resource.Id.main_viewflipper); _miniPlayer = FindViewById<LinearLayout>(Resource.Id.main_miniplayer); _miniPlaylist = FindViewById<LinearLayout>(Resource.Id.main_miniplaylist); _lblArtistName = FindViewById<TextView>(Resource.Id.main_miniplayer_lblArtistName); _lblAlbumTitle = FindViewById<TextView>(Resource.Id.main_miniplayer_lblAlbumTitle); _lblSongTitle = FindViewById<TextView>(Resource.Id.main_miniplayer_lblSongTitle); //_lblNextArtistName = FindViewById<TextView>(Resource.Id.main_miniplaylist_lblNextArtistName); //_lblNextAlbumTitle = FindViewById<TextView>(Resource.Id.main_miniplaylist_lblNextAlbumTitle); //_lblNextSongTitle = FindViewById<TextView>(Resource.Id.main_miniplaylist_lblNextSongTitle); _lblPlaylistCount = FindViewById<TextView>(Resource.Id.main_miniplaylist_lblPlaylistCount); _btnPrevious = FindViewById<ImageButton>(Resource.Id.main_miniplayer_btnPrevious); _btnPlayPause = FindViewById<ImageButton>(Resource.Id.main_miniplayer_btnPlayPause); _btnNext = FindViewById<ImageButton>(Resource.Id.main_miniplayer_btnNext); _btnPlaylist = FindViewById<ImageButton>(Resource.Id.main_miniplaylist_btnPlaylist); _btnShuffle = FindViewById<ImageButton>(Resource.Id.main_miniplaylist_btnShuffle); _btnRepeat = FindViewById<ImageButton>(Resource.Id.main_miniplaylist_btnRepeat); _btnLeft = FindViewById<ImageButton>(Resource.Id.main_miniplaylist_btnLeft); _cboPlaylist = FindViewById<Spinner>(Resource.Id.main_miniplaylist_cboPlaylist); _btnRight = FindViewById<ImageButton>(Resource.Id.main_miniplayer_btnRight); _imageAlbum = FindViewById<SquareImageView>(Resource.Id.main_miniplayer_imageAlbum); _miniPlayer.Click += (sender, args) => _messengerHub.PublishAsync<MobileNavigationManagerCommandMessage>(new MobileNavigationManagerCommandMessage(this, MobileNavigationManagerCommandMessageType.ShowPlayerView)); _btnLeft.SetOnTouchListener(this); _btnRight.SetOnTouchListener(this); _btnPrevious.SetOnTouchListener(this); _btnPlayPause.SetOnTouchListener(this); _btnNext.SetOnTouchListener(this); _btnPlaylist.SetOnTouchListener(this); _btnShuffle.SetOnTouchListener(this); _btnRepeat.SetOnTouchListener(this); _btnPrevious.Click += (sender, args) => OnPlayerPrevious(); _btnPlayPause.Click += (sender, args) => OnPlayerPlayPause(); _btnNext.Click += (sender, args) => OnPlayerNext(); _btnPlaylist.Click += (sender, args) => OnOpenPlaylist(); _btnShuffle.Click += (sender, args) => OnPlayerShuffle(); _btnRepeat.Click += (sender, args) => OnPlayerRepeat(); _btnLeft.Click += BtnLeftOnClick; _btnRight.Click += BtnRightOnClick; // Set initial view flipper item int realIndex = _viewFlipper.IndexOfChild(_miniPlayer); _viewFlipper.DisplayedChild = realIndex; // Create bitmap cache Point size = new Point(); WindowManager.DefaultDisplay.GetSize(size); int maxMemory = (int)(Runtime.GetRuntime().MaxMemory() / 1024); int cacheSize = maxMemory / 16; BitmapCache = new BitmapCache(this, cacheSize, size.X / 6, size.X / 6); _playlistSpinnerAdapter = new ArrayAdapter<string>(this, Resource.Layout.playlist_spinner_item, new string[2] {"Hello", "World"}); _cboPlaylist.Adapter = _playlistSpinnerAdapter; _cboPlaylist.ItemSelected += CboPlaylistOnItemSelected; Console.WriteLine("MainActivity - OnCreate - Binding presenters..."); var navigationManager = (AndroidNavigationManager)Bootstrapper.GetContainer().Resolve<MobileNavigationManager>(); navigationManager.MainActivity = this; // Watch out, this can lead to memory leaks! navigationManager.BindOptionsMenuView(this); navigationManager.BindPlayerStatusView(this); navigationManager.BindMobileMainView(this); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate (savedInstanceState); /************************************************| * DECLARING VARIABLES | * for global class use | * | *************************************************/ Log.Info (Tag, "Choosing Phase began"); SetContentView(Resource.Layout.NewJourneySpecificPreferences); //--------Layout Variables---------// // Images - Interests - New Journey firstImage = (ImageView)FindViewById (Resource.Id.imageView1); secondImage = (ImageView)FindViewById (Resource.Id.imageView2); thirdImage = (ImageView)FindViewById (Resource.Id.imageView3); fourthImage = (ImageView)FindViewById (Resource.Id.imageView4); // Buttons - Moodboard takeItFirst = (Button)FindViewById (Resource.Id.takeItFirst); takeItSecond = (Button) FindViewById (Resource.Id.takeItSecond); takeItThird = (Button)FindViewById (Resource.Id.takeItThird); takeItFourth = (Button)FindViewById (Resource.Id.takeItFourth); // Buttons - Transitions nextButton = (Button) FindViewById (Resource.Id.nextButton); backButton = (Button)FindViewById (Resource.Id.backButton); nextButtonExplanation = (Button)FindViewById (Resource.Id.nextButtonChoosing); backButtonExplanation = (Button)FindViewById (Resource.Id.backButtonChoosing); // Layout - Special Preference - New Journey layoutFirstImage = (LinearLayout)FindViewById (Resource.Id.layoutFirstImage); layoutSecondImage = (LinearLayout)FindViewById (Resource.Id.layoutSecondImage); layoutThirdImage = (LinearLayout)FindViewById (Resource.Id.layoutThirdImage); layoutFourthImage = (LinearLayout)FindViewById (Resource.Id.layoutFourthImage); fullScreen = (LinearLayout)FindViewById (Resource.Id.fullScreenLayout); // Flipper - Specific Preferences - New Journey flipper = (ViewFlipper) FindViewById (Resource.Id.viewFlipper1); //-----------Method Variables---------// // bools isImageFitToScreen = true; isSelected = true; canBeSelected = false; // ints imagesSelected = 0; // Remove Like Buttons from View (o t in Fullscreen View) fullScreen.RemoveView (takeItFirst); fullScreen.RemoveView (takeItSecond); fullScreen.RemoveView (takeItThird); fullScreen.RemoveView (takeItFourth); nextButtonExplanation.Click += delegate { flipper.ShowNext(); }; backButton.Click += delegate { flipper.ShowPrevious(); }; /************************************************| * INVOKING METHODS | * | * | *************************************************/ // Zoom Methods - Interests ImageZoom (firstImage, Tag, fullScreen, layoutFirstImage, takeItFirst); ImageZoom (secondImage, Tag, fullScreen, layoutSecondImage, takeItSecond); ImageZoom (thirdImage, Tag, fullScreen, layoutThirdImage, takeItThird); ImageZoom (fourthImage, Tag, fullScreen, layoutFourthImage, takeItFourth); // Like Methods - Interests clickingImage (firstImage, takeItFirst, fullScreen, layoutFirstImage); clickingImage (secondImage, takeItSecond, fullScreen, layoutSecondImage); clickingImage (thirdImage, takeItThird, fullScreen, layoutThirdImage); clickingImage (fourthImage, takeItFourth, fullScreen, layoutFourthImage); // Transition Methods Transition (nextButton); Transition (backButtonExplanation); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate (savedInstanceState); Log.Warn (Tag, "OnCreate"); /************************************************| * DECLARING VARIABLES | * for global class use | * | *************************************************/ Log.Info (Tag, "Choosing Phase began"); SetContentView(Resource.Layout.MainPreferencesPhaseOne); //--------Layout Variables---------// // Images - Interests - Main Preferences firstImage = (ImageView)FindViewById (Resource.Id.imageView1); secondImage = (ImageView)FindViewById (Resource.Id.imageView2); thirdImage = (ImageView)FindViewById (Resource.Id.imageView3); fourthImage = (ImageView)FindViewById (Resource.Id.imageView4); //imageArray = {firstImage, secondImage, thirdImage, fourthImage} // Layout - MainPreferences - Main Preferences layoutFirstImage = (LinearLayout)FindViewById (Resource.Id.layoutFirstImage); layoutSecondImage = (LinearLayout)FindViewById (Resource.Id.layoutSecondImage); layoutThirdImage = (LinearLayout)FindViewById (Resource.Id.layoutThirdImage); layoutFourthImage = (LinearLayout)FindViewById (Resource.Id.layoutFourthImage); fullScreen = (LinearLayout)FindViewById (Resource.Id.fullScreenLayout); mainPreferences = (LinearLayout)FindViewById (Resource.Id.MainPreferences); imageChoosingExplanation = (LinearLayout)FindViewById (Resource.Id.ImageChoosingExplanation); // Buttons - Main Preferences takeIt = (Button)FindViewById (Resource.Id.takeItFirst); backButton = (Button)FindViewById (Resource.Id.backButton); nextButton = (Button) FindViewById (Resource.Id.nextButton); nextButtonChoosing = (Button)FindViewById (Resource.Id.nextButtonChoosing); fullScreen.RemoveView (takeIt); // Flipper - Main Preferences Main flipper = (ViewFlipper) FindViewById (Resource.Id.viewFlipper1); flipper.ShowNext (); //-----------Method Variables---------// // bools isImageFitToScreen = true; isSelected = true; hasStarted = true; /************************************************| * INVOKING METHODS | * | * | *************************************************/ // Creating the Databse createDatabase(dbPath); nextButtonChoosing.Click += delegate { flipper.ShowPrevious(); }; // Phase Handler next(Tag); // Zoom Methods - Interests ImageZoom (firstImage, Tag, fullScreen, layoutFirstImage); ImageZoom (secondImage, Tag, fullScreen, layoutSecondImage); ImageZoom (thirdImage, Tag, fullScreen, layoutThirdImage); ImageZoom (fourthImage, Tag, fullScreen, layoutFourthImage); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.FourthPage); // Prefix var resourcePrefix = "Math_App.Droid."; // Create stream with path var assembly = typeof(MainActivity).GetTypeInfo().Assembly; Stream stream = assembly.GetManifestResourceStream(resourcePrefix + "Strategies.xml"); // get title from bundle Intent intent = this.Intent; string title = intent.GetStringExtra("title"); // Read Xml file & create strategy object StrategyXmlObject strat = new StrategyXmlObject(); strat = ReaderXml.ReadFile(stream, title); Console.WriteLine(title); // create flipper _flipper = FindViewById<ViewFlipper>(Resource.Id.viewFlipper); // create buttons btnNext = FindViewById<Button>(Resource.Id.btnNext); btnPrev = FindViewById<Button>(Resource.Id.btnPrev); // different views flipper titel = FindViewById<TextView>(Resource.Id.nameAndLevel); titel.Text = strat.Level1.title; info = FindViewById<TextView>(Resource.Id.explanation); info.Text = strat.Level1.text; //image = FindViewById<ImageView>(Resource.Id.img); //int id = Resources.GetIdentifier(strat.Level2.image, "drawable", "Math_App.Droid"); //image.SetImageResource(id); titel2 = FindViewById<TextView>(Resource.Id.nameAndLevel2); titel2.Text = strat.Level2.title; info2 = FindViewById<TextView>(Resource.Id.explanation2); info2.Text = strat.Level2.text; //image2 = FindViewById<ImageView>(Resource.Id.img2); //int id2 = Resources.GetIdentifier(strat.Level2.image, "drawable", "Math_App.Droid"); //image2.SetImageResource(id2); titel3 = FindViewById<TextView>(Resource.Id.nameAndLevel3); titel3.Text = strat.Level3.title; info3 = FindViewById<TextView>(Resource.Id.explanation3); info3.Text = strat.Level3.text; //image3 = FindViewById<ImageView>(Resource.Id.img3); //int id3 = Resources.GetIdentifier(strat.Level3.image, "drawable", "Math_App.Droid"); //image3.SetImageResource(id3); titel4 = FindViewById<TextView>(Resource.Id.nameAndLevel4); titel4.Text = strat.Level4.title; info4 = FindViewById<TextView>(Resource.Id.explanation4); info4.Text = strat.Level4.text; //image4 = FindViewById<ImageView>(Resource.Id.img4); //int id4 = Resources.GetIdentifier(strat.Level4.image, "drawable", "Math_App.Droid"); //image4.SetImageResource(id4); // Use button clicks to cycle through views btnNext.Click += (sender, e) => { // Use custom animations _flipper.SetOutAnimation(this, Resource.Layout.Slideout_top); _flipper.SetInAnimation(this, Resource.Layout.Slidein_bot); // Use Android built-in animations //_flipper.SetInAnimation(this, Android.Resource.Animation.SlideInLeft); //_flipper.SetOutAnimation(this, Android.Resource.Animation.SlideOutRight); _flipper.ShowNext(); }; btnPrev.Click += (sender, e) => { // Use custom animations _flipper.SetOutAnimation(this, Resource.Layout.Slideout_bot); _flipper.SetInAnimation(this, Resource.Layout.Slidein_top); // Use Android built-in animations //_flipper.SetInAnimation(this, Android.Resource.Animation.SlideInLeft); //_flipper.SetOutAnimation(this, Android.Resource.Animation.SlideOutRight); _flipper.ShowPrevious(); }; }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { float density = Resources.DisplayMetrics.Density; if (density == 3) density = 2; //Console.WriteLine("MLBFragment - OnCreateView"); _view = inflater.Inflate(Resource.Layout.MobileLibraryBrowser, container, false); // Get screen size Point size = new Point(); Activity.WindowManager.DefaultDisplay.GetSize(size); // Create bitmap cache int maxMemory = (int)(Runtime.GetRuntime().MaxMemory() / 1024); BitmapCache = new BitmapCache(Activity, maxMemory / 8, size.X / 2, size.X / 2); // Max size = half the screen (grid has 2 columns) SmallBitmapCache = new BitmapCache(Activity, maxMemory / 16, 44 * (int)density, 44 * (int)density); _viewFlipper = _view.FindViewById<ViewFlipper>(Resource.Id.mobileLibraryBrowser_viewFlipper); _imageAlbum = _view.FindViewById<SquareImageView>(Resource.Id.mobileLibraryBrowser_imageAlbum); _lblBreadcrumb = _view.FindViewById<TextView>(Resource.Id.mobileLibraryBrowser_lblBreadcrumb); _layoutAlbum = _view.FindViewById<LinearLayout>(Resource.Id.mobileLibraryBrowser_layoutAlbum); _layoutSongs = _view.FindViewById<LinearLayout>(Resource.Id.mobileLibraryBrowser_layoutSongs); _lblArtistName = _view.FindViewById<TextView>(Resource.Id.mobileLibraryBrowser_lblArtistName); _lblAlbumTitle = _view.FindViewById<TextView>(Resource.Id.mobileLibraryBrowser_lblAlbumTitle); _lblAlbumLength = _view.FindViewById<TextView>(Resource.Id.mobileLibraryBrowser_lblAlbumLength); _lblAlbumSongCount = _view.FindViewById<TextView>(Resource.Id.mobileLibraryBrowser_lblAlbumSongCount); _listViewArtists = _view.FindViewById<ListView>(Resource.Id.mobileLibraryBrowser_listViewArtists); _listViewSongs = _view.FindViewById<ListView>(Resource.Id.mobileLibraryBrowser_listViewSongs); _listViewPlaylists = _view.FindViewById<ListView>(Resource.Id.mobileLibraryBrowser_listViewPlaylists); _gridViewAlbums = _view.FindViewById<GridView>(Resource.Id.mobileLibraryBrowser_gridViewAlbums); _listAdapterArtists = new MobileLibraryBrowserListAdapter(Activity, this, _listViewArtists, _entities.ToList()); _listViewArtists.SetAdapter(_listAdapterArtists); _listViewArtists.ItemClick += ListViewOnItemClick; _listViewArtists.ItemLongClick += ListViewOnItemLongClick; _listAdapterSongs = new MobileLibraryBrowserListAdapter(Activity, this, _listViewSongs, _entities.ToList()); _listViewSongs.SetAdapter(_listAdapterSongs); _listViewSongs.ItemClick += ListViewOnItemClick; _listViewSongs.ItemLongClick += ListViewOnItemLongClick; _gridAdapter = new MobileLibraryBrowserGridAdapter(Activity, this, _gridViewAlbums, _entities.ToList()); _gridViewAlbums.SetAdapter(_gridAdapter); _gridViewAlbums.ItemClick += GridViewOnItemClick; _gridViewAlbums.ItemLongClick += GridViewOnItemLongClick; var navigationManager = (AndroidNavigationManager)Bootstrapper.GetContainer().Resolve<MobileNavigationManager>(); navigationManager.BindMobileLibraryBrowserView(this, _tabType, _browserType, _query); return _view; }
//string path1 = "http://commonsware.com/misc/test2.3gp"; //string path2 = "http://commonsware.com/misc/test.mp4"; protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Spectate); wView = FindViewById<WebView>(Resource.Id.vidview); //set the activeIndex to 0 activeIndex = 0; //midbox viewflipper flipper = FindViewById<ViewFlipper>(Resource.Id.spectateflipper); //graphview graphview = FindViewById<RelativeLayout>(Resource.Id.spec_graphview); //set buttons overview = FindViewById<Button>(Resource.Id.spec_overviewButton); overview.Click += new EventHandler(FlipToOverView); battery = FindViewById<Button>(Resource.Id.spec_batteryButton); battery.Click += new EventHandler(FlipToBattery); camera = FindViewById<Button>(Resource.Id.spec_cameraButton); camera.Click += new EventHandler(FlipToCamera); orient = FindViewById<Button>(Resource.Id.spec_orientbutton); orient.Click += new EventHandler(FlipToPitch); volt0 = FindViewById<Button>(Resource.Id.spec_voltbutton0); volt0.Click += new EventHandler(FlipToVolt0); volt1 = FindViewById<Button>(Resource.Id.spec_voltbutton1); volt1.Click += new EventHandler(FlipToVolt1); amp0 = FindViewById<Button>(Resource.Id.spec_ampbutton0); amp0.Click += new EventHandler(FlipToAmp0); amp1 = FindViewById<Button>(Resource.Id.spec_ampbutton1); amp1.Click += new EventHandler(FlipToAmp1); temp0 = FindViewById<Button>(Resource.Id.spec_tempbutton0); temp0.Click += new EventHandler(FlipToTemp0); temp1 = FindViewById<Button>(Resource.Id.spec_tempbutton1); temp1.Click += new EventHandler(FlipToTemp1); }
public void InitializeLayoutParadigm(View view) { // Set views primaryWebview = view.FindViewById <ObservableWebView>(Resource.Id.primaryWebView); secondaryWebview = view.FindViewById <ObservableWebView>(Resource.Id.secondaryWebView); flipper = view.FindViewById <ViewFlipper>(Resource.Id.view_flipper); gridViewTitle = view.FindViewById <TextView>(Resource.Id.chapterTitle); gridView = view.FindViewById <HeaderFooterGridView>(Resource.Id.chapterGridView); LayoutInflater layoutInflater = LayoutInflater.From(Activity); View footerView = layoutInflater.Inflate(Resource.Layout.FooterWebView, null); gridViewFooterWebview = footerView.FindViewById <ObservableWebView>(Resource.Id.footerWebView); // ViewFlipper animations flipper.SetInAnimation(Activity, Resource.Animation.push_down_in_no_alpha); flipper.SetOutAnimation(Activity, Resource.Animation.push_down_out_no_alpha); // Style views Typeface face = Typeface.CreateFromAsset(Activity.Assets, "fonts/Roboto-Regular.ttf"); gridViewTitle.SetTypeface(face, TypefaceStyle.Normal); // WebView setup InitializeWebView(primaryWebview); InitializeWebView(secondaryWebview); InitializeWebView(gridViewFooterWebview); primaryWebview.Tag = "primary"; secondaryWebview.Tag = "secondary"; ((LinearLayout)primaryWebview.Parent).LayoutParameters = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.MatchParent, App.STATE.WebviewWeights[0]); ((LinearLayout)secondaryWebview.Parent).LayoutParameters = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.MatchParent, App.STATE.WebviewWeights[1]); if (App.STATE.WebviewWeights[0] == 0) { primaryWebview.IsDeflated = true; } if (App.STATE.WebviewWeights[1] == 0) { secondaryWebview.IsDeflated = true; } if (Build.VERSION.SdkInt >= BuildVersionCodes.Honeycomb) { gridView.ChoiceMode = ChoiceMode.Single; } gridView.ItemClick += SelectChapter; if (library == Library.Bible) { gridView.DoSetHeight = false; gridViewTitle.Click += text_Click; gridViewTitle.SetCompoundDrawablesWithIntrinsicBounds(Resource.Drawable.ic_outline, 0, 0, 0); // Set Bible book outline NavStruct outline = new NavStruct() { Book = 0, Chapter = SelectedArticle.Book, Verse = 0 }; OutlineContents = JwStore.QueryArticle("outline", outline, LibraryStorehouse.English).ArticleContent; gridView.AddFooterView(footerView); gridViewFooterWebview.LoadDataWithBaseURL("file:///android_asset/", OutlineContents, "text/html", "utf-8", null); } }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Flipper); //set viewflipper to switch between pages flipper = FindViewById <ViewFlipper>(Resource.Id.simpleflipper); flipper.SetInAnimation(this, Android.Resource.Animation.FadeIn); flipper.SetOutAnimation(this, Android.Resource.Animation.FadeOut); //set up layouts actions var v = flipper.GetChildAt(0); //starting screen v.Touch += delegate { flipper.DisplayedChild = 1; }; v = flipper.GetChildAt(1); //welcome screen v.Touch += delegate { flipper.DisplayedChild = 2; }; v = flipper.GetChildAt(2); //connecting screen v.Touch += delegate { flipper.DisplayedChild = 3; }; v = flipper.GetChildAt(3); //connecting mobile screen v.Touch += delegate { ShowDrinkNotification(); ShowWalkNotification(); flipper.DisplayedChild = 4; }; //for mainmenu screen, all the buttons has to lead somewhere v = flipper.GetChildAt(4); //fetch the button press animation from resource and set it to all the buttons //recycle var button for every button and set actions for them var button1 = FindViewById <ImageButton>(Resource.Id.mainmenu_button1_id); //taskbutton button1.Click += OnTaskButtonClicked; var button2 = FindViewById <ImageButton>(Resource.Id.mainmenu_button2_id); //gearbutton //button2.Click += OnTaskButtonClicked; var button3 = FindViewById <ImageButton>(Resource.Id.mainmenu_button3_id); //creepyguybutton //button3.Click += OnTaskButtonClicked; var button4 = FindViewById <ImageButton>(Resource.Id.mainmenu_button4_id); //helpbutton button4.Click += OnHelpButtonClicked; //in the tasks-screen, we make tasks dynamically based on what kind of- and how many tasks need to be done v = flipper.GetChildAt(5); var task_storage = FindViewById <LinearLayout>(Resource.Id.task_storage_layout); //add taks to the task storgae (Linearlayout) task_storage.AddView(CreateTask("jfdslkkkkjndfkjnfd fds ds df kfd hdf hfd f ddhf dfh fh hfd hd hdf hfd hfd hdf hffdh fdh fdhfdfdh dfh fdh fd df fsdeg ewdsf ds ss df sd sd sd sd fe ge sd d er werferw f er fer f er f erf er fe f re r")); task_storage.AddView(CreateTask("moj")); //init heartrate related stuff heartRate = 0; sensorManager = (SensorManager)GetSystemService(SensorService); heartRateSensor = sensorManager.GetDefaultSensor(SensorType.HeartRate); sl = new SensorListener(this); //create and connect googleapi client _client = new GoogleApiClientBuilder(this, this, this).AddApi(WearableClass.Api).Build(); _client.Connect(); }
protected void InitComponents() { title = FindViewById<TextView>(Resource.Id.title); notifications = FindViewById<TextView>(Resource.Id.textViewnotification); flipper = FindViewById<ViewFlipper>(Resource.Id.flipper); editTxtNotes = FindViewById<EditText>(Resource.Id.editTxtNotes); fab = FindViewById<FloatingActionButton>(Resource.Id.fab); if (!HideEdit) { fab.Visibility = ViewStates.Visible; } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate (savedInstanceState); RetrieveDatafromDB (); //existingJourney = true; if (existingJourney == false) { SetContentView (Resource.Layout.Main); newJourneyBtn = (Button)FindViewById (Resource.Id.NewJourneyButton); userDataBtn = (Button)FindViewById (Resource.Id.UserDataButton); backUserDataBtn = (Button)FindViewById (Resource.Id.backButtonUserData); resetBtn = (Button)FindViewById (Resource.Id.NewMainPreferences); flipper = (ViewFlipper)FindViewById (Resource.Id.viewFlipper1); Menu (); } if (existingJourney == true) { SetContentView (Resource.Layout.ExistingJourney); Log.Info (Tag, "existing Journey false"); voiceResultText = (TextView)FindViewById (Resource.Id.VoiceResultText); speechListener = (Button)FindViewById (Resource.Id.voiceButton); speechListener.Click += RecordVoice; newComJourneyBtn = (Button)FindViewById (Resource.Id.ExistingNewJourney); existingMainMenu = (Button)FindViewById (Resource.Id.ExistingMainMenu); existingMainMenu.Click += delegate { using (var connection = new SQLiteConnection(dbPath)) { var User = connection.Get<User> (1); User.ExistingJourney = false; connection.Update(User); StartActivity (typeof(GowlMain)); Finish(); } }; newComJourneyBtn.Click += delegate { StartActivity(typeof(NewJourneySpecificPreference)); Finish(); }; } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate (savedInstanceState); Log.Warn (Tag, "OnCreate"); /************************************************| * DECLARING VARIABLES | * for global class use | * | *************************************************/ Log.Info (Tag, "Choosing Phase began"); SetContentView(Resource.Layout.NewJourney); //--------Layout Variables---------// // Images - Interests - New Journey firstImage = (ImageView)FindViewById (Resource.Id.imageView1); secondImage = (ImageView)FindViewById (Resource.Id.imageView2); thirdImage = (ImageView)FindViewById (Resource.Id.imageView3); fourthImage = (ImageView)FindViewById (Resource.Id.imageView4); // Images - Person Count Symbols firstPersonImage = (ImageView) FindViewById (Resource.Id.imageView5); secondPersonImage = (ImageView)FindViewById (Resource.Id.imageView6); thirdPersonImage = (ImageView)FindViewById (Resource.Id.imageView7); fourthPersonImage = (ImageView)FindViewById (Resource.Id.imageView8); // Layout - Special Preference - New Journey layoutFirstImage = (LinearLayout)FindViewById (Resource.Id.layoutFirstImage); layoutSecondImage = (LinearLayout)FindViewById (Resource.Id.layoutSecondImage); layoutThirdImage = (LinearLayout)FindViewById (Resource.Id.layoutThirdImage); layoutFourthImage = (LinearLayout)FindViewById (Resource.Id.layoutFourthImage); fullScreen = (LinearLayout)FindViewById (Resource.Id.fullScreenLayout); mainPreferences = (LinearLayout)FindViewById (Resource.Id.MainPreferences); imageChoosingExplanation = (LinearLayout)FindViewById (Resource.Id.ImageChoosingExplanation); // Buttons - Moodboard takeItFirst = (Button)FindViewById (Resource.Id.takeItFirst); takeItSecond = (Button) FindViewById (Resource.Id.takeItSecond); takeItThird = (Button)FindViewById (Resource.Id.takeItThird); takeItFourth = (Button)FindViewById (Resource.Id.takeItFourth); // Buttons - Back Buttons backButtonMoodboard = (Button)FindViewById (Resource.Id.backButton); backButtonExplanation = (Button)FindViewById (Resource.Id.backButtonChoosing); backButtonDateStart = (Button)FindViewById (Resource.Id.backButtonDateStart); backButtonDateEnd = (Button)FindViewById (Resource.Id.backButtonDateEnd); backButtonPersonCount = (Button)FindViewById (Resource.Id.backButtonPersonCount); // Buttons - Next Buttons nextButtonMoodboard = (Button) FindViewById (Resource.Id.nextButton); nextButtonChoosing = (Button)FindViewById (Resource.Id.nextButtonChoosing); nextButtonDateStart = (Button)FindViewById (Resource.Id.nextButtonDateStart); nextButtonDateEnd = (Button)FindViewById (Resource.Id.nextButtonDateEnd); nextButtonPersonCount = (Button)FindViewById (Resource.Id.nextButtonPersonCount); // Remove Like Buttons from View (o t in Fullscreen View) fullScreen.RemoveView (takeItFirst); fullScreen.RemoveView (takeItSecond); fullScreen.RemoveView (takeItThird); fullScreen.RemoveView (takeItFourth); // Flipper - Main Preferences Main flipper = (ViewFlipper) FindViewById (Resource.Id.viewFlipper1); // Date Picker dateStart = (DatePicker)FindViewById (Resource.Id.DatePickerStart); dateEnd = (DatePicker)FindViewById (Resource.Id.DatePickerEnd); //-----------Method Variables---------// // bools isImageFitToScreen = true; isImageChoosen = true; isSelected = true; // ints imagesSelected = 0; phase = 1; /************************************************| * INVOKING METHODS | * | * | *************************************************/ nextButtonChoosing.Click += delegate { flipper.ShowNext(); }; // Only for testing // ONLY FOR TESTING - DELETED WHEN RELEASED //-----------Database is created---------// createDatabase(dbPath); // Phase Handler next (Tag, nextButtonMoodboard); next (Tag, nextButtonPersonCount); next (Tag, nextButtonDateStart); next (Tag, nextButtonDateEnd); back (backButtonMoodboard); back (backButtonExplanation); back (backButtonDateStart); back (backButtonDateEnd); // Zoom Methods - Interests ImageZoom (firstImage, Tag, fullScreen, layoutFirstImage, takeItFirst); ImageZoom (secondImage, Tag, fullScreen, layoutSecondImage, takeItSecond); ImageZoom (thirdImage, Tag, fullScreen, layoutThirdImage, takeItThird); ImageZoom (fourthImage, Tag, fullScreen, layoutFourthImage, takeItFourth); ImageZoom (firstPersonImage, Tag, fullScreen, layoutFirstImage, takeItFirst); ImageZoom (secondPersonImage, Tag, fullScreen, layoutFirstImage, takeItFirst); ImageZoom (thirdPersonImage, Tag, fullScreen, layoutFirstImage, takeItFirst); ImageZoom (fourthPersonImage, Tag, fullScreen, layoutFirstImage, takeItFirst); }
public OnSwipeListener(ViewFlipper viewFlipper, MainActivity activity) { _viewFlipper = viewFlipper; _activity = activity; }
protected override void OnCreate(Bundle bundle) { base.OnCreate (bundle); Window.RequestFeature (WindowFeatures.NoTitle); SetContentView (Resource.Layout.Main); Window.SetBackgroundDrawableResource (Resource.Drawable.empty); Window.SetFeatureInt (WindowFeatures.NoTitle,0); Window.ClearFlags (WindowManagerFlags.DimBehind); kalinga = Typeface.CreateFromAsset (this.Assets, "fonts/kalinga.ttf"); kalingab = Typeface.CreateFromAsset (this.Assets, "fonts/kalingab.ttf"); prefs = GetPreferences (FileCreationMode.Append); firstTime = prefs.GetBoolean (FIRST, true); tSel = prefs.GetBoolean (TIMESEL, true); flipper = FindViewById<ViewFlipper> (Resource.Id.viewFlipper1); viewStart = FindViewById<LinearLayout> (Resource.Id.view1); viewSearch = FindViewById<LinearLayout> (Resource.Id.view2); ibSearch = FindViewById<ImageButton> (Resource.Id.ibSearch); ibTravel = FindViewById<ImageButton> (Resource.Id.ibTravel); ibPrevious = FindViewById<ImageButton> (Resource.Id.ibPrevious); main = FindViewById<LinearLayout> (Resource.Id.llMain); from = FindViewById<TextView> (Resource.Id.tvFrom); fromInput = FindViewById<AutoCompleteTextView> (Resource.Id.atvFrom); toInput = FindViewById<AutoCompleteTextView> (Resource.Id.atvTo); to = FindViewById<TextView> (Resource.Id.tvTo); dateLabel = FindViewById<Button> (Resource.Id.tvDate); timeLabel = FindViewById<Button> (Resource.Id.tvTime); rbDepart = FindViewById<RadioButton> (Resource.Id.rbDeparture); rbArrive = FindViewById<RadioButton> (Resource.Id.rbArrival); var dateButton = FindViewById<ImageButton> (Resource.Id.btnDate); var timeButton = FindViewById<ImageButton> (Resource.Id.btnTime); var btnGo = FindViewById<Button> (Resource.Id.btnGo); dateButton.Click += DatePicker_Dialog; dateLabel.Click += DatePicker_Dialog; timeButton.Click += TimePicker_Dialog; timeLabel.Click += TimePicker_Dialog; btnGo.Click += Download_Itinerary; rbDepart.Click += RadioButtonClick; rbArrive.Click += RadioButtonClick; btnGo.Click += CloseKeyBoard; main.Click += CloseKeyBoard; from.Click += ShowFocus; to.Click += ShowFocus; fromInput.TextChanged += ChangeGravity; toInput.TextChanged += ChangeGravity; ibSearch.Click += NextView; ibPrevious.Click += PreviousView; ibTravel.Click += delegate { StartActivity (typeof (ActivityUnderConstruction)); }; DateTime now = DateTime.Now; var day = XTool.CatchZero (now.Day); var month = XTool.CatchZero (now.Month); var year = XTool.CatchZero (now.Year - 2000); var hour = XTool.CatchZero (now.Hour); var minute = XTool.CatchZero (now.Minute); RunOnUiThread (() => { dateLabel.Text = String.Format ("{0}/{1}/{2}", day, month, year); timeLabel.Text = String.Format ("{0}:{1}", hour, minute); rbDepart.Checked = tSel; rbArrive.Checked = !tSel; from.Typeface = kalinga; fromInput.Typeface = kalingab; to.Typeface = kalinga; toInput.Typeface = kalingab; dateLabel.Typeface = kalinga; timeLabel.Typeface = kalinga; rbArrive.Typeface = tSel ? kalinga : kalingab; rbDepart.Typeface = tSel ? kalingab : kalinga; btnGo.Typeface = kalingab; }); if (firstTime) { Download_Stations (); } else { // using (StreamReader reader = new StreamReader(Assets.Open ("stations.txt"))) // { // var line = reader.ReadToEnd (); // reader.Close (); // SaveStations (line); // } } var dbStation = new StationCommands (this); List<string> list = new List<string> (); list = dbStation.All; dbStation.Close (); autoCompleteAdapter = new ArrayAdapter (this, Resource.Layout.autocomplete, list.ToArray ()); fromInput.Adapter = autoCompleteAdapter; toInput.Adapter = autoCompleteAdapter; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); Xamarin.Essentials.Platform.Init(this, savedInstanceState); SetContentView(Resource.Layout.activity_main); // Get the control resources from the layout frame_home = FindViewById <FrameLayout>(Resource.Id.frame_home); frame_dashboard = FindViewById <FrameLayout>(Resource.Id.frame_dashboard); frame_log = FindViewById <RelativeLayout>(Resource.Id.frame_log); upload_btn = (Button)FindViewById(Resource.Id.dashboard_uploadBtn); record_btn = (Button)FindViewById(Resource.Id.dashboard_recordBtn); textview_status = FindViewById <TextView>(Resource.Id.dashboard_file_status); textview_record_status = FindViewById <TextView>(Resource.Id.dashboard_record_status); upload_btn.Click += Upload_btn_Click; record_btn.Click += Record_btn_Click; edittext_treeid = FindViewById <EditText>(Resource.Id.current_q_treeid_edittext); edittext_property = FindViewById <EditText>(Resource.Id.current_q_property_edittext); edittext_oldval = FindViewById <EditText>(Resource.Id.current_q_oldval_edittext); edittext_newval = FindViewById <EditText>(Resource.Id.current_q_newval_edittext); log_listview = FindViewById <ListView>(Resource.Id.log_listview); session_listview_adapter = new SessionAdapter(sessions); log_listview.Adapter = session_listview_adapter; log_listview.ItemClick += Log_listview_ItemClick; InterpretationInstance instance; NLQ query; string[] queryTypes = { "SESSION_START", "GET_TREE", "EDIT_PROPERTY", "SESION_END" }; Random rand = new Random(); for (int i = 0; i < 10; i++) { instance = new InterpretationInstance(); instance.survey_name = "BS5837 Test Survey"; instance.tree_id = "T" + rand.Next(1, 100).ToString(); instance.session_datetime = DateTime.Now; int count = 0; for (int j = 0; j < 4; j++) { query = new NLQ(); query.tree_id = instance.tree_id; query.query_type = queryTypes[count]; query.property_actioned = "Maturity"; query.property_val_old = "Young"; query.property_val_new = "Mature"; instance.session_queries.Add(query); count++; } sessions.Add(instance); } listview_detailed_log = FindViewById <ListView>(Resource.Id.detailed_listview); listview_detailed_log.ItemClick += Listview_detailed_log_ItemClick; button_execute_all = FindViewById <Button>(Resource.Id.button_exe_all); button_execute_all.Click += Button_execute_all_Click; textview_itemdetail_title = FindViewById <TextView>(Resource.Id.query_detail_name); textview_itemdetail_qtype = FindViewById <TextView>(Resource.Id.query_detail_querytype_val); edittext_itemdetail_prop = FindViewById <EditText>(Resource.Id.query_detail_property_val); edittext_itemdetail_oldval = FindViewById <EditText>(Resource.Id.query_detail_oldval_val); edittext_itemdetail_newval = FindViewById <EditText>(Resource.Id.query_detail_newval_val); button_itemdetail_save = FindViewById <Button>(Resource.Id.query_detail_save_button); button_itemdetail_save.Click += Button_itemdetail_save_Click; vf = FindViewById <ViewFlipper>(Resource.Id.viewflipper_logview); button_export = FindViewById <Button>(Resource.Id.button_export); button_export.Click += Button_export_Click; BottomNavigationView navigation = FindViewById <BottomNavigationView>(Resource.Id.navigation); navigation.SetOnNavigationItemSelectedListener(this); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.Main); ImageButton Boton1 = FindViewById <ImageButton>(Resource.Id.imageButton1); ImageButton Boton2 = FindViewById <ImageButton>(Resource.Id.imageButton2); ImageButton Boton3 = FindViewById <ImageButton>(Resource.Id.imageButton3); ImageButton Boton4 = FindViewById <ImageButton>(Resource.Id.imageButton4); ImageButton Boton5 = FindViewById <ImageButton>(Resource.Id.imageButton5); ImageButton Boton6 = FindViewById <ImageButton>(Resource.Id.imageButton6); ImageButton Boton7 = FindViewById <ImageButton>(Resource.Id.imageButton7); ImageButton Boton8 = FindViewById <ImageButton>(Resource.Id.imageButton8); ImageButton Boton9 = FindViewById <ImageButton>(Resource.Id.imageButton9); ImageButton Boton10 = FindViewById <ImageButton>(Resource.Id.imageButton10); ImageButton Boton11 = FindViewById <ImageButton>(Resource.Id.imageButton11); Imagen = FindViewById <ViewFlipper>(Resource.Id.ImagenesCar); fade_in = AnimationUtils.LoadAnimation(this, Resource.Animation.Fade_in); fade_put = AnimationUtils.LoadAnimation(this, Resource.Animation.Fade_put); Imagen.SetInAnimation(ApplicationContext, Resource.Animation.Fade_in); Imagen.SetOutAnimation(ApplicationContext, Resource.Animation.Fade_put); Imagen.SetFlipInterval(5000); Imagen.StartFlipping(); Boton1.Click += delegate { try { Practica4ParcialUYS.SitioCine.ServiCine Ser = new Practica4ParcialUYS.SitioCine.ServiCine(); DataSet Con = new DataSet(); Con = Ser.BuscarPeli("Donnie Darko"); DataRow Renglon; Renglon = Con.Tables["Informacion"].Rows[0]; Titu = Renglon["Nombre"].ToString(); Gene = Renglon["Genero"].ToString(); Clasi = Renglon["Clasificacion"].ToString(); Dura = Renglon["Duracion"].ToString(); Dire = Renglon["Director"].ToString(); Acto = Renglon["Actores"].ToString(); Sino = Renglon["Sinopsis"].ToString(); Fe = Renglon["Fecha"].ToString(); Cargar(); } catch (System.Exception) { try { Practica4ParcialUYS.ServiCineSql.Service Ser = new Practica4ParcialUYS.ServiCineSql.Service(); DataSet Con = new DataSet(); Con = Ser.Consultar("Donnie Darko"); DataRow Renglon; Renglon = Con.Tables["Informacion"].Rows[0]; Titu = Renglon["Nombre"].ToString(); Gene = Renglon["Genero"].ToString(); Clasi = Renglon["Clasificacion"].ToString(); Dura = Renglon["Duracion"].ToString(); Dire = Renglon["Director"].ToString(); Acto = Renglon["Actores"].ToString(); Sino = Renglon["Sinopsis"].ToString(); Fe = Renglon["Fecha_Estreno"].ToString(); Cargar(); } catch (Exception) { Toast.MakeText(this, "Erro Al Busca La Peli", ToastLength.Long).Show(); } } }; Boton2.Click += delegate { try { Practica4ParcialUYS.SitioCine.ServiCine Ser = new Practica4ParcialUYS.SitioCine.ServiCine(); DataSet Con = new DataSet(); Con = Ser.BuscarPeli("El efecto mariposa"); DataRow Renglon; Renglon = Con.Tables["Informacion"].Rows[0]; Titu = Renglon["Nombre"].ToString(); Gene = Renglon["Genero"].ToString(); Clasi = Renglon["Clasificacion"].ToString(); Dura = Renglon["Duracion"].ToString(); Dire = Renglon["Director"].ToString(); Acto = Renglon["Actores"].ToString(); Sino = Renglon["Sinopsis"].ToString(); Fe = Renglon["Fecha"].ToString(); Cargar(); } catch (System.Exception) { try { Practica4ParcialUYS.ServiCineSql.Service Ser = new Practica4ParcialUYS.ServiCineSql.Service(); DataSet Con = new DataSet(); Con = Ser.Consultar("El efecto mariposa"); DataRow Renglon; Renglon = Con.Tables["Informacion"].Rows[0]; Titu = Renglon["Nombre"].ToString(); Gene = Renglon["Genero"].ToString(); Clasi = Renglon["Clasificacion"].ToString(); Dura = Renglon["Duracion"].ToString(); Dire = Renglon["Director"].ToString(); Acto = Renglon["Actores"].ToString(); Sino = Renglon["Sinopsis"].ToString(); Fe = Renglon["Fecha_Estreno"].ToString(); Cargar(); } catch (Exception) { Toast.MakeText(this, "Erro Al Busca La Peli", ToastLength.Long).Show(); } } }; Boton3.Click += delegate { try { Practica4ParcialUYS.SitioCine.ServiCine Ser = new Practica4ParcialUYS.SitioCine.ServiCine(); DataSet Con = new DataSet(); Con = Ser.BuscarPeli("El exorcista"); DataRow Renglon; Renglon = Con.Tables["Informacion"].Rows[0]; Titu = Renglon["Nombre"].ToString(); Gene = Renglon["Genero"].ToString(); Clasi = Renglon["Clasificacion"].ToString(); Dura = Renglon["Duracion"].ToString(); Dire = Renglon["Director"].ToString(); Acto = Renglon["Actores"].ToString(); Sino = Renglon["Sinopsis"].ToString(); Fe = Renglon["Fecha"].ToString(); Cargar(); } catch (System.Exception) { try { Practica4ParcialUYS.ServiCineSql.Service Ser = new Practica4ParcialUYS.ServiCineSql.Service(); DataSet Con = new DataSet(); Con = Ser.Consultar("El exorcista"); DataRow Renglon; Renglon = Con.Tables["Informacion"].Rows[0]; Titu = Renglon["Nombre"].ToString(); Gene = Renglon["Genero"].ToString(); Clasi = Renglon["Clasificacion"].ToString(); Dura = Renglon["Duracion"].ToString(); Dire = Renglon["Director"].ToString(); Acto = Renglon["Actores"].ToString(); Sino = Renglon["Sinopsis"].ToString(); Fe = Renglon["Fecha_Estreno"].ToString(); Cargar(); } catch (Exception) { Toast.MakeText(this, "Erro Al Busca La Peli", ToastLength.Long).Show(); } } }; Boton4.Click += delegate { try { Practica4ParcialUYS.SitioCine.ServiCine Ser = new Practica4ParcialUYS.SitioCine.ServiCine(); DataSet Con = new DataSet(); Con = Ser.BuscarPeli("El increible castillo vagabundo"); DataRow Renglon; Renglon = Con.Tables["Informacion"].Rows[0]; Titu = Renglon["Nombre"].ToString(); Gene = Renglon["Genero"].ToString(); Clasi = Renglon["Clasificacion"].ToString(); Dura = Renglon["Duracion"].ToString(); Dire = Renglon["Director"].ToString(); Acto = Renglon["Actores"].ToString(); Sino = Renglon["Sinopsis"].ToString(); Fe = Renglon["Fecha"].ToString(); Cargar(); } catch (System.Exception) { try { Practica4ParcialUYS.ServiCineSql.Service Ser = new Practica4ParcialUYS.ServiCineSql.Service(); DataSet Con = new DataSet(); Con = Ser.Consultar("El increible castillo vagabundo"); DataRow Renglon; Renglon = Con.Tables["Informacion"].Rows[0]; Titu = Renglon["Nombre"].ToString(); Gene = Renglon["Genero"].ToString(); Clasi = Renglon["Clasificacion"].ToString(); Dura = Renglon["Duracion"].ToString(); Dire = Renglon["Director"].ToString(); Acto = Renglon["Actores"].ToString(); Sino = Renglon["Sinopsis"].ToString(); Fe = Renglon["Fecha_Estreno"].ToString(); Cargar(); } catch (Exception) { Toast.MakeText(this, "Erro Al Busca La Peli", ToastLength.Long).Show(); } } }; Boton5.Click += delegate { try { Practica4ParcialUYS.SitioCine.ServiCine Ser = new Practica4ParcialUYS.SitioCine.ServiCine(); DataSet Con = new DataSet(); Con = Ser.BuscarPeli("Intouchables"); DataRow Renglon; Renglon = Con.Tables["Informacion"].Rows[0]; Titu = Renglon["Nombre"].ToString(); Gene = Renglon["Genero"].ToString(); Clasi = Renglon["Clasificacion"].ToString(); Dura = Renglon["Duracion"].ToString(); Dire = Renglon["Director"].ToString(); Acto = Renglon["Actores"].ToString(); Sino = Renglon["Sinopsis"].ToString(); Fe = Renglon["Fecha"].ToString(); Cargar(); } catch (System.Exception) { try { Practica4ParcialUYS.ServiCineSql.Service Ser = new Practica4ParcialUYS.ServiCineSql.Service(); DataSet Con = new DataSet(); Con = Ser.Consultar("Intouchables"); DataRow Renglon; Renglon = Con.Tables["Informacion"].Rows[0]; Titu = Renglon["Nombre"].ToString(); Gene = Renglon["Genero"].ToString(); Clasi = Renglon["Clasificacion"].ToString(); Dura = Renglon["Duracion"].ToString(); Dire = Renglon["Director"].ToString(); Acto = Renglon["Actores"].ToString(); Sino = Renglon["Sinopsis"].ToString(); Fe = Renglon["Fecha_Estreno"].ToString(); Cargar(); } catch (Exception) { Toast.MakeText(this, "Erro Al Busca La Peli", ToastLength.Long).Show(); } } }; Boton6.Click += delegate { try { Practica4ParcialUYS.SitioCine.ServiCine Ser = new Practica4ParcialUYS.SitioCine.ServiCine(); DataSet Con = new DataSet(); Con = Ser.BuscarPeli("La naranja mecanica"); DataRow Renglon; Renglon = Con.Tables["Informacion"].Rows[0]; Titu = Renglon["Nombre"].ToString(); Gene = Renglon["Genero"].ToString(); Clasi = Renglon["Clasificacion"].ToString(); Dura = Renglon["Duracion"].ToString(); Dire = Renglon["Director"].ToString(); Acto = Renglon["Actores"].ToString(); Sino = Renglon["Sinopsis"].ToString(); Fe = Renglon["Fecha"].ToString(); Cargar(); } catch (System.Exception) { try { Practica4ParcialUYS.ServiCineSql.Service Ser = new Practica4ParcialUYS.ServiCineSql.Service(); DataSet Con = new DataSet(); Con = Ser.Consultar("La naranja mecanica"); DataRow Renglon; Renglon = Con.Tables["Informacion"].Rows[0]; Titu = Renglon["Nombre"].ToString(); Gene = Renglon["Genero"].ToString(); Clasi = Renglon["Clasificacion"].ToString(); Dura = Renglon["Duracion"].ToString(); Dire = Renglon["Director"].ToString(); Acto = Renglon["Actores"].ToString(); Sino = Renglon["Sinopsis"].ToString(); Fe = Renglon["Fecha_Estreno"].ToString(); Cargar(); } catch (Exception) { Toast.MakeText(this, "Erro Al Busca La Peli", ToastLength.Long).Show(); } } }; Boton7.Click += delegate { try { Practica4ParcialUYS.SitioCine.ServiCine Ser = new Practica4ParcialUYS.SitioCine.ServiCine(); DataSet Con = new DataSet(); Con = Ser.BuscarPeli("Las ventajas de ser invisible"); DataRow Renglon; Renglon = Con.Tables["Informacion"].Rows[0]; Titu = Renglon["Nombre"].ToString(); Gene = Renglon["Genero"].ToString(); Clasi = Renglon["Clasificacion"].ToString(); Dura = Renglon["Duracion"].ToString(); Dire = Renglon["Director"].ToString(); Acto = Renglon["Actores"].ToString(); Sino = Renglon["Sinopsis"].ToString(); Fe = Renglon["Fecha"].ToString(); Cargar(); } catch (System.Exception) { try { Practica4ParcialUYS.ServiCineSql.Service Ser = new Practica4ParcialUYS.ServiCineSql.Service(); DataSet Con = new DataSet(); Con = Ser.Consultar("Las ventajas de ser invisible"); DataRow Renglon; Renglon = Con.Tables["Informacion"].Rows[0]; Titu = Renglon["Nombre"].ToString(); Gene = Renglon["Genero"].ToString(); Clasi = Renglon["Clasificacion"].ToString(); Dura = Renglon["Duracion"].ToString(); Dire = Renglon["Director"].ToString(); Acto = Renglon["Actores"].ToString(); Sino = Renglon["Sinopsis"].ToString(); Fe = Renglon["Fecha_Estreno"].ToString(); Cargar(); } catch (Exception) { Toast.MakeText(this, "Erro Al Busca La Peli", ToastLength.Long).Show(); } } }; Boton8.Click += delegate { try { Practica4ParcialUYS.SitioCine.ServiCine Ser = new Practica4ParcialUYS.SitioCine.ServiCine(); DataSet Con = new DataSet(); Con = Ser.BuscarPeli("Requiem por un sueno"); DataRow Renglon; Renglon = Con.Tables["Informacion"].Rows[0]; Titu = Renglon["Nombre"].ToString(); Gene = Renglon["Genero"].ToString(); Clasi = Renglon["Clasificacion"].ToString(); Dura = Renglon["Duracion"].ToString(); Dire = Renglon["Director"].ToString(); Acto = Renglon["Actores"].ToString(); Sino = Renglon["Sinopsis"].ToString(); Fe = Renglon["Fecha"].ToString(); Cargar(); } catch (System.Exception) { try { Practica4ParcialUYS.ServiCineSql.Service Ser = new Practica4ParcialUYS.ServiCineSql.Service(); DataSet Con = new DataSet(); Con = Ser.Consultar("Requiem por un sueno"); DataRow Renglon; Renglon = Con.Tables["Informacion"].Rows[0]; Titu = Renglon["Nombre"].ToString(); Gene = Renglon["Genero"].ToString(); Clasi = Renglon["Clasificacion"].ToString(); Dura = Renglon["Duracion"].ToString(); Dire = Renglon["Director"].ToString(); Acto = Renglon["Actores"].ToString(); Sino = Renglon["Sinopsis"].ToString(); Fe = Renglon["Fecha_Estreno"].ToString(); Cargar(); } catch (Exception) { Toast.MakeText(this, "Erro Al Busca La Peli", ToastLength.Long).Show(); } } }; Boton9.Click += delegate { try { Practica4ParcialUYS.SitioCine.ServiCine Ser = new Practica4ParcialUYS.SitioCine.ServiCine(); DataSet Con = new DataSet(); Con = Ser.BuscarPeli("Straight Outta Compton"); DataRow Renglon; Renglon = Con.Tables["Informacion"].Rows[0]; Titu = Renglon["Nombre"].ToString(); Gene = Renglon["Genero"].ToString(); Clasi = Renglon["Clasificacion"].ToString(); Dura = Renglon["Duracion"].ToString(); Dire = Renglon["Director"].ToString(); Acto = Renglon["Actores"].ToString(); Sino = Renglon["Sinopsis"].ToString(); Fe = Renglon["Fecha"].ToString(); Cargar(); } catch (System.Exception) { try { Practica4ParcialUYS.ServiCineSql.Service Ser = new Practica4ParcialUYS.ServiCineSql.Service(); DataSet Con = new DataSet(); Con = Ser.Consultar("Straight outta compton"); DataRow Renglon; Renglon = Con.Tables["Informacion"].Rows[0]; Titu = Renglon["Nombre"].ToString(); Gene = Renglon["Genero"].ToString(); Clasi = Renglon["Clasificacion"].ToString(); Dura = Renglon["Duracion"].ToString(); Dire = Renglon["Director"].ToString(); Acto = Renglon["Actores"].ToString(); Sino = Renglon["Sinopsis"].ToString(); Fe = Renglon["Fecha_Estreno"].ToString(); Cargar(); } catch (Exception) { Toast.MakeText(this, "Erro Al Busca La Peli", ToastLength.Long).Show(); } } }; Boton10.Click += delegate { try { Practica4ParcialUYS.SitioCine.ServiCine Ser = new Practica4ParcialUYS.SitioCine.ServiCine(); DataSet Con = new DataSet(); Con = Ser.BuscarPeli("Wolverine inmortal"); DataRow Renglon; Renglon = Con.Tables["Informacion"].Rows[0]; Titu = Renglon["Nombre"].ToString(); Gene = Renglon["Genero"].ToString(); Clasi = Renglon["Clasificacion"].ToString(); Dura = Renglon["Duracion"].ToString(); Dire = Renglon["Director"].ToString(); Acto = Renglon["Actores"].ToString(); Sino = Renglon["Sinopsis"].ToString(); Fe = Renglon["Fecha"].ToString(); Cargar(); } catch (System.Exception) { try { Practica4ParcialUYS.ServiCineSql.Service Ser = new Practica4ParcialUYS.ServiCineSql.Service(); DataSet Con = new DataSet(); Con = Ser.Consultar("Wolverine Inmortal"); DataRow Renglon; Renglon = Con.Tables["Informacion"].Rows[0]; Titu = Renglon["Nombre"].ToString(); Gene = Renglon["Genero"].ToString(); Clasi = Renglon["Clasificacion"].ToString(); Dura = Renglon["Duracion"].ToString(); Dire = Renglon["Director"].ToString(); Acto = Renglon["Actores"].ToString(); Sino = Renglon["Sinopsis"].ToString(); Fe = Renglon["Fecha_Estreno"].ToString(); Cargar(); } catch (Exception) { Toast.MakeText(this, "Erro Al Busca La Peli", ToastLength.Long).Show(); } } }; Boton11.Click += delegate { try { Practica4ParcialUYS.SitioCine.ServiCine Ser = new Practica4ParcialUYS.SitioCine.ServiCine(); DataSet Con = new DataSet(); Con = Ser.BuscarPeli("Comunidad"); DataRow Renglon; Renglon = Con.Tables["Informacion"].Rows[0]; Titu = Renglon["Nombre"].ToString(); Gene = Renglon["Genero"].ToString(); Clasi = Renglon["Clasificacion"].ToString(); Dura = Renglon["Duracion"].ToString(); Dire = Renglon["Director"].ToString(); Acto = Renglon["Actores"].ToString(); Sino = Renglon["Sinopsis"].ToString(); Fe = Renglon["Fecha"].ToString(); Cargar(); } catch (System.Exception) { Toast.MakeText(this, "Erro Al Busca La Peli", ToastLength.Long).Show(); } }; }
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.statistic_game_view, container, false); myViewModel = new GameStatisticViewModel(DbManager.Instance); Button shotclockButton = view.FindViewById <Button>(Resource.Id.shotclockButton); Button turnoverButton = view.FindViewById <Button>(Resource.Id.turnoverButton); Button shotButton = view.FindViewById <Button>(Resource.Id.shotButton); Button goalButton = view.FindViewById <Button>(Resource.Id.goalButton); TextView homeTeam = view.FindViewById <TextView>(Resource.Id.homeTeamText); TextView awayTeam = view.FindViewById <TextView>(Resource.Id.awayTeamText); homeTeam.Text = myViewModel.HomeTeam; awayTeam.Text = myViewModel.AwayTeam; shotButton.Click += ShotButton_Click; turnoverButton.Click += TurnoverButton_Click; shotclockButton.Click += ShotclockButton_Click; goalButton.Click += GoalButton_Click; cardViewLeft = view.FindViewById <CardView>(Resource.Id.statCardLeft); cardViewRight = view.FindViewById <CardView>(Resource.Id.statCardRight); view.FindViewById <ImageButton>(Resource.Id.returnButton).Click += ReturnButton_Click; statInputSwitcher = view.FindViewById <LinearLayout>(Resource.Id.statsInput).FindViewById <ViewFlipper>(Resource.Id.viewSwitcher1); view.FindViewById <LinearLayout>(Resource.Id.statsInput).FindViewById <Button>(Resource.Id.backButton).Click += BackButton_Clicked;; view.FindViewById <LinearLayout>(Resource.Id.statsInput).FindViewById <Button>(Resource.Id.cancelButton).Click += CancelButtonClicked; okButton = view.FindViewById <LinearLayout>(Resource.Id.statsInput).FindViewById <Button>(Resource.Id.okButton); okButton.Click += StatsInput_OkButton_Clicked; myViewModel.PropertyChanged += MyViewModel_PropertyChanged; statButtonLayout = statInputSwitcher.FindViewById <LinearLayout>(Resource.Id.buttonLayout); actionButtonLayout = view.FindViewById <LinearLayout>(Resource.Id.statsInput).FindViewById <LinearLayout>(Resource.Id.actionButtons); okButton.Visibility = ViewStates.Gone; statInputSwitcher.FindViewById(Resource.Id.four4Choice).FindViewById <MultiLineRadioGroup>(Resource.Id.radioGroup1).CheckedChanged += GameStatisticsActivity_CheckedChanged; statInputSwitcher.FindViewById(Resource.Id.twoChoice).FindViewById <ItemIdHolderRadioGroup>(Resource.Id.radioGroup1).CheckedChange += RadioButtonGroup_CheckedChange; statInputSwitcher.FindViewById(Resource.Id.goaltype).FindViewById <MultiLineRadioGroup>(Resource.Id.radioGroup1).CheckedChanged += GameStatisticsActivity_CheckedChanged; myGameStatus = view.FindViewById <TextView>(Resource.Id.gameStatus); myGameStatus.Text = myViewModel.GameStatus; myEndHalfButton = view.FindViewById <Button>(Resource.Id.endHalfButton); myEndHalfButton.Click += EndHalfButton_Clicked; myCurrentPlayersLayout = view.FindViewById <SquaredTextViewLayout>(Resource.Id.currentPlayersLayout); myHomeScoreTextView = view.FindViewById <TextView>(Resource.Id.homeTeamScore); myAwayScoreTextView = view.FindViewById <TextView>(Resource.Id.awayTeamScore); view.FindViewById(Resource.Id.bottomBar).FindViewById <ImageButton>(Resource.Id.rightActionButton).Click += Bottom_RightButtonClicked; view.FindViewById(Resource.Id.bottomBar).FindViewById <ImageButton>(Resource.Id.undoButton).Click += UndoButton_Clicked; view.FindViewById(Resource.Id.bottomBar).FindViewById <ImageButton>(Resource.Id.leftActionButton).Click += LeftActionButton_Clicked; view.FindViewById(Resource.Id.bottomBar).FindViewById <ImageButton>(Resource.Id.leftActionButton).SetImageDrawable(Context.GetDrawable(Resource.Drawable.ic_playerchange_48px)); // view.FindViewById(Resource.Id.bottomBar).FindViewById<ImageButton>(Resource.Id.redoButton).Click += (e, args) => myViewModel.Redo(); myViewModel.Init(); return(view); // return base.OnCreateView(inflater, container, savedInstanceState); }
/// <summary> /// Method thats called when the activity is first created /// </summary> /// <param name="bundle"></param> protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); this.bundle = bundle; //set the activeIndex to 0 activeIndex = 0; // Create your application here SetContentView(Resource.Layout.Controller); //set webview and client iView = FindViewById<ImageView>(Resource.Id.vidview); //midbox viewflipper flipper = FindViewById<ViewFlipper>(Resource.Id.flipper); //graphview graphview = FindViewById<RelativeLayout>(Resource.Id.graphview); #region Eventhandlers control buttons //set buttons overview = FindViewById<Button>(Resource.Id.overviewButton); overview.Click += new EventHandler(FlipToOverView); battery = FindViewById<Button>(Resource.Id.batteryButton); battery.Click += new EventHandler(FlipToBattery); camera = FindViewById<Button>(Resource.Id.cameraButton); camera.Click += new EventHandler(FlipToCamera); orient = FindViewById<Button>(Resource.Id.orientbutton); orient.Click += new EventHandler(FlipToPitch); release = FindViewById<Button>(Resource.Id.releasebutton); release.Click += new EventHandler(releaseClick); stopR = FindViewById<Button>(Resource.Id.stopbuttonR); stopR.Click += new EventHandler(stopRclick); stopL = FindViewById<Button>(Resource.Id.stopbuttonL); stopL.Click += new EventHandler(stopLclick); #endregion #region Eventhandlers battery buttons volt0 = FindViewById<Button>(Resource.Id.voltbutton0); volt0.Click += new EventHandler(FlipToVolt0); volt1 = FindViewById<Button>(Resource.Id.voltbutton1); volt1.Click += new EventHandler(FlipToVolt1); amp0 = FindViewById<Button>(Resource.Id.ampbutton0); amp0.Click += new EventHandler(FlipToAmp0); amp1 = FindViewById<Button>(Resource.Id.ampbutton1); amp1.Click += new EventHandler(FlipToAmp1); temp0 = FindViewById<Button>(Resource.Id.tempbutton0); temp0.Click += new EventHandler(FlipToTemp0); temp1 = FindViewById<Button>(Resource.Id.tempbutton1); temp1.Click += new EventHandler(FlipToTemp1); #endregion #region Eventhandlers + Textviews audio buttons extra = FindViewById<Button>(Resource.Id.extrabutton); extra.Click += new EventHandler(extraClick); atv1 = FindViewById<TextView>(Resource.Id.aTxt1); atv1.Text = Receive_Singleton.Instance.Track1; ab1 = FindViewById<Button>(Resource.Id.aButton1); ab1.Click += delegate { playTrack(1); }; atv2 = FindViewById<TextView>(Resource.Id.aTxt2); atv2.Text = Receive_Singleton.Instance.Track2; ab2 = FindViewById<Button>(Resource.Id.aButton2); ab2.Click += delegate { playTrack(2); }; atv3 = FindViewById<TextView>(Resource.Id.aTxt3); atv3.Text = Receive_Singleton.Instance.Track3; ab3 = FindViewById<Button>(Resource.Id.aButton3); ab3.Click += delegate { playTrack(3); }; atv4 = FindViewById<TextView>(Resource.Id.aTxt4); atv4.Text = Receive_Singleton.Instance.Track4; ab4 = FindViewById<Button>(Resource.Id.aButton4); ab4.Click += delegate { playTrack(4); }; atv5 = FindViewById<TextView>(Resource.Id.aTxt5); atv5.Text = Receive_Singleton.Instance.Track5; ab5 = FindViewById<Button>(Resource.Id.aButton5); ab5.Click += delegate { playTrack(5); }; atv6 = FindViewById<TextView>(Resource.Id.aTxt6); atv6.Text = Receive_Singleton.Instance.Track6; ab6 = FindViewById<Button>(Resource.Id.aButton6); ab6.Click += delegate { playTrack(6); }; atv7 = FindViewById<TextView>(Resource.Id.aTxt7); atv7.Text = Receive_Singleton.Instance.Track7; ab7 = FindViewById<Button>(Resource.Id.aButton7); ab7.Click += delegate { playTrack(7); }; atv8 = FindViewById<TextView>(Resource.Id.aTxt8); atv8.Text = Receive_Singleton.Instance.Track8; ab8 = FindViewById<Button>(Resource.Id.aButton8); ab8.Click += delegate { playTrack(8); }; atv9 = FindViewById<TextView>(Resource.Id.aTxt9); atv9.Text = Receive_Singleton.Instance.Track9; ab9 = FindViewById<Button>(Resource.Id.aButton9); ab9.Click += delegate { playTrack(9); }; #endregion LEDButton = FindViewById<Button>(Resource.Id.discoButton); LEDButton.Click += new EventHandler(LEDClick); //set throttle textviews Throttle0 = FindViewById<TextView>(Resource.Id.Throttle0); Throttle1 = FindViewById<TextView>(Resource.Id.Throttle1); Throttle2 = FindViewById<TextView>(Resource.Id.Throttle2); Throttle3 = FindViewById<TextView>(Resource.Id.Throttle3); //Start Update Thread updateThread = new Thread(new ThreadStart(Update)); updateThread.Start(); //Start Camera Thread camThread = new Thread(new ThreadStart(UpdateCamera)); camThread.Start(); }