// Path: app/src/main/java/me/codpoe/onlyweather/ui/fragment/AboutFragment.java
// public class AboutFragment extends PreferenceFragment implements Preference.OnPreferenceClickListener{
// 
//     private Preference mIntroductionPref;
//     private Preference mCheckVersionPref;
//     private Preference mStarPref;
//     private Preference mMePref;
//     private Preference mSupportPref;
//     private Preference mFeedbackPref;
//     private Preference mWeatherApiPref;
//     private Preference mImagePref;
//     private Preference mOpenSourcePref;
// 
//     @Override
//     public void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         addPreferencesFromResource(R.xml.about);
// 
//         findPreferences();
// 
//         mIntroductionPref.setOnPreferenceClickListener(this);
//         mCheckVersionPref.setOnPreferenceClickListener(this);
//         mStarPref.setOnPreferenceClickListener(this);
//         mMePref.setOnPreferenceClickListener(this);
//         mSupportPref.setOnPreferenceClickListener(this);
//         mFeedbackPref.setOnPreferenceClickListener(this);
//         mWeatherApiPref.setOnPreferenceClickListener(this);
//         mImagePref.setOnPreferenceClickListener(this);
//         mOpenSourcePref.setOnPreferenceClickListener(this);
// 
//         mCheckVersionPref.setSummary("当前版本: " + VersionUtils.getCurVersion(getActivity()));
// 
//     }
// 
//     @Override
//     public void onDestroy() {
//         super.onDestroy();
//     }
// 
//     public void findPreferences() {
//         mIntroductionPref = findPreference("introduction");
//         mCheckVersionPref = findPreference("check_version");
//         mStarPref = findPreference("star");
//         mMePref = findPreference("me");
//         mSupportPref = findPreference("support");
//         mFeedbackPref = findPreference("feedback");
//         mWeatherApiPref = findPreference("data_source");
//         mImagePref = findPreference("img_source");
//         mOpenSourcePref = findPreference("open_source");
//     }
// 
//     @Override
//     public boolean onPreferenceClick(Preference preference) {
//         switch (preference.getKey()) {
//             case "introduction":
//                 DialogUtils.showIntroduction(getActivity());
//                 break;
//             case "check_version":
//                 VersionUtils.checkVersion(getActivity());
//                 break;
//             case "star":
//                 DialogUtils.showStar(getActivity());
//                 break;
//             case "me":
//                 DialogUtils.showMe(getActivity());
//                 break;
//             case "support":
//                 DialogUtils.showSupport(getActivity());
//                 break;
//             case "feedback":
//                 ClipboardManager clipboardManager = (ClipboardManager) getActivity().getSystemService(Context.CLIPBOARD_SERVICE);
//                 clipboardManager.setPrimaryClip(ClipData.newPlainText(null, "codpoe.me@gmail.com"));
//                 Snackbar.make(getView(), "复制成功", Snackbar.LENGTH_SHORT).show();
//                 break;
//             case "data_source":
//                 DialogUtils.showDataSource(getActivity());
//                 break;
//             case "img_source":
//                 Uri uri1 = Uri.parse("http://www.coolapk.com/apk/com.backdrops.wallpapers");
//                 Intent intent1 = new Intent();
//                 intent1.setAction(Intent.ACTION_VIEW);
//                 intent1.setData(uri1);
//                 getActivity().startActivity(intent1);
//                 break;
//             case "open_source":
//                 DialogUtils.showOpenSource(getActivity());
//                 break;
//         }
//         return false;
//     }
// }


import android.os.Bundle;
import android.support.design.widget.CoordinatorLayout;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import me.codpoe.onlyweather.R;
import me.codpoe.onlyweather.ui.fragment.AboutFragment;
package me.codpoe.onlyweather.ui.activity;



/**
 * Created by Codpoe on 2016/5/23.
 */
public class AboutActivity extends AppCompatActivity{

    private CoordinatorLayout mCoordinatorLayout;
    private Toolbar mToolbar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about);

        findViews();

        mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackPressed();
            }
        });

        getFragmentManager().beginTransaction()
// Path: app/src/main/java/me/codpoe/onlyweather/ui/fragment/AboutFragment.java
// public class AboutFragment extends PreferenceFragment implements Preference.OnPreferenceClickListener{
// 
//     private Preference mIntroductionPref;
//     private Preference mCheckVersionPref;
//     private Preference mStarPref;
//     private Preference mMePref;
//     private Preference mSupportPref;
//     private Preference mFeedbackPref;
//     private Preference mWeatherApiPref;
//     private Preference mImagePref;
//     private Preference mOpenSourcePref;
// 
//     @Override
//     public void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         addPreferencesFromResource(R.xml.about);
// 
//         findPreferences();
// 
//         mIntroductionPref.setOnPreferenceClickListener(this);
//         mCheckVersionPref.setOnPreferenceClickListener(this);
//         mStarPref.setOnPreferenceClickListener(this);
//         mMePref.setOnPreferenceClickListener(this);
//         mSupportPref.setOnPreferenceClickListener(this);
//         mFeedbackPref.setOnPreferenceClickListener(this);
//         mWeatherApiPref.setOnPreferenceClickListener(this);
//         mImagePref.setOnPreferenceClickListener(this);
//         mOpenSourcePref.setOnPreferenceClickListener(this);
// 
//         mCheckVersionPref.setSummary("当前版本: " + VersionUtils.getCurVersion(getActivity()));
// 
//     }
// 
//     @Override
//     public void onDestroy() {
//         super.onDestroy();
//     }
// 
//     public void findPreferences() {
//         mIntroductionPref = findPreference("introduction");
//         mCheckVersionPref = findPreference("check_version");
//         mStarPref = findPreference("star");
//         mMePref = findPreference("me");
//         mSupportPref = findPreference("support");
//         mFeedbackPref = findPreference("feedback");
//         mWeatherApiPref = findPreference("data_source");
//         mImagePref = findPreference("img_source");
//         mOpenSourcePref = findPreference("open_source");
//     }
// 
//     @Override
//     public boolean onPreferenceClick(Preference preference) {
//         switch (preference.getKey()) {
//             case "introduction":
//                 DialogUtils.showIntroduction(getActivity());
//                 break;
//             case "check_version":
//                 VersionUtils.checkVersion(getActivity());
//                 break;
//             case "star":
//                 DialogUtils.showStar(getActivity());
//                 break;
//             case "me":
//                 DialogUtils.showMe(getActivity());
//                 break;
//             case "support":
//                 DialogUtils.showSupport(getActivity());
//                 break;
//             case "feedback":
//                 ClipboardManager clipboardManager = (ClipboardManager) getActivity().getSystemService(Context.CLIPBOARD_SERVICE);
//                 clipboardManager.setPrimaryClip(ClipData.newPlainText(null, "codpoe.me@gmail.com"));
//                 Snackbar.make(getView(), "复制成功", Snackbar.LENGTH_SHORT).show();
//                 break;
//             case "data_source":
//                 DialogUtils.showDataSource(getActivity());
//                 break;
//             case "img_source":
//                 Uri uri1 = Uri.parse("http://www.coolapk.com/apk/com.backdrops.wallpapers");
//                 Intent intent1 = new Intent();
//                 intent1.setAction(Intent.ACTION_VIEW);
//                 intent1.setData(uri1);
//                 getActivity().startActivity(intent1);
//                 break;
//             case "open_source":
//                 DialogUtils.showOpenSource(getActivity());
//                 break;
//         }
//         return false;
//     }
// }


// Path: app/src/main/java/me/codpoe/onlyweather/ui/activity/AboutActivity.java
import android.os.Bundle;
import android.support.design.widget.CoordinatorLayout;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import me.codpoe.onlyweather.R;
import me.codpoe.onlyweather.ui.fragment.AboutFragment;

package me.codpoe.onlyweather.ui.activity;



/**
 * Created by Codpoe on 2016/5/23.
 */
public class AboutActivity extends AppCompatActivity{

    private CoordinatorLayout mCoordinatorLayout;
    private Toolbar mToolbar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about);

        findViews();

        mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackPressed();
            }
        });

        getFragmentManager().beginTransaction()
                .replace(R.id.about_frame, new AboutFragment())