|
@@ -16,6 +16,7 @@ import android.webkit.WebChromeClient;
|
|
|
import android.webkit.WebSettings;
|
|
|
import android.webkit.WebView;
|
|
|
import android.webkit.WebViewClient;
|
|
|
+import android.widget.LinearLayout;
|
|
|
import android.widget.TextView;
|
|
|
import android.widget.Toast;
|
|
|
|
|
@@ -24,12 +25,14 @@ import com.example.informationkanban.utils.AppUtil;
|
|
|
import com.example.informationkanban.utils.GetInformationUtils;
|
|
|
import com.example.informationkanban.utils.LocaleMangerUtils;
|
|
|
import com.example.informationkanban.utils.NetFunctionConfig;
|
|
|
+import com.example.informationkanban.view.SplashView;
|
|
|
|
|
|
public class MainActivity extends AppCompatActivity {
|
|
|
private String TAG = MainActivity.class.getSimpleName();
|
|
|
private WebView webView;
|
|
|
private String MAC = "";
|
|
|
- private TextView initView;
|
|
|
+ private LinearLayout initView;
|
|
|
+ private SplashView splashView;
|
|
|
|
|
|
private long backClickTime = 0;
|
|
|
|
|
@@ -97,7 +100,8 @@ public class MainActivity extends AppCompatActivity {
|
|
|
private void init() {
|
|
|
//获得控件
|
|
|
webView = findViewById(R.id.wv_webview);
|
|
|
- initView = findViewById(R.id.tv_init);
|
|
|
+ initView = findViewById(R.id.ll_splash);
|
|
|
+ splashView = findViewById(R.id.splash_view);
|
|
|
}
|
|
|
|
|
|
private void accessTheWebpage() {
|
|
@@ -128,6 +132,7 @@ public class MainActivity extends AppCompatActivity {
|
|
|
|
|
|
//Toast.makeText(MainActivity.this, "fetch: " + myUrl, Toast.LENGTH_LONG).show();
|
|
|
Toast.makeText(MainActivity.this, "正在加载数据,请稍后...", Toast.LENGTH_LONG).show();
|
|
|
+ splashView.finshSplash();
|
|
|
initView.setVisibility(View.GONE);
|
|
|
Log.e(TAG, "load url: " + myUrl);
|
|
|
|