commit 73478f0b1f972bc302155bef7655e1dcdf9ceb79
Author: lh <1209405678@qq.com>
Date: Fri Nov 24 09:50:00 2017 +0800
init
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..39fb081
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+*.iml
+.gradle
+/local.properties
+/.idea/workspace.xml
+/.idea/libraries
+.DS_Store
+/build
+/captures
+.externalNativeBuild
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..96cc43e
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
new file mode 100644
index 0000000..e7bedf3
--- /dev/null
+++ b/.idea/copyright/profiles_settings.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
new file mode 100644
index 0000000..ec344a3
--- /dev/null
+++ b/.idea/gradle.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..54207cd
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..1024777
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
new file mode 100644
index 0000000..7f68460
--- /dev/null
+++ b/.idea/runConfigurations.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.gitignore b/app/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/app/build.gradle b/app/build.gradle
new file mode 100644
index 0000000..75a08a9
--- /dev/null
+++ b/app/build.gradle
@@ -0,0 +1,43 @@
+apply plugin: 'com.android.application'
+apply plugin: 'android-apt'
+
+android {
+ compileSdkVersion 26
+ buildToolsVersion "26.0.0"
+ defaultConfig {
+ applicationId "com.qhclh.ytzh"
+ minSdkVersion 15
+ targetSdkVersion 26
+ versionCode 1
+ versionName "1.0"
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ compile fileTree(include: ['*.jar'], dir: 'libs')
+ androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
+ exclude group: 'com.android.support', module: 'support-annotations'
+ })
+ compile 'com.android.support:appcompat-v7:26.+'
+ testCompile 'junit:junit:4.12'
+ compile 'com.jakewharton:butterknife:8.4.0'
+ apt 'com.jakewharton:butterknife-compiler:8.4.0'
+ compile 'com.github.bumptech.glide:glide:3.7.0'
+ compile 'com.android.support:support-v4:26.0.0-alpha1'
+ compile 'com.android.support:design:26.0.0-alpha1'
+ compile 'org.greenrobot:eventbus:3.0.0'
+ compile 'com.umeng.analytics:analytics:latest.integration'
+ compile 'pub.devrel:easypermissions:0.2.1'
+ compile 'com.google.code.gson:gson:2.8.1'
+ compile 'org.litepal.android:core:1.3.0'
+ compile 'com.journeyapps:zxing-android-embedded:3.5.0'
+ compile 'com.google.zxing:core:3.3.0'
+ compile project(':jsonrpc')
+}
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
new file mode 100644
index 0000000..2f7a964
--- /dev/null
+++ b/app/proguard-rules.pro
@@ -0,0 +1,25 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in F:\SDK/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
diff --git a/app/src/androidTest/java/com/qhclh/ytzh/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/qhclh/ytzh/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..198dcdb
--- /dev/null
+++ b/app/src/androidTest/java/com/qhclh/ytzh/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+package com.qhclh.ytzh;
+
+import android.content.Context;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+
+/**
+ * Instrumentation test, which will execute on an Android device.
+ *
+ * @see Testing documentation
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+ @Test
+ public void useAppContext() throws Exception {
+ // Context of the app under test.
+ Context appContext = InstrumentationRegistry.getTargetContext();
+
+ assertEquals("com.qhclh.ytzh", appContext.getPackageName());
+ }
+}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..cbd9572
--- /dev/null
+++ b/app/src/main/AndroidManifest.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/litepal.xml b/app/src/main/assets/litepal.xml
new file mode 100644
index 0000000..8590a8f
--- /dev/null
+++ b/app/src/main/assets/litepal.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/com/qhclh/ytzh/base/BaseActivity.java b/app/src/main/java/com/qhclh/ytzh/base/BaseActivity.java
new file mode 100644
index 0000000..a9638be
--- /dev/null
+++ b/app/src/main/java/com/qhclh/ytzh/base/BaseActivity.java
@@ -0,0 +1,99 @@
+package com.qhclh.ytzh.base;
+
+import android.os.Bundle;
+import android.support.annotation.IdRes;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.Toolbar;
+import android.view.View;
+import android.widget.TextView;
+import android.widget.Toast;
+
+
+import com.qhclh.ytzh.R;
+import com.qhclh.ytzh.utils.ActivityCollector;
+import com.umeng.analytics.MobclickAgent;
+
+import butterknife.ButterKnife;
+
+
+/**
+ * Created by 青花瓷 on 2017/7/19.
+ */
+
+public abstract class BaseActivity extends AppCompatActivity {
+
+ @Override
+ protected void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(setLayoutId());
+ ButterKnife.bind(this);
+ ActivityCollector.addActivity(this);
+ initView();
+ initData();
+ initOper();
+ }
+
+ protected abstract int setLayoutId();
+ protected abstract void initView();
+ protected abstract void initData();
+ protected abstract void initOper();
+ ///< toolbar设置
+ public void initToolbar(Toolbar toolbar, String title, View.OnClickListener listener) {
+ if (toolbar == null) {
+ return;
+ }
+ TextView tvTitle = findById(toolbar, R.id.tv_toolbar_title);
+ if (tvTitle != null) {
+ tvTitle.setText(title == null ? "" : title);
+ }
+ setSupportActionBar(toolbar);
+ ActionBar actionBar = getSupportActionBar();
+ if (actionBar != null) {
+ actionBar.setDisplayShowTitleEnabled(false);
+ }
+ if (listener != null) {
+ toolbar.setNavigationIcon(R.drawable.back);
+ toolbar.setNavigationOnClickListener(listener);
+ }
+ }
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+ try {
+ MobclickAgent.onResume(this);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Override
+ protected void onPause() {
+ super.onPause();
+ try {
+ MobclickAgent.onPause(this);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+
+ @Override
+ protected void onDestroy() {
+ super.onDestroy();
+ ActivityCollector.removeActivity(this);
+ }
+
+ public void finishAll(){ActivityCollector.finishAll();}
+
+ public void showToast(String str) {
+ Toast.makeText(this, str, Toast.LENGTH_SHORT).show();
+ }
+
+ protected T findById(@NonNull View view, @IdRes int resId) {
+ return ButterKnife.findById(view, resId);
+ }
+}
diff --git a/app/src/main/java/com/qhclh/ytzh/configs/ConfigBase.java b/app/src/main/java/com/qhclh/ytzh/configs/ConfigBase.java
new file mode 100644
index 0000000..c872861
--- /dev/null
+++ b/app/src/main/java/com/qhclh/ytzh/configs/ConfigBase.java
@@ -0,0 +1,31 @@
+package com.qhclh.ytzh.configs;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.preference.PreferenceManager;
+
+import com.qhclh.ytzh.utils.StringUtil;
+
+
+public abstract class ConfigBase {
+ String mName;
+ Context mContext;
+
+ public ConfigBase(Context context, String name) {
+ mName = name;
+ mContext = context;
+ }
+
+ public SharedPreferences getStore() {
+ if (StringUtil.IsNullOrEmpty(mName)) {
+ return PreferenceManager.getDefaultSharedPreferences(mContext);
+ } else {
+ return mContext.getSharedPreferences(mName, Context.MODE_PRIVATE);
+ }
+ }
+
+ public abstract void GetValues(SharedPreferences store);
+
+ public abstract void SetValues(SharedPreferences.Editor store);
+
+}
diff --git a/app/src/main/java/com/qhclh/ytzh/configs/ConfigUtil.java b/app/src/main/java/com/qhclh/ytzh/configs/ConfigUtil.java
new file mode 100644
index 0000000..b0f6cec
--- /dev/null
+++ b/app/src/main/java/com/qhclh/ytzh/configs/ConfigUtil.java
@@ -0,0 +1,29 @@
+package com.qhclh.ytzh.configs;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+
+
+public class ConfigUtil {
+ public static void Fill(T config) {
+ SharedPreferences store = config.getStore();
+ config.GetValues(store);
+ }
+
+ public static void Save(T config) {
+ SharedPreferences store = config.getStore();
+ SharedPreferences.Editor editor = store.edit();
+ editor.clear();
+ config.SetValues(editor);
+ editor.commit();
+ }
+
+ public static String getServerUri(Context context) {
+ ServerConfig config = new ServerConfig(context);
+ Fill(config);
+ return config.getServerUri();
+ }
+
+
+}
+
diff --git a/app/src/main/java/com/qhclh/ytzh/configs/LastLoginInfo.java b/app/src/main/java/com/qhclh/ytzh/configs/LastLoginInfo.java
new file mode 100644
index 0000000..eadb74f
--- /dev/null
+++ b/app/src/main/java/com/qhclh/ytzh/configs/LastLoginInfo.java
@@ -0,0 +1,32 @@
+package com.qhclh.ytzh.configs;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+
+
+public class LastLoginInfo extends ConfigBase {
+
+ public LastLoginInfo(Context context) {
+ super(context, "LastLoginUserInfo");
+ // TODO Auto-generated constructor stub
+ }
+
+ @Override
+ public void GetValues(SharedPreferences store) {
+ Username = store.getString("Username", "");
+ Password = store.getString("Password", "");
+ CurrentTimeMillis = store.getLong("CurrentTimeMillis", 0);
+ }
+
+ @Override
+ public void SetValues(SharedPreferences.Editor store) {
+ store.putString("Username", Username);
+ store.putString("Password", Password);
+ store.putLong("CurrentTimeMillis", System.currentTimeMillis());
+ }
+
+ public String Username;
+ public String Password;
+ public long CurrentTimeMillis;
+
+}
diff --git a/app/src/main/java/com/qhclh/ytzh/configs/LoginUserConfig.java b/app/src/main/java/com/qhclh/ytzh/configs/LoginUserConfig.java
new file mode 100644
index 0000000..37ada9f
--- /dev/null
+++ b/app/src/main/java/com/qhclh/ytzh/configs/LoginUserConfig.java
@@ -0,0 +1,31 @@
+package com.qhclh.ytzh.configs;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+
+
+public class LoginUserConfig extends ConfigBase {
+
+ public LoginUserConfig(Context context) {
+ super(context, "LoginUserConfig");
+ }
+
+ @Override
+ public void GetValues(SharedPreferences store) {
+ Username = store.getString("Username", "");
+ Password = store.getString("Password", "");
+ DisplayName = store.getString("DisplayName", "");
+ }
+
+ @Override
+ public void SetValues(SharedPreferences.Editor store) {
+ store.putString("Username", Username);
+ store.putString("Password", Password);
+ store.putString("DisplayName", DisplayName);
+ }
+
+ public String Username;
+ public String Password;
+ public String DisplayName;
+
+}
diff --git a/app/src/main/java/com/qhclh/ytzh/configs/ServerConfig.java b/app/src/main/java/com/qhclh/ytzh/configs/ServerConfig.java
new file mode 100644
index 0000000..05e9ee4
--- /dev/null
+++ b/app/src/main/java/com/qhclh/ytzh/configs/ServerConfig.java
@@ -0,0 +1,93 @@
+package com.qhclh.ytzh.configs;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+
+import org.forks.jsonrpc.RpcFacade;
+
+
+public class ServerConfig extends ConfigBase {
+
+ String JPUSH_TAG_KEY="jpushtagkey";
+ String SYSTEMSET_ENABLE_SCAN="systemset_enable_scan";
+ String ENABLE_Catogray="systemset_enable_catogray";
+ String ENABLE_MoneyTipe="systemset_enable_moneytipe";
+ String ENABLE_StoreGoods="systemset_enable_storegoods";
+
+ public ServerConfig(Context context) {
+ super(context, "");
+ }
+
+ @Override
+ public void GetValues(SharedPreferences store) {
+ mServerUri = store.getString(RpcFacade.SERVER_URI_PREFKEY, "");
+ mTag = store.getString(JPUSH_TAG_KEY, "");
+ mEnableGoodsScan = store.getBoolean(SYSTEMSET_ENABLE_SCAN,false);
+ mEnableGoodsCatogray = store.getBoolean(ENABLE_Catogray,false);
+ mEnablMoneyTipe = store.getBoolean(ENABLE_MoneyTipe,false);
+ mEnablStoreGoods = store.getBoolean(ENABLE_StoreGoods,false);
+
+ }
+
+ @Override
+ public void SetValues(SharedPreferences.Editor store) {
+ store.putString(RpcFacade.SERVER_URI_PREFKEY, getServerUri());
+ store.putString(JPUSH_TAG_KEY, getTag());
+ store.putBoolean(SYSTEMSET_ENABLE_SCAN,getEnableGoodsScan());
+ store.putBoolean(ENABLE_Catogray,getEnableGoodsCatogray());
+ store.putBoolean(ENABLE_MoneyTipe,getEnableMoneyTipe());
+ store.putBoolean(ENABLE_StoreGoods,getEnableStoreGoods());
+ }
+
+ private String mServerUri;
+ private String mTag;
+
+ public String getServerUri() {
+ return mServerUri;
+ }
+
+ public void setServerUri(String value) {
+ mServerUri = value;
+ }
+
+
+ public String getTag() {
+ return mTag;
+ }
+
+ public void setTag(String value) {
+ mTag = value;
+ }
+
+ private boolean mEnableGoodsScan;
+ public boolean getEnableGoodsScan() {
+ return mEnableGoodsScan;
+ }
+ public void setEnableGoodsScang(boolean value) {
+ mEnableGoodsScan = value;
+ }
+
+ private boolean mEnableGoodsCatogray;
+ public boolean getEnableGoodsCatogray() {
+ return mEnableGoodsCatogray;
+ }
+ public void setEnableGoodsCatogray(boolean value) {
+ mEnableGoodsCatogray = value;
+ }
+
+ private boolean mEnablMoneyTipe;
+ public boolean getEnableMoneyTipe() {
+ return mEnablMoneyTipe;
+ }
+ public void setEnableMoneyTipe(boolean value) {
+ mEnablMoneyTipe = value;
+ }
+
+ private boolean mEnablStoreGoods;
+ public boolean getEnableStoreGoods() {
+ return mEnablStoreGoods;
+ }
+ public void setEnableStoreGoods(boolean value) {
+ mEnablStoreGoods = value;
+ }
+}
diff --git a/app/src/main/java/com/qhclh/ytzh/home/MainActivity.java b/app/src/main/java/com/qhclh/ytzh/home/MainActivity.java
new file mode 100644
index 0000000..2b7d37f
--- /dev/null
+++ b/app/src/main/java/com/qhclh/ytzh/home/MainActivity.java
@@ -0,0 +1,43 @@
+package com.qhclh.ytzh.home;
+
+import android.support.v7.widget.Toolbar;
+import android.view.View;
+import android.widget.TextView;
+
+import com.qhclh.ytzh.R;
+import com.qhclh.ytzh.base.BaseActivity;
+
+import butterknife.BindView;
+
+public class MainActivity extends BaseActivity {
+ @BindView(R.id.textaaa)
+ TextView textView;
+
+ @BindView(R.id.toolbar)
+ Toolbar mToolbar;
+
+ @Override
+ protected int setLayoutId() {
+ return R.layout.act_main;
+ }
+
+ @Override
+ protected void initView() {
+ initToolbar(mToolbar, "aaaaa", new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ finish();
+ }
+ });
+ }
+
+ @Override
+ protected void initData() {
+ textView.setText("aaaaaaaaaaa");
+ }
+
+ @Override
+ protected void initOper() {
+
+ }
+}
diff --git a/app/src/main/java/com/qhclh/ytzh/home/MyApplication.java b/app/src/main/java/com/qhclh/ytzh/home/MyApplication.java
new file mode 100644
index 0000000..9e4fbb8
--- /dev/null
+++ b/app/src/main/java/com/qhclh/ytzh/home/MyApplication.java
@@ -0,0 +1,61 @@
+package com.qhclh.ytzh.home;
+
+import android.app.Activity;
+
+import com.qhclh.ytzh.configs.ConfigUtil;
+import com.qhclh.ytzh.configs.LastLoginInfo;
+import com.qhclh.ytzh.configs.ServerConfig;
+
+import org.forks.jsonrpc.RpcFacade;
+import org.litepal.LitePalApplication;
+
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * Created by 青花瓷 on 2017/11/23.
+ */
+
+public class MyApplication extends LitePalApplication {
+
+ private final String NAME ="ytzh";
+ static LastLoginInfo mLoginInfo;
+ private static MyApplication instance;
+ String url= RpcUrl.BaseAppUrl;
+ ServerConfig config;
+
+ private List activityList = new LinkedList();
+
+ public static MyApplication getInstance(){
+ if (null == instance) {
+ instance = new MyApplication();
+ }
+ return instance;
+ }
+ @Override
+ public void onCreate() {
+ super.onCreate();
+
+ mLoginInfo = new LastLoginInfo(this);
+ ConfigUtil.Fill(mLoginInfo);
+
+ ///< 先暂时必须设置URL
+ config = new ServerConfig(this);
+ config.setServerUri(url);
+ ConfigUtil.Save(config);
+
+ RpcFacade.init(this.getApplicationContext(),NAME);
+ }
+
+ public void exit() {
+ for (Activity activity : activityList) {
+ activity.finish();
+ }
+ System.exit(0);
+ }
+
+ public static void ClearLogin() {
+ mLoginInfo.Username = "";
+ ConfigUtil.Save(mLoginInfo);
+ }
+}
diff --git a/app/src/main/java/com/qhclh/ytzh/home/RpcUrl.java b/app/src/main/java/com/qhclh/ytzh/home/RpcUrl.java
new file mode 100644
index 0000000..ef3b534
--- /dev/null
+++ b/app/src/main/java/com/qhclh/ytzh/home/RpcUrl.java
@@ -0,0 +1,11 @@
+package com.qhclh.ytzh.home;
+
+public class RpcUrl {
+
+ ///< 域名开发
+// public static String BaseAppUrl = "http://192.168.1.9/MarketPlace/";
+ ///< 正式服务器地址
+ public static String BaseAppUrl = "http://47.93.175.172/Marketplace/";
+ ///< 外网测试
+// public static String BaseAppUrl = "http://111.198.52.49:81/MarketPlace/";
+}
diff --git a/app/src/main/java/com/qhclh/ytzh/interfaces/OnPromptListener.java b/app/src/main/java/com/qhclh/ytzh/interfaces/OnPromptListener.java
new file mode 100644
index 0000000..109aac2
--- /dev/null
+++ b/app/src/main/java/com/qhclh/ytzh/interfaces/OnPromptListener.java
@@ -0,0 +1,7 @@
+package com.qhclh.ytzh.interfaces;
+
+
+public interface OnPromptListener {
+ public void OnPrompt(String prompt);
+
+}
diff --git a/app/src/main/java/com/qhclh/ytzh/splash/SplashActivity.java b/app/src/main/java/com/qhclh/ytzh/splash/SplashActivity.java
new file mode 100644
index 0000000..6850548
--- /dev/null
+++ b/app/src/main/java/com/qhclh/ytzh/splash/SplashActivity.java
@@ -0,0 +1,66 @@
+package com.qhclh.ytzh.splash;
+
+import android.content.Intent;
+import android.view.animation.AlphaAnimation;
+import android.view.animation.Animation;
+import android.widget.LinearLayout;
+
+import com.qhclh.ytzh.R;
+import com.qhclh.ytzh.base.BaseActivity;
+import com.qhclh.ytzh.home.MainActivity;
+
+import butterknife.BindView;
+
+/**
+ * Created by 青花瓷 on 2017/11/23.
+ */
+
+public class SplashActivity extends BaseActivity {
+ @BindView(R.id.ll_splash)
+ LinearLayout ll_splash;
+
+ @Override
+ protected int setLayoutId() {
+ return R.layout.act_splash;
+ }
+
+ @Override
+ protected void initView() {
+
+ }
+
+ @Override
+ protected void initData() {
+
+ }
+
+ @Override
+ protected void initOper() {
+
+ //渐变展示启动屏
+ AlphaAnimation aa = new AlphaAnimation(0.3f, 1.0f);
+ aa.setDuration(2000);
+ ll_splash.startAnimation(aa);
+ aa.setAnimationListener(new Animation.AnimationListener() {
+ @Override
+ public void onAnimationEnd(Animation arg0) {
+ redirectTo();
+ }
+
+ @Override
+ public void onAnimationRepeat(Animation animation) {
+ }
+
+ @Override
+ public void onAnimationStart(Animation animation) {
+ }
+
+ });
+
+ }
+
+ private void redirectTo() {
+ startActivity(new Intent(this, MainActivity.class));
+ finish();
+ }
+}
diff --git a/app/src/main/java/com/qhclh/ytzh/tasks/CallableTask.java b/app/src/main/java/com/qhclh/ytzh/tasks/CallableTask.java
new file mode 100644
index 0000000..687c922
--- /dev/null
+++ b/app/src/main/java/com/qhclh/ytzh/tasks/CallableTask.java
@@ -0,0 +1,115 @@
+package com.qhclh.ytzh.tasks;
+
+import android.app.ProgressDialog;
+import android.content.Context;
+import android.os.AsyncTask;
+import android.util.Log;
+
+
+import com.qhclh.ytzh.utils.DialogUtil;
+
+import java.util.concurrent.Callable;
+
+public abstract class CallableTask implements Callable