當前位置: 首頁>>代碼示例>>Java>>正文


Java InactivityTimer類代碼示例

本文整理匯總了Java中com.google.zxing.client.android.InactivityTimer的典型用法代碼示例。如果您正苦於以下問題:Java InactivityTimer類的具體用法?Java InactivityTimer怎麽用?Java InactivityTimer使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


InactivityTimer類屬於com.google.zxing.client.android包,在下文中一共展示了InactivityTimer類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: ScanHelper

import com.google.zxing.client.android.InactivityTimer; //導入依賴的package包/類
public ScanHelper(Activity activity, SurfaceView surfaceView) {
    this.activity = activity;
    this.capturePreview = surfaceView;
    this.hasSurface = false;
    this.mInactivityTimer = new InactivityTimer(activity);
    this.mBeepManager = new BeepManager(activity);
}
 
開發者ID:snice,項目名稱:androidscan,代碼行數:8,代碼來源:ScanHelper.java

示例2: onCreateView

import com.google.zxing.client.android.InactivityTimer; //導入依賴的package包/類
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
		Bundle savedInstanceState) {
       View view = inflater.inflate(R.layout.fragment_section_scan, container, false);
       FrameLayout frameLayout = (FrameLayout) view.findViewById(R.id.camera_preview);
	FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(
			LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
       surfaceView = new SurfaceView(getActivity());
	surfaceView.setLayoutParams(layoutParams);
	viewfinderView = new ViewfinderView(getActivity());
	viewfinderView.setLayoutParams(layoutParams);
	frameLayout.addView(surfaceView);
	frameLayout.addView(viewfinderView);
	inactivityTimer = new InactivityTimer(this.getActivity());
	ambientLightManager = new AmbientLightManager(this.getActivity());
       Button closeButton = (Button) view.findViewById(R.id.button_close);
       closeButton.setOnClickListener(
               new View.OnClickListener() {
                   @Override
                   public void onClick(View v) {
                       if (listener != null) {
                           listener.onButtonClick(PayPageState.PAY_FORM, null);
                       } else {
                           Log.e("", "WTF Listener null");
                       }
                   }
               }
       );
	return view;
}
 
開發者ID:bushidowallet,項目名稱:bushido-android-app,代碼行數:31,代碼來源:BarcodeFragment.java

示例3: onCreate

import com.google.zxing.client.android.InactivityTimer; //導入依賴的package包/類
@Override
public void onCreate(Bundle icicle) {
  super.onCreate(icicle);

  hasSurface = false;
  inactivityTimer = new InactivityTimer(getActivity());
  beepManager = new BeepManager(getActivity());
  ambientLightManager = new AmbientLightManager(getActivity());

  PreferenceManager.setDefaultValues(getActivity(), R.xml.preferences, false);
}
 
開發者ID:mitoyarzun,項目名稱:zxingfragmentlib,代碼行數:12,代碼來源:BarCodeScannerFragment.java


注:本文中的com.google.zxing.client.android.InactivityTimer類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。