// 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);
//   }
// }


import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import com.github.pierry.cartolapp.ui.ToolbarBase;
import com.github.pierry.cartolapp.ui.fragments.HomeFragment_;
import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.ViewById;
package com.github.pierry.cartolapp;


@EActivity(R.layout.activity_main) public class MainActivity extends AppCompatActivity {

  @ViewById Toolbar toolbar;

// 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/MainActivity.java
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import com.github.pierry.cartolapp.ui.ToolbarBase;
import com.github.pierry.cartolapp.ui.fragments.HomeFragment_;
import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.ViewById;

package com.github.pierry.cartolapp;


@EActivity(R.layout.activity_main) public class MainActivity extends AppCompatActivity {

  @ViewById Toolbar toolbar;

  @Bean(ToolbarBase.class) ToolbarBase toolbarBase;