// Path: app/src/main/java/io/github/kobakei/anago/fragment/MyRepoListFragment.java
// public class MyRepoListFragment extends BaseFragment {
// 
//     @Inject
//     MyRepoListFragmentViewModel viewModel;
// 
//     public MyRepoListFragment() {
//         // Required empty public constructor
//     }
// 
//     public static MyRepoListFragment newInstance() {
//         MyRepoListFragment fragment = new MyRepoListFragment();
//         return fragment;
//     }
// 
//     @Override
//     public View onCreateView(LayoutInflater inflater, ViewGroup container,
//                              Bundle savedInstanceState) {
// 
//         getInjector().inject(this);
//         bindViewModel(viewModel);
// 
//         MyRepoListFragmentBinding binding = DataBindingUtil.inflate(inflater, R.layout.my_repo_list_fragment, container, false);
//         binding.setViewModel(viewModel);
// 
//         // Set up listview
//         RepoAdapter adapter = new RepoAdapter(getContext(), getInjector(), viewModel.repos);
//         binding.listView.setAdapter(adapter);
// 
//         return binding.getRoot();
//     }
// }
// 
// Path: app/src/main/java/io/github/kobakei/anago/fragment/StarredRepoListFragment.java
// public class StarredRepoListFragment extends BaseFragment {
// 
//     @Inject
//     StarredRepoListFragmentViewModel viewModel;
// 
//     public StarredRepoListFragment() {
//         // Required empty public constructor
//     }
// 
//     public static StarredRepoListFragment newInstance() {
//         StarredRepoListFragment fragment = new StarredRepoListFragment();
//         return fragment;
//     }
// 
//     @Override
//     public View onCreateView(LayoutInflater inflater, ViewGroup container,
//                              Bundle savedInstanceState) {
// 
//         getInjector().inject(this);
//         bindViewModel(viewModel);
// 
//         StarredRepoListFragmentBinding binding = DataBindingUtil.inflate(inflater, R.layout.starred_repo_list_fragment, container, false);
//         binding.setViewModel(viewModel);
// 
//         // Set up listview
//         RepoAdapter adapter = new RepoAdapter(getContext(), getInjector(), viewModel.repos);
//         binding.listView.setAdapter(adapter);
// 
//         return binding.getRoot();
//     }
// }
// 
// Path: app/src/main/java/io/github/kobakei/anago/viewmodel/HomeActivityViewModel.java
// public class HomeActivityViewModel extends ActivityViewModel implements Toolbar.OnMenuItemClickListener {
// 
//     private final SignOutUseCase signOutUseCase;
// 
//     @Inject
//     public HomeActivityViewModel(BaseActivity activity, SignOutUseCase signOutUseCase) {
//         super(activity);
//         this.signOutUseCase = signOutUseCase;
//     }
// 
//     @Override
//     public boolean onMenuItemClick(MenuItem item) {
//         signOutUseCase.run()
//                 .compose(bindToLifecycle().forCompletable())
//                 .subscribeOn(Schedulers.io())
//                 .observeOn(AndroidSchedulers.mainThread())
//                 .subscribe(() -> SignInActivity.startActivity(getContext()), Throwable::printStackTrace);
//         return true;
//     }
// 
//     @Override
//     public void onStart() {
// 
//     }
// 
//     @Override
//     public void onResume() {
// 
//     }
// 
//     @Override
//     public void onPause() {
// 
//     }
// 
//     @Override
//     public void onStop() {
// 
//     }
// }


import android.app.Activity;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import javax.inject.Inject;
import io.github.kobakei.anago.R;
import io.github.kobakei.anago.databinding.HomeActivityBinding;
import io.github.kobakei.anago.fragment.MyRepoListFragment;
import io.github.kobakei.anago.fragment.StarredRepoListFragment;
import io.github.kobakei.anago.viewmodel.HomeActivityViewModel;
package io.github.kobakei.anago.activity;




/**
 * リポジトリ一覧画面
 */
public class HomeActivity extends BaseActivity {

    @Inject
    HomeActivityViewModel viewModel;

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

        getInjector().inject(this);
        bindViewModel(viewModel);

        HomeActivityBinding binding = DataBindingUtil.setContentView(this, R.layout.home_activity);
        binding.setViewModel(viewModel);

        // Set up viewpager
// Path: app/src/main/java/io/github/kobakei/anago/fragment/MyRepoListFragment.java
// public class MyRepoListFragment extends BaseFragment {
// 
//     @Inject
//     MyRepoListFragmentViewModel viewModel;
// 
//     public MyRepoListFragment() {
//         // Required empty public constructor
//     }
// 
//     public static MyRepoListFragment newInstance() {
//         MyRepoListFragment fragment = new MyRepoListFragment();
//         return fragment;
//     }
// 
//     @Override
//     public View onCreateView(LayoutInflater inflater, ViewGroup container,
//                              Bundle savedInstanceState) {
// 
//         getInjector().inject(this);
//         bindViewModel(viewModel);
// 
//         MyRepoListFragmentBinding binding = DataBindingUtil.inflate(inflater, R.layout.my_repo_list_fragment, container, false);
//         binding.setViewModel(viewModel);
// 
//         // Set up listview
//         RepoAdapter adapter = new RepoAdapter(getContext(), getInjector(), viewModel.repos);
//         binding.listView.setAdapter(adapter);
// 
//         return binding.getRoot();
//     }
// }
// 
// Path: app/src/main/java/io/github/kobakei/anago/fragment/StarredRepoListFragment.java
// public class StarredRepoListFragment extends BaseFragment {
// 
//     @Inject
//     StarredRepoListFragmentViewModel viewModel;
// 
//     public StarredRepoListFragment() {
//         // Required empty public constructor
//     }
// 
//     public static StarredRepoListFragment newInstance() {
//         StarredRepoListFragment fragment = new StarredRepoListFragment();
//         return fragment;
//     }
// 
//     @Override
//     public View onCreateView(LayoutInflater inflater, ViewGroup container,
//                              Bundle savedInstanceState) {
// 
//         getInjector().inject(this);
//         bindViewModel(viewModel);
// 
//         StarredRepoListFragmentBinding binding = DataBindingUtil.inflate(inflater, R.layout.starred_repo_list_fragment, container, false);
//         binding.setViewModel(viewModel);
// 
//         // Set up listview
//         RepoAdapter adapter = new RepoAdapter(getContext(), getInjector(), viewModel.repos);
//         binding.listView.setAdapter(adapter);
// 
//         return binding.getRoot();
//     }
// }
// 
// Path: app/src/main/java/io/github/kobakei/anago/viewmodel/HomeActivityViewModel.java
// public class HomeActivityViewModel extends ActivityViewModel implements Toolbar.OnMenuItemClickListener {
// 
//     private final SignOutUseCase signOutUseCase;
// 
//     @Inject
//     public HomeActivityViewModel(BaseActivity activity, SignOutUseCase signOutUseCase) {
//         super(activity);
//         this.signOutUseCase = signOutUseCase;
//     }
// 
//     @Override
//     public boolean onMenuItemClick(MenuItem item) {
//         signOutUseCase.run()
//                 .compose(bindToLifecycle().forCompletable())
//                 .subscribeOn(Schedulers.io())
//                 .observeOn(AndroidSchedulers.mainThread())
//                 .subscribe(() -> SignInActivity.startActivity(getContext()), Throwable::printStackTrace);
//         return true;
//     }
// 
//     @Override
//     public void onStart() {
// 
//     }
// 
//     @Override
//     public void onResume() {
// 
//     }
// 
//     @Override
//     public void onPause() {
// 
//     }
// 
//     @Override
//     public void onStop() {
// 
//     }
// }


// Path: app/src/main/java/io/github/kobakei/anago/activity/HomeActivity.java
import android.app.Activity;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import javax.inject.Inject;
import io.github.kobakei.anago.R;
import io.github.kobakei.anago.databinding.HomeActivityBinding;
import io.github.kobakei.anago.fragment.MyRepoListFragment;
import io.github.kobakei.anago.fragment.StarredRepoListFragment;
import io.github.kobakei.anago.viewmodel.HomeActivityViewModel;

package io.github.kobakei.anago.activity;




/**
 * リポジトリ一覧画面
 */
public class HomeActivity extends BaseActivity {

    @Inject
    HomeActivityViewModel viewModel;

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

        getInjector().inject(this);
        bindViewModel(viewModel);

        HomeActivityBinding binding = DataBindingUtil.setContentView(this, R.layout.home_activity);
        binding.setViewModel(viewModel);

        // Set up viewpager
        HomeFragmentPagerAdapter adapter = new HomeFragmentPagerAdapter(this, getSupportFragmentManager());