当前位置: 首页>>代码示例>>Java>>正文


Java TelescopeLayout.setLens方法代码示例

本文整理汇总了Java中com.mattprecious.telescope.TelescopeLayout.setLens方法的典型用法代码示例。如果您正苦于以下问题:Java TelescopeLayout.setLens方法的具体用法?Java TelescopeLayout.setLens怎么用?Java TelescopeLayout.setLens使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.mattprecious.telescope.TelescopeLayout的用法示例。


在下文中一共展示了TelescopeLayout.setLens方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: showTelescopeDialog

import com.mattprecious.telescope.TelescopeLayout; //导入方法依赖的package包/类
public void showTelescopeDialog(final Activity activity) {
  LayoutInflater inflater = LayoutInflater.from(activity);
  TelescopeLayout content =
      (TelescopeLayout) inflater.inflate(R.layout.telescope_tutorial_dialog, null);
  final AlertDialog dialog =
      new AlertDialog.Builder(activity).setView(content).setCancelable(false).create();

  content.setLens(new Lens() {
    @Override public void onCapture(File file) {
      dialog.dismiss();

      Context toastContext = new ContextThemeWrapper(activity, android.R.style.Theme_DeviceDefault_Dialog);
      LayoutInflater toastInflater = LayoutInflater.from(toastContext);
      Toast toast = Toast.makeText(toastContext, "", Toast.LENGTH_SHORT);
      View toastView = toastInflater.inflate(R.layout.telescope_tutorial_toast, null);
      toast.setView(toastView);
      toast.setGravity(Gravity.CENTER, 0, 0);
      toast.show();
    }
  });

  dialog.show();
}
 
开发者ID:rogues-dev,项目名称:superglue,代码行数:24,代码来源:TelescopeViewContainer.java

示例2: onModuleAttached

import com.mattprecious.telescope.TelescopeLayout; //导入方法依赖的package包/类
@Override
protected void onModuleAttached(Activity activity, DebugModule module) {
	super.onModuleAttached(activity,module);

	ViewGroup content = module.getContent();

	telescopeLayout = new TelescopeLayout(activity);

	ViewGroup parent = (ViewGroup) content.getParent();
	parent.removeView(content);
	parent.addView(telescopeLayout,0);
	telescopeLayout.addView(content);

	telescopeLayout.setLens(new BugReportLens(activity, LumberYard.getInstance(activity)));

	TelescopeLayout.cleanUp(activity); // Clean up any old screenshots.

	// enable/disable based on saved preference
	onSwitch(isChecked());
}
 
开发者ID:williamwebb,项目名称:debugdrawer,代码行数:21,代码来源:TelescopeElement.java

示例3: showTelescopeDialog

import com.mattprecious.telescope.TelescopeLayout; //导入方法依赖的package包/类
public void showTelescopeDialog(final Activity activity) {
    LayoutInflater inflater = LayoutInflater.from(activity);
    TelescopeLayout content =
            (TelescopeLayout) inflater.inflate(R.layout.telescope_tutorial_dialog, null);
    final AlertDialog dialog =
            new AlertDialog.Builder(activity).setView(content).setCancelable(false).create();

    content.setLens(new Lens() {
        @Override public void onCapture(File file) {
            dialog.dismiss();

            Context toastContext = new ContextThemeWrapper(activity, android.R.style.Theme_DeviceDefault_Dialog);
            LayoutInflater toastInflater = LayoutInflater.from(toastContext);
            Toast toast = Toast.makeText(toastContext, "", Toast.LENGTH_SHORT);
            View toastView = toastInflater.inflate(R.layout.telescope_tutorial_toast, null);
            toast.setView(toastView);
            toast.setGravity(Gravity.CENTER, 0, 0);
            toast.show();
        }
    });

    dialog.show();
}
 
开发者ID:LiveTyping,项目名称:u2020-mvp,代码行数:24,代码来源:TelescopeViewContainer.java

示例4: initBugReport

import com.mattprecious.telescope.TelescopeLayout; //导入方法依赖的package包/类
public void initBugReport()
{
    try
    {
        TelescopeLayout telescopeView = (TelescopeLayout) findViewById(telescopeId);
        telescopeView.setLens(new EmailDeviceInfoLens(this, getString(R.string.bug_report_title),
                getPackageManager().getPackageInfo(getPackageName(), 0).versionName,
                getPackageManager().getPackageInfo(getPackageName(), 0).versionCode,
                getResources().getStringArray(R.array.bugreport_email)));
    }
    catch (Exception e)
    {
        Log.w("Test", Log.getStackTraceString(e));
    }
}
 
开发者ID:Alfresco,项目名称:activiti-android-app,代码行数:16,代码来源:AlfrescoActivity.java


注:本文中的com.mattprecious.telescope.TelescopeLayout.setLens方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。