Esempio n. 1
0
        @Override
        public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
          Spinner spinner = (Spinner) arg0;
          mSelectedFontColorPosition = spinner.getSelectedItemPosition();

          try {
            TypedArray ta = getResources().obtainTypedArray(R.array.fontcolor_value);
            mFontColor = ta.getColor(mSelectedFontColorPosition, 0);

            if (mLoggerService != null) {
              mLoggerService.setFontColor(mFontColor);
            }
          } catch (RemoteException e) {
            e.printStackTrace();
          }
        }
Esempio n. 2
0
        @Override
        public void onServiceConnected(ComponentName name, IBinder service) {
          mLoggerService = ILoggerService.Stub.asInterface(service);
          try {
            mLoggerService.setOppacity(mOppacity);
            mLoggerService.setVerticalLogLinesWeight(mVerticalLogLinesWeight);
            mLoggerService.setVerticalLogLinesOffset(mVerticalLogLinesOffset);
            mLoggerService.setHorizontalLogLinesWeight(mHorizontalLogLinesWeight);
            mLoggerService.setHorizontalLogLinesOffset(mHorizontalLogLinesOffset);
            mLoggerService.setFontsize(mFontSize);
            mLoggerService.setFontColor(mFontColor);
            mLoggerService.enableGrep(mGrepEnable);
            mLoggerService.setGrepText(mGrepText);
            mLoggerService.setSelectedContents(mDisplayContents);

            mLoggerService.startLogger();
          } catch (RemoteException e) {
            e.printStackTrace();
          }
        }