Extend BlogActivity to also show individual posts

This allows for swiping left/right to read other posts by using
a ViewPager.

This hasn't been done as a separate activity, but with
fragments, so both can share the `BlogPersistentData` without
needing to reload it.

Closes #428
This commit is contained in:
Torsten Grote
2016-06-20 15:58:42 -03:00
parent f7d5c1f63c
commit 761525ad85
15 changed files with 929 additions and 125 deletions

View File

@@ -4,6 +4,8 @@ import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import org.briarproject.android.blogs.BlogController;
import org.briarproject.android.blogs.BlogControllerImpl;
import org.briarproject.android.controller.BriarController;
import org.briarproject.android.controller.BriarControllerImpl;
import org.briarproject.android.controller.ConfigController;
@@ -107,6 +109,13 @@ public class ActivityModule {
return forumController;
}
@ActivityScope
@Provides
BlogController provideBlogController(BlogControllerImpl blogController) {
activity.addLifecycleController(blogController);
return blogController;
}
@ActivityScope
@Provides
protected NavDrawerController provideNavDrawerController(