// Path: src/com/zhongyun/viewer/MyViewPagerAdapter.java
// public class MyViewPagerAdapter extends FragmentStatePagerAdapter {
// 
//     private int[] mTitles;
//     private List<Fragment> mFragments;
//     private Context mContext;
// 
//     public MyViewPagerAdapter(Context context,FragmentManager fm, int[] mTitles, List<Fragment> mFragments) {
//         super(fm);
//         mContext = context;
//         this.mTitles = mTitles;
//         this.mFragments = mFragments;
//     }
// 
//     @Override
//     public CharSequence getPageTitle(int position) {
//         return mContext.getString(mTitles[position]);
//     }
// 
//     @Override
//     public Fragment getItem(int position) {
//         return mFragments.get(position);
//     }
// 
//     @Override
//     public int getCount() {
//         return mFragments.size();
//     }
// }
// 
// Path: src/com/zhongyun/viewer/utils/Constants.java
// public class Constants {
// 
// 	public static final String INTENT_CID = "cid";
// 	public static final String INTENT_CAMERA_NAME = "camera_name";
// 	
// 	public static final String BARCODE_SPLITER = "&";
// 	public static final String BARCODE_DEVICE_ID = "deviceid=";
// 	public static final String BARCODE_CID = "cid=";
// 	public static final String BARCODE_NAME = "name=";
// 	public static final String BARCODE_USER_NAME = "username=";
// 	public static final String BARCODE_PASSWORD = "password=";
// 
// 	public static final String VIDEO_MP4 = ".mp4";
// 	public static final String IMG_JPG = ".jpg";
// 	public static final String RECORD_VIDEO_PATH = "ZhongYun/recordVideo";
// 	public static final String CAPTURE_IAMGE_PATH = "ZhongYun/capture";
// 	public static final String LOCAL_ICON_PATH = "ZhongYun/icon";
// 	public static final String LOCAL_CID_ICON_PATH = "ZhongYun/cid_icon";
// 	
// 	public static final String CONNECTIVITY_CHANGE_ACTION = "android.net.conn.CONNECTIVITY_CHANGE";
// 	public static final String CONNECTIVITY_SESSION_STATE = "zhongyun.viewer.session_state";
// }


import java.util.ArrayList;
import java.util.List;
import com.zhongyun.viewer.MyViewPagerAdapter;
import com.zhongyun.viewer.R;
import com.zhongyun.viewer.utils.Constants;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.view.ViewPager;
import android.support.v4.widget.DrawerLayout;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
                mFragments.add(i, fm);
            }else if(i==2){
                CameraSettingsInfoFragment fm = new CameraSettingsInfoFragment();
                fm.setArguments(mBundle);
                mFragments.add(i, fm);
            }
        }

    }

    private void configViews() {

        // 设置显示Toolbar
//        setSupportActionBar(mToolbar);
        
//        mToolbar.setOnMenuItemClickListener(new OnMenuItemClickListener() {
//            
//            @Override
//            public boolean onMenuItemClick(MenuItem arg0) {
//                int id = arg0.getItemId();
//
//                if (id == R.id.save) {
//                    BaseSettingFragment fm =  (BaseSettingFragment)mViewPagerAdapter.getItem(mViewPager.getCurrentItem());
//                    if(fm!=null)fm.onSave();
//                    return true;
//                }
//                return false;
//            }
//        });
        // 初始化ViewPager的适配器，并设置给它
// Path: src/com/zhongyun/viewer/MyViewPagerAdapter.java
// public class MyViewPagerAdapter extends FragmentStatePagerAdapter {
// 
//     private int[] mTitles;
//     private List<Fragment> mFragments;
//     private Context mContext;
// 
//     public MyViewPagerAdapter(Context context,FragmentManager fm, int[] mTitles, List<Fragment> mFragments) {
//         super(fm);
//         mContext = context;
//         this.mTitles = mTitles;
//         this.mFragments = mFragments;
//     }
// 
//     @Override
//     public CharSequence getPageTitle(int position) {
//         return mContext.getString(mTitles[position]);
//     }
// 
//     @Override
//     public Fragment getItem(int position) {
//         return mFragments.get(position);
//     }
// 
//     @Override
//     public int getCount() {
//         return mFragments.size();
//     }
// }
// 
// Path: src/com/zhongyun/viewer/utils/Constants.java
// public class Constants {
// 
// 	public static final String INTENT_CID = "cid";
// 	public static final String INTENT_CAMERA_NAME = "camera_name";
// 	
// 	public static final String BARCODE_SPLITER = "&";
// 	public static final String BARCODE_DEVICE_ID = "deviceid=";
// 	public static final String BARCODE_CID = "cid=";
// 	public static final String BARCODE_NAME = "name=";
// 	public static final String BARCODE_USER_NAME = "username=";
// 	public static final String BARCODE_PASSWORD = "password=";
// 
// 	public static final String VIDEO_MP4 = ".mp4";
// 	public static final String IMG_JPG = ".jpg";
// 	public static final String RECORD_VIDEO_PATH = "ZhongYun/recordVideo";
// 	public static final String CAPTURE_IAMGE_PATH = "ZhongYun/capture";
// 	public static final String LOCAL_ICON_PATH = "ZhongYun/icon";
// 	public static final String LOCAL_CID_ICON_PATH = "ZhongYun/cid_icon";
// 	
// 	public static final String CONNECTIVITY_CHANGE_ACTION = "android.net.conn.CONNECTIVITY_CHANGE";
// 	public static final String CONNECTIVITY_SESSION_STATE = "zhongyun.viewer.session_state";
// }


// Path: src/com/zhongyun/viewer/setting/CameraSettingsTabActivity.java
import java.util.ArrayList;
import java.util.List;
import com.zhongyun.viewer.MyViewPagerAdapter;
import com.zhongyun.viewer.R;
import com.zhongyun.viewer.utils.Constants;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.view.ViewPager;
import android.support.v4.widget.DrawerLayout;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

                mFragments.add(i, fm);
            }else if(i==2){
                CameraSettingsInfoFragment fm = new CameraSettingsInfoFragment();
                fm.setArguments(mBundle);
                mFragments.add(i, fm);
            }
        }

    }

    private void configViews() {

        // 设置显示Toolbar
//        setSupportActionBar(mToolbar);
        
//        mToolbar.setOnMenuItemClickListener(new OnMenuItemClickListener() {
//            
//            @Override
//            public boolean onMenuItemClick(MenuItem arg0) {
//                int id = arg0.getItemId();
//
//                if (id == R.id.save) {
//                    BaseSettingFragment fm =  (BaseSettingFragment)mViewPagerAdapter.getItem(mViewPager.getCurrentItem());
//                    if(fm!=null)fm.onSave();
//                    return true;
//                }
//                return false;
//            }
//        });
        // 初始化ViewPager的适配器，并设置给它
        mViewPagerAdapter = new MyViewPagerAdapter(this,getSupportFragmentManager(),