Java 类com.google.zxing.FakeR 实例源码

项目:sres-app    文件:CaptureActivityHandler.java   
CaptureActivityHandler(CaptureActivity activity,
                        Collection<BarcodeFormat> decodeFormats,
                        String characterSet,
                        CameraManager cameraManager) {
fakeR = new FakeR(activity);
   this.activity = activity;
   decodeThread = new DecodeThread(activity, decodeFormats, characterSet,
       new ViewfinderResultPointCallback(activity.getViewfinderView()));
   decodeThread.start();
   state = State.SUCCESS;

   // Start ourselves capturing previews and decoding.
   this.cameraManager = cameraManager;
   cameraManager.startPreview();
   restartPreviewAndDecode();
 }
项目:sres-app    文件:CaptureActivity.java   
@Override
 public void onCreate(Bundle icicle) {
   super.onCreate(icicle);

fakeR = new FakeR(this);

   Window window = getWindow();
   window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
   setContentView(fakeR.getId("layout", "capture"));

   hasSurface = false;
   historyManager = new HistoryManager(this);
   historyManager.trimHistory();
   inactivityTimer = new InactivityTimer(this);
   beepManager = new BeepManager(this);

   PreferenceManager.setDefaultValues(this, fakeR.getId("xml", "preferences"), false);

   //showHelpOnFirstLaunch();
 }
项目:sres-app    文件:EncodeActivity.java   
@Override
  public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    fakeR = new FakeR(this);
    Intent intent = getIntent();
    if (intent == null) {
      finish();
    } else {
//      String action = intent.getAction();
//      if (Intents.Encode.ACTION.equals(action) || Intent.ACTION_SEND.equals(action)) {
        setContentView(fakeR.getId("layout", "encode"));
//      } else {
//        finish();
//      }
    }
  }
项目:sres-app    文件:ViewfinderView.java   
public ViewfinderView(Context context, AttributeSet attrs) {
   super(context, attrs);

fakeR = new FakeR(context);

   // Initialize these once for performance rather than calling them every time in onDraw().
   paint = new Paint(Paint.ANTI_ALIAS_FLAG);
   Resources resources = getResources();
   maskColor = resources.getColor(fakeR.getId("color", "viewfinder_mask"));
   resultColor = resources.getColor(fakeR.getId("color", "result_view"));
   laserColor = resources.getColor(fakeR.getId("color", "viewfinder_laser"));
   resultPointColor = resources.getColor(fakeR.getId("color", "possible_result_points"));
   scannerAlpha = 0;
   possibleResultPoints = new ArrayList<ResultPoint>(5);
   lastPossibleResultPoints = null;
 }
项目:reacteu-app    文件:CaptureActivityHandler.java   
CaptureActivityHandler(CaptureActivity activity,
                        Collection<BarcodeFormat> decodeFormats,
                        String characterSet,
                        CameraManager cameraManager) {
fakeR = new FakeR(activity);
   this.activity = activity;
   decodeThread = new DecodeThread(activity, decodeFormats, characterSet,
       new ViewfinderResultPointCallback(activity.getViewfinderView()));
   decodeThread.start();
   state = State.SUCCESS;

   // Start ourselves capturing previews and decoding.
   this.cameraManager = cameraManager;
   cameraManager.startPreview();
   restartPreviewAndDecode();
 }
项目:reacteu-app    文件:CaptureActivity.java   
@Override
 public void onCreate(Bundle icicle) {
   super.onCreate(icicle);

fakeR = new FakeR(this);

   Window window = getWindow();
   window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
   setContentView(fakeR.getId("layout", "capture"));

   hasSurface = false;
   historyManager = new HistoryManager(this);
   historyManager.trimHistory();
   inactivityTimer = new InactivityTimer(this);
   beepManager = new BeepManager(this);

   PreferenceManager.setDefaultValues(this, fakeR.getId("xml", "preferences"), false);

   //showHelpOnFirstLaunch();
 }
项目:reacteu-app    文件:EncodeActivity.java   
@Override
  public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    fakeR = new FakeR(this);
    Intent intent = getIntent();
    if (intent == null) {
      finish();
    } else {
//      String action = intent.getAction();
//      if (Intents.Encode.ACTION.equals(action) || Intent.ACTION_SEND.equals(action)) {
        setContentView(fakeR.getId("layout", "encode"));
//      } else {
//        finish();
//      }
    }
  }
项目:reacteu-app    文件:ViewfinderView.java   
public ViewfinderView(Context context, AttributeSet attrs) {
   super(context, attrs);

fakeR = new FakeR(context);

   // Initialize these once for performance rather than calling them every time in onDraw().
   paint = new Paint(Paint.ANTI_ALIAS_FLAG);
   Resources resources = getResources();
   maskColor = resources.getColor(fakeR.getId("color", "viewfinder_mask"));
   resultColor = resources.getColor(fakeR.getId("color", "result_view"));
   laserColor = resources.getColor(fakeR.getId("color", "viewfinder_laser"));
   resultPointColor = resources.getColor(fakeR.getId("color", "possible_result_points"));
   scannerAlpha = 0;
   possibleResultPoints = new ArrayList<ResultPoint>(5);
   lastPossibleResultPoints = null;
 }
项目:CordovaDemo    文件:CaptureActivityHandler.java   
CaptureActivityHandler(CaptureActivity activity,
                        Collection<BarcodeFormat> decodeFormats,
                        String characterSet,
                        CameraManager cameraManager) {
fakeR = new FakeR(activity);
   this.activity = activity;
   decodeThread = new DecodeThread(activity, decodeFormats, characterSet,
       new ViewfinderResultPointCallback(activity.getViewfinderView()));
   decodeThread.start();
   state = State.SUCCESS;

   // Start ourselves capturing previews and decoding.
   this.cameraManager = cameraManager;
   cameraManager.startPreview();
   restartPreviewAndDecode();
 }
项目:CordovaDemo    文件:CaptureActivity.java   
@Override
 public void onCreate(Bundle icicle) {
   super.onCreate(icicle);

fakeR = new FakeR(this);

   Window window = getWindow();
   window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
   setContentView(fakeR.getId("layout", "capture"));

   hasSurface = false;
   historyManager = new HistoryManager(this);
   historyManager.trimHistory();
   inactivityTimer = new InactivityTimer(this);
   beepManager = new BeepManager(this);

   PreferenceManager.setDefaultValues(this, fakeR.getId("xml", "preferences"), false);

   //showHelpOnFirstLaunch();
 }
项目:CordovaDemo    文件:EncodeActivity.java   
@Override
  public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    fakeR = new FakeR(this);
    Intent intent = getIntent();
    if (intent == null) {
      finish();
    } else {
//      String action = intent.getAction();
//      if (Intents.Encode.ACTION.equals(action) || Intent.ACTION_SEND.equals(action)) {
        setContentView(fakeR.getId("layout", "encode"));
//      } else {
//        finish();
//      }
    }
  }
项目:CordovaDemo    文件:ViewfinderView.java   
public ViewfinderView(Context context, AttributeSet attrs) {
   super(context, attrs);

fakeR = new FakeR(context);

   // Initialize these once for performance rather than calling them every time in onDraw().
   paint = new Paint(Paint.ANTI_ALIAS_FLAG);
   Resources resources = getResources();
   maskColor = resources.getColor(fakeR.getId("color", "viewfinder_mask"));
   resultColor = resources.getColor(fakeR.getId("color", "result_view"));
   laserColor = resources.getColor(fakeR.getId("color", "viewfinder_laser"));
   resultPointColor = resources.getColor(fakeR.getId("color", "possible_result_points"));
   scannerAlpha = 0;
   possibleResultPoints = new ArrayList<ResultPoint>(5);
   lastPossibleResultPoints = null;
 }
项目:ng-cordova-demo    文件:CaptureActivityHandler.java   
CaptureActivityHandler(CaptureActivity activity,
                        Collection<BarcodeFormat> decodeFormats,
                        String characterSet,
                        CameraManager cameraManager) {
fakeR = new FakeR(activity);
   this.activity = activity;
   decodeThread = new DecodeThread(activity, decodeFormats, characterSet,
       new ViewfinderResultPointCallback(activity.getViewfinderView()));
   decodeThread.start();
   state = State.SUCCESS;

   // Start ourselves capturing previews and decoding.
   this.cameraManager = cameraManager;
   cameraManager.startPreview();
   restartPreviewAndDecode();
 }
项目:ng-cordova-demo    文件:CaptureActivity.java   
@Override
 public void onCreate(Bundle icicle) {
   super.onCreate(icicle);

fakeR = new FakeR(this);

   Window window = getWindow();
   window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
   setContentView(fakeR.getId("layout", "capture"));

   hasSurface = false;
   historyManager = new HistoryManager(this);
   historyManager.trimHistory();
   inactivityTimer = new InactivityTimer(this);
   beepManager = new BeepManager(this);

   PreferenceManager.setDefaultValues(this, fakeR.getId("xml", "preferences"), false);

   //showHelpOnFirstLaunch();
 }
项目:ng-cordova-demo    文件:EncodeActivity.java   
@Override
  public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    fakeR = new FakeR(this);
    Intent intent = getIntent();
    if (intent == null) {
      finish();
    } else {
//      String action = intent.getAction();
//      if (Intents.Encode.ACTION.equals(action) || Intent.ACTION_SEND.equals(action)) {
        setContentView(fakeR.getId("layout", "encode"));
//      } else {
//        finish();
//      }
    }
  }
项目:ng-cordova-demo    文件:ViewfinderView.java   
public ViewfinderView(Context context, AttributeSet attrs) {
   super(context, attrs);

fakeR = new FakeR(context);

   // Initialize these once for performance rather than calling them every time in onDraw().
   paint = new Paint(Paint.ANTI_ALIAS_FLAG);
   Resources resources = getResources();
   maskColor = resources.getColor(fakeR.getId("color", "viewfinder_mask"));
   resultColor = resources.getColor(fakeR.getId("color", "result_view"));
   laserColor = resources.getColor(fakeR.getId("color", "viewfinder_laser"));
   resultPointColor = resources.getColor(fakeR.getId("color", "possible_result_points"));
   scannerAlpha = 0;
   possibleResultPoints = new ArrayList<ResultPoint>(5);
   lastPossibleResultPoints = null;
 }
项目:ngCordova-demo    文件:CaptureActivityHandler.java   
CaptureActivityHandler(CaptureActivity activity,
                        Collection<BarcodeFormat> decodeFormats,
                        String characterSet,
                        CameraManager cameraManager) {
fakeR = new FakeR(activity);
   this.activity = activity;
   decodeThread = new DecodeThread(activity, decodeFormats, characterSet,
       new ViewfinderResultPointCallback(activity.getViewfinderView()));
   decodeThread.start();
   state = State.SUCCESS;

   // Start ourselves capturing previews and decoding.
   this.cameraManager = cameraManager;
   cameraManager.startPreview();
   restartPreviewAndDecode();
 }
项目:ngCordova-demo    文件:CaptureActivity.java   
@Override
 public void onCreate(Bundle icicle) {
   super.onCreate(icicle);

fakeR = new FakeR(this);

   Window window = getWindow();
   window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
   setContentView(fakeR.getId("layout", "capture"));

   hasSurface = false;
   historyManager = new HistoryManager(this);
   historyManager.trimHistory();
   inactivityTimer = new InactivityTimer(this);
   beepManager = new BeepManager(this);

   PreferenceManager.setDefaultValues(this, fakeR.getId("xml", "preferences"), false);

   //showHelpOnFirstLaunch();
 }
项目:ngCordova-demo    文件:EncodeActivity.java   
@Override
  public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    fakeR = new FakeR(this);
    Intent intent = getIntent();
    if (intent == null) {
      finish();
    } else {
//      String action = intent.getAction();
//      if (Intents.Encode.ACTION.equals(action) || Intent.ACTION_SEND.equals(action)) {
        setContentView(fakeR.getId("layout", "encode"));
//      } else {
//        finish();
//      }
    }
  }
项目:ngCordova-demo    文件:ViewfinderView.java   
public ViewfinderView(Context context, AttributeSet attrs) {
   super(context, attrs);

fakeR = new FakeR(context);

   // Initialize these once for performance rather than calling them every time in onDraw().
   paint = new Paint(Paint.ANTI_ALIAS_FLAG);
   Resources resources = getResources();
   maskColor = resources.getColor(fakeR.getId("color", "viewfinder_mask"));
   resultColor = resources.getColor(fakeR.getId("color", "result_view"));
   laserColor = resources.getColor(fakeR.getId("color", "viewfinder_laser"));
   resultPointColor = resources.getColor(fakeR.getId("color", "possible_result_points"));
   scannerAlpha = 0;
   possibleResultPoints = new ArrayList<ResultPoint>(5);
   lastPossibleResultPoints = null;
 }
项目:CordovaW8BarcodeDemo    文件:CaptureActivityHandler.java   
CaptureActivityHandler(CaptureActivity activity,
                        Collection<BarcodeFormat> decodeFormats,
                        String characterSet,
                        CameraManager cameraManager) {
fakeR = new FakeR(activity);
   this.activity = activity;
   decodeThread = new DecodeThread(activity, decodeFormats, characterSet,
       new ViewfinderResultPointCallback(activity.getViewfinderView()));
   decodeThread.start();
   state = State.SUCCESS;

   // Start ourselves capturing previews and decoding.
   this.cameraManager = cameraManager;
   cameraManager.startPreview();
   restartPreviewAndDecode();
 }
项目:CordovaW8BarcodeDemo    文件:CaptureActivity.java   
@Override
 public void onCreate(Bundle icicle) {
   super.onCreate(icicle);

fakeR = new FakeR(this);

   Window window = getWindow();
   window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
   setContentView(fakeR.getId("layout", "capture"));

   hasSurface = false;
   historyManager = new HistoryManager(this);
   historyManager.trimHistory();
   inactivityTimer = new InactivityTimer(this);
   beepManager = new BeepManager(this);

   PreferenceManager.setDefaultValues(this, fakeR.getId("xml", "preferences"), false);

   //showHelpOnFirstLaunch();
 }
项目:CordovaW8BarcodeDemo    文件:ViewfinderView.java   
public ViewfinderView(Context context, AttributeSet attrs) {
   super(context, attrs);

fakeR = new FakeR(context);

   // Initialize these once for performance rather than calling them every time in onDraw().
   paint = new Paint(Paint.ANTI_ALIAS_FLAG);
   Resources resources = getResources();
   maskColor = resources.getColor(fakeR.getId("color", "viewfinder_mask"));
   resultColor = resources.getColor(fakeR.getId("color", "result_view"));
   laserColor = resources.getColor(fakeR.getId("color", "viewfinder_laser"));
   resultPointColor = resources.getColor(fakeR.getId("color", "possible_result_points"));
   scannerAlpha = 0;
   possibleResultPoints = new ArrayList<ResultPoint>(5);
   lastPossibleResultPoints = null;
 }
项目:hive-ios    文件:CaptureActivity.java   
@Override
 public void onCreate(Bundle icicle) {
   super.onCreate(icicle);

fakeR = new FakeR(this);

   Window window = getWindow();
   window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
   setContentView(fakeR.getId("layout", "capture"));

   hasSurface = false;
   historyManager = new HistoryManager(this);
   historyManager.trimHistory();
   inactivityTimer = new InactivityTimer(this);
   beepManager = new BeepManager(this);

   PreferenceManager.setDefaultValues(this, fakeR.getId("xml", "preferences"), false);

   //showHelpOnFirstLaunch();
 }
项目:hive-ios    文件:ViewfinderView.java   
public ViewfinderView(Context context, AttributeSet attrs) {
   super(context, attrs);

fakeR = new FakeR(context);

   // Initialize these once for performance rather than calling them every time in onDraw().
   paint = new Paint(Paint.ANTI_ALIAS_FLAG);
   Resources resources = getResources();
   maskColor = resources.getColor(fakeR.getId("color", "viewfinder_mask"));
   resultColor = resources.getColor(fakeR.getId("color", "result_view"));
   laserColor = resources.getColor(fakeR.getId("color", "viewfinder_laser"));
   resultPointColor = resources.getColor(fakeR.getId("color", "possible_result_points"));
   scannerAlpha = 0;
   possibleResultPoints = new ArrayList<ResultPoint>(5);
   lastPossibleResultPoints = null;
 }
项目:cordova-template    文件:CaptureActivityHandler.java   
CaptureActivityHandler(CaptureActivity activity,
                        Collection<BarcodeFormat> decodeFormats,
                        String characterSet,
                        CameraManager cameraManager) {
fakeR = new FakeR(activity);
   this.activity = activity;
   decodeThread = new DecodeThread(activity, decodeFormats, characterSet,
       new ViewfinderResultPointCallback(activity.getViewfinderView()));
   decodeThread.start();
   state = State.SUCCESS;

   // Start ourselves capturing previews and decoding.
   this.cameraManager = cameraManager;
   cameraManager.startPreview();
   restartPreviewAndDecode();
 }
项目:cordova-template    文件:CaptureActivity.java   
@Override
 public void onCreate(Bundle icicle) {
   super.onCreate(icicle);

fakeR = new FakeR(this);

   Window window = getWindow();
   window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
   setContentView(fakeR.getId("layout", "capture"));

   hasSurface = false;
   historyManager = new HistoryManager(this);
   historyManager.trimHistory();
   inactivityTimer = new InactivityTimer(this);
   beepManager = new BeepManager(this);

   PreferenceManager.setDefaultValues(this, fakeR.getId("xml", "preferences"), false);

   //showHelpOnFirstLaunch();
 }
项目:cordova-template    文件:EncodeActivity.java   
@Override
  public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    fakeR = new FakeR(this);
    Intent intent = getIntent();
    if (intent == null) {
      finish();
    } else {
//      String action = intent.getAction();
//      if (Intents.Encode.ACTION.equals(action) || Intent.ACTION_SEND.equals(action)) {
        setContentView(fakeR.getId("layout", "encode"));
//      } else {
//        finish();
//      }
    }
  }
项目:cordova-template    文件:ViewfinderView.java   
public ViewfinderView(Context context, AttributeSet attrs) {
   super(context, attrs);

fakeR = new FakeR(context);

   // Initialize these once for performance rather than calling them every time in onDraw().
   paint = new Paint(Paint.ANTI_ALIAS_FLAG);
   Resources resources = getResources();
   maskColor = resources.getColor(fakeR.getId("color", "viewfinder_mask"));
   resultColor = resources.getColor(fakeR.getId("color", "result_view"));
   laserColor = resources.getColor(fakeR.getId("color", "viewfinder_laser"));
   resultPointColor = resources.getColor(fakeR.getId("color", "possible_result_points"));
   scannerAlpha = 0;
   possibleResultPoints = new ArrayList<ResultPoint>(5);
   lastPossibleResultPoints = null;
 }
项目:oxPush    文件:CaptureActivityHandler.java   
CaptureActivityHandler(CaptureActivity activity,
                        Collection<BarcodeFormat> decodeFormats,
                        String characterSet,
                        CameraManager cameraManager) {
fakeR = new FakeR(activity);
   this.activity = activity;
   decodeThread = new DecodeThread(activity, decodeFormats, characterSet,
       new ViewfinderResultPointCallback(activity.getViewfinderView()));
   decodeThread.start();
   state = State.SUCCESS;

   // Start ourselves capturing previews and decoding.
   this.cameraManager = cameraManager;
   cameraManager.startPreview();
   restartPreviewAndDecode();
 }
项目:oxPush    文件:CaptureActivity.java   
@Override
 public void onCreate(Bundle icicle) {
   super.onCreate(icicle);

fakeR = new FakeR(this);

   Window window = getWindow();
   window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
   setContentView(fakeR.getId("layout", "capture"));

   hasSurface = false;
   historyManager = new HistoryManager(this);
   historyManager.trimHistory();
   inactivityTimer = new InactivityTimer(this);
   beepManager = new BeepManager(this);

   PreferenceManager.setDefaultValues(this, fakeR.getId("xml", "preferences"), false);

   //showHelpOnFirstLaunch();
 }
项目:oxPush    文件:EncodeActivity.java   
@Override
  public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    fakeR = new FakeR(this);
    Intent intent = getIntent();
    if (intent == null) {
      finish();
    } else {
//      String action = intent.getAction();
//      if (Intents.Encode.ACTION.equals(action) || Intent.ACTION_SEND.equals(action)) {
        setContentView(fakeR.getId("layout", "encode"));
//      } else {
//        finish();
//      }
    }
  }
项目:oxPush    文件:ViewfinderView.java   
public ViewfinderView(Context context, AttributeSet attrs) {
   super(context, attrs);

fakeR = new FakeR(context);

   // Initialize these once for performance rather than calling them every time in onDraw().
   paint = new Paint(Paint.ANTI_ALIAS_FLAG);
   Resources resources = getResources();
   maskColor = resources.getColor(fakeR.getId("color", "viewfinder_mask"));
   resultColor = resources.getColor(fakeR.getId("color", "result_view"));
   laserColor = resources.getColor(fakeR.getId("color", "viewfinder_laser"));
   resultPointColor = resources.getColor(fakeR.getId("color", "possible_result_points"));
   scannerAlpha = 0;
   possibleResultPoints = new ArrayList<ResultPoint>(5);
   lastPossibleResultPoints = null;
 }
项目:hive-ios    文件:CaptureActivityHandler.java   
CaptureActivityHandler(CaptureActivity activity,
                        Collection<BarcodeFormat> decodeFormats,
                        String characterSet,
                        CameraManager cameraManager) {
fakeR = new FakeR(activity);
   this.activity = activity;
   decodeThread = new DecodeThread(activity, decodeFormats, characterSet,
       new ViewfinderResultPointCallback(activity.getViewfinderView()));
   decodeThread.start();
   state = State.SUCCESS;

   // Start ourselves capturing previews and decoding.
   this.cameraManager = cameraManager;
   cameraManager.startPreview();
   restartPreviewAndDecode();
 }
项目:sres-app    文件:ShareActivity.java   
@Override
 public void onCreate(Bundle icicle) {
   super.onCreate(icicle);
fakeR = new FakeR(this);
   setContentView(fakeR.getId("layout", "share"));

   findViewById(fakeR.getId("id", "share_contact_button")).setOnClickListener(contactListener);
   findViewById(fakeR.getId("id", "share_bookmark_button")).setOnClickListener(bookmarkListener);
   findViewById(fakeR.getId("id", "share_app_button")).setOnClickListener(appListener);
   clipboardButton = (Button) findViewById(fakeR.getId("id", "share_clipboard_button"));
   clipboardButton.setOnClickListener(clipboardListener);
   findViewById(fakeR.getId("id", "share_text_view")).setOnKeyListener(textListener);
 }
项目:sres-app    文件:QRCodeEncoder.java   
QRCodeEncoder(Activity activity, Intent intent, int dimension, boolean useVCard) throws WriterException {
  fakeR = new FakeR(activity);
  this.activity = activity;
  this.dimension = dimension;
  this.useVCard = useVCard;
  String action = intent.getAction();
  //if (action.equals(Intents.Encode.ACTION)) {
    encodeContentsFromZXingIntent(intent);
  //} else if (action.equals(Intent.ACTION_SEND)) {
  //  encodeContentsFromShareIntent(intent);
  //}
}
项目:sres-app    文件:PreferencesActivity.java   
@Override
 protected void onCreate(Bundle icicle) {
   super.onCreate(icicle);
fakeR = new FakeR(this);
   addPreferencesFromResource(fakeR.getId("xml", "preferences"));

   PreferenceScreen preferences = getPreferenceScreen();
   preferences.getSharedPreferences().registerOnSharedPreferenceChangeListener(this);
   decode1D = (CheckBoxPreference) preferences.findPreference(KEY_DECODE_1D);
   decodeQR = (CheckBoxPreference) preferences.findPreference(KEY_DECODE_QR);
   decodeDataMatrix = (CheckBoxPreference) preferences.findPreference(KEY_DECODE_DATA_MATRIX);
   disableLastCheckedPref();
 }
项目:sres-app    文件:HelpActivity.java   
@Override
 protected void onCreate(Bundle icicle) {
   super.onCreate(icicle);

fakeR = new FakeR(this);

   setContentView(fakeR.getId("layout", "help"));

   webView = (WebView)findViewById(fakeR.getId("id", "help_contents"));
   webView.setWebViewClient(new HelpClient());

   // Froyo has a bug with calling onCreate() twice in a row, which causes the What's New page
   // that's auto-loaded on first run to appear blank. As a workaround we only call restoreState()
   // if a valid URL was loaded at the time the previous activity was torn down.
   Intent intent = getIntent();
   if (icicle != null && icicle.getBoolean(WEBVIEW_STATE_PRESENT, false)) {
     webView.restoreState(icicle);
   } else if (intent != null) {
     String page = intent.getStringExtra(REQUESTED_PAGE_KEY);
     if (page != null && page.length() > 0) {
       webView.loadUrl(BASE_URL + page);
     } else {
       webView.loadUrl(BASE_URL + DEFAULT_PAGE);
     }
   } else {
     webView.loadUrl(BASE_URL + DEFAULT_PAGE);
   }

   backButton = (Button) findViewById(fakeR.getId("id", "back_button"));
   backButton.setOnClickListener(backListener);
   View doneButton = findViewById(fakeR.getId("id", "done_button"));
   doneButton.setOnClickListener(doneListener);
 }
项目:sres-app    文件:ResultHandler.java   
ResultHandler(Activity activity, ParsedResult result, Result rawResult) {
   this.result = result;
   this.activity = activity;
   this.rawResult = rawResult;
   this.customProductSearch = parseCustomSearchURL();

fakeR = new FakeR(activity);

// Make sure the Shopper button is hidden by default. Without this, scanning a product followed
   // by a QR Code would leave the button on screen among the QR Code actions.
   View shopperButton = activity.findViewById(fakeR.getId("id", "shopper_button"));
   shopperButton.setVisibility(View.GONE);
 }
项目:sres-app    文件:HistoryActivity.java   
@Override
protected void onCreate(Bundle icicle) {
  super.onCreate(icicle);
  fakeR = new FakeR(this);
  this.historyManager = new HistoryManager(this);  
  adapter = new HistoryItemAdapter(this);
  setListAdapter(adapter);
  ListView listview = getListView();
  registerForContextMenu(listview);
}