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


Java TelescopeLayout.cleanUp方法代码示例

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


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

示例1: forActivity

import com.mattprecious.telescope.TelescopeLayout; //导入方法依赖的package包/类
@Override public ViewGroup forActivity(final Activity activity) {
  activity.setContentView(R.layout.internal_activity_frame);
  ButterKnife.bind(this, activity);

  TelescopeLayout.cleanUp(activity); // Clean up any old screenshots.
  telescopeLayout.setLens(new BugReportLens(activity, lumberYard, intentManager));

  // If you have not seen the telescope dialog before, show it.
  if (!seenTelescopeDialog.get()) {
    telescopeLayout.postDelayed(() -> {
      if (activity.isFinishing()) {
        return;
      }

      seenTelescopeDialog.set(true);
      showTelescopeDialog(activity);
    }, 1000);
  }

  return telescopeLayout;
}
 
开发者ID:rogues-dev,项目名称:superglue,代码行数:22,代码来源: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: forActivity

import com.mattprecious.telescope.TelescopeLayout; //导入方法依赖的package包/类
@Override public ViewGroup forActivity(final Activity activity) {
    activity.setContentView(R.layout.internal_activity_frame);
    ButterKnife.bind(this, activity);

    TelescopeLayout.cleanUp(activity); // Clean up any old screenshots.
    telescopeLayout.setLens(new BugReportLens(activity, lumberYard));

    // If you have not seen the telescope dialog before, show it.
    if (!seenTelescopeDialog.get()) {
        telescopeLayout.postDelayed(new Runnable() {
            @Override public void run() {
                if (activity.isFinishing()) {
                    return;
                }

                seenTelescopeDialog.set(true);
                showTelescopeDialog(activity);
            }
        }, 1000);
    }

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

示例4: forActivity

import com.mattprecious.telescope.TelescopeLayout; //导入方法依赖的package包/类
@Override public ViewGroup forActivity(final Activity activity) {
  activity.setContentView(R.layout.internal_activity_frame);
  ButterKnife.bind(this, activity);

  TelescopeLayout.cleanUp(activity); // Clean up any old screenshots.
  telescopeLayout.setLens(new BugReportLens(activity, lumberYard));

  // If you have not seen the telescope dialog before, show it.
  if (!seenTelescopeDialog.get()) {
    telescopeLayout.postDelayed(new Runnable() {
      @Override public void run() {
        if (activity.isFinishing()) {
          return;
        }

        seenTelescopeDialog.set(true);
        showTelescopeDialog(activity);
      }
    }, 1000);
  }

  return telescopeLayout;
}
 
开发者ID:JakeWharton,项目名称:u2020,代码行数:24,代码来源:TelescopeViewContainer.java

示例5: forActivity

import com.mattprecious.telescope.TelescopeLayout; //导入方法依赖的package包/类
@Override public ViewGroup forActivity(final Activity activity) {
  activity.setContentView(R.layout.debug_activity_frame);

  final ViewHolder viewHolder = new ViewHolder();
  ButterKnife.bind(viewHolder, activity);

  final Context drawerContext = new ContextThemeWrapper(activity, R.style.Theme_SuperGlue_Debug);
  final DebugView debugView = new DebugView(drawerContext);
  viewHolder.debugDrawer.addView(debugView);

  viewHolder.drawerLayout.setDrawerShadow(R.drawable.debug_drawer_shadow, GravityCompat.END);
  viewHolder.drawerLayout.setDrawerListener(new DebugDrawerLayout.SimpleDrawerListener() {
    @Override public void onDrawerOpened(View drawerView) {
      debugView.onDrawerOpened();
    }
  });

  TelescopeLayout.cleanUp(activity); // Clean up any old screenshots.
  viewHolder.telescopeLayout.setLens(new BugReportLens(activity, lumberYard, intentManager));

  // If you have not seen the debug drawer before, show it with a message
  if (!seenDebugDrawer.get()) {
    viewHolder.drawerLayout.postDelayed(() -> {
      viewHolder.drawerLayout.openDrawer(GravityCompat.END);
      Toast.makeText(drawerContext, R.string.debug_drawer_welcome, Toast.LENGTH_LONG).show();
    }, SECONDS.toMillis(1));
    seenDebugDrawer.set(true);
  }

  final CompositeSubscription subscriptions = new CompositeSubscription();
  setupMadge(viewHolder, subscriptions);
  setupScalpel(viewHolder, subscriptions);

  final Application app = activity.getApplication();
  app.registerActivityLifecycleCallbacks(new EmptyActivityLifecycleCallbacks() {
    @Override public void onActivityDestroyed(Activity lifecycleActivity) {
      if (lifecycleActivity == activity) {
        subscriptions.unsubscribe();
        app.unregisterActivityLifecycleCallbacks(this);
      }
    }
  });

  riseAndShine(activity);
  return viewHolder.content;
}
 
开发者ID:rogues-dev,项目名称:superglue,代码行数:47,代码来源:DebugViewContainer.java

示例6: onDestroy

import com.mattprecious.telescope.TelescopeLayout; //导入方法依赖的package包/类
@Override protected void onDestroy() {
  super.onDestroy();
  TelescopeLayout.cleanUp(this);
}
 
开发者ID:mattprecious,项目名称:telescope,代码行数:5,代码来源:SampleActivity.java

示例7: forActivity

import com.mattprecious.telescope.TelescopeLayout; //导入方法依赖的package包/类
@Override public ViewGroup forActivity(final Activity activity) {
  activity.setContentView(R.layout.debug_activity_frame);

  final ViewHolder viewHolder = new ViewHolder();
  ButterKnife.bind(viewHolder, activity);

  final Context drawerContext = new ContextThemeWrapper(activity, R.style.Theme_U2020_Debug);
  final DebugView debugView = new DebugView(drawerContext);
  viewHolder.debugDrawer.addView(debugView);

  // Set up the contextual actions to watch views coming in and out of the content area.
  ContextualDebugActions contextualActions = debugView.getContextualDebugActions();
  contextualActions.setActionClickListener(v -> viewHolder.drawerLayout.closeDrawers());
  viewHolder.content.setOnHierarchyChangeListener(
      HierarchyTreeChangeListener.wrap(contextualActions));

  viewHolder.drawerLayout.setDrawerShadow(R.drawable.debug_drawer_shadow, GravityCompat.END);
  viewHolder.drawerLayout.setDrawerListener(new DebugDrawerLayout.SimpleDrawerListener() {
    @Override public void onDrawerOpened(View drawerView) {
      debugView.onDrawerOpened();
    }
  });

  TelescopeLayout.cleanUp(activity); // Clean up any old screenshots.
  viewHolder.telescopeLayout.setLens(new BugReportLens(activity, lumberYard));

  // If you have not seen the debug drawer before, show it with a message
  if (!seenDebugDrawer.get()) {
    viewHolder.drawerLayout.postDelayed(() -> {
      viewHolder.drawerLayout.openDrawer(GravityCompat.END);
      Toast.makeText(drawerContext, R.string.debug_drawer_welcome, Toast.LENGTH_LONG).show();
    }, 1000);
    seenDebugDrawer.set(true);
  }

  final CompositeSubscription subscriptions = new CompositeSubscription();
  setupMadge(viewHolder, subscriptions);
  setupScalpel(viewHolder, subscriptions);

  final Application app = activity.getApplication();
  app.registerActivityLifecycleCallbacks(new EmptyActivityLifecycleCallbacks() {
    @Override public void onActivityDestroyed(Activity lifecycleActivity) {
      if (lifecycleActivity == activity) {
        subscriptions.unsubscribe();
        app.unregisterActivityLifecycleCallbacks(this);
      }
    }
  });

  riseAndShine(activity);
  return viewHolder.content;
}
 
开发者ID:JakeWharton,项目名称:u2020,代码行数:53,代码来源:DebugViewContainer.java


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