本文整理汇总了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;
}
示例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());
}
示例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;
}
示例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;
}
示例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;
}
示例6: onDestroy
import com.mattprecious.telescope.TelescopeLayout; //导入方法依赖的package包/类
@Override protected void onDestroy() {
super.onDestroy();
TelescopeLayout.cleanUp(this);
}
示例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;
}