Browse Source

Fixed null pointer exception by properly replacing the fragment

master
Anthony Restaino 9 years ago
parent
commit
58d8cb6a36
  1. 4
      app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java
  2. 2
      app/src/main/java/acr/browser/lightning/fragment/TabsFragment.java

4
app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java

@ -316,8 +316,8 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements @@ -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));

2
app/src/main/java/acr/browser/lightning/fragment/TabsFragment.java

@ -243,7 +243,7 @@ public class TabsFragment extends Fragment implements View.OnClickListener, View @@ -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;

Loading…
Cancel
Save