Ejemplo n.º 1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            //Window.AddFlags (WindowManagerFlags.NotTouchable);
            //Window.AddFlags (WindowManagerFlags.NotTouchModal);
            //GetSystemService (WindowManager.UpdateViewLayout);
            // Set our view from the "main" layout resource
            SetContentView (Resource.Layout.Main);
            _UiVideosList = FindViewById<ListView> (Resource.Id.UiVideosList);

            FakeData data = new FakeData ();
            _VideoDB = new VideoBuyDB ();
            _VideoDB.ConnectToDB ("VideoBuyDB.db3");
            _VideoDB.CreateDB ();
            //_VideoDB.Insert (data.allVideos.ToArray ());
            //_VideoDB.SelectBDItems ();

            _VideosListAdapter = new VideosListAdapter (this, _VideoDB.SelectBDItems ().ToArray ());
            _UiVideosList.Adapter = _VideosListAdapter;
            //Intent i = new Intent (this, typeof(IncomingCallReceiver));
            //StartService (i);

            _telephonyManager = (TelephonyManager)GetSystemService (Context.TelephonyService)  as TelephonyManager;
            PhoneStateListener callListener = new PhoneStateListener ();
            PhoneStateListenerFlags callStateListenerFlags = new PhoneStateListenerFlags();
            _telephonyManager.Listen (callListener, PhoneStateListenerFlags.CallState);
        }
Ejemplo n.º 2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            SetContentView (Resource.Layout.AcountVideoList);
            _UiVideosList = FindViewById<ListView> (Resource.Id.UiVideosList);

            FakeData data = new FakeData ();
            _VideoDB = new VideoBuyDB ();
            _VideoDB.ConnectToDB ("VideoBuyDB.db3");

            _VideosListAdapter = new VideosListAdapter (this, _VideoDB.SelectBDItems ().ToArray ());
            _UiVideosList.Adapter = _VideosListAdapter;
        }