// Path: cartolapp/app/src/main/java/com/github/pierry/cartolapp/ui/ToolbarBase.java
// @EBean public class ToolbarBase {
// 
//   private Drawer drawer;
//   private Toolbar toolbar;
//   private Activity act;
//   private AccountHeader headerResult;
//   private Context context;
// 
//   public ToolbarBase(Context context) {
//     this.context = context;
//   }
// 
//   @UiThread public void injectToolbar(Toolbar toolbar, Activity act) {
//     this.toolbar = toolbar;
//     this.act = act;
//     initAccount();
//     initDrawer();
//   }
// 
//   @UiThread void initDrawer() {
//     PrimaryDrawerItem home =
//         new PrimaryDrawerItem().withName(R.string.home).withIcon(GoogleMaterial.Icon.gmd_home);
//     new DrawerBuilder().withActivity((Activity) act)
//         .withToolbar(toolbar)
//         .withHasStableIds(true)
//         .withTranslucentStatusBar(true)
//         .withSelectedItem(-1)
//         .withAccountHeader(headerResult)
//         .addDrawerItems(home)
//         .withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener() {
//           @Override public boolean onItemClick(View view, int position, IDrawerItem drawerItem) {
//             switch (position) {
//               case 1:
//                 context.startActivity(new Intent(context, MainActivity_.class));
//                 return true;
//               default:
//                 return true;
//             }
//           }
//         })
//         .build();
//   }
// 
//   @UiThread void initAccount() {
//     headerResult = new AccountHeaderBuilder().withActivity(act)
//         .withHeaderBackground(R.color.colorPrimary)
//         .addProfiles(new ProfileDrawerItem().withName("Usuário"))
//         .withOnAccountHeaderListener(new AccountHeader.OnAccountHeaderListener() {
//           @Override
//           public boolean onProfileChanged(View view, IProfile profile, boolean currentProfile) {
//             return false;
//           }
//         })
//         .build();
//   }
// 
//   @UiThread
//   public void changeColor(PagerSlidingTabStrip tabs, SystemBarTintManager tintManager, int newColor) {
//     tabs.setBackgroundColor(newColor);
//     tintManager.setTintColor(newColor);
//   }
// }
// 
// Path: cartolapp/app/src/main/java/com/github/pierry/cartolapp/ui/adapters/HomeAdapter.java
// public class HomeAdapter extends FragmentPagerAdapter {
//   final int PAGE_COUNT = 3;
//   private String tabTitles[] = new String[] { "Equipes", "Jogadores", "Perfil" };
// 
//   public HomeAdapter(FragmentManager fm) {
//     super(fm);
//   }
// 
//   @Override public int getCount() {
//     return PAGE_COUNT;
//   }
// 
//   @Override public Fragment getItem(int position) {
//     switch (position) {
//       case 0:
//         return new TeamFragment_();
//       case 1:
//         return new PlayerFragment_();
//       case 2:
//         return new PlayerFragment_();
//     }
//     return new TeamFragment_();
//   }
// 
//   @Override public CharSequence getPageTitle(int position) {
//     return tabTitles[position];
//   }
// }


import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.support.v4.view.ViewPager.OnPageChangeListener;
import android.util.TypedValue;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.astuetz.PagerSlidingTabStrip;
import com.github.pierry.cartolapp.R;
import com.github.pierry.cartolapp.ui.ToolbarBase;
import com.github.pierry.cartolapp.ui.adapters.HomeAdapter;
import com.readystatesoftware.systembartint.SystemBarTintManager;
import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EFragment;
import org.androidannotations.annotations.ViewById;
package com.github.pierry.cartolapp.ui.fragments;


@EFragment(R.layout.fragment_home) public class HomeFragment extends Fragment implements OnPageChangeListener {

  @ViewById PagerSlidingTabStrip tabs;
  @ViewById ViewPager pager;

  @Bean(ToolbarBase.class) ToolbarBase toolbarBase;

  @AfterViews void init() {
    SystemBarTintManager tintManager = new SystemBarTintManager(getActivity());
    tintManager.setStatusBarTintEnabled(true);
// Path: cartolapp/app/src/main/java/com/github/pierry/cartolapp/ui/ToolbarBase.java
// @EBean public class ToolbarBase {
// 
//   private Drawer drawer;
//   private Toolbar toolbar;
//   private Activity act;
//   private AccountHeader headerResult;
//   private Context context;
// 
//   public ToolbarBase(Context context) {
//     this.context = context;
//   }
// 
//   @UiThread public void injectToolbar(Toolbar toolbar, Activity act) {
//     this.toolbar = toolbar;
//     this.act = act;
//     initAccount();
//     initDrawer();
//   }
// 
//   @UiThread void initDrawer() {
//     PrimaryDrawerItem home =
//         new PrimaryDrawerItem().withName(R.string.home).withIcon(GoogleMaterial.Icon.gmd_home);
//     new DrawerBuilder().withActivity((Activity) act)
//         .withToolbar(toolbar)
//         .withHasStableIds(true)
//         .withTranslucentStatusBar(true)
//         .withSelectedItem(-1)
//         .withAccountHeader(headerResult)
//         .addDrawerItems(home)
//         .withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener() {
//           @Override public boolean onItemClick(View view, int position, IDrawerItem drawerItem) {
//             switch (position) {
//               case 1:
//                 context.startActivity(new Intent(context, MainActivity_.class));
//                 return true;
//               default:
//                 return true;
//             }
//           }
//         })
//         .build();
//   }
// 
//   @UiThread void initAccount() {
//     headerResult = new AccountHeaderBuilder().withActivity(act)
//         .withHeaderBackground(R.color.colorPrimary)
//         .addProfiles(new ProfileDrawerItem().withName("Usuário"))
//         .withOnAccountHeaderListener(new AccountHeader.OnAccountHeaderListener() {
//           @Override
//           public boolean onProfileChanged(View view, IProfile profile, boolean currentProfile) {
//             return false;
//           }
//         })
//         .build();
//   }
// 
//   @UiThread
//   public void changeColor(PagerSlidingTabStrip tabs, SystemBarTintManager tintManager, int newColor) {
//     tabs.setBackgroundColor(newColor);
//     tintManager.setTintColor(newColor);
//   }
// }
// 
// Path: cartolapp/app/src/main/java/com/github/pierry/cartolapp/ui/adapters/HomeAdapter.java
// public class HomeAdapter extends FragmentPagerAdapter {
//   final int PAGE_COUNT = 3;
//   private String tabTitles[] = new String[] { "Equipes", "Jogadores", "Perfil" };
// 
//   public HomeAdapter(FragmentManager fm) {
//     super(fm);
//   }
// 
//   @Override public int getCount() {
//     return PAGE_COUNT;
//   }
// 
//   @Override public Fragment getItem(int position) {
//     switch (position) {
//       case 0:
//         return new TeamFragment_();
//       case 1:
//         return new PlayerFragment_();
//       case 2:
//         return new PlayerFragment_();
//     }
//     return new TeamFragment_();
//   }
// 
//   @Override public CharSequence getPageTitle(int position) {
//     return tabTitles[position];
//   }
// }


// Path: cartolapp/app/src/main/java/com/github/pierry/cartolapp/ui/fragments/HomeFragment.java
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.support.v4.view.ViewPager.OnPageChangeListener;
import android.util.TypedValue;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.astuetz.PagerSlidingTabStrip;
import com.github.pierry.cartolapp.R;
import com.github.pierry.cartolapp.ui.ToolbarBase;
import com.github.pierry.cartolapp.ui.adapters.HomeAdapter;
import com.readystatesoftware.systembartint.SystemBarTintManager;
import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EFragment;
import org.androidannotations.annotations.ViewById;

package com.github.pierry.cartolapp.ui.fragments;


@EFragment(R.layout.fragment_home) public class HomeFragment extends Fragment implements OnPageChangeListener {

  @ViewById PagerSlidingTabStrip tabs;
  @ViewById ViewPager pager;

  @Bean(ToolbarBase.class) ToolbarBase toolbarBase;

  @AfterViews void init() {
    SystemBarTintManager tintManager = new SystemBarTintManager(getActivity());
    tintManager.setStatusBarTintEnabled(true);
    pager.setAdapter(new HomeAdapter(getActivity().getSupportFragmentManager()));