// Path: app/src/main/java/moe/yukinoneko/diycode/base/BaseActivity.java
// public abstract class BaseActivity extends RxAppCompatActivity {
// 
//     protected Unbinder unbinder;
// 
//     @Nullable
//     @BindView(R.id.toolbar)
//     protected Toolbar toolbar;
// 
//     @BindColor(R.color.navigation)
//     protected int navigationColor;
// 
//     @Override
//     protected void onCreate(@Nullable Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(provideContentViewId());
// 
//         unbinder = ButterKnife.bind(this);
// 
//         if (toolbar != null) {
//             setSupportActionBar(toolbar);
//             if (getSupportActionBar() != null) {
//                 getSupportActionBar().setDisplayHomeAsUpEnabled(true);
//             }
//         }
//     }
// 
//     @Override
//     protected void onPostCreate(@Nullable Bundle savedInstanceState) {
//         super.onPostCreate(savedInstanceState);
//         setNavigationIconColor(navigationColor);
//     }
// 
//     @Override
//     public boolean onOptionsItemSelected(MenuItem item) {
//         if (item.getItemId() == android.R.id.home) {
//             finish();
//             return true;
//         }
//         return super.onOptionsItemSelected(item);
//     }
// 
//     @Override
//     protected void onDestroy() {
//         super.onDestroy();
// 
//         if (unbinder != null) {
//             unbinder.unbind();
//         }
//     }
// 
//     protected abstract int provideContentViewId();
// 
//     protected void setToolBarTitle(CharSequence title) {
//         if (toolbar != null) {
//             toolbar.setTitle(title);
//         }
//     }
// 
//     protected void setDisplayShowTitleEnabled(boolean enabled) {
//         ActionBar actionBar = getSupportActionBar();
//         if (actionBar != null) {
//             actionBar.setDisplayShowTitleEnabled(enabled);
//         }
//     }
// 
//     protected void setNavigationIconColor(@ColorInt int color) {
//         if (toolbar != null) {
//             Drawable icon = toolbar.getNavigationIcon();
//             if (icon != null) {
//                 DrawableCompat.setTint(icon, color);
//             }
//         }
//     }
// }
// 
// Path: app/src/main/java/moe/yukinoneko/diycode/tool/Tools.java
// public class Tools {
//     public static String getVersionName(Context context) {
//         try {
//             PackageManager packageManager = context.getPackageManager();
//             PackageInfo packageInfo = packageManager.getPackageInfo(context.getPackageName(), 0);
//             return packageInfo.versionName;
// 
//         } catch (PackageManager.NameNotFoundException e) {
//             e.printStackTrace();
//         }
//         return "unknown";
//     }
// }


import moe.yukinoneko.diycode.R;
import moe.yukinoneko.diycode.base.BaseActivity;
import moe.yukinoneko.diycode.tool.Tools;
import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.AppCompatTextView;
import android.webkit.WebView;
import java.util.Locale;
import butterknife.BindView;
import butterknife.OnClick;
/*
 * Copyright (c) 2017 SamuelGjk <samuel.alva@outlook.com>
 *
 * This file is part of DiyCode
 *
 * DiyCode is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * DiyCode is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with DiyCode. If not, see <http://www.gnu.org/licenses/>.
 */

package moe.yukinoneko.diycode.module.about;






/**
 * MVPPlugin
 * 邮箱 784787081@qq.com
 */

public class AboutActivity extends BaseActivity {

    @BindView(R.id.text_app_version) AppCompatTextView textAppVersion;

    @Override
    protected int provideContentViewId() {
        return R.layout.activity_about;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

// Path: app/src/main/java/moe/yukinoneko/diycode/base/BaseActivity.java
// public abstract class BaseActivity extends RxAppCompatActivity {
// 
//     protected Unbinder unbinder;
// 
//     @Nullable
//     @BindView(R.id.toolbar)
//     protected Toolbar toolbar;
// 
//     @BindColor(R.color.navigation)
//     protected int navigationColor;
// 
//     @Override
//     protected void onCreate(@Nullable Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(provideContentViewId());
// 
//         unbinder = ButterKnife.bind(this);
// 
//         if (toolbar != null) {
//             setSupportActionBar(toolbar);
//             if (getSupportActionBar() != null) {
//                 getSupportActionBar().setDisplayHomeAsUpEnabled(true);
//             }
//         }
//     }
// 
//     @Override
//     protected void onPostCreate(@Nullable Bundle savedInstanceState) {
//         super.onPostCreate(savedInstanceState);
//         setNavigationIconColor(navigationColor);
//     }
// 
//     @Override
//     public boolean onOptionsItemSelected(MenuItem item) {
//         if (item.getItemId() == android.R.id.home) {
//             finish();
//             return true;
//         }
//         return super.onOptionsItemSelected(item);
//     }
// 
//     @Override
//     protected void onDestroy() {
//         super.onDestroy();
// 
//         if (unbinder != null) {
//             unbinder.unbind();
//         }
//     }
// 
//     protected abstract int provideContentViewId();
// 
//     protected void setToolBarTitle(CharSequence title) {
//         if (toolbar != null) {
//             toolbar.setTitle(title);
//         }
//     }
// 
//     protected void setDisplayShowTitleEnabled(boolean enabled) {
//         ActionBar actionBar = getSupportActionBar();
//         if (actionBar != null) {
//             actionBar.setDisplayShowTitleEnabled(enabled);
//         }
//     }
// 
//     protected void setNavigationIconColor(@ColorInt int color) {
//         if (toolbar != null) {
//             Drawable icon = toolbar.getNavigationIcon();
//             if (icon != null) {
//                 DrawableCompat.setTint(icon, color);
//             }
//         }
//     }
// }
// 
// Path: app/src/main/java/moe/yukinoneko/diycode/tool/Tools.java
// public class Tools {
//     public static String getVersionName(Context context) {
//         try {
//             PackageManager packageManager = context.getPackageManager();
//             PackageInfo packageInfo = packageManager.getPackageInfo(context.getPackageName(), 0);
//             return packageInfo.versionName;
// 
//         } catch (PackageManager.NameNotFoundException e) {
//             e.printStackTrace();
//         }
//         return "unknown";
//     }
// }


// Path: app/src/main/java/moe/yukinoneko/diycode/module/about/AboutActivity.java
import moe.yukinoneko.diycode.R;
import moe.yukinoneko.diycode.base.BaseActivity;
import moe.yukinoneko.diycode.tool.Tools;
import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.AppCompatTextView;
import android.webkit.WebView;
import java.util.Locale;
import butterknife.BindView;
import butterknife.OnClick;

/*
 * Copyright (c) 2017 SamuelGjk <samuel.alva@outlook.com>
 *
 * This file is part of DiyCode
 *
 * DiyCode is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * DiyCode is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with DiyCode. If not, see <http://www.gnu.org/licenses/>.
 */

package moe.yukinoneko.diycode.module.about;






/**
 * MVPPlugin
 * 邮箱 784787081@qq.com
 */

public class AboutActivity extends BaseActivity {

    @BindView(R.id.text_app_version) AppCompatTextView textAppVersion;

    @Override
    protected int provideContentViewId() {
        return R.layout.activity_about;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        textAppVersion.setText(String.format(Locale.getDefault(), "Version %s", Tools.getVersionName(this)));