当前位置: 首页>>代码示例>>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;未经允许,请勿转载。