// Path: app/src/main/java/com/example/mego/adas/main/adapter/HelpPageViewerAdapter.java
// public class HelpPageViewerAdapter extends PagerAdapter {
// 
// 
//     private Context mContext;
//     private LayoutInflater mLayoutInflater;
// 
//    /* //list of help photos
//     private int[] mResources = {
//             R.drawable.help_start,
//             R.drawable.car_help_zero,
//             R.drawable.car_help_one,
//             R.drawable.car_help_two,
//             R.drawable.car_help_three,
//             R.drawable.car_help_four
// 
//     };*/
// 
//     public HelpPageViewerAdapter(Context context) {
//         mContext = context;
//         mLayoutInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
// 
//     }
// 
//     @Override
//     public int getCount() {
//         return 6;
//     }
// 
//     @Override
//     public Object instantiateItem(ViewGroup container, int position) {
//         View itemView = mLayoutInflater.inflate(R.layout.pager_item, container, false);
// 
//         int resId = 0;
//         //set the help photo with current position
//         ImageView imageView = itemView.findViewById(R.id.imageView);
//         switch (position) {
//             case 0:
//                 resId = R.drawable.help_start;
//                 break;
//             case 1:
//                 resId = R.drawable.car_help_zero;
//                 break;
//             case 2:
//                 resId = R.drawable.car_help_one;
//                 break;
//             case 3:
//                 resId = R.drawable.car_help_two;
//                 break;
//             case 4:
//                 resId = R.drawable.car_help_three;
//                 break;
//             case 5:
//                 resId = R.drawable.car_help_four;
//                 break;
//         }
//         imageView.setImageResource(resId);
// 
//         container.addView(itemView);
// 
//         return itemView;
//     }
// 
//     @Override
//     public boolean isViewFromObject(View view, Object object) {
//         return view == object;
//     }
// 
//     @Override
//     public void destroyItem(ViewGroup container, int position, Object object) {
//         container.removeView((LinearLayout) object);
//     }
// 
// }


import com.example.mego.adas.R;
import com.example.mego.adas.main.adapter.HelpPageViewerAdapter;
import com.viewpagerindicator.CirclePageIndicator;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
/*
 * Copyright (c) 2017 Ahmed-Abdelmeged
 *
 * github: https://github.com/Ahmed-Abdelmeged
 * email: ahmed.abdelmeged.vm@gamil.com
 * Facebook: https://www.facebook.com/ven.rto
 * Twitter: https://twitter.com/A_K_Abd_Elmeged
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


package com.example.mego.adas.main;




/**
 * A simple {@link Fragment} subclass.
 * <p>
 * Fragment to show how to use the program and help instructions
 */
public class HelpFragment extends Fragment {

    public HelpFragment() {
        // Required empty public constructor
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.fragment_help, container, false);

        //setup the page viewer and adapter
// Path: app/src/main/java/com/example/mego/adas/main/adapter/HelpPageViewerAdapter.java
// public class HelpPageViewerAdapter extends PagerAdapter {
// 
// 
//     private Context mContext;
//     private LayoutInflater mLayoutInflater;
// 
//    /* //list of help photos
//     private int[] mResources = {
//             R.drawable.help_start,
//             R.drawable.car_help_zero,
//             R.drawable.car_help_one,
//             R.drawable.car_help_two,
//             R.drawable.car_help_three,
//             R.drawable.car_help_four
// 
//     };*/
// 
//     public HelpPageViewerAdapter(Context context) {
//         mContext = context;
//         mLayoutInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
// 
//     }
// 
//     @Override
//     public int getCount() {
//         return 6;
//     }
// 
//     @Override
//     public Object instantiateItem(ViewGroup container, int position) {
//         View itemView = mLayoutInflater.inflate(R.layout.pager_item, container, false);
// 
//         int resId = 0;
//         //set the help photo with current position
//         ImageView imageView = itemView.findViewById(R.id.imageView);
//         switch (position) {
//             case 0:
//                 resId = R.drawable.help_start;
//                 break;
//             case 1:
//                 resId = R.drawable.car_help_zero;
//                 break;
//             case 2:
//                 resId = R.drawable.car_help_one;
//                 break;
//             case 3:
//                 resId = R.drawable.car_help_two;
//                 break;
//             case 4:
//                 resId = R.drawable.car_help_three;
//                 break;
//             case 5:
//                 resId = R.drawable.car_help_four;
//                 break;
//         }
//         imageView.setImageResource(resId);
// 
//         container.addView(itemView);
// 
//         return itemView;
//     }
// 
//     @Override
//     public boolean isViewFromObject(View view, Object object) {
//         return view == object;
//     }
// 
//     @Override
//     public void destroyItem(ViewGroup container, int position, Object object) {
//         container.removeView((LinearLayout) object);
//     }
// 
// }


// Path: app/src/main/java/com/example/mego/adas/main/HelpFragment.java
import com.example.mego.adas.R;
import com.example.mego.adas.main.adapter.HelpPageViewerAdapter;
import com.viewpagerindicator.CirclePageIndicator;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

/*
 * Copyright (c) 2017 Ahmed-Abdelmeged
 *
 * github: https://github.com/Ahmed-Abdelmeged
 * email: ahmed.abdelmeged.vm@gamil.com
 * Facebook: https://www.facebook.com/ven.rto
 * Twitter: https://twitter.com/A_K_Abd_Elmeged
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


package com.example.mego.adas.main;




/**
 * A simple {@link Fragment} subclass.
 * <p>
 * Fragment to show how to use the program and help instructions
 */
public class HelpFragment extends Fragment {

    public HelpFragment() {
        // Required empty public constructor
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.fragment_help, container, false);

        //setup the page viewer and adapter
        HelpPageViewerAdapter adapter = new HelpPageViewerAdapter(getContext());