Fixed null pointer exception by properly replacing the fragment

This commit is contained in:
Anthony Restaino 2016-03-21 22:10:16 -04:00
parent 57d5298bec
commit 58d8cb6a36
2 changed files with 3 additions and 3 deletions

View File

@ -316,8 +316,8 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
final FragmentManager fragmentManager = getSupportFragmentManager();
fragmentManager
.beginTransaction()
.add(containerId, tabsFragment)
.add(R.id.right_drawer, bookmarksFragment)
.replace(containerId, tabsFragment)
.replace(R.id.right_drawer, bookmarksFragment)
.commit();
if (mShowTabsInDrawer) {
mToolbarLayout.removeView(findViewById(R.id.tabs_toolbar_container));

View File

@ -243,7 +243,7 @@ public class TabsFragment extends Fragment implements View.OnClickListener, View
}
}
public class LightningViewAdapter extends RecyclerView.Adapter<LightningViewAdapter.LightningViewHolder> {
private class LightningViewAdapter extends RecyclerView.Adapter<LightningViewAdapter.LightningViewHolder> {
private final int mLayoutResourceId;
@Nullable private final Drawable mBackgroundTabDrawable;