Blog Fragment in Navigation Drawer with Tabs

This replaces the custom layouts in the navigation drawer with a
`NavigationView` and adds a menu entry for Blogs.

A Main Blogs fragment is added that holds a `TabLayout` and a
`ViewPager`. Five tabs are already added, but they just have a single
placeholder fragment that is to be replaced by the actual fragments.

Closes #409
This commit is contained in:
Torsten Grote
2016-06-02 19:06:53 -03:00
parent bba7083660
commit 3f838b0472
40 changed files with 410 additions and 109 deletions

View File

@@ -5,6 +5,8 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import org.briarproject.android.blogs.BlogsFragment;
import org.briarproject.android.blogs.MyBlogsFragment;
import org.briarproject.android.contact.ContactListFragment;
import org.briarproject.android.controller.BriarController;
import org.briarproject.android.controller.BriarControllerImpl;
@@ -149,6 +151,20 @@ public class ActivityModule {
return fragment;
}
@Provides
@Named("BlogsFragment")
BaseFragment provideBlogsFragment(BlogsFragment fragment) {
fragment.setArguments(new Bundle());
return fragment;
}
@Provides
@Named("MyBlogsFragment")
BaseFragment provideMyBlogsFragment(MyBlogsFragment fragment) {
fragment.setArguments(new Bundle());
return fragment;
}
@Provides
@Named("ChooseIdentityFragment")
BaseFragment provideChooseIdentityFragment(