// Path: chapter10/WoodworkingTools/app/src/main/java/com/iangclifton/woodworkingtools/ToolType.java
// public enum ToolType {
//     CLAMPS(R.string.clamps, R.string.clamps_description, R.drawable.hero_image_clamps_1080),
//     SAWS(R.string.saws, R.string.saws_description, R.drawable.hero_image_saw_1080),
//     DRILLS(R.string.drills, R.string.drills_description, R.drawable.hero_image_drill_1080),
//     SANDERS(R.string.sanders, R.string.sanders_description, R.drawable.hero_image_sander_1080),
//     ROUTERS(R.string.routers, R.string.routers_description, R.drawable.hero_image_router_1080),
//     LATHES(R.string.lathes, R.string.lathes_description, R.drawable.hero_image_lathe_1080),
//     MORE(R.string.more, R.string.more_description, R.drawable.hero_image_more_1080),
//     ;
// 
//     private final int mToolNameResourceId;
//     private final int mToolDescriptionResourceId;
//     private final int mToolImageResourceId;
// 
//     private ToolType(@StringRes int toolName, @StringRes int toolDescription, @DrawableRes int toolImage) {
//         mToolNameResourceId = toolName;
//         mToolDescriptionResourceId = toolDescription;
//         mToolImageResourceId = toolImage;
//     }
// 
//     @StringRes
//     public int getToolDescriptionResourceId() {
//         return mToolDescriptionResourceId;
//     }
// 
//     @StringRes
//     public int getToolNameResourceId() {
//         return mToolNameResourceId;
//     }
// 
//     @DrawableRes
//     public int getToolImageResourceId() {
//         return mToolImageResourceId;
//     }
// }


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.SharedElementCallback;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.ViewTreeObserver;
import com.iangclifton.woodworkingtools.R;
import com.iangclifton.woodworkingtools.ToolType;
import java.util.List;
import java.util.Map;
                return true;
            }
        });

        setEnterSharedElementCallback(new SharedElementCallback() {
            @Override
            public void onMapSharedElements(List<String> names, Map<String, View> sharedElements) {
                if (mViewPager.getCurrentItem() != 0) {
                    // Not displaying the about page, which has the hero image
                    names.clear();
                    sharedElements.clear();
                }
            }
        });


    }


    @Override
    public void onTabSelected(TabLayout.Tab tab) {
        mViewPager.setCurrentItem(tab.getPosition());
    }

    @Override
    public void onTabUnselected(TabLayout.Tab tab) {

    }

    @Override
// Path: chapter10/WoodworkingTools/app/src/main/java/com/iangclifton/woodworkingtools/ToolType.java
// public enum ToolType {
//     CLAMPS(R.string.clamps, R.string.clamps_description, R.drawable.hero_image_clamps_1080),
//     SAWS(R.string.saws, R.string.saws_description, R.drawable.hero_image_saw_1080),
//     DRILLS(R.string.drills, R.string.drills_description, R.drawable.hero_image_drill_1080),
//     SANDERS(R.string.sanders, R.string.sanders_description, R.drawable.hero_image_sander_1080),
//     ROUTERS(R.string.routers, R.string.routers_description, R.drawable.hero_image_router_1080),
//     LATHES(R.string.lathes, R.string.lathes_description, R.drawable.hero_image_lathe_1080),
//     MORE(R.string.more, R.string.more_description, R.drawable.hero_image_more_1080),
//     ;
// 
//     private final int mToolNameResourceId;
//     private final int mToolDescriptionResourceId;
//     private final int mToolImageResourceId;
// 
//     private ToolType(@StringRes int toolName, @StringRes int toolDescription, @DrawableRes int toolImage) {
//         mToolNameResourceId = toolName;
//         mToolDescriptionResourceId = toolDescription;
//         mToolImageResourceId = toolImage;
//     }
// 
//     @StringRes
//     public int getToolDescriptionResourceId() {
//         return mToolDescriptionResourceId;
//     }
// 
//     @StringRes
//     public int getToolNameResourceId() {
//         return mToolNameResourceId;
//     }
// 
//     @DrawableRes
//     public int getToolImageResourceId() {
//         return mToolImageResourceId;
//     }
// }


// Path: chapter10/WoodworkingTools/app/src/main/java/com/iangclifton/woodworkingtools/toollist/ToolListActivity.java
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.SharedElementCallback;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.ViewTreeObserver;
import com.iangclifton.woodworkingtools.R;
import com.iangclifton.woodworkingtools.ToolType;
import java.util.List;
import java.util.Map;

                return true;
            }
        });

        setEnterSharedElementCallback(new SharedElementCallback() {
            @Override
            public void onMapSharedElements(List<String> names, Map<String, View> sharedElements) {
                if (mViewPager.getCurrentItem() != 0) {
                    // Not displaying the about page, which has the hero image
                    names.clear();
                    sharedElements.clear();
                }
            }
        });


    }


    @Override
    public void onTabSelected(TabLayout.Tab tab) {
        mViewPager.setCurrentItem(tab.getPosition());
    }

    @Override
    public void onTabUnselected(TabLayout.Tab tab) {

    }

    @Override
    public void onTabReselected(TabLayout.Tab tab) {