android - 如何将 Instabug 与较旧的支持库和 Holo 主题一起使用

标签 android instabug

我想将 Instabug 与旧版本的支持库 (appcompat-v7/support-v4) 一起使用,因为我们的应用程序尚未准备好使用 Material design。但是,当我使用 InstabugAppCompatActivity (或任何其他类型)时,由于将较新的支持库链接到 com.instabug.library.instabugsupport,我将 Material 设计引入到我的应用程序中。
有什么想法如何做到这一点吗?谢谢

最佳答案

您可以使用此包含(或更新版本的instabugbasic):
compile 'com.instabug.library:instabugbasic:1.3.8'
然后,您需要创建扩展 ActionBarActivity 的 InstabugActivity 并重写一些方法。

public class BaseInstabugActivity extends ActionBarActivity {

InstabugActivityDelegate mDelegate;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    mDelegate = new InstabugActivityDelegate(this);
}

@Override
protected void onResume() {
    super.onResume();
    mDelegate.onResume();
}

@Override
protected void onPause() {
    super.onPause();
    mDelegate.onPause();
}

@Override
protected void onDestroy() {
    super.onDestroy();
    mDelegate.onDestroy();
}

@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
    mDelegate.dispatchTouchEvent(ev);
    return super.dispatchTouchEvent(ev);
}   }

其余集成与官方指南相同。因此,不要忘记在 Application 类中初始化 Instabug 并将 InstabugFeedbackActivity 添加到 list 中。也许您需要在 list 中使用自己的 android:theme 和 InstabugFeedbackActivity。

关于android - 如何将 Instabug 与较旧的支持库和 Holo 主题一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31605643/

相关文章:

android - 依赖性问题

android - 如何在带有 fragment 的布局中的 ListView 下方的页脚中添加按钮

java - 为什么我的 ListAdapter 没有显示任何数据?

android - java.lang.NoClassDefFoundError : com. instabug.library 错误

android - 如何在没有gps的情况下检查android手机是否被移动

用于下载/同步数据的 android 4.0 模式

android - InstaBug,无法解析 'Builder'

java - 在 Retrofit 2 日志记录中过滤敏感 json 字段

java - 如何初始化 android 的 instabug?