protected internal override void onCreate(Bundle savedInstanceState)
 {
     base.onCreate(savedInstanceState);
     ContentView = R.layout.activity_main;
     mBridge     = new SapaAppService(this);
     mBridge.addConnectionListener(mListener);
     mBridge.connect();
     mFloatingController = ((FloatingController)findViewById(R.id.jam_control));
 }
예제 #2
0
		protected internal override void onCreate(Bundle savedInstanceState)
		{
			base.onCreate(savedInstanceState);
			ContentView = R.layout.activity_main;
			mBridge = new SapaAppService(this);
			mBridge.addConnectionListener(mListener);
			mBridge.connect();
			mFloatingController = ((FloatingController) findViewById(R.id.jam_control));
		}
        protected internal override void onCreate(Bundle savedInstanceState)
        {
            Log.d(TAG, "onCreate");
            ContentView = R.layout.activity_main;
            base.onCreate(savedInstanceState);
            this.mService = null;



            // binding to local service.
            this.bindService(new Intent(this, typeof(MainService)), this.mConnection, 0);

            // Views are being set from the layout.
            mFloatingController = (FloatingController)findViewById(R.id.jam_control);
            //Load position form shared preference
            SharedPreferences preferences = getPreferences(Context.MODE_PRIVATE);
            int barAlignment = preferences.getInt(FLOATING_ALIGNMENT_STATE_TAG, mFloatingController.BarAlignment);

            /// <summary>
            ///This method is used to set floating controller position
            /// To set position you must used one of below value:
            /// HORIZONTAL POSITION
            /// 5 - BOTTOM RIGHT
            /// 6 - BOTTOM LEFT
            /// 4 - TOP RIGHT
            /// 7 - TOP LEFT
            ///
            /// VERTICAL POSITION
            /// 15 - BOTTOM RIGHT
            /// 16 - BOTTOM LEFT
            /// 14 - TOP RIGHT
            /// 17 - TOP LEFT
            /// </summary>
            mFloatingController.loadBarState(barAlignment);
            this.mPlayButton = (ImageButton)findViewById(R.id.playButton);
            this.mStopButton = (ImageButton)findViewById(R.id.stopButton);

            // Received intent is being read.
            Intent intent = Intent;

            if (intent != null)
            {
                this.readIntent(intent);
                changeTitle();
            }

            // Controls actions are being set.
            // Only one button is visible at a time, so visibility needs to be
            // changed.
            this.mPlayButton.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this);
            this.mStopButton.OnClickListener = new OnClickListenerAnonymousInnerClassHelper2(this);
        }
예제 #4
0
        protected internal override void onCreate(Bundle savedInstanceState)
        {
            Log.d(TAG, "onCreate");
            ContentView = R.layout.activity_main;
            base.onCreate(savedInstanceState);
            mService = null;
            //binding to local service.
            bindService(new Intent(this, typeof(MainService)), mConnection, 0);

            //Views are being set from the layout.

            mFloatingController = (FloatingController)findViewById(R.id.jam_control);
            SharedPreferences preferences = getPreferences(Context.MODE_PRIVATE);
            int barAlignment = preferences.getInt(FLOATING_ALIGNMENT_STATE_TAG, mFloatingController.BarAlignment);

            /// <summary>
            ///This method is used to set floating controller position
            /// To set position you must used one of below value:
            /// HORIZONTAL POSITION
            /// 5 - BOTTOM RIGHT
            /// 6 - BOTTOM LEFT
            /// 4 - TOP RIGHT
            /// 7 - TOP LEFT
            ///
            /// VERTICAL POSITION
            /// 15 - BOTTOM RIGHT
            /// 16 - BOTTOM LEFT
            /// 14 - TOP RIGHT
            /// 17 - TOP LEFT
            /// </summary>
            mFloatingController.loadBarState(barAlignment);
            ViewGroup vg = (ViewGroup)findViewById(R.id.layout_keys);

            int size = vg.ChildCount;

            for (int i = 0; i < size; ++i)
            {
                View v = vg.getChildAt(i);
                if (v is KeyButton)
                {
                    v.OnTouchListener = this;
                }
            }
        }
예제 #5
0
		protected internal override void onCreate(Bundle savedInstanceState)
		{
			Log.d(TAG, "onCreate");
			ContentView = R.layout.activity_main;
			base.onCreate(savedInstanceState);
			mService = null;
			//binding to local service.
			bindService(new Intent(this, typeof(MainService)), mConnection, 0);

			//Views are being set from the layout.

			mFloatingController = (FloatingController)findViewById(R.id.jam_control);
			SharedPreferences preferences = getPreferences(Context.MODE_PRIVATE);
			int barAlignment = preferences.getInt(FLOATING_ALIGNMENT_STATE_TAG, mFloatingController.BarAlignment);
			/// <summary>
			///This method is used to set floating controller position
			/// To set position you must used one of below value:
			/// HORIZONTAL POSITION
			/// 5 - BOTTOM RIGHT
			/// 6 - BOTTOM LEFT
			/// 4 - TOP RIGHT
			/// 7 - TOP LEFT
			/// 
			/// VERTICAL POSITION
			/// 15 - BOTTOM RIGHT
			/// 16 - BOTTOM LEFT
			/// 14 - TOP RIGHT
			/// 17 - TOP LEFT
			/// </summary>
			mFloatingController.loadBarState(barAlignment);
			ViewGroup vg = (ViewGroup) findViewById(R.id.layout_keys);

			int size = vg.ChildCount;
			for (int i = 0; i < size; ++i)
			{
				View v = vg.getChildAt(i);
				if (v is KeyButton)
				{
					v.OnTouchListener = this;
				}
			}

		}
예제 #6
0
		protected internal override void onCreate(Bundle savedInstanceState)
		{
			Log.d(TAG, "onCreate");
			base.onCreate(savedInstanceState);

			this.mFloatingController = (FloatingController) findViewById(R.id.jam_control);

			this.mService = null;
			// binding to local service.
			this.bindService(new Intent(this, typeof(MainService)), this.mConnection, 0);

			Intent intent = Intent;
			if (intent != null)
			{
				this.readIntent(intent);
			}

			this.mVolDownButton.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this);
			this.mVolUpButton.OnClickListener = new OnClickListenerAnonymousInnerClassHelper2(this);
		}
예제 #7
0
        protected internal override void onCreate(Bundle savedInstanceState)
        {
            Log.d(TAG, "onCreate");
            base.onCreate(savedInstanceState);

            this.mFloatingController = (FloatingController)findViewById(R.id.jam_control);

            this.mService = null;
            // binding to local service.
            this.bindService(new Intent(this, typeof(MainService)), this.mConnection, 0);

            Intent intent = Intent;

            if (intent != null)
            {
                this.readIntent(intent);
            }

            this.mVolDownButton.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this);
            this.mVolUpButton.OnClickListener   = new OnClickListenerAnonymousInnerClassHelper2(this);
        }
예제 #8
0
		protected internal override void onCreate(Bundle savedInstanceState)
		{
			Log.d(TAG, "onCreate");
			ContentView = R.layout.activity_main;
			base.onCreate(savedInstanceState);
			this.mService = null;



			// binding to local service.
			this.bindService(new Intent(this, typeof(MainService)), this.mConnection, 0);

			// Views are being set from the layout.
			mFloatingController = (FloatingController) findViewById(R.id.jam_control);
			//Load position form shared preference
			SharedPreferences preferences = getPreferences(Context.MODE_PRIVATE);
			int barAlignment = preferences.getInt(FLOATING_ALIGNMENT_STATE_TAG, mFloatingController.BarAlignment);
			/// <summary>
			///This method is used to set floating controller position
			/// To set position you must used one of below value:
			/// HORIZONTAL POSITION
			/// 5 - BOTTOM RIGHT
			/// 6 - BOTTOM LEFT
			/// 4 - TOP RIGHT
			/// 7 - TOP LEFT
			/// 
			/// VERTICAL POSITION
			/// 15 - BOTTOM RIGHT
			/// 16 - BOTTOM LEFT
			/// 14 - TOP RIGHT
			/// 17 - TOP LEFT
			/// </summary>
			mFloatingController.loadBarState(barAlignment);
			this.mPlayButton = (ImageButton) findViewById(R.id.playButton);
			this.mStopButton = (ImageButton) findViewById(R.id.stopButton);

			// Received intent is being read.
			Intent intent = Intent;
			if (intent != null)
			{
				this.readIntent(intent);
				changeTitle();
			}

			// Controls actions are being set.
			// Only one button is visible at a time, so visibility needs to be
			// changed.
			this.mPlayButton.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this);
			this.mStopButton.OnClickListener = new OnClickListenerAnonymousInnerClassHelper2(this);
		}