Beispiel #1
0
        protected override async void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            Window.AddFlags(WindowManagerFlags.TranslucentStatus);
            Window.RequestFeature(WindowFeatures.ContentTransitions);
            totalUpdater = new TotalUpdater(OnTotalUpdate);
            SetContentView(Resource.Layout.activity_main_view);
            goalDetails = SupportFragmentManager.FindFragmentById(Resource.Id.fragment_next_goal) as GoalDetailsFragment;
            if (goalDetails != null)
            {
                goalDetails.CollapsingToolbar = FindViewById <CollapsingToolbarLayout>(Resource.Id.collapsing_toolbar_layout);
            }

            emptyCollection =
                SupportFragmentManager.FindFragmentById(Resource.Id.fragment_empty_collection) as
                LineAnimationFragment;
            accountHelper = new AccountHelper(PackageManager, Resources, intent => StartActivity(intent));
            BindView();
            accountFabAnimator = new AccountFabAnimator(accountFab);

            TrySetToolbar();
            SetupFabClickHandling();
            await SetPreferredImageAsync();
            await SetupRecyclerView();
            await InitializeAsync().ContinueWith(_ =>
            {
                RestartTotalUpdate();
                shouldStartUpdaterOnResume = true;
            });

            appbarLayout.AddOnOffsetChangedListener(new OffsetChangedListener(OnCollapsed, OnExpanded));
            LoadAds();
            adAnimator    = new AdAnimator(adView);
            titleAnimator = new TitleAnimator(collapsingToolbar);
        }
Beispiel #2
0
 public static int connectionTimeout = 5;  //sec
 public Form1()
 {
     InitializeComponent();
     //SoccerObject so1 = new SoccerObject("Soccer", 3333);
     m_tu = new TotalUpdater("flashscore", 100);
     if (rkApp.GetValue("SAF_SSC") == null)
     {
         chkRun.Checked = false;
     }
     else
     {
         chkRun.Checked = true;
     }
     btnStart_Click(null, null);
 }