最新一次版本提交
47
tkgo/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.web.tkgo">
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<application
|
||||
android:name=".WebApplication"
|
||||
android:allowBackup="true"
|
||||
android:hardwareAccelerated="true"
|
||||
android:icon="@mipmap/hey_girl"
|
||||
android:label="@string/app_name"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:roundIcon="@mipmap/hey_girl"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppThemeStart"
|
||||
android:usesCleartextTraffic="true">
|
||||
|
||||
<activity
|
||||
android:name="com.web.tkgo.MainActivity2"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:exported="true"
|
||||
android:hardwareAccelerated="true"
|
||||
android:launchMode="singleTop"
|
||||
>
|
||||
|
||||
<intent-filter>
|
||||
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
|
||||
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
||||
</intent-filter>
|
||||
|
||||
</activity>
|
||||
<activity
|
||||
android:name="com.web.tkgo.WebViewActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:exported="false"
|
||||
android:hardwareAccelerated="true" />
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
321
tkgo/src/main/java/com/web/tkgo/CircleImageView.java
Normal file
@@ -0,0 +1,321 @@
|
||||
package com.web.tkgo;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.PorterDuffXfermode;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import androidx.appcompat.widget.AppCompatImageView;
|
||||
|
||||
|
||||
public class CircleImageView extends AppCompatImageView {
|
||||
// paint when user press
|
||||
private Paint pressPaint;
|
||||
private int width;
|
||||
private int height;
|
||||
|
||||
// default bitmap config
|
||||
private static final Bitmap.Config BITMAP_CONFIG = Bitmap.Config.ARGB_8888;
|
||||
private static final int COLORDRAWABLE_DIMENSION = 1;
|
||||
|
||||
// border color
|
||||
private int borderColor;
|
||||
// width of border
|
||||
private int borderWidth;
|
||||
// alpha when pressed
|
||||
private int pressAlpha;
|
||||
// color when pressed
|
||||
private int pressColor;
|
||||
// radius
|
||||
private int radius;
|
||||
// rectangle or round, 1 is circle, 2 is rectangle
|
||||
private int shapeType;
|
||||
|
||||
public CircleImageView(Context context) {
|
||||
super(context);
|
||||
init(context, null);
|
||||
}
|
||||
|
||||
public CircleImageView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init(context, attrs);
|
||||
}
|
||||
|
||||
public CircleImageView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
init(context, attrs);
|
||||
}
|
||||
|
||||
|
||||
private void init(Context context, AttributeSet attrs) {
|
||||
//init the value
|
||||
borderWidth = 0;
|
||||
borderColor = 0xddffffff;
|
||||
pressAlpha = 0x42;
|
||||
pressColor = 0x42000000;
|
||||
radius = 16;
|
||||
shapeType = 0;
|
||||
|
||||
// get attribute of EaseImageView
|
||||
if (attrs != null) {
|
||||
TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.CircleImageView);
|
||||
borderColor = array.getColor(R.styleable.CircleImageView_ease_border_color, borderColor);
|
||||
borderWidth = array.getDimensionPixelOffset(R.styleable.CircleImageView_ease_border_width, borderWidth);
|
||||
pressAlpha = array.getInteger(R.styleable.CircleImageView_ease_press_alpha, pressAlpha);
|
||||
pressColor = array.getColor(R.styleable.CircleImageView_ease_press_color, pressColor);
|
||||
radius = array.getDimensionPixelOffset(R.styleable.CircleImageView_ease_radius, radius);
|
||||
shapeType = array.getInteger(R.styleable.CircleImageView_es_shape_type, shapeType);
|
||||
array.recycle();
|
||||
}
|
||||
|
||||
// set paint when pressed
|
||||
pressPaint = new Paint();
|
||||
pressPaint.setAntiAlias(true);
|
||||
pressPaint.setStyle(Paint.Style.FILL);
|
||||
pressPaint.setColor(pressColor);
|
||||
pressPaint.setAlpha(0);
|
||||
pressPaint.setFlags(Paint.ANTI_ALIAS_FLAG);
|
||||
|
||||
setDrawingCacheEnabled(true);
|
||||
setWillNotDraw(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
|
||||
if (shapeType == 0) {
|
||||
super.onDraw(canvas);
|
||||
return;
|
||||
}
|
||||
Drawable drawable = getDrawable();
|
||||
if (drawable == null) {
|
||||
return;
|
||||
}
|
||||
// the width and height is in xml file
|
||||
if (getWidth() == 0 || getHeight() == 0) {
|
||||
return;
|
||||
}
|
||||
Bitmap bitmap = getBitmapFromDrawable(drawable);
|
||||
drawDrawable(canvas, bitmap);
|
||||
|
||||
if (isClickable()) {
|
||||
drawPress(canvas);
|
||||
}
|
||||
drawBorder(canvas);
|
||||
}
|
||||
|
||||
/**
|
||||
* draw Rounded Rectangle
|
||||
*
|
||||
* @param canvas
|
||||
* @param bitmap
|
||||
*/
|
||||
@SuppressLint("WrongConstant")
|
||||
private void drawDrawable(Canvas canvas, Bitmap bitmap) {
|
||||
Paint paint = new Paint();
|
||||
paint.setColor(0xffffffff);
|
||||
paint.setAntiAlias(true); //smooths out the edges of what is being drawn
|
||||
PorterDuffXfermode xfermode = new PorterDuffXfermode(PorterDuff.Mode.SRC_IN);
|
||||
// set flags
|
||||
int saveFlags = Canvas.ALL_SAVE_FLAG
|
||||
;
|
||||
canvas.saveLayer(0, 0, width, height, null, saveFlags);
|
||||
|
||||
if (shapeType == 1) {
|
||||
canvas.drawCircle(width / 2, height / 2, width / 2 - 1, paint);
|
||||
} else if (shapeType == 2) {
|
||||
RectF rectf = new RectF(1, 1, getWidth() - 1, getHeight() - 1);
|
||||
canvas.drawRoundRect(rectf, radius + 1, radius + 1, paint);
|
||||
}
|
||||
|
||||
paint.setXfermode(xfermode);
|
||||
|
||||
float scaleWidth = ((float) getWidth()) / bitmap.getWidth();
|
||||
float scaleHeight = ((float) getHeight()) / bitmap.getHeight();
|
||||
|
||||
Matrix matrix = new Matrix();
|
||||
matrix.postScale(scaleWidth, scaleHeight);
|
||||
|
||||
//bitmap scale
|
||||
bitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
|
||||
|
||||
canvas.drawBitmap(bitmap, 0, 0, paint);
|
||||
canvas.restore();
|
||||
}
|
||||
|
||||
/**
|
||||
* draw the effect when pressed
|
||||
*
|
||||
* @param canvas
|
||||
*/
|
||||
private void drawPress(Canvas canvas) {
|
||||
// check is rectangle or circle
|
||||
if (shapeType == 1) {
|
||||
canvas.drawCircle(width / 2, height / 2, width / 2 - 1, pressPaint);
|
||||
} else if (shapeType == 2) {
|
||||
RectF rectF = new RectF(1, 1, width - 1, height - 1);
|
||||
canvas.drawRoundRect(rectF, radius + 1, radius + 1, pressPaint);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* draw customized border
|
||||
*
|
||||
* @param canvas
|
||||
*/
|
||||
private void drawBorder(Canvas canvas) {
|
||||
if (borderWidth > 0) {
|
||||
Paint paint = new Paint();
|
||||
paint.setStrokeWidth(borderWidth);
|
||||
paint.setStyle(Paint.Style.STROKE);
|
||||
paint.setColor(borderColor);
|
||||
paint.setAntiAlias(true);
|
||||
// // check is rectangle or circle
|
||||
if (shapeType == 1) {
|
||||
canvas.drawCircle(width / 2, height / 2, (width - borderWidth) / 2, paint);
|
||||
} else if (shapeType == 2) {
|
||||
RectF rectf = new RectF(borderWidth / 2, borderWidth / 2, getWidth() - borderWidth / 2,
|
||||
getHeight() - borderWidth / 2);
|
||||
canvas.drawRoundRect(rectf, radius, radius, paint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* monitor the size change
|
||||
*
|
||||
* @param w
|
||||
* @param h
|
||||
* @param oldw
|
||||
* @param oldh
|
||||
*/
|
||||
@Override
|
||||
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
|
||||
super.onSizeChanged(w, h, oldw, oldh);
|
||||
width = w;
|
||||
height = h;
|
||||
}
|
||||
|
||||
/**
|
||||
* monitor if touched
|
||||
*
|
||||
* @param event
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
switch (event.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
pressPaint.setAlpha(pressAlpha);
|
||||
invalidate();
|
||||
break;
|
||||
case MotionEvent.ACTION_UP:
|
||||
pressPaint.setAlpha(0);
|
||||
invalidate();
|
||||
break;
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
|
||||
break;
|
||||
default:
|
||||
pressPaint.setAlpha(0);
|
||||
invalidate();
|
||||
break;
|
||||
}
|
||||
return super.onTouchEvent(event);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param drawable
|
||||
* @return
|
||||
*/
|
||||
private Bitmap getBitmapFromDrawable(Drawable drawable) {
|
||||
if (drawable == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (drawable instanceof BitmapDrawable) {
|
||||
return ((BitmapDrawable) drawable).getBitmap();
|
||||
}
|
||||
|
||||
Bitmap bitmap;
|
||||
int width = Math.max(drawable.getIntrinsicWidth(), 2);
|
||||
int height = Math.max(drawable.getIntrinsicHeight(), 2);
|
||||
try {
|
||||
bitmap = Bitmap.createBitmap(width, height, BITMAP_CONFIG);
|
||||
Canvas canvas = new Canvas(bitmap);
|
||||
drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
|
||||
drawable.draw(canvas);
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
bitmap = null;
|
||||
}
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
/**
|
||||
* set border color
|
||||
*
|
||||
* @param borderColor
|
||||
*/
|
||||
public void setBorderColor(int borderColor) {
|
||||
this.borderColor = borderColor;
|
||||
invalidate();
|
||||
}
|
||||
|
||||
/**
|
||||
* set border width
|
||||
*
|
||||
* @param borderWidth
|
||||
*/
|
||||
public void setBorderWidth(int borderWidth) {
|
||||
this.borderWidth = borderWidth;
|
||||
}
|
||||
|
||||
/**
|
||||
* set alpha when pressed
|
||||
*
|
||||
* @param pressAlpha
|
||||
*/
|
||||
public void setPressAlpha(int pressAlpha) {
|
||||
this.pressAlpha = pressAlpha;
|
||||
}
|
||||
|
||||
/**
|
||||
* set color when pressed
|
||||
*
|
||||
* @param pressColor
|
||||
*/
|
||||
public void setPressColor(int pressColor) {
|
||||
this.pressColor = pressColor;
|
||||
}
|
||||
|
||||
/**
|
||||
* set radius
|
||||
*
|
||||
* @param radius
|
||||
*/
|
||||
public void setRadius(int radius) {
|
||||
this.radius = radius;
|
||||
invalidate();
|
||||
}
|
||||
|
||||
/**
|
||||
* set shape,1 is circle, 2 is rectangle
|
||||
*
|
||||
* @param shapeType
|
||||
*/
|
||||
public void setShapeType(int shapeType) {
|
||||
this.shapeType = shapeType;
|
||||
invalidate();
|
||||
}
|
||||
}
|
||||
146
tkgo/src/main/java/com/web/tkgo/LogUtils.java
Normal file
@@ -0,0 +1,146 @@
|
||||
package com.web.tkgo;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
|
||||
/**
|
||||
* Log统一管理类
|
||||
* Created by on 2015/10/19 0019.
|
||||
*/
|
||||
public class LogUtils {
|
||||
|
||||
private LogUtils() {
|
||||
throw new UnsupportedOperationException("cannot be instantiated");
|
||||
}
|
||||
|
||||
// public static boolean isDebug = ApiService.isDebug;// 是否需要打印bug,可以在application的onCreate函数里面初始化
|
||||
public static boolean isDebug = com.web.tkgo.BuildConfig.BUILD_TYPE.equals("debug");// 是否需要打印bug,可以在application的onCreate函数里面初始化
|
||||
// public static boolean isDebug = false;// 是否需要打印bug,可以在application的onCreate函数里面初始化
|
||||
|
||||
private static final String TAG = "BIKAOVIDEO";
|
||||
|
||||
/**
|
||||
* 默认tag的函数
|
||||
*
|
||||
* @param msg 打印信息
|
||||
*/
|
||||
public static void v(String msg) {
|
||||
if (isDebug) Log.v(TAG, msg);
|
||||
}
|
||||
|
||||
public static void d(String msg) {
|
||||
if (isDebug) Log.d(TAG, msg);
|
||||
}
|
||||
|
||||
public static void i(String msg) {
|
||||
if (isDebug) {
|
||||
if (msg.length() > 4000) {
|
||||
Log.i( TAG,"BIKAOVIDEOsb.length = " + msg.length());
|
||||
int chunkCount = msg.length() / 4000; // integer division
|
||||
for (int i = 0; i <= chunkCount; i++) {
|
||||
int max = 4000 * (i + 1);
|
||||
if (max >= msg.length()) {
|
||||
Log.i( TAG,"XHXchunk " + i + " of " + chunkCount + ":" + msg.substring(4000 * i));
|
||||
} else {
|
||||
Log.i( TAG,"XHXchunk " + i + " of " + chunkCount + ":" + msg.substring(4000 * i, max));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Log.i( TAG,"BIKAOVIDEO" + msg.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void w(String msg) {
|
||||
if (isDebug) Log.w(TAG, msg);
|
||||
}
|
||||
|
||||
public static void e(String msg) {
|
||||
if (isDebug) {
|
||||
if (msg.length() > 4000) {
|
||||
Log.e(TAG, "sb.length = " + msg.length());
|
||||
int chunkCount = msg.length() / 4000; // integer division
|
||||
for (int i = 0; i <= chunkCount; i++) {
|
||||
int max = 4000 * (i + 1);
|
||||
if (max >= msg.length()) {
|
||||
Log.e(TAG, "XHXchunk " + i + " of " + chunkCount + ":" + msg.substring(4000 * i));
|
||||
} else {
|
||||
Log.e(TAG, "XHXchunk " + i + " of " + chunkCount + ":" + msg.substring(4000 * i, max));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Log.e(TAG, "XHX" + msg.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义lag的函数
|
||||
*
|
||||
* @param tag tag
|
||||
* @param msg 打印信息
|
||||
*/
|
||||
public static void v(String tag, String msg) {
|
||||
if (isDebug) Log.v(tag, msg);
|
||||
}
|
||||
|
||||
public static void d(String tag, String msg) {
|
||||
if (isDebug) Log.d(tag, msg);
|
||||
}
|
||||
|
||||
public static void i(String tag, String msg) {
|
||||
if (isDebug) {
|
||||
if (msg.length() > 4000) {
|
||||
Log.i( TAG,"sb.length = " + msg.length());
|
||||
int chunkCount = msg.length() / 4000; // integer division
|
||||
for (int i = 0; i <= chunkCount; i++) {
|
||||
int max = 4000 * (i + 1);
|
||||
if (max >= msg.length()) {
|
||||
Log.i( TAG,"XHXchunk " + i + " of " + chunkCount + ":" + msg.substring(4000 * i));
|
||||
} else {
|
||||
Log.i( TAG,"XHXchunk " + i + " of " + chunkCount + ":" + msg.substring(4000 * i, max));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Log.i( TAG,"XHX" + msg.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void w(String tag, String msg) {
|
||||
if (isDebug) Log.w(tag, msg);
|
||||
}
|
||||
|
||||
public static void e(String tag, String msg) {
|
||||
if (isDebug) Log.e(tag, msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义lag的函数
|
||||
*
|
||||
* @param clazz 类
|
||||
* @param msg 打印信息
|
||||
*/
|
||||
public static void v(Class<?> clazz, String msg) {
|
||||
if (isDebug) Log.v(clazz.getSimpleName(), msg);
|
||||
}
|
||||
|
||||
public static void d(Class<?> clazz, String msg) {
|
||||
if (isDebug) Log.d(clazz.getSimpleName(), msg);
|
||||
}
|
||||
|
||||
public static void i(Class<?> clazz, String msg) {
|
||||
if (isDebug) Log.i(clazz.getSimpleName(), msg);
|
||||
}
|
||||
|
||||
public static void w(Class<?> clazz, String msg) {
|
||||
if (isDebug) Log.w(clazz.getSimpleName(), msg);
|
||||
}
|
||||
|
||||
public static void e(Class<?> clazz, String msg) {
|
||||
if (isDebug) Log.e(clazz.getSimpleName(), msg);
|
||||
}
|
||||
|
||||
}
|
||||
670
tkgo/src/main/java/com/web/tkgo/MainActivity2.java
Normal file
@@ -0,0 +1,670 @@
|
||||
package com.web.tkgo;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.NotificationManager;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.Color;
|
||||
import android.net.Uri;
|
||||
import android.net.http.SslError;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.provider.ContactsContract;
|
||||
import android.text.Html;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.webkit.ConsoleMessage;
|
||||
import android.webkit.DownloadListener;
|
||||
import android.webkit.JavascriptInterface;
|
||||
import android.webkit.PermissionRequest;
|
||||
import android.webkit.SslErrorHandler;
|
||||
import android.webkit.ValueCallback;
|
||||
import android.webkit.WebChromeClient;
|
||||
import android.webkit.WebResourceError;
|
||||
import android.webkit.WebResourceRequest;
|
||||
import android.webkit.WebResourceResponse;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class MainActivity2 extends AppCompatActivity {
|
||||
public WebView webView;
|
||||
TextView tvErrorMsg;
|
||||
LinearLayout layoutError;
|
||||
ImageView show_top_v;
|
||||
// public ImageView showTopV1;
|
||||
private LinearLayout showTopLy;
|
||||
private View topVvvv;
|
||||
private ProgressBar progressBar;
|
||||
public static String url = "https://154.213.186.36";
|
||||
|
||||
//先定义
|
||||
private static final int REQUEST_EXTERNAL_STORAGE = 1;
|
||||
|
||||
|
||||
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
getWindow().setNavigationBarColor(Color.parseColor("#FFFFFF"));
|
||||
getWindow().getDecorView().setBackgroundColor(Color.parseColor("#FFFFFF"));
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
||||
super.onCreate(savedInstanceState);
|
||||
View decor = getWindow().getDecorView();
|
||||
getWindow().setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED, WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
|
||||
if (getInt(MainActivity2.this, "is_white", 0) == 1) {
|
||||
decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
||||
} else {
|
||||
decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
||||
}
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.hide();
|
||||
}
|
||||
setContentView(R.layout.activity_main2);
|
||||
|
||||
initView();
|
||||
findViewById(R.id.back_iv).setOnClickListener(view -> onBackPressed());
|
||||
|
||||
}
|
||||
|
||||
public void setBackDrawables(int drawableId) {
|
||||
showTopLy.setBackgroundResource(drawableId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
|
||||
if (webView.canGoBack()) {//当webview有多级能返回的时候
|
||||
webView.goBack();
|
||||
}else{//不能返回了 关闭进程 退出程序
|
||||
super.onBackPressed();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static String[] PERMISSIONS_STORAGE = {
|
||||
"android.permission.READ_EXTERNAL_STORAGE",
|
||||
"android.permission.WRITE_EXTERNAL_STORAGE"};
|
||||
|
||||
private static String[] PERMISSIONS_CAMERA = {
|
||||
Manifest.permission.CAMERA};
|
||||
|
||||
@SuppressLint({"NewApi", "WrongConstant"})
|
||||
protected void initView() {
|
||||
topVvvv = (View) findViewById(R.id.top_vvvv);
|
||||
webView = findViewById(R.id.webview);
|
||||
show_top_v = findViewById(R.id.show_top_v);
|
||||
|
||||
// showTopV1 = (ImageView) findViewById(R.id.show_top_v1);
|
||||
showTopLy = findViewById(R.id.show_top_ly);
|
||||
progressBar = (ProgressBar) findViewById(R.id.progressbar);
|
||||
tvErrorMsg = findViewById(R.id.errormsg);
|
||||
layoutError = findViewById(R.id.layoutError);
|
||||
WebSettings settings = webView.getSettings();
|
||||
settings.setDomStorageEnabled(true);
|
||||
settings.setAppCacheEnabled(true);
|
||||
settings.setCacheMode(WebSettings.LOAD_DEFAULT);
|
||||
settings.setJavaScriptEnabled(true);
|
||||
settings.setLoadWithOverviewMode(true);
|
||||
// 设置允许访问文件数据
|
||||
settings.setAllowFileAccess(true);
|
||||
settings.setAllowContentAccess(true);
|
||||
settings.setDatabaseEnabled(true);
|
||||
settings.setSavePassword(false);
|
||||
settings.setSaveFormData(false);
|
||||
settings.setUseWideViewPort(true);
|
||||
settings.setBuiltInZoomControls(true);
|
||||
settings.setPluginState(WebSettings.PluginState.ON);
|
||||
settings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS);
|
||||
webView.setFocusable(true);
|
||||
webView.setFocusableInTouchMode(true);
|
||||
webView.getSettings().setSupportMultipleWindows(true);
|
||||
webView.getSettings().setBlockNetworkImage(false); // 解决图片不显示
|
||||
|
||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
webView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
}
|
||||
|
||||
settings.setSupportZoom(false);
|
||||
webView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
|
||||
// webView.setHorizontalScrollbarOverlay(true);
|
||||
webView.setHorizontalScrollBarEnabled(true);
|
||||
webView.requestFocus();
|
||||
// webView.setBackgroundColor(getColor(R.color.black));
|
||||
settings.setJavaScriptCanOpenWindowsAutomatically(true);
|
||||
settings.setMediaPlaybackRequiresUserGesture(false);
|
||||
// 设置在WebView内部是否允许通过file url加载的 Js代码读取其他的本地文件
|
||||
// Android 4.1前默认允许,4.1后默认禁止
|
||||
settings.setAllowFileAccessFromFileURLs(true);
|
||||
// 设置WebView内部是否允许通过 file url 加载的 Javascript 可以访问其他的源(包括http、https等源)
|
||||
// Android 4.1前默认允许,4.1后默认禁止
|
||||
settings.setAllowUniversalAccessFromFileURLs(true);
|
||||
|
||||
webView.setWebChromeClient(webChromeClient);
|
||||
webView.setWebViewClient(webViewClient);
|
||||
Log.i("XHXDEBUG", "XHXDEBUGURL:::" + url);
|
||||
|
||||
webView.setDownloadListener(new DownloadListener() {
|
||||
@Override
|
||||
public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimeType, long contentLength) {
|
||||
com.web.tkgo.LogUtils.i("URL是啥onDownloadStart:" + url);
|
||||
|
||||
try {
|
||||
Intent intent = new Intent();
|
||||
intent.setAction(Intent.ACTION_VIEW);
|
||||
intent.setData(Uri.parse(url));
|
||||
startActivity(intent);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
webView.loadUrl(url);
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// private void checkUpdate(String url) {
|
||||
// new AppUpdater(this, url).start();
|
||||
// }
|
||||
|
||||
|
||||
Handler handler = new Handler();
|
||||
|
||||
boolean hasSignIn = false;
|
||||
|
||||
|
||||
// WebView webViews;
|
||||
WebViewClient webViewClient = new WebViewClient() {
|
||||
|
||||
@Override
|
||||
public void onPageFinished(WebView webView, String s) {
|
||||
super.onPageFinished(webView, s);
|
||||
LogUtils.i("URL是啥加载完成:" + webView.getUrl());
|
||||
if (webView.getUrl().contains("hasSignIn")) {
|
||||
hasSignIn = true;
|
||||
}
|
||||
|
||||
int w = View.MeasureSpec.makeMeasureSpec(0,
|
||||
View.MeasureSpec.UNSPECIFIED);
|
||||
int h = View.MeasureSpec.makeMeasureSpec(0,
|
||||
View.MeasureSpec.UNSPECIFIED);
|
||||
// 重新测量
|
||||
webView.measure(w, h);
|
||||
if (showTopLy.getVisibility() == View.VISIBLE) {
|
||||
handler.postDelayed(() ->{
|
||||
showTopLy.setVisibility(View.GONE);
|
||||
}, 500);
|
||||
}
|
||||
|
||||
if(webView.getUrl().equals(url+"/h5/")||webView.getUrl().equals(url+"/h5/#/")){
|
||||
getWindow().setNavigationBarColor(Color.parseColor("#000000"));
|
||||
}else{
|
||||
getWindow().setNavigationBarColor(Color.parseColor("#FFFFFF"));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public WebResourceResponse shouldInterceptRequest(WebView webView, String s) {
|
||||
// LogUtils.i("网址是啥:222222222222222222222222");
|
||||
|
||||
return super.shouldInterceptRequest(webView, s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WebResourceResponse shouldInterceptRequest(WebView webView, WebResourceRequest webResourceRequest) {
|
||||
// LogUtils.i("网址是啥:"+webResourceRequest.getUrl().toString());
|
||||
|
||||
return super.shouldInterceptRequest(webView, webResourceRequest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {
|
||||
super.onReceivedError(view, request, error);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
int errorCode = error.getErrorCode();
|
||||
String errorMessage = error.getDescription().toString();
|
||||
String currentUrl = request.getUrl().toString();
|
||||
if ((errorCode == -2 || errorCode == -6) && currentUrl.contains(url)) {
|
||||
onShowErrorView(errorMessage);
|
||||
} else {
|
||||
onShowNetView();
|
||||
}
|
||||
}
|
||||
progressBar.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceivedSslError(WebView webView, SslErrorHandler sslErrorHandler, SslError sslError) {
|
||||
// super.onReceivedSslError(webView, sslErrorHandler, sslError);
|
||||
sslErrorHandler.proceed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
|
||||
super.onReceivedError(view, errorCode, description, failingUrl);
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
|
||||
if ((errorCode == -2 || errorCode == -6) && failingUrl.contains(url)) {
|
||||
onShowErrorView(description);
|
||||
} else {
|
||||
onShowNetView();
|
||||
}
|
||||
}
|
||||
progressBar.setVisibility(View.GONE);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView webView, String url1) {
|
||||
|
||||
LogUtils.i("URL是啥:" + url1);
|
||||
|
||||
if (url1.equals(url + "index") || url1.equals(url + "/index")) {
|
||||
isAtGame = false;
|
||||
topVvvv.setVisibility(View.GONE);
|
||||
} else {
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (!(url1.startsWith("http") || url1.startsWith("https"))) {
|
||||
try {
|
||||
Intent intent = new Intent();
|
||||
intent.setAction(Intent.ACTION_VIEW);
|
||||
intent.setData(Uri.parse(url1));
|
||||
startActivity(intent);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
|
||||
if ((url1.equals(url + "index") || url1.equals(url + "/index")) && webView.canGoBack()) {
|
||||
return false;
|
||||
} else {
|
||||
//其它的该怎么处理就怎么处理
|
||||
webView.loadUrl(url1);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
|
||||
|
||||
LogUtils.i("网络请求3333:" + request.getUrl());
|
||||
LogUtils.i("网络请求3333:" + request.getRequestHeaders());
|
||||
|
||||
Uri uri;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
uri = request.getUrl();
|
||||
} else {
|
||||
uri = Uri.parse(request.toString());
|
||||
}
|
||||
String url1 = uri.toString();
|
||||
LogUtils.i("URL是啥1:" + url1);
|
||||
|
||||
if (url1.equals(url + "index") || url1.equals(url + "/index")) {
|
||||
isAtGame = false;
|
||||
topVvvv.setVisibility(View.GONE);
|
||||
} else {
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
if (!(url1.startsWith("http") || url1.startsWith("https"))) {
|
||||
try {
|
||||
Intent intent = new Intent();
|
||||
intent.setAction(Intent.ACTION_VIEW);
|
||||
intent.setData(Uri.parse(url1));
|
||||
startActivity(intent);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
|
||||
if ((url1.equals(url + "index") || url1.equals(url + "/index")) && webView.canGoBack()) {
|
||||
return false;
|
||||
} else {
|
||||
//其它的该怎么处理就怎么处理
|
||||
webView.loadUrl(url1);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
public void onShowErrorView(String errorMsg) { //网络不可用的情况
|
||||
webView.setVisibility(View.GONE);
|
||||
layoutError.setVisibility(View.VISIBLE);
|
||||
tvErrorMsg.setText(errorMsg);
|
||||
showTopLy.setVisibility(View.GONE);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void onShowNetView() {
|
||||
// topVvvv.setVisibility(View.GONE);
|
||||
webView.setVisibility(View.VISIBLE);
|
||||
layoutError.setVisibility(View.GONE);
|
||||
showTopLy.setVisibility(View.GONE);
|
||||
// isNetError = false;
|
||||
}
|
||||
|
||||
|
||||
boolean isAtGame = false;
|
||||
// String uuid = "", uuid1 = "";
|
||||
private static final int REQUEST_CODE_FILE_CHOOSER = 1;
|
||||
private ValueCallback<Uri> mUploadCallbackForLowApi;
|
||||
private ValueCallback<Uri[]> mUploadCallbackForHighApi;
|
||||
WebChromeClient webChromeClient = new WebChromeClient() {
|
||||
|
||||
@Override
|
||||
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
|
||||
// if (consoleMessage.message().contains("POST_DATA:")) {
|
||||
// 解析控制台输出的 POST 数据
|
||||
// String postData = consoleMessage.message().replace("POST_DATA:", "");
|
||||
// LogUtils.i("当前输入内容CONSOLE_POST", postData);
|
||||
// }
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateWindow(WebView webViewdd, boolean b, boolean b1, Message resultMsg) {
|
||||
LogUtils.i("URL是啥onCreateWindow:" + webView.getUrl());
|
||||
|
||||
WebView newWebView = new WebView(webViewdd.getContext());
|
||||
newWebView.setWebViewClient(new WebViewClient() {
|
||||
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
|
||||
LogUtils.i("URL是啥新窗口:" + url);
|
||||
|
||||
if (!(url.startsWith("http") || url.startsWith("https"))) {
|
||||
try {
|
||||
Intent intent = new Intent();
|
||||
intent.setAction(Intent.ACTION_VIEW);
|
||||
intent.setData(Uri.parse(url));
|
||||
startActivity(intent);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
Intent browserIntent = new Intent(MainActivity2.this, WebViewActivity.class);
|
||||
browserIntent.putExtra("url", url);
|
||||
startActivity(browserIntent);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj;
|
||||
transport.setWebView(newWebView);
|
||||
resultMsg.sendToTarget();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onCloseWindow(WebView window) {
|
||||
super.onCloseWindow(window);
|
||||
LogUtils.i("URL是啥新窗口结束:" + url);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProgressChanged(WebView view, int newProgress) {
|
||||
super.onProgressChanged(view, newProgress);
|
||||
// 更新进度条的进度
|
||||
progressBar.setProgress(newProgress);
|
||||
// 如果加载完成,隐藏进度条
|
||||
if (newProgress == 100) {
|
||||
progressBar.setVisibility(View.GONE);
|
||||
} else {
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// @TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
@Override
|
||||
public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback, FileChooserParams fileChooserParams) {
|
||||
LogUtils.i("数据接口:onShowFileChooser");
|
||||
mUploadCallbackForHighApi = filePathCallback;
|
||||
Intent intent = fileChooserParams.createIntent();
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
startActivityForResult(Intent.createChooser(intent, "File chooser"), REQUEST_CODE_FILE_CHOOSER);
|
||||
return true;
|
||||
}
|
||||
|
||||
// For 3.0+
|
||||
protected void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType) {
|
||||
LogUtils.i("数据接口:openFileChooseracceptType");
|
||||
openFilerChooser(uploadMsg);
|
||||
}
|
||||
|
||||
|
||||
private void openFilerChooser(ValueCallback<Uri> uploadMsg) {
|
||||
LogUtils.i("数据接口:openFileChooser");
|
||||
mUploadCallbackForLowApi = uploadMsg;
|
||||
startActivityForResult(Intent.createChooser(getFilerChooserIntent(), "File Chooser"), REQUEST_CODE_FILE_CHOOSER);
|
||||
}
|
||||
|
||||
|
||||
private Intent getFilerChooserIntent() {
|
||||
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
return intent;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onPermissionRequest(PermissionRequest request) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
MainActivity2.this.runOnUiThread(() -> {
|
||||
for (String permisson : request.getResources()) {
|
||||
permissionRequest = request;
|
||||
if (permisson.equals(PermissionRequest.RESOURCE_VIDEO_CAPTURE)) {
|
||||
if (ContextCompat.checkSelfPermission(MainActivity2.this, Manifest.permission.CAMERA) != 0) {
|
||||
ActivityCompat.requestPermissions(MainActivity2.this, PERMISSIONS_CAMERA, 1111);
|
||||
} else {
|
||||
request.grant(request.getResources());
|
||||
request.getOrigin();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private PermissionRequest permissionRequest;
|
||||
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.Q)
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
switch (requestCode) {
|
||||
case REQUEST_CODE_FILE_CHOOSER:
|
||||
if (resultCode == RESULT_OK || resultCode == RESULT_CANCELED) {
|
||||
afterFileChooseGoing(resultCode, data);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* onActivityResult方法
|
||||
*/
|
||||
|
||||
private void afterFileChooseGoing(int resultCode, Intent data) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
if (mUploadCallbackForHighApi == null) {
|
||||
return;
|
||||
}
|
||||
mUploadCallbackForHighApi.onReceiveValue(WebChromeClient.FileChooserParams.parseResult(resultCode, data));
|
||||
mUploadCallbackForHighApi = null;
|
||||
} else {
|
||||
if (mUploadCallbackForLowApi == null) {
|
||||
return;
|
||||
}
|
||||
Uri result = data == null ? null : data.getData();
|
||||
mUploadCallbackForLowApi.onReceiveValue(result);
|
||||
mUploadCallbackForLowApi = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode,
|
||||
String permissions[], int[] grantResults) {
|
||||
if (grantResults.length == 0) {
|
||||
return;
|
||||
}
|
||||
switch (requestCode) {
|
||||
case REQUEST_EXTERNAL_STORAGE:
|
||||
if (grantResults[0] == PackageManager.PERMISSION_GRANTED && grantResults[1] == PackageManager.PERMISSION_GRANTED) {
|
||||
}
|
||||
break;
|
||||
case 1111:
|
||||
if (grantResults[0] == PackageManager.PERMISSION_GRANTED && permissionRequest != null) {
|
||||
permissionRequest.grant(permissionRequest.getResources());
|
||||
}
|
||||
break;
|
||||
case 2222:
|
||||
if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
// readContact();
|
||||
} else {
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
|
||||
if (webView != null) {
|
||||
//加载null内容
|
||||
webView.loadDataWithBaseURL(null, "", "text/html", "utf-8", null);
|
||||
//清除历史记录
|
||||
webView.clearHistory();
|
||||
//移除WebView
|
||||
// ((ViewGroup) webView.getParent()).removeView(webView);
|
||||
//销毁VebView
|
||||
webView.destroy();
|
||||
}
|
||||
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static void saveInt(Context context, String key, int value) {
|
||||
SharedPreferences sp = context.getSharedPreferences("InitApp", Activity.MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = sp.edit();
|
||||
editor.putInt(key, value);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
public static int getInt(Context context, String key, int defValue) {
|
||||
SharedPreferences sp = context.getSharedPreferences("InitApp", Activity.MODE_PRIVATE);
|
||||
return sp.getInt(key, defValue);
|
||||
}
|
||||
|
||||
Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||
|
||||
public boolean isApplicationBroughtToBackground(final Context context) {
|
||||
ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
|
||||
List<ActivityManager.RunningTaskInfo> tasks = am.getRunningTasks(1);
|
||||
if (!tasks.isEmpty()) {
|
||||
ComponentName topActivity = tasks.get(0).topActivity;
|
||||
if (!topActivity.getPackageName().equals(context.getPackageName())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
44
tkgo/src/main/java/com/web/tkgo/StatusLayout.java
Normal file
@@ -0,0 +1,44 @@
|
||||
package com.web.tkgo;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* Created by kiun_2007 on 2018/3/29.
|
||||
*/
|
||||
|
||||
public class StatusLayout extends LinearLayout {
|
||||
public StatusLayout(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public StatusLayout(Context context, @Nullable AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public StatusLayout(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
private int getStatusBarHeight(Context context) {
|
||||
int result = 0;
|
||||
int resourceId = context.getResources().getIdentifier("status_bar_height", "dimen", "android");
|
||||
if (resourceId > 0) {
|
||||
result = context.getResources().getDimensionPixelSize(resourceId);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
ViewGroup.LayoutParams lp = this.getLayoutParams();
|
||||
lp.width = -1;
|
||||
lp.height = getStatusBarHeight(getContext());
|
||||
this.setLayoutParams(lp);
|
||||
super.onAttachedToWindow();
|
||||
}
|
||||
}
|
||||
18
tkgo/src/main/java/com/web/tkgo/WebApplication.java
Normal file
@@ -0,0 +1,18 @@
|
||||
package com.web.tkgo;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public class WebApplication extends Application {
|
||||
|
||||
|
||||
public static Context application;
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
// 设置开启优化方案
|
||||
application = this;
|
||||
}
|
||||
}
|
||||
450
tkgo/src/main/java/com/web/tkgo/WebViewActivity.java
Normal file
@@ -0,0 +1,450 @@
|
||||
package com.web.tkgo;
|
||||
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.webkit.ValueCallback;
|
||||
import android.webkit.WebChromeClient;
|
||||
import android.webkit.WebResourceError;
|
||||
import android.webkit.WebResourceRequest;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
|
||||
|
||||
public class WebViewActivity extends AppCompatActivity {
|
||||
|
||||
private String url;
|
||||
WebView webView;
|
||||
TextView tvErrorMsg;
|
||||
LinearLayout layoutError;
|
||||
ImageView show_top_v;
|
||||
ImageView menu_iv;
|
||||
private ImageView helpIv;
|
||||
private LinearLayout showTopLy;
|
||||
private FrameLayout videoContainer;
|
||||
private ImageView backIv;
|
||||
private ProgressBar progressBar;
|
||||
private View topVvvv;
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
getWindow().setNavigationBarColor(getColor(R.color.white));
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
View decor = getWindow().getDecorView();
|
||||
getWindow().setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED, WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
|
||||
decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.hide();
|
||||
}
|
||||
setContentView(R.layout.activity_main2);
|
||||
findViewById(R.id.back_iv).setOnClickListener(view -> finish());
|
||||
url = getIntent().getStringExtra("url");
|
||||
initView();
|
||||
}
|
||||
|
||||
private ValueCallback<Uri[]> mUploadCallbackForHighApi;
|
||||
|
||||
public void initView() {
|
||||
topVvvv = (View) findViewById(R.id.top_vvvv);
|
||||
webView = findViewById(R.id.webview);
|
||||
show_top_v = findViewById(R.id.show_top_v);
|
||||
showTopLy = findViewById(R.id.show_top_ly);
|
||||
tvErrorMsg = findViewById(R.id.errormsg);
|
||||
layoutError = findViewById(R.id.layoutError);
|
||||
videoContainer = (FrameLayout) findViewById(R.id.videoContainer);
|
||||
backIv = (ImageView) findViewById(R.id.back_iv);
|
||||
progressBar = (ProgressBar) findViewById(R.id.progressbar);
|
||||
WebSettings settings = webView.getSettings();
|
||||
settings.setDomStorageEnabled(true);
|
||||
settings.setAppCacheEnabled(true);
|
||||
settings.setCacheMode(WebSettings.LOAD_DEFAULT);
|
||||
settings.setJavaScriptEnabled(true);
|
||||
settings.setLoadWithOverviewMode(true);
|
||||
// 设置允许访问文件数据
|
||||
settings.setAllowFileAccess(true);
|
||||
settings.setAllowContentAccess(true);
|
||||
settings.setDatabaseEnabled(true);
|
||||
settings.setSavePassword(false);
|
||||
settings.setSaveFormData(false);
|
||||
settings.setUseWideViewPort(true);
|
||||
settings.setBuiltInZoomControls(true);
|
||||
settings.setPluginState(WebSettings.PluginState.ON);
|
||||
settings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS);
|
||||
webView.setFocusable(true);
|
||||
webView.setFocusableInTouchMode(true);
|
||||
webView.getSettings().setSupportMultipleWindows(true);
|
||||
|
||||
settings.setSupportZoom(false);
|
||||
webView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
|
||||
// webView.setHorizontalScrollbarOverlay(true);
|
||||
webView.setHorizontalScrollBarEnabled(true);
|
||||
webView.requestFocus();
|
||||
// webView.setBackgroundColor(getColor(R.color.black));
|
||||
settings.setJavaScriptCanOpenWindowsAutomatically(false);
|
||||
|
||||
// 设置在WebView内部是否允许通过file url加载的 Js代码读取其他的本地文件
|
||||
// Android 4.1前默认允许,4.1后默认禁止
|
||||
settings.setAllowFileAccessFromFileURLs(true);
|
||||
// 设置WebView内部是否允许通过 file url 加载的 Javascript 可以访问其他的源(包括http、https等源)
|
||||
// Android 4.1前默认允许,4.1后默认禁止
|
||||
settings.setAllowUniversalAccessFromFileURLs(true);
|
||||
|
||||
// settings.setBuiltInZoomControls(false); // 启用缩放功能
|
||||
// settings.setDisplayZoomControls(false); // 隐藏缩放控件
|
||||
|
||||
|
||||
webView.setWebChromeClient(new WebChromeClient() {
|
||||
@Override
|
||||
public boolean onCreateWindow(WebView view, boolean isDialog, boolean isUserGesture, Message resultMsg) {
|
||||
|
||||
WebView newWebView = new WebView(WebViewActivity.this);
|
||||
topVvvv.setVisibility(View.VISIBLE);
|
||||
webView.addView(newWebView);
|
||||
WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj;
|
||||
transport.setWebView(newWebView);
|
||||
resultMsg.sendToTarget();
|
||||
|
||||
newWebView.setWebViewClient(new WebViewClient() {
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
// isAtGame = true;
|
||||
progressBar.setVisibility(View.GONE);
|
||||
webView.loadUrl(url);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
// WebView newWebView = new WebView(view.getContext());
|
||||
// newWebView.setWebViewClient(new WebViewClient() {
|
||||
// @Override
|
||||
// public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
// Intent browserIntent = new Intent(WebViewActivity.this, WebViewActivity.class);
|
||||
// browserIntent.putExtra("url", url);
|
||||
// startActivity(browserIntent);
|
||||
// return true;
|
||||
// }
|
||||
// });
|
||||
// WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj;
|
||||
// transport.setWebView(newWebView);
|
||||
// resultMsg.sendToTarget();
|
||||
// return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// @TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
@Override
|
||||
public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback, FileChooserParams fileChooserParams) {
|
||||
LogUtils.i("数据接口:onShowFileChooser");
|
||||
mUploadCallbackForHighApi = filePathCallback;
|
||||
Intent intent = fileChooserParams.createIntent();
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
startActivityForResult(Intent.createChooser(intent, "File chooser"), REQUEST_CODE_FILE_CHOOSER);
|
||||
return true;
|
||||
}
|
||||
|
||||
// For 3.0+
|
||||
protected void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType) {
|
||||
LogUtils.i("数据接口:openFileChooseracceptType");
|
||||
openFilerChooser(uploadMsg);
|
||||
}
|
||||
|
||||
|
||||
private void openFilerChooser(ValueCallback<Uri> uploadMsg) {
|
||||
LogUtils.i("数据接口:openFileChooser");
|
||||
mUploadCallbackForLowApi = uploadMsg;
|
||||
startActivityForResult(Intent.createChooser(getFilerChooserIntent(), "File Chooser"), REQUEST_CODE_FILE_CHOOSER);
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
webView.setWebViewClient(new WebViewClient() {
|
||||
|
||||
|
||||
@Override
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
super.onPageFinished(view, url);
|
||||
showTopLy.setVisibility(View.GONE);
|
||||
progressBar.setVisibility(View.GONE);
|
||||
topVvvv.setVisibility(View.VISIBLE);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageStarted(WebView view, String url, Bitmap favicon) {
|
||||
super.onPageStarted(view, url, favicon);
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
topVvvv.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {
|
||||
super.onReceivedError(view, request, error);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
int errorCode = error.getErrorCode();
|
||||
String errorMessage = error.getDescription().toString();
|
||||
String currentUrl = request.getUrl().toString();
|
||||
LogUtils.d("onReceivedError2 url==" + url + " errorCode ==" + errorCode);
|
||||
if ((errorCode == -2 || errorCode == -6) && currentUrl.contains(url)) {
|
||||
onShowErrorView(errorMessage);
|
||||
} else {
|
||||
onShowNetView();
|
||||
}
|
||||
}
|
||||
progressBar.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
|
||||
super.onReceivedError(view, errorCode, description, failingUrl);
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
|
||||
LogUtils.d("onReceivedError2 url==" + failingUrl + " errorCode ==" + errorCode);
|
||||
if ((errorCode == -2 || errorCode == -6) && failingUrl.contains(url)) {
|
||||
onShowErrorView(description);
|
||||
} else {
|
||||
onShowNetView();
|
||||
}
|
||||
}
|
||||
progressBar.setVisibility(View.GONE);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
|
||||
|
||||
Uri uri;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
uri = request.getUrl();
|
||||
} else {
|
||||
uri = Uri.parse(request.toString());
|
||||
}
|
||||
String url1 = uri.toString();
|
||||
LogUtils.d("url1111111111==" + url1);
|
||||
if (url1.equals(url + "index") || url1.equals(url + "/index")) {
|
||||
topVvvv.setVisibility(View.GONE);
|
||||
} else {
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
if (!(url1.startsWith("http") || url1.startsWith("https"))) {
|
||||
try {
|
||||
Intent intent = new Intent();
|
||||
intent.setAction(Intent.ACTION_VIEW);
|
||||
intent.setData(Uri.parse(url1));
|
||||
startActivity(intent);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
|
||||
if ((url1.equals(url + "index") || url1.equals(url + "/index")) && webView.canGoBack()) {
|
||||
return false;
|
||||
} else {
|
||||
if (url1.contains(".apk")) { //下载
|
||||
Toast.makeText(WebViewActivity.this, "下载开始,请稍后...", Toast.LENGTH_SHORT).show();
|
||||
// Constants.isUpdate = false;
|
||||
// new AppUpdater(WebViewActivity.this, url1).start();
|
||||
return false;
|
||||
}
|
||||
//其它的该怎么处理就怎么处理
|
||||
LogUtils.d("url1111111111==2" + url1);
|
||||
webView.loadUrl(url1);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url1) {
|
||||
if (url1.equals(url + "index") || url1.equals(url + "/index")) {
|
||||
topVvvv.setVisibility(View.GONE);
|
||||
} else {
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
if (!(url1.startsWith("http") || url1.startsWith("https"))) {
|
||||
try {
|
||||
Intent intent = new Intent();
|
||||
intent.setAction(Intent.ACTION_VIEW);
|
||||
intent.setData(Uri.parse(url1));
|
||||
startActivity(intent);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
|
||||
if ((url1.equals(url + "index") || url1.equals(url + "/index")) && webView.canGoBack()) {
|
||||
return false;
|
||||
} else {
|
||||
if (url1.contains(".apk")) { //下载
|
||||
// new AppUpdater(WebViewActivity.this, url1).start();
|
||||
return false;
|
||||
}
|
||||
//其它的该怎么处理就怎么处理
|
||||
webView.loadUrl(url1);
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
webView.setOnGenericMotionListener(new View.OnGenericMotionListener() {
|
||||
@Override
|
||||
public boolean onGenericMotion(View view, MotionEvent motionEvent) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
// webView.setOnTouchListener(new View.OnTouchListener() {
|
||||
// @Override
|
||||
// public boolean onTouch(View view, MotionEvent motionEvent) {
|
||||
// if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
|
||||
// webView.loadUrl("javascript:_IntervalResize(+\" + view + \",false)");
|
||||
// return true;
|
||||
// } else {
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
// webView.onWindowFocusChanged(true);
|
||||
// webView.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||
// @Override
|
||||
// public void onFocusChange(View view, boolean b) {
|
||||
// LogUtils.d("B==" + b);
|
||||
// view.invalidate();
|
||||
// }
|
||||
// });
|
||||
if (url != null) {
|
||||
webView.loadUrl(url);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.Q)
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
switch (requestCode) {
|
||||
case REQUEST_CODE_FILE_CHOOSER:
|
||||
if (resultCode == RESULT_OK || resultCode == RESULT_CANCELED) {
|
||||
afterFileChooseGoing(resultCode, data);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* onActivityResult方法
|
||||
*/
|
||||
|
||||
private void afterFileChooseGoing(int resultCode, Intent data) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
if (mUploadCallbackForHighApi == null) {
|
||||
return;
|
||||
}
|
||||
mUploadCallbackForHighApi.onReceiveValue(WebChromeClient.FileChooserParams.parseResult(resultCode, data));
|
||||
mUploadCallbackForHighApi = null;
|
||||
} else {
|
||||
if (mUploadCallbackForLowApi == null) {
|
||||
return;
|
||||
}
|
||||
Uri result = data == null ? null : data.getData();
|
||||
mUploadCallbackForLowApi.onReceiveValue(result);
|
||||
mUploadCallbackForLowApi = null;
|
||||
}
|
||||
}
|
||||
|
||||
private Intent getFilerChooserIntent() {
|
||||
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
return intent;
|
||||
}
|
||||
|
||||
|
||||
private static final int REQUEST_CODE_FILE_CHOOSER = 1;
|
||||
private ValueCallback<Uri> mUploadCallbackForLowApi;
|
||||
private boolean isNetError = false;
|
||||
|
||||
public void onShowErrorView(String errorMsg) { //网络不可用的情况
|
||||
topVvvv.setVisibility(View.VISIBLE);
|
||||
webView.setVisibility(View.GONE);
|
||||
layoutError.setVisibility(View.VISIBLE);
|
||||
tvErrorMsg.setText(errorMsg);
|
||||
showTopLy.setVisibility(View.GONE);
|
||||
isNetError = true;
|
||||
|
||||
}
|
||||
|
||||
public void onShowNetView() {
|
||||
topVvvv.setVisibility(View.VISIBLE);
|
||||
webView.setVisibility(View.VISIBLE);
|
||||
layoutError.setVisibility(View.GONE);
|
||||
showTopLy.setVisibility(View.GONE);
|
||||
isNetError = false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if (webView.canGoBack()) {//当webview有多级能返回的时候
|
||||
onShowNetView();
|
||||
webView.goBack();
|
||||
} else {//不能返回了
|
||||
WebViewActivity.this.finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
if (webView != null) {
|
||||
//加载null内容
|
||||
// webView.loadDataWithBaseURL(null, "", "text/html", "utf-8", null);
|
||||
//清除历史记录
|
||||
// webView.clearHistory();
|
||||
//移除WebView
|
||||
// ((ViewGroup) webView.getParent()).removeView(webView);
|
||||
//销毁VebView
|
||||
webView.destroy();
|
||||
}
|
||||
super.onDestroy();
|
||||
}
|
||||
}
|
||||
11
tkgo/src/main/res/drawable-anydpi/ic_action_back.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="#333333"
|
||||
android:alpha="0.8">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
|
||||
</vector>
|
||||
BIN
tkgo/src/main/res/drawable-hdpi/ic_action_back.png
Normal file
|
After Width: | Height: | Size: 182 B |
BIN
tkgo/src/main/res/drawable-mdpi/ic_action_back.png
Normal file
|
After Width: | Height: | Size: 150 B |
30
tkgo/src/main/res/drawable-v24/ic_launcher_foreground.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="85.84757"
|
||||
android:endY="92.4963"
|
||||
android:startX="42.9492"
|
||||
android:startY="49.59793"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
||||
BIN
tkgo/src/main/res/drawable-xhdpi/ic_action_back.png
Normal file
|
After Width: | Height: | Size: 212 B |
BIN
tkgo/src/main/res/drawable-xxhdpi/ic_action_back.png
Normal file
|
After Width: | Height: | Size: 324 B |
170
tkgo/src/main/res/drawable/ic_launcher_background.xml
Normal file
@@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#3DDC84"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
||||
20
tkgo/src/main/res/drawable/input_bg.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/white">
|
||||
<item android:id="@android:id/mask">
|
||||
<shape>
|
||||
<solid android:color="@android:color/transparent" />
|
||||
<corners android:radius="23dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<!-- 默认显⽰效果-->
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
|
||||
<solid android:color="@color/dialog_input_bg"/>
|
||||
<corners
|
||||
android:radius="3dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
|
||||
28
tkgo/src/main/res/drawable/pass_word_bg.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:color="@color/white"
|
||||
tools:ignore="NewApi">
|
||||
<item android:id="@android:id/mask"
|
||||
tools:ignore="NewApi">
|
||||
<shape>
|
||||
<solid android:color="@android:color/transparent" />
|
||||
<corners android:radius="5dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<!-- 默认显⽰效果-->
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:startColor="@android:color/transparent"
|
||||
android:endColor="@android:color/transparent"
|
||||
android:type="linear"
|
||||
android:useLevel="true" />
|
||||
<stroke android:width="1dp" android:color="#333333"/>
|
||||
<corners
|
||||
android:radius="5dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
|
||||
23
tkgo/src/main/res/drawable/pass_word_bg1.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<animated-rotate
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:fromDegrees="0"
|
||||
android:toDegrees="360"
|
||||
android:pivotX="50%"
|
||||
android:pivotY="50%"
|
||||
>
|
||||
<shape
|
||||
android:shape="ring"
|
||||
android:innerRadiusRatio="3"
|
||||
android:thicknessRatio="8"
|
||||
android:useLevel="false"
|
||||
>
|
||||
<gradient
|
||||
android:type="sweep"
|
||||
android:useLevel="false"
|
||||
android:startColor="#000000"
|
||||
android:centerColor="#999999"
|
||||
android:endColor="#EEEEEE"
|
||||
android:centerY="0.50" />
|
||||
</shape>
|
||||
</animated-rotate>
|
||||
23
tkgo/src/main/res/drawable/pass_word_bg2.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<animated-rotate
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:fromDegrees="0"
|
||||
android:toDegrees="360"
|
||||
android:pivotX="50%"
|
||||
android:pivotY="50%"
|
||||
>
|
||||
<shape
|
||||
android:shape="ring"
|
||||
android:innerRadiusRatio="3"
|
||||
android:thicknessRatio="8"
|
||||
android:useLevel="false"
|
||||
>
|
||||
<gradient
|
||||
android:type="sweep"
|
||||
android:useLevel="false"
|
||||
android:startColor="#000000"
|
||||
android:centerColor="#888888"
|
||||
android:endColor="#FFFFFF"
|
||||
android:centerY="0.50" />
|
||||
</shape>
|
||||
</animated-rotate>
|
||||
5
tkgo/src/main/res/drawable/shape_btn_bg.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<corners android:radius="22dp" />
|
||||
<solid android:color="@color/jisuanqi" />
|
||||
</shape>
|
||||
6
tkgo/src/main/res/drawable/shape_dialog_bg2.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<corners android:topRightRadius="12dp"
|
||||
android:topLeftRadius="12dp"/>
|
||||
<solid android:color="@color/dialog_bg" />
|
||||
</shape>
|
||||
5
tkgo/src/main/res/drawable/shape_dialog_bg3.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<corners android:radius="12dp" />
|
||||
<solid android:color="@color/dialog_bg" />
|
||||
</shape>
|
||||
5
tkgo/src/main/res/drawable/shape_dialog_bg_new.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<corners android:radius="20dp" />
|
||||
<solid android:color="@color/white" />
|
||||
</shape>
|
||||
5
tkgo/src/main/res/drawable/shape_notify_typebg.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<corners android:radius="2dp" />
|
||||
<solid android:color="@android:color/black" />
|
||||
</shape>
|
||||
351
tkgo/src/main/res/layout/activity_main.xml
Normal file
@@ -0,0 +1,351 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".MainActivity"
|
||||
android:background="@color/white"
|
||||
android:id="@+id/homePage">
|
||||
|
||||
<LinearLayout
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/big_v"
|
||||
android:visibility="visible"
|
||||
android:background="@android:color/transparent"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/inputText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="6"
|
||||
android:padding="10dp"
|
||||
android:textSize="40dp"
|
||||
android:textColor="@color/black"
|
||||
android:gravity="center_vertical" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/outputText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="end"
|
||||
android:textColor="@color/black"
|
||||
android:textAlignment="textEnd"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:textSize="80dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/allBtn"
|
||||
android:layout_weight="3"
|
||||
android:background="#EEEEEE"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="AC"
|
||||
android:textSize="35dp"
|
||||
android:textColor="#e67e22"
|
||||
android:id="@+id/btn_clear"
|
||||
>
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="←"
|
||||
android:textSize="35dp"
|
||||
android:textColor="#e67e22"
|
||||
android:id="@+id/btn_backspace"
|
||||
>
|
||||
|
||||
</Button>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="3"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="÷"
|
||||
android:textSize="35dp"
|
||||
android:textColor="#e67e22"
|
||||
android:id="@+id/btn_divide"
|
||||
>
|
||||
|
||||
</Button>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:id="@+id/btn_7"
|
||||
android:text="7"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="35dp">
|
||||
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:id="@+id/btn_8"
|
||||
android:text="8"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="35dp"
|
||||
>
|
||||
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:id="@+id/btn_9"
|
||||
android:text="9"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="35dp"
|
||||
>
|
||||
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="×"
|
||||
android:textSize="35dp"
|
||||
android:textColor="#e67e22"
|
||||
android:id="@+id/btn_multiply"
|
||||
>
|
||||
|
||||
</Button>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="4"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="35dp"
|
||||
android:id="@+id/btn_4"
|
||||
>
|
||||
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="5"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="35dp"
|
||||
android:id="@+id/btn_5"
|
||||
>
|
||||
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="6"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="35dp"
|
||||
android:id="@+id/btn_6"
|
||||
>
|
||||
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="-"
|
||||
android:textSize="35dp"
|
||||
android:textColor="#e67e22"
|
||||
android:id="@+id/btn_subtract"
|
||||
>
|
||||
|
||||
</Button>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
|
||||
|
||||
>
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="1"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="35dp"
|
||||
android:id="@+id/btn_1"
|
||||
>
|
||||
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="2"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="35dp"
|
||||
android:id="@+id/btn_2"
|
||||
>
|
||||
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="3"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="35dp"
|
||||
android:id="@+id/btn_3"
|
||||
>
|
||||
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="+"
|
||||
android:textSize="35dp"
|
||||
android:textColor="#e67e22"
|
||||
android:id="@+id/btn_add"
|
||||
>
|
||||
|
||||
</Button>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fiveLow"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
|
||||
|
||||
>
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text=""
|
||||
android:textSize="35dp"
|
||||
>
|
||||
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="0"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="35dp"
|
||||
android:id="@+id/btn_0"
|
||||
>
|
||||
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="."
|
||||
android:textColor="@color/black"
|
||||
android:textSize="35dp"
|
||||
android:id="@+id/btn_point"
|
||||
>
|
||||
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="="
|
||||
android:textSize="35dp"
|
||||
android:textColor="#e67e22"
|
||||
android:id="@+id/btn_equal"
|
||||
>
|
||||
|
||||
</Button>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
145
tkgo/src/main/res/layout/activity_main2.xml
Normal file
@@ -0,0 +1,145 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="false"
|
||||
android:keepScreenOn="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.web.tkgo.StatusLayout
|
||||
android:id="@+id/top_vvvv1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/top_vvvv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_below="@id/top_vvvv1"
|
||||
android:background="@color/white"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back_iv"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/ic_action_back" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@mipmap/hey_girl" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<WebView
|
||||
android:id="@+id/webview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutError"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_error"
|
||||
style="@android:style/Widget.ProgressBar.Large"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="Loading……" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/errormsg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textColor="#999999"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/show_top_ly"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/top_vvvv"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
android:background="@color/white"
|
||||
android:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center">
|
||||
|
||||
|
||||
<com.web.tkgo.CircleImageView
|
||||
android:id="@+id/show_top_v"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:src="@mipmap/hey_girl"
|
||||
android:visibility="visible"
|
||||
app:ease_border_color="#EEEEEE"
|
||||
app:ease_border_width="1px"
|
||||
app:es_shape_type="round" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="6"
|
||||
android:gravity="center">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressbar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:indeterminateDrawable="@drawable/pass_word_bg1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/videoContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:indeterminateDrawable="@drawable/pass_word_bg2"
|
||||
android:visibility="gone" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
108
tkgo/src/main/res/layout/activity_main3.xml
Normal file
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.web.tkgo.StatusLayout
|
||||
android:id="@+id/top_vvvv1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:visibility="gone" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/top_vvvv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_below="@id/top_vvvv1"
|
||||
android:background="@color/white"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back_iv"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/ic_action_back" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@mipmap/hey_girl" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/webview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_below="@id/top_vvvv" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/show_top_ly"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/top_vvvv"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center">
|
||||
|
||||
<com.web.tkgo.CircleImageView
|
||||
android:id="@+id/show_top_v"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:src="@mipmap/hey_girl"
|
||||
android:visibility="visible"
|
||||
app:ease_border_color="#EEEEEE"
|
||||
app:ease_border_width="1dp"
|
||||
app:es_shape_type="round" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="6"
|
||||
android:gravity="center">
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminateDrawable="@drawable/pass_word_bg1"
|
||||
android:layout_centerHorizontal="true" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/videoContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
<ProgressBar
|
||||
android:id="@+id/progressbar"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:visibility="gone"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:indeterminateDrawable="@drawable/pass_word_bg2"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
95
tkgo/src/main/res/layout/activity_notifydetails.xml
Normal file
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:keepScreenOn="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/top_vvvv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:background="@color/white"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back_iv"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/ic_action_back" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@mipmap/hey_girl" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/top_vvvv"
|
||||
android:scaleType="centerCrop"
|
||||
android:visibility="gone" />
|
||||
|
||||
<com.tencent.smtt.sdk.WebView
|
||||
android:id="@+id/webview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/top_vvvv"
|
||||
android:visibility="gone" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/show_top_ly"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/top_vvvv"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center">
|
||||
|
||||
<com.web.tkgo.CircleImageView
|
||||
android:id="@+id/show_top_v"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:src="@mipmap/hey_girl"
|
||||
android:visibility="visible"
|
||||
app:ease_border_color="#EEEEEE"
|
||||
app:ease_border_width="1dp"
|
||||
app:es_shape_type="round" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="6"
|
||||
android:gravity="center">
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:indeterminateDrawable="@drawable/pass_word_bg1" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
44
tkgo/src/main/res/layout/activity_notifylist.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:keepScreenOn="true"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/top_vvvv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:background="@color/white"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back_iv"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/ic_action_back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:gravity="center"
|
||||
android:text="@string/app_notify_title"
|
||||
android:textColor="@color/dialog_bg"
|
||||
android:textSize="16sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_nofity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/top_vvvv" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
294
tkgo/src/main/res/layout/activity_start.xml
Normal file
@@ -0,0 +1,294 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/homePage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/white"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<LinearLayout
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/transparent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:layout_weight="6">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#333333"
|
||||
android:text="@string/qsrlwmm_txt"
|
||||
android:textSize="20dp">
|
||||
|
||||
</TextView>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="5dp"
|
||||
android:gravity="center"
|
||||
android:textSize="20sp"
|
||||
android:textColor="#333333"
|
||||
android:background="@drawable/pass_word_bg"
|
||||
android:id="@+id/password_1"/>
|
||||
<TextView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="5dp"
|
||||
android:gravity="center"
|
||||
android:textSize="20sp"
|
||||
android:textColor="#333333"
|
||||
android:background="@drawable/pass_word_bg"
|
||||
android:id="@+id/password_2"/>
|
||||
<TextView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="5dp"
|
||||
android:gravity="center"
|
||||
android:textSize="20sp"
|
||||
android:textColor="#333333"
|
||||
android:background="@drawable/pass_word_bg"
|
||||
android:id="@+id/password_3"/>
|
||||
<TextView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="5dp"
|
||||
android:gravity="center"
|
||||
android:textSize="20sp"
|
||||
android:textColor="#333333"
|
||||
android:background="@drawable/pass_word_bg"
|
||||
android:id="@+id/password_4"/>
|
||||
<TextView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="5dp"
|
||||
android:gravity="center"
|
||||
android:textSize="20sp"
|
||||
android:textColor="#333333"
|
||||
android:background="@drawable/pass_word_bg"
|
||||
android:id="@+id/password_5"/>
|
||||
<TextView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="5dp"
|
||||
android:gravity="center"
|
||||
android:textSize="20sp"
|
||||
android:textColor="#333333"
|
||||
android:background="@drawable/pass_word_bg"
|
||||
android:id="@+id/password_6"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/allBtn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#EEEEEE"
|
||||
android:layout_weight="4"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_7"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="7"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="25dp">
|
||||
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_8"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="8"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="25dp">
|
||||
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_9"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="9"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="25dp">
|
||||
|
||||
</Button>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="4"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="25dp">
|
||||
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_5"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="5"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="25dp">
|
||||
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_6"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="6"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="25dp">
|
||||
|
||||
</Button>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
|
||||
|
||||
>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="1"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="25dp">
|
||||
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="2"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="25dp">
|
||||
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="3"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="25dp">
|
||||
|
||||
</Button>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fiveLow"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
|
||||
|
||||
>
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text=""
|
||||
android:textColor="#e67e22"
|
||||
android:textSize="25dp">
|
||||
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_0"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="0"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="25dp">
|
||||
|
||||
</Button>
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_equal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="DEL"
|
||||
android:textColor="#e67e22"
|
||||
android:textSize="25dp">
|
||||
|
||||
</Button>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
108
tkgo/src/main/res/layout/activity_webview.xml
Normal file
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:keepScreenOn="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.web.tkgo.StatusLayout
|
||||
android:id="@+id/top_vvvv1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:visibility="gone" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/top_vvvv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_below="@id/top_vvvv1"
|
||||
android:background="@color/white"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back_iv"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/ic_action_back" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@mipmap/hey_girl" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
<com.tencent.smtt.sdk.WebView
|
||||
android:id="@+id/webview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/top_vvvv" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/show_top_ly"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/top_vvvv"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center">
|
||||
|
||||
<com.web.tkgo.CircleImageView
|
||||
android:id="@+id/show_top_v"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:src="@mipmap/hey_girl"
|
||||
android:visibility="visible"
|
||||
app:ease_border_color="#EEEEEE"
|
||||
app:ease_border_width="1dp"
|
||||
app:es_shape_type="round" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="6"
|
||||
android:gravity="center">
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminateDrawable="@drawable/pass_word_bg1"
|
||||
android:layout_centerHorizontal="true" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/videoContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
<ProgressBar
|
||||
android:id="@+id/progressbar"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:visibility="gone"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:indeterminateDrawable="@drawable/pass_word_bg2"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
228
tkgo/src/main/res/layout/dialog_action_bankinfo.xml
Normal file
@@ -0,0 +1,228 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_dialog_bg3"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="144dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ic_dialog_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:tint="@color/white"
|
||||
android:src="@mipmap/ic_close" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="25dp"
|
||||
android:gravity="center"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:text="@string/app_bankinfo_title"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textSize="18sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_bankinfo_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_below="@+id/layout_top"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bankinfo_name"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="@string/app_bankinfo_name"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/inputname_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_toRightOf="@+id/tv_bankinfo_name"
|
||||
android:background="@drawable/input_bg"
|
||||
android:gravity="center"
|
||||
android:hint="@string/app_bankinfo_name_hint"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textColorHint="#BCBCBC"
|
||||
android:textSize="16sp" />
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_bankinfo_country"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_below="@+id/layout_bankinfo_name"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bankinfo_country"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="@string/app_bankinfo_bankcountry"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/inputcountry_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_toRightOf="@+id/tv_bankinfo_country"
|
||||
android:drawableEnd="@mipmap/ic_pull_down"
|
||||
android:background="@drawable/input_bg"
|
||||
android:gravity="center"
|
||||
android:paddingEnd="10dp"
|
||||
android:hint="@string/app_bankinfo_bankcountry_hint"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textColorHint="#BCBCBC"
|
||||
android:textSize="16sp" />
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_bankcountry"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_below="@+id/layout_bankinfo_country"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bank_name"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:drawablePadding="10dp"
|
||||
android:text="@string/app_bankinfo_bankname"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/inputbankname_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_toEndOf="@+id/tv_bank_name"
|
||||
android:background="@drawable/input_bg"
|
||||
android:drawableRight="@mipmap/ic_pull_down"
|
||||
android:gravity="center"
|
||||
android:hint="@string/app_bankinfo_bankname_hint"
|
||||
android:inputType="number"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textColorHint="#BCBCBC"
|
||||
android:textSize="16sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_bankinfo_code"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_below="@+id/layout_bankcountry"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bank_code"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="@string/app_bankinfo_code"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/inputcode_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_toRightOf="@+id/tv_bank_code"
|
||||
android:background="@drawable/input_bg"
|
||||
android:gravity="center"
|
||||
android:hint="@string/app_bankinfo_code_hint"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textColorHint="#BCBCBC"
|
||||
android:textSize="16sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sumbit_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_below="@+id/layout_bankinfo_code"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="70dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:background="@drawable/shape_btn_bg"
|
||||
android:gravity="center"
|
||||
android:text="@string/sure_txt"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_bankname"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="220dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_below="@+id/layout_bankcountry"
|
||||
android:background="@color/dialog_bg"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_bankcountry"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="260dp"
|
||||
android:layout_below="@+id/layout_bankinfo_country"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:background="@color/dialog_bg"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
71
tkgo/src/main/res/layout/dialog_action_confirm.xml
Normal file
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_dialog_bg3"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="285dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="144dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content_tv"
|
||||
android:layout_width="245dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="@color/white" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="62dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cancel_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/cancel_txt"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/line_v"
|
||||
android:layout_width="0.5dp"
|
||||
android:layout_height="42dp"
|
||||
android:background="@color/white" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sumbit_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/sure_txt"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
89
tkgo/src/main/res/layout/dialog_action_invite.xml
Normal file
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_dialog_bg3"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="285dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:minHeight="144dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content_tv"
|
||||
android:layout_width="245dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:text="@string/app_tishi"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_tv"
|
||||
android:layout_width="245dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_bg"
|
||||
android:gravity="center"
|
||||
android:hint="@string/app_hint"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textColorHint="#BCBCBC"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="@color/white" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="62dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cancel_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/cancel_txt"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/line_v"
|
||||
android:layout_width="0.5dp"
|
||||
android:layout_height="42dp"
|
||||
android:background="@color/white" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sumbit_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/sure_txt"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
105
tkgo/src/main/res/layout/dialog_action_invite_records.xml
Normal file
@@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_dialog_bg3"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="144dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ic_dialog_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:tint="@color/white"
|
||||
android:src="@mipmap/ic_close" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="30dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_balance"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/content_tv"
|
||||
android:layout_marginTop="15dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/balance_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginStart="10dp"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/totalearnings_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textSize="16sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_empty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="360dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:tint="@color/dialog_textcolor"
|
||||
android:src="@mipmap/ic_empty" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nodata"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/layout_balance"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:text="@string/app_nodata"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textSize="20sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="360dp"
|
||||
android:layout_below="@+id/layout_balance"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@color/dialog_bg"
|
||||
android:visibility="visible" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
121
tkgo/src/main/res/layout/dialog_action_withdrawapply.xml
Normal file
@@ -0,0 +1,121 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_dialog_bg3"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="285dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="144dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content_tv"
|
||||
android:layout_width="245dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:text="@string/app_withdrawapply_title"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/balance_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="left|center_vertical"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_records"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="right|center_vertical"
|
||||
android:text="@string/app_withdrawtitle"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_tv"
|
||||
android:layout_width="245dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/input_bg"
|
||||
android:gravity="center"
|
||||
android:hint="@string/app_withdraw_apply_hint"
|
||||
android:inputType="numberDecimal"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textColorHint="#BCBCBC"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="#D8D8D8" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="62dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cancel_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/cancel_txt"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/line_v"
|
||||
android:layout_width="0.5dp"
|
||||
android:layout_height="42dp"
|
||||
android:background="#d8d8d8" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sumbit_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/sure_txt"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
76
tkgo/src/main/res/layout/dialog_select_action.xml
Normal file
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@drawable/shape_dialog_bg2"
|
||||
android:gravity="bottom"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/share"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/app_share"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="@color/dialog_input_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/check"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/app_invitetitle"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="@color/dialog_input_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/withdraw"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/app_withdrawtitle"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="@color/dialog_input_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/withdraw_apply"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/app_withdrawapply_title"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="@color/dialog_input_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bankinfo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/app_bankinfo_title"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textSize="20sp" />
|
||||
</LinearLayout>
|
||||
22
tkgo/src/main/res/layout/item_invite_records.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_invitecode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="@color/dialog_input_bg" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
59
tkgo/src/main/res/layout/item_withdraw_records.xml
Normal file
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_withdrawname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:textColor="@color/dialog_textcolor"
|
||||
android:textSize="16sp" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="right|center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingEnd="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_withdrawamount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="#4BCD6D"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_withdrawbalance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="#EF4723"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:background="@color/dialog_input_bg" />
|
||||
|
||||
</LinearLayout>
|
||||
5
tkgo/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
BIN
tkgo/src/main/res/mipmap-hdpi/ic_empty.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
tkgo/src/main/res/mipmap-hdpi/ic_pull_down.png
Normal file
|
After Width: | Height: | Size: 271 B |
BIN
tkgo/src/main/res/mipmap-xhdpi/ic_close.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
tkgo/src/main/res/mipmap-xhdpi/ic_email.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
tkgo/src/main/res/mipmap-xhdpi/ic_email1.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
tkgo/src/main/res/mipmap-xhdpi/ic_facebook.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
tkgo/src/main/res/mipmap-xhdpi/ic_hometo.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
tkgo/src/main/res/mipmap-xhdpi/ic_link.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
tkgo/src/main/res/mipmap-xhdpi/ic_menu.png
Normal file
|
After Width: | Height: | Size: 779 B |
BIN
tkgo/src/main/res/mipmap-xhdpi/ic_notify_email.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
tkgo/src/main/res/mipmap-xhdpi/ic_notify_normal.png
Normal file
|
After Width: | Height: | Size: 9.0 KiB |
BIN
tkgo/src/main/res/mipmap-xhdpi/ic_notify_shangla.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
tkgo/src/main/res/mipmap-xhdpi/ic_notify_xiala.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
tkgo/src/main/res/mipmap-xhdpi/ic_notifylogo.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
tkgo/src/main/res/mipmap-xhdpi/ic_shousuo.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
tkgo/src/main/res/mipmap-xhdpi/ic_tel.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
tkgo/src/main/res/mipmap-xhdpi/ic_whatsapp.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
tkgo/src/main/res/mipmap-xhdpi/ic_zhangkai.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
tkgo/src/main/res/mipmap-xxhdpi/hey_girl.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
54
tkgo/src/main/res/values-en/strings.xml
Normal file
@@ -0,0 +1,54 @@
|
||||
<resources>
|
||||
<string name="qsrlwmm_txt">Please Set Your Password</string>
|
||||
<string name="cancel_txt">Cancel</string>
|
||||
<string name="app_name">TkGo</string>
|
||||
<string name="sure_txt">Sure</string>
|
||||
<string name="banbengengxin_txt">New Version Update</string>
|
||||
<string name="xiacigengxin_txt">Next Update</string>
|
||||
<string name="lijigengxin_txt">Update Immediately</string>
|
||||
<string name="app_updater_error_notification_content">Click to close notification</string>
|
||||
<string name="app_updater_error_notification_content_re_download">Click to re-download</string>
|
||||
<string name="app_updater_error_notification_title">Download failed</string>
|
||||
<string name="app_updater_finish_notification_content">Click to install</string>
|
||||
<string name="app_updater_finish_notification_title">Download completed</string>
|
||||
<string name="app_updater_progress_notification_content">Downloading...</string>
|
||||
<string name="app_updater_progress_notification_title">Version update</string>
|
||||
<string name="app_updater_progress_notification_title_2">Downloading game</string>
|
||||
<string name="app_updater_start_notification_content">Getting download data...</string>
|
||||
<string name="app_updater_start_notification_title">Version update</string>
|
||||
<string name="app_updater_start_notification_title_2">Downloading game</string>
|
||||
<string name="notification_title_txt">Need to turn on mobile phone notification permission</string>
|
||||
<string name="notification_cancel_txt">Exit</string>
|
||||
<string name="notification_setting_txt">Setting</string>
|
||||
<string name="app_tishi">Tip</string>
|
||||
<string name="app_hint">Please enter the invitation code</string>
|
||||
<string name="app_sharetitle">My invitation code:</string>
|
||||
<string name="app_sharetitle2">Superior invitation code:</string>
|
||||
<string name="app_totalinvite">Total number of invites:</string>
|
||||
<string name="app_sharecontent">App download link:</string>
|
||||
<string name="app_share">Share</string>
|
||||
<string name="app_checklist">Check Invitation Records</string>
|
||||
<string name="app_invitetitle">Invitation Records</string>
|
||||
<string name="app_checklist_number">Total number of invitees: %d</string>
|
||||
<string name="app_nodata">No Data</string>
|
||||
<string name="app_withdrawtitle">Withdrawal Record</string>
|
||||
<string name="app_withdrawapply_title">Withdrawal Application</string>
|
||||
<string name="app_bankinfo_title">Edit Bank Card Information</string>
|
||||
<string name="app_bankinfo_countrycode">60</string>
|
||||
<string name="app_bankinfo_name">Name:</string>
|
||||
<string name="app_bankinfo_name_hint">Please enter the bank card name</string>
|
||||
<string name="app_bankinfo_code">Bank card account:</string>
|
||||
<string name="app_bankinfo_code_hint">Please enter the bank card account</string>
|
||||
<string name="app_bankinfo_bankcountry">Country:</string>
|
||||
<string name="app_bankinfo_bankcountry_hint">Please select a country</string>
|
||||
<string name="app_bankinfo_bankname">Bank Name:</string>
|
||||
<string name="app_bankinfo_bankname_hint">Please select a bank name</string>
|
||||
<string name="app_bankinfo_bankinfo_tips">Note: Please enter the country code before selecting the bank name!</string>
|
||||
<string name="app_balance">Balance: %s</string>
|
||||
<string name="app_totalearning">Total Earnings: %s</string>
|
||||
<string name="app_withdraw_amount">Amount: %s</string>
|
||||
<string name="app_withdraw_apply_hint">Please enter the withdrawal amount</string>
|
||||
<string name="app_toastapply">Withdrawal application has been submitted</string>
|
||||
<string name="app_toastloading">No additional data available for now</string>
|
||||
<string name="app_notify_title">NOTIFICATIONS</string>
|
||||
</resources>
|
||||
70
tkgo/src/main/res/values-night/themes.xml
Normal file
@@ -0,0 +1,70 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.Calculcator" parent="Theme.MaterialComponents.DayNight.DarkActionBar.Bridge">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_200</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/black</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_200</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
<style name="Theme.Calculcator1" parent="Theme.MaterialComponents.DayNight.DarkActionBar.Bridge">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_500</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_700</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<item name="android:windowFullscreen">true</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
<declare-styleable name="CircleImageView">
|
||||
<attr name="ease_border_color" format="color" />
|
||||
<attr name="ease_border_width" format="dimension" />
|
||||
<attr name="ease_press_alpha" format="integer" />
|
||||
<attr name="ease_press_color" format="color" />
|
||||
<attr name="ease_radius" format="dimension" />
|
||||
<attr name="es_shape_type" format="enum">
|
||||
<enum name="none" value="0" />
|
||||
<enum name="round" value="1" />
|
||||
<enum name="rectangle" value="2" />
|
||||
</attr>
|
||||
</declare-styleable>
|
||||
|
||||
|
||||
<!-- 注意:当前AppTheme主题,在values-v23中单独重复维护。原因是Android 6以下系统不支持设置
|
||||
系统状态栏颜色,如果按照设计,状态栏使用素色则在android6以下手机上就看不清系统状态栏文字了(
|
||||
因为系统文字是白色)。在values-v23表示当Android 23(即android 6)及以上版本将自动使用该目录
|
||||
下的主题(即 colorPrimaryDark 使用素色,从而跟标题栏颜色保持一致,实现沉浸式ui效果)。-->
|
||||
<style name="AppThemeStart" parent="@style/Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="android:windowTranslucentStatus">false</item>
|
||||
<item name="android:windowTranslucentNavigation">false</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="colorPrimary">@color/white</item>
|
||||
<item name="colorPrimaryDark">@color/white</item>
|
||||
<item name="colorAccent">@color/white</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<!-- 隐藏Activity窗口的Title标题栏 -->
|
||||
<item name="windowNoTitle">true</item>
|
||||
<!-- <item name="android:windowFullscreen">true</item>-->
|
||||
<!-- <item name="android:windowBackground">@drawable/splah_bg</item>-->
|
||||
<item name="android:windowBackground">@color/white</item>
|
||||
<!-- <item name="android:background">#aadcf5</item>-->
|
||||
|
||||
<item name="android:navigationBarColor">@color/white</item>
|
||||
<!-- <item name="android:windowBackground">@mipmap/big_bg</item>-->
|
||||
<item name="android:forceDarkAllowed" tools:ignore="NewApi">false</item>
|
||||
</style>
|
||||
</resources>
|
||||
22
tkgo/src/main/res/values/colors.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="purple_200">#FFFFFF</color>
|
||||
<color name="purple_500">#FFFFFF</color>
|
||||
<color name="purple_700">#FFFFFF</color>
|
||||
<color name="teal_200">#FF03DAC5</color>
|
||||
<color name="teal_700">#FF018786</color>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="jisuanqi">#EF4723</color>
|
||||
<color name="notify_color">#FFFFFF</color>
|
||||
|
||||
<color name="dialog_bg">#2C2C2E</color>
|
||||
<color name="dialog_textcolor">#FFA722</color>
|
||||
<color name="dialog_input_bg">#434343</color>
|
||||
<color name="dialog_dark">#BCBCBC</color>
|
||||
|
||||
<color name="notify_textcolor">#FFFFFF</color>
|
||||
<color name="notify_imagecolor">#BDDDB7</color>
|
||||
<color name="notify_jumplinkcolor">#C3B5D0</color>
|
||||
|
||||
</resources>
|
||||
76
tkgo/src/main/res/values/strings.xml
Normal file
@@ -0,0 +1,76 @@
|
||||
<resources>
|
||||
<string name="qsrlwmm_txt">请输入6位密码</string>
|
||||
<string name="app_name">TkGo</string>
|
||||
<string name="cancel_txt">取消</string>
|
||||
<string name="sure_txt">确定</string>
|
||||
<string name="banbengengxin_txt">版本更新</string>
|
||||
<string name="xiacigengxin_txt">下次更新</string>
|
||||
<string name="lijigengxin_txt">立即更新</string>
|
||||
<string name="app_updater_error_notification_content">点击关闭通知</string>
|
||||
<string name="app_updater_error_notification_content_re_download">点击重新下载</string>
|
||||
<string name="app_updater_error_notification_title">下载失败</string>
|
||||
<string name="app_updater_finish_notification_content">点击安装</string>
|
||||
<string name="app_updater_finish_notification_title">下载完成</string>
|
||||
<string name="app_updater_progress_notification_content">正在下载…</string>
|
||||
<string name="app_updater_progress_notification_title">版本更新</string>
|
||||
<string name="app_updater_progress_notification_title_2">下载游戏中</string>
|
||||
<string name="app_updater_start_notification_title">版本更新</string>
|
||||
<string name="app_updater_start_notification_title_2">下载游戏中</string>
|
||||
<string name="app_updater_start_notification_content">正在获取下载数据…</string>
|
||||
<string name="notification_title_txt">需要打开手机通知权限</string>
|
||||
<string name="notification_cancel_txt">退出</string>
|
||||
<string name="notification_setting_txt">设置</string>
|
||||
<string name="app_tishi">提示</string>
|
||||
<string name="app_hint">请输入邀请码</string>
|
||||
<string name="app_sharetitle">我的邀请码:</string>
|
||||
<string name="app_sharetitle2">上级邀请码:</string>
|
||||
<string name="app_totalinvite">总邀请人数:</string>
|
||||
<string name="app_sharecontent">邀请您下载:</string>
|
||||
<string name="app_share">分享</string>
|
||||
<string name="app_checklist">查看邀请记录</string>
|
||||
<string name="app_invitetitle">邀请记录</string>
|
||||
<string name="app_checklist_number">总邀请人数: %d</string>
|
||||
<string name="app_nodata">暂无数据</string>
|
||||
<string name="app_withdrawtitle">提现记录</string>
|
||||
<string name="app_withdrawapply_title">提现申请</string>
|
||||
<string name="app_bankinfo_title">编辑银行卡信息</string>
|
||||
<string name="app_bankinfo_countrycode">86</string>
|
||||
<string name="app_bankinfo_name">持卡人姓名:</string>
|
||||
<string name="app_bankinfo_name_hint">请输入持卡人姓名</string>
|
||||
<string name="app_bankinfo_bankcountry">国家地区:</string>
|
||||
<string name="app_bankinfo_bankcountry_hint">请选择国家地区</string>
|
||||
<string name="app_bankinfo_bankname">开户行名称:</string>
|
||||
<string name="app_bankinfo_bankname_hint">请选择开户行名称</string>
|
||||
<string name="app_bankinfo_code">银行户口:</string>
|
||||
<string name="app_bankinfo_code_hint">请输入银行卡户口</string>
|
||||
<string name="app_bankinfo_bankinfo_tips">(注:请先输入国家区号再选择开户行名称!)</string>
|
||||
<string name="app_balance">余额: %s</string>
|
||||
<string name="app_totalearning">总收益: %s</string>
|
||||
<string name="app_withdraw_amount">金额: %s</string>
|
||||
<string name="app_withdraw_apply_hint">请输入提现金额</string>
|
||||
<string name="app_toastapply">提现申请已提交</string>
|
||||
<string name="app_toastloading">暂无更多数据</string>
|
||||
<string name="app_notify_title">通知</string>
|
||||
<!-- <string name="app_name">SPEEDAU</string>-->
|
||||
<!-- <string name="qsrlwmm_txt">Please Set Your Password</string>-->
|
||||
<!-- <string name="cancel_txt">Cancel</string>-->
|
||||
<!-- <string name="sure_txt">Sure</string>-->
|
||||
<!-- <string name="banbengengxin_txt">New Version Update</string>-->
|
||||
<!-- <string name="xiacigengxin_txt">Next Update</string>-->
|
||||
<!-- <string name="lijigengxin_txt">Update Immediately</string>-->
|
||||
<!-- <string name="app_updater_error_notification_content">Click to close notification</string>-->
|
||||
<!-- <string name="app_updater_error_notification_content_re_download">Click to re-download</string>-->
|
||||
<!-- <string name="app_updater_error_notification_title">Download failed</string>-->
|
||||
<!-- <string name="app_updater_finish_notification_content">Click to install</string>-->
|
||||
<!-- <string name="app_updater_finish_notification_title">Download completed</string>-->
|
||||
<!-- <string name="app_updater_progress_notification_content">Downloading...</string>-->
|
||||
<!-- <string name="app_updater_progress_notification_title">Version update</string>-->
|
||||
<!-- <string name="app_updater_progress_notification_title_2">Downloading game</string>-->
|
||||
<!-- <string name="app_updater_start_notification_content">Getting download data...</string>-->
|
||||
<!-- <string name="app_updater_start_notification_title">Version update</string>-->
|
||||
<!-- <string name="app_updater_start_notification_title_2">Downloading game</string>-->
|
||||
<!-- <string name="notification_title_txt">Need to turn on mobile phone notification permission</string>-->
|
||||
<!-- <string name="notification_cancel_txt">Cancel</string>-->
|
||||
<!-- <string name="notification_setting_txt">Setting</string>-->
|
||||
|
||||
</resources>
|
||||
88
tkgo/src/main/res/values/themes.xml
Normal file
@@ -0,0 +1,88 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.AppTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar.Bridge">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_500</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_700</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
<style name="Theme.Calculcator1" parent="Theme.MaterialComponents.DayNight.DarkActionBar.Bridge">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_500</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_700</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<item name="android:windowFullscreen">true</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
|
||||
<declare-styleable name="CircleImageView">
|
||||
<attr name="ease_border_color" format="color" />
|
||||
<attr name="ease_border_width" format="dimension" />
|
||||
<attr name="ease_press_alpha" format="integer" />
|
||||
<attr name="ease_press_color" format="color" />
|
||||
<attr name="ease_radius" format="dimension" />
|
||||
<attr name="es_shape_type" format="enum">
|
||||
<enum name="none" value="0" />
|
||||
<enum name="round" value="1" />
|
||||
<enum name="rectangle" value="2" />
|
||||
</attr>
|
||||
</declare-styleable>
|
||||
|
||||
|
||||
<!-- 注意:当前AppTheme主题,在values-v23中单独重复维护。原因是Android 6以下系统不支持设置
|
||||
系统状态栏颜色,如果按照设计,状态栏使用素色则在android6以下手机上就看不清系统状态栏文字了(
|
||||
因为系统文字是白色)。在values-v23表示当Android 23(即android 6)及以上版本将自动使用该目录
|
||||
下的主题(即 colorPrimaryDark 使用素色,从而跟标题栏颜色保持一致,实现沉浸式ui效果)。-->
|
||||
<style name="AppThemeStart" parent="@style/Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="android:windowTranslucentStatus">false</item>
|
||||
<item name="android:windowTranslucentNavigation">false</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="colorPrimary">@color/white</item>
|
||||
<item name="colorPrimaryDark">@color/white</item>
|
||||
<item name="colorAccent">@color/white</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<!-- 隐藏Activity窗口的Title标题栏 -->
|
||||
<item name="windowNoTitle">true</item>
|
||||
<!-- <item name="android:windowFullscreen">true</item>-->
|
||||
<!-- <item name="android:windowBackground">@drawable/splah_bg</item>-->
|
||||
<item name="android:windowBackground">#FFFFFF</item>
|
||||
<!-- <item name="android:background">#aadcf5</item>-->
|
||||
<item name="android:navigationBarColor">#FFFFFF</item>
|
||||
<!-- <item name="android:windowBackground">@mipmap/big_bg</item>-->
|
||||
<item name="android:forceDarkAllowed" tools:ignore="NewApi">false</item>
|
||||
</style>
|
||||
|
||||
<style name="MaterialDesignDialog" parent="@style/Theme.AppCompat.Dialog">
|
||||
<!-- 背景透明 -->
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<!-- 浮于Activity之上 -->
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<!-- 边框 -->
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<!-- Dialog以外的区域模糊效果 -->
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
<!-- 无标题 -->
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<!-- 半透明 -->
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowCloseOnTouchOutside">true</item>
|
||||
</style>
|
||||
</resources>
|
||||
10
tkgo/src/main/res/xml/app_updater_paths.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<paths>
|
||||
<root-path name="app_root_path" path="/"/>
|
||||
<external-path name="app_external_path" path="/"/>
|
||||
<external-cache-path name="app_external_cache_path" path="/"/>
|
||||
<external-files-path name="app_external_files_path" path="/"/>
|
||||
<files-path name="app_files_path" path="/"/>
|
||||
<cache-path name="app_cache_path" path="/"/>
|
||||
|
||||
</paths>
|
||||
4
tkgo/src/main/res/xml/network_security_config.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config>
|
||||
<base-config cleartextTrafficPermitted="true" />
|
||||
</network-security-config>
|
||||
13
tkgo/src/main/res/xml/provider_paths.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding= "utf-8"?>
|
||||
<resources>
|
||||
<paths >
|
||||
<external-path name="external_files" path="."/>
|
||||
<root-path name="root" path="." />
|
||||
<files-path name="files" path="." />
|
||||
<cache-path name="cache" path="." />
|
||||
<external-files-path name="external_files_f" path="." />
|
||||
<external-cache-path name="external_cache" path="." />
|
||||
</paths >
|
||||
</resources>
|
||||
<!-- 适配7.0及其以上,配合com.eva.android.OpenFileUtil,用于解决调用系统Intent查看大文件内
|
||||
容、拍照保存图片的功能时出现"android.os.FileUriExposedException"异常的问题 -->
|
||||