// Path: app/src/main/java/org/attentiveness/news/base/BaseActivity.java
// public abstract class BaseActivity extends AppCompatActivity {
// 
//     @Nullable
//     @BindView(R.id.toolbar)
//     Toolbar mToolbar;
//     @Nullable
//     @BindView(R.id.drawer_layout)
//     protected DrawerLayout mDrawerLayout;
//     @Nullable
//     @BindView(R.id.nav_view)
//     NavigationView mNavigationView;
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//     }
// 
//     protected void setup() {
//         setup(-1);
//     }
// 
//     protected void setup(int barIconId) {
//         setSupportActionBar(this.mToolbar);
//         ActionBar actionBar = getSupportActionBar();
//         if (actionBar != null) {
//             if (barIconId > 0) {
//                 actionBar.setHomeAsUpIndicator(barIconId);
//             }
//             actionBar.setDisplayHomeAsUpEnabled(true);
//         }
// 
//         if (this.mDrawerLayout != null) {
//             this.mDrawerLayout.setStatusBarBackground(R.color.colorPrimaryDark);
//         }
//         if (this.mNavigationView != null) {
//             setupDrawerContent(this.mNavigationView);
//         }
//     }
// 
//     protected void setupDrawerContent(NavigationView navigationView) {
// 
//     }
// 
//     protected void addFragment(FragmentManager fragmentManager, int containerId, Fragment fragment) {
//         FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
//         fragmentTransaction.add(containerId, fragment);
//         fragmentTransaction.commit();
//     }
// 
//     protected void showMessage(View anchorView, String message) {
//         Snackbar.make(anchorView, message, Snackbar.LENGTH_SHORT).show();
//     }
// 
// }
// 
// Path: app/src/main/java/org/attentiveness/news/list/StoryListActivity.java
// public class StoryListActivity extends BaseActivity {
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_story_list);
//         ButterKnife.bind(this);
//         setup(R.drawable.ic_menu);
// 
//         StoryListFragment newsListFragment = (StoryListFragment) getSupportFragmentManager().findFragmentById(R.id.fl_container);
//         if (newsListFragment == null) {
//             String today = DateUtil.getToday();
//             newsListFragment = StoryListFragment.newInstance(today);
//             addFragment(getSupportFragmentManager(), R.id.fl_container, newsListFragment);
//         }
// 
//         StoriesDataRepository repository = StoriesDataRepository.getInstance(
//                 RemoteStoriesDataSource.getInstance(this), LocalStoriesDataSource.getInstance(this));
//         StoryListPresenter presenter = new StoryListPresenter(repository, newsListFragment);
//     }
// 
//     @Override
//     public boolean onOptionsItemSelected(MenuItem item) {
//         switch (item.getItemId()) {
//             case android.R.id.home:
//                 // Open the navigation drawer when the home icon is selected from the toolbar.
//                 if (this.mDrawerLayout != null) {
//                     this.mDrawerLayout.openDrawer(GravityCompat.START);
//                 }
//                 return true;
//         }
//         return super.onOptionsItemSelected(item);
//     }
// 
//     @Override
//     protected void setupDrawerContent(NavigationView navigationView) {
//         navigationView.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {
//             @Override
//             public boolean onNavigationItemSelected(@NonNull MenuItem item) {
//                 int itemId = item.getItemId();
//                 switch (itemId) {
//                     case R.id.nav_news_list:
//                         //do nothing
//                         break;
//                     case R.id.nav_feedback:
//                         break;
//                     case R.id.nav_about:
//                         break;
//                     case R.id.nav_settings:
//                         break;
//                     default:
//                         break;
//                 }
//                 // Close the navigation drawer when an item is selected.
//                 item.setChecked(true);
//                 if (mDrawerLayout != null) {
//                     mDrawerLayout.closeDrawers();
//                 }
//                 return true;
//             }
//         });
//     }
// 
// }


import android.content.Intent;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.support.design.widget.NavigationView;
import android.view.Window;
import android.view.WindowManager;
import org.attentiveness.news.R;
import org.attentiveness.news.base.BaseActivity;
import org.attentiveness.news.list.StoryListActivity;
import butterknife.ButterKnife;
package org.attentiveness.news.splash;




public class SplashActivity extends BaseActivity {

    private CountDownTimer mTimer;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.activity_splash);
        ButterKnife.bind(this);

        init();
    }

    @Override
    protected void setupDrawerContent(NavigationView navigationView) {
        //do nothing
    }

    private void init() {
        mTimer = new CountDownTimer(3000, 1000) {
            @Override
            public void onTick(long millisUntilFinished) {

            }

            @Override
            public void onFinish() {
                navigate();
                finish();
            }
        };
        mTimer.start();
    }

    private void navigate() {
// Path: app/src/main/java/org/attentiveness/news/base/BaseActivity.java
// public abstract class BaseActivity extends AppCompatActivity {
// 
//     @Nullable
//     @BindView(R.id.toolbar)
//     Toolbar mToolbar;
//     @Nullable
//     @BindView(R.id.drawer_layout)
//     protected DrawerLayout mDrawerLayout;
//     @Nullable
//     @BindView(R.id.nav_view)
//     NavigationView mNavigationView;
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//     }
// 
//     protected void setup() {
//         setup(-1);
//     }
// 
//     protected void setup(int barIconId) {
//         setSupportActionBar(this.mToolbar);
//         ActionBar actionBar = getSupportActionBar();
//         if (actionBar != null) {
//             if (barIconId > 0) {
//                 actionBar.setHomeAsUpIndicator(barIconId);
//             }
//             actionBar.setDisplayHomeAsUpEnabled(true);
//         }
// 
//         if (this.mDrawerLayout != null) {
//             this.mDrawerLayout.setStatusBarBackground(R.color.colorPrimaryDark);
//         }
//         if (this.mNavigationView != null) {
//             setupDrawerContent(this.mNavigationView);
//         }
//     }
// 
//     protected void setupDrawerContent(NavigationView navigationView) {
// 
//     }
// 
//     protected void addFragment(FragmentManager fragmentManager, int containerId, Fragment fragment) {
//         FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
//         fragmentTransaction.add(containerId, fragment);
//         fragmentTransaction.commit();
//     }
// 
//     protected void showMessage(View anchorView, String message) {
//         Snackbar.make(anchorView, message, Snackbar.LENGTH_SHORT).show();
//     }
// 
// }
// 
// Path: app/src/main/java/org/attentiveness/news/list/StoryListActivity.java
// public class StoryListActivity extends BaseActivity {
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_story_list);
//         ButterKnife.bind(this);
//         setup(R.drawable.ic_menu);
// 
//         StoryListFragment newsListFragment = (StoryListFragment) getSupportFragmentManager().findFragmentById(R.id.fl_container);
//         if (newsListFragment == null) {
//             String today = DateUtil.getToday();
//             newsListFragment = StoryListFragment.newInstance(today);
//             addFragment(getSupportFragmentManager(), R.id.fl_container, newsListFragment);
//         }
// 
//         StoriesDataRepository repository = StoriesDataRepository.getInstance(
//                 RemoteStoriesDataSource.getInstance(this), LocalStoriesDataSource.getInstance(this));
//         StoryListPresenter presenter = new StoryListPresenter(repository, newsListFragment);
//     }
// 
//     @Override
//     public boolean onOptionsItemSelected(MenuItem item) {
//         switch (item.getItemId()) {
//             case android.R.id.home:
//                 // Open the navigation drawer when the home icon is selected from the toolbar.
//                 if (this.mDrawerLayout != null) {
//                     this.mDrawerLayout.openDrawer(GravityCompat.START);
//                 }
//                 return true;
//         }
//         return super.onOptionsItemSelected(item);
//     }
// 
//     @Override
//     protected void setupDrawerContent(NavigationView navigationView) {
//         navigationView.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {
//             @Override
//             public boolean onNavigationItemSelected(@NonNull MenuItem item) {
//                 int itemId = item.getItemId();
//                 switch (itemId) {
//                     case R.id.nav_news_list:
//                         //do nothing
//                         break;
//                     case R.id.nav_feedback:
//                         break;
//                     case R.id.nav_about:
//                         break;
//                     case R.id.nav_settings:
//                         break;
//                     default:
//                         break;
//                 }
//                 // Close the navigation drawer when an item is selected.
//                 item.setChecked(true);
//                 if (mDrawerLayout != null) {
//                     mDrawerLayout.closeDrawers();
//                 }
//                 return true;
//             }
//         });
//     }
// 
// }


// Path: app/src/main/java/org/attentiveness/news/splash/SplashActivity.java
import android.content.Intent;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.support.design.widget.NavigationView;
import android.view.Window;
import android.view.WindowManager;
import org.attentiveness.news.R;
import org.attentiveness.news.base.BaseActivity;
import org.attentiveness.news.list.StoryListActivity;
import butterknife.ButterKnife;

package org.attentiveness.news.splash;




public class SplashActivity extends BaseActivity {

    private CountDownTimer mTimer;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.activity_splash);
        ButterKnife.bind(this);

        init();
    }

    @Override
    protected void setupDrawerContent(NavigationView navigationView) {
        //do nothing
    }

    private void init() {
        mTimer = new CountDownTimer(3000, 1000) {
            @Override
            public void onTick(long millisUntilFinished) {

            }

            @Override
            public void onFinish() {
                navigate();
                finish();
            }
        };
        mTimer.start();
    }

    private void navigate() {
        Intent intent = new Intent(this, StoryListActivity.class);