3.5日 再提交一次备份

This commit is contained in:
xuhuixiang
2026-03-05 15:39:40 +08:00
parent 8909d2ec4f
commit 90d783f2e8
309 changed files with 9901 additions and 9 deletions

View File

@@ -0,0 +1,29 @@
{
"project_info": {
"project_number": "722866808349",
"project_id": "xhuat-7da8d",
"storage_bucket": "xhuat-7da8d.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:722866808349:android:d96ba99e4c161682d848f4",
"android_client_info": {
"package_name": "com.xyz.xhuat"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyBR0nae-jXRJuX1e8a-53fWuZYQZKC1jlI"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

View File

@@ -49,7 +49,7 @@ public class MainActivity extends MainActivity2 {
}
/**
* 基础配置都在这里
* 基础配置都在这里 cucislot365 freecredit66
* 不要动 都在 app_config.xml中修改
*/
private void initConfig() {

2
atm/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/build
/release

80
atm/build.gradle Normal file
View File

@@ -0,0 +1,80 @@
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
}
android {
compileSdkVersion 31
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.xyz.atmpad"
minSdkVersion 24
targetSdkVersion 31
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
debug {
storeFile file('justlet.jks')
storePassword "123456"
keyAlias 'key0'
keyPassword "123456"
}
release {
storeFile file('justlet.jks')
storePassword "123456"
keyAlias 'key0'
keyPassword "123456"
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
applicationVariants.all { variant ->
variant.outputs.all {
// def appName = "meemee99"
def appName = "atmiufgdshgdfshgdfkjdghjksdf"
def outputDir = new File(rootProject.ext.outputPath)
// 创建输出目录
outputDir.mkdirs()
def outputFileName = "${appName}.apk"
// 设置输出文件名
setOutputFileName(outputFileName)
// 计算新的输出文件
def newOutputFile = new File(outputDir, outputFileName)
// 如果新的输出目录不存在,则创建它
newOutputFile.parentFile.mkdirs()
// 在构建完成后将 APK 复制到新位置
variant.assemble.doLast {
try {
java.nio.file.Files.copy(
outputFile.toPath(),
newOutputFile.toPath(),
java.nio.file.StandardCopyOption.REPLACE_EXISTING
)
println "Success to copy APK !!!"
} catch (java.io.IOException e) {
println "Failed to copy APK: ${e.message}"
}
}
}
}
}
dependencies {
implementation project(path: ':base_theme')
}

29
atm/google-services.json Normal file
View File

@@ -0,0 +1,29 @@
{
"project_info": {
"project_number": "862034870100",
"project_id": "atmpad-86d01",
"storage_bucket": "atmpad-86d01.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:862034870100:android:b562f3fb2f93db1dc1d2c1",
"android_client_info": {
"package_name": "com.xyz.atmpad"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyBvrIlyL6N8n3PcTQMc0pmQoGT4SsX0hPs"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}

BIN
atm/justlet.jks Normal file

Binary file not shown.

32
atm/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,32 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-dontwarn dalvik.**
-dontwarn com.tencent.smtt.**
-keep class com.tencent.smtt.** {
*;
}
-keep class com.tencent.tbs.** {
*;
}

View File

@@ -0,0 +1,26 @@
package Tptogiar.calculcator;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("Tptogiar.calculcator", appContext.getPackageName());
}
}

View File

@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xyz.atmpad">
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.camera2"
android:required="false" />
<!-- <uses-permission android:name="android.permission.READ_CONTACTS" />-->
<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" />
<uses-permission android:name="android.permission.VIBRATE" />
<!-- <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />-->
<!-- 多媒体相关 -->
<uses-permission android:name="android.permission.CAMERA" />
<!-- 8.0+系统需要-->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!--推送权限-->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<queries>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
</queries>
<application
android:name=".WebApplication"
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="@mipmap/app_logo"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/app_logo"
android:supportsRtl="true"
android:theme="@style/Theme.AppTheme"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="true"
android:hardwareAccelerated="true"
android:theme="@style/AppThemeStart">
<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>
<!-- <service-->
<!-- android:name="com.tencent.smtt.export.external.DexClassLoaderProviderService"-->
<!-- android:label="dexopt"-->
<!-- android:process=":dexopt" />-->
<service
android:name=".MyFirebaseMessageingService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@mipmap/app_logo" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/notify_color" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="@string/app_name" />
</application>
</manifest>

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

View File

@@ -0,0 +1,82 @@
package com.xyz.atmpad;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import com.web.base.LogUtils;
import com.web.base.MainActivity2;
import com.google.firebase.messaging.FirebaseMessaging;
public class MainActivity extends MainActivity2 {
@Override
protected void onCreate(Bundle savedInstanceState) {
initConfig();
super.onCreate(savedInstanceState);
initWinwdowLogoConfig();
registerFCM();
}
/**
* 注册FCM
*/
private void registerFCM() {
//订阅主题
try {
FirebaseMessaging.getInstance().subscribeToTopic("demo")
.addOnCompleteListener(task -> {
String msg = "Subscribed";
if (!task.isSuccessful()) {
msg = "Subscribe failed";
}
LogUtils.i("结果:"+msg);
});
}catch (Exception e){
e.printStackTrace();
}
}
/**
* 用于修改大背景渐变色 不设置
* 大背景就是 windows_color 的颜色
* 不要动 都在 app_config.xml中修改
*/
private void initWinwdowLogoConfig() {
setBackDrawables(R.drawable.big_bg);
setImageView(getString(R.string.is_round).equals("1"));
}
/**
* 基础配置都在这里
* 不要动 都在 app_config.xml中修改
*/
private void initConfig() {
//===========================以下是APP的配置信息 都写在 app_config.xml中==================================
userId = Integer.parseInt(getString(R.string.userId));
saveInt(MainActivity.this,"user_code",userId);
saveInt(MainActivity.this,"version_code",getVersion());
saveString(this, "base_url",getString(R.string.base_url));
//网页的底部NavigationBar颜色
saveInt(this, "style_color_int", getColor(R.color.style_color));
//页面的大背景颜色
saveInt(this, "windows_color_int", getColor(R.color.windows_color));
//任务栏的文字颜色 0 黑 1白 默认黑
saveInt(MainActivity.this,"is_white",Integer.parseInt(getString(R.string.is_white)));
saveInt(MainActivity.this,"hasContact",Integer.parseInt(getString(R.string.has_contact)));
//===========================以上是APP的配置信息 都写在 app_config.xml中==================================
}
public int getVersion(){
try {
PackageManager packageManager = getPackageManager();
PackageInfo packageInfo = packageManager.getPackageInfo(getPackageName(), 0);
int versionCode = packageInfo.versionCode; // 版本码
return versionCode;
} catch (PackageManager.NameNotFoundException e) {
return 0;
}
}
}

View File

@@ -0,0 +1,125 @@
package com.xyz.atmpad;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import androidx.annotation.NonNull;
import androidx.core.app.NotificationCompat;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
import com.google.gson.Gson;
import com.web.base.GsonUtils;
import com.web.base.MessageInfo;
import java.util.Map;
import java.util.Random;
public class MyFirebaseMessageingService extends FirebaseMessagingService {
public MyFirebaseMessageingService() {
}
@Override
public void onMessageReceived(@NonNull RemoteMessage remoteMessage) {
super.onMessageReceived(remoteMessage);
Map<String, String> serviceData = remoteMessage.getData(); //后台推送数据
if (serviceData != null && serviceData.containsKey("message")) {
String value = serviceData.get("message");
Gson gson = new Gson();
MessageInfo messageInfo = gson.fromJson(value, MessageInfo.class);
showNotification(messageInfo);
} else {
//收到通知 创建notify
if (remoteMessage.getNotification() != null) {
showNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody());
}
}
}
private void showNotification(MessageInfo messageInfo) {
Intent notifyIntent = new Intent(this, MainActivity.class);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) {
ComponentName launchComponent = null;
launchComponent = getApplication()
.getPackageManager()
.getLaunchIntentForPackage(getApplication().getPackageName())
.getComponent();
notifyIntent.setComponent(launchComponent);
}
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
notifyIntent.setAction(Intent.ACTION_VIEW);
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须
notifyIntent.putExtra("message", messageInfo);
PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE);
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
NotificationChannel channelwinway = null;
NotificationCompat.Builder notificationBuilder = null;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
channelwinway = new NotificationChannel(getString(com.web.base.R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT);
channelwinway.enableLights(true);
channelwinway.enableVibration(true);
notificationManager.createNotificationChannel(channelwinway);
notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId())
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(messageInfo.getTitle())
.setContentText(messageInfo.getContent())
.setAutoCancel(true)
.setContentIntent(pendingIntent);
} else {
notificationBuilder = new NotificationCompat.Builder(this, getString(com.web.base.R.string.app_name))
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(messageInfo.getTitle())
.setContentText(messageInfo.getContent())
.setAutoCancel(true)
.setContentIntent(pendingIntent);
}
notificationManager.notify(0, notificationBuilder.build());
}
private void showNotification(String title, String body) {
Intent notifyIntent = new Intent(this, MainActivity.class);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) {
ComponentName launchComponent = null;
launchComponent = getApplication()
.getPackageManager()
.getLaunchIntentForPackage(getApplication().getPackageName())
.getComponent();
notifyIntent.setComponent(launchComponent);
}
notifyIntent.putExtra("message", body);
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
notifyIntent.setAction(Intent.ACTION_VIEW);
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须
PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE);
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
NotificationChannel channelwinway = null;
NotificationCompat.Builder notificationBuilder = null;
MessageInfo messageInfo = GsonUtils.getObjFromJSON(body, MessageInfo.class);
if (messageInfo != null) {
body = messageInfo.getContent();
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
channelwinway = new NotificationChannel(getString(com.web.base.R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT);
channelwinway.enableLights(true);
channelwinway.enableVibration(true);
notificationManager.createNotificationChannel(channelwinway);
notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId())
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(title)
.setContentText(body)
.setAutoCancel(true)
.setContentIntent(pendingIntent);
} else {
notificationBuilder = new NotificationCompat.Builder(this, getString(com.web.base.R.string.app_name))
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(title)
.setContentText(body)
.setAutoCancel(true)
.setContentIntent(pendingIntent);
}
notificationManager.notify(0, notificationBuilder.build());
}
}

View File

@@ -0,0 +1,16 @@
package com.xyz.atmpad;
import android.app.Application;
import android.content.Context;
public class WebApplication extends Application {
public static Context application;
@Override
public void onCreate() {
super.onCreate();
// 设置开启优化方案
application = this;
}
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="270"
android:startColor="@color/windows_color"
android:endColor="@color/style_color"/>
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

View File

@@ -0,0 +1,52 @@
<resources>
<!-- <string name="app_name">SlotKaki33</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">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>
</resources>

View 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/windows_color</item>
<item name="colorPrimaryDark">@color/windows_color</item>
<item name="colorAccent">@color/windows_color</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:navigationBarColor">@color/style_color</item>
<!-- <item name="android:windowBackground">@mipmap/big_bg</item>-->
<item name="android:forceDarkAllowed" tools:ignore="NewApi">false</item>
<item name="android:windowBackground">@drawable/big_bg</item>
</style>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--需要修改的配置项都在这里了-->
<!--APP名字-->
<string name="app_name">ATM</string>
<!--唯一ID-->
<string name="userId">244</string>
<!--初始域名-->
<string name="base_url">https://game.atmpad.com/</string>
<!--任务栏的文字颜色 0 黑 1白 默认黑-->
<string name="is_white">1</string>
<!--启动页logo 0 原图显示 1 强制修改为原型图片logo-->
<string name="is_round">0</string>
<!--是否需要通讯录权限 1 要 0 不要-->
<string name="has_contact">0</string>
<!--底部操作栏色调-->
<color name="style_color">#130f0b</color>
<!--整体背景色调 style_color和windows_color 一致 就是纯色 不然就是 w-s的上下渐变色-->
<color name="windows_color">#1a120b</color>
</resources>

View File

@@ -0,0 +1,16 @@
<?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">#1251a1</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>
</resources>

View File

@@ -0,0 +1,53 @@
<resources>
<string name="qsrlwmm_txt">请输入6位密码</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>
</resources>

View File

@@ -0,0 +1,90 @@
<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. -->
<item name="android:windowBackground">#000000</item>
</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/windows_color</item>
<item name="colorPrimaryDark">@color/windows_color</item>
<item name="colorAccent">@color/windows_color</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:navigationBarColor">@color/style_color</item>
<!-- <item name="android:windowBackground">@mipmap/big_bg</item>-->
<item name="android:forceDarkAllowed" tools:ignore="NewApi">false</item>
<item name="android:windowBackground">@drawable/big_bg</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>

View 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>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true" />
</network-security-config>

View 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"异常的问题 -->

View File

@@ -0,0 +1,35 @@
package Tptogiar.calculcator;
import org.junit.Test;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
@Test
public void TestPattern(){
//
Pattern compile = Pattern.compile( "^(\\-|\\+)?\\d+(\\.\\d+)?$");
String a="+45.5";
boolean matches = compile.matcher(a).matches();
System.out.println(matches);
String result = compile.matcher(a).replaceAll("");
System.out.println(result);
}
}

1
base_player/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build

27
base_player/build.gradle Normal file
View File

@@ -0,0 +1,27 @@
plugins {
id 'com.android.library'
}
android {
compileSdkVersion 31
defaultConfig {
minSdkVersion 24
targetSdkVersion 31
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
api 'androidx.appcompat:appcompat:1.1.0'
api 'com.google.android.material:material:1.1.0'
api 'androidx.constraintlayout:constraintlayout:1.1.3'
api("com.github.bumptech.glide:glide:4.13.1")
}

32
base_player/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,32 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-dontwarn dalvik.**
-dontwarn com.tencent.smtt.**
-keep class com.tencent.smtt.** {
*;
}
-keep class com.tencent.tbs.** {
*;
}

View File

@@ -0,0 +1,26 @@
package Tptogiar.calculcator;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("Tptogiar.calculcator", appContext.getPackageName());
}
}

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.web.base">
<application>
</application>
</manifest>

View File

@@ -0,0 +1,321 @@
package com.web.base;
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();
}
}

View File

@@ -0,0 +1,29 @@
package com.web.base;
public class ContactBean {
public String name;
public String phone;
public ContactBean(String name, String phone) {
this.name = name;
this.phone = phone;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
}

View File

@@ -0,0 +1,146 @@
package com.web.base;
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 = 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);
}
}

View File

@@ -0,0 +1,712 @@
package com.web.base;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
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.Message;
import android.util.Log;
import android.view.View;
import android.view.WindowManager;
import android.webkit.ConsoleMessage;
import android.webkit.DownloadListener;
import android.webkit.PermissionRequest;
import android.webkit.SslErrorHandler;
import android.webkit.ValueCallback;
import android.webkit.WebChromeClient;
import android.webkit.WebChromeClient.FileChooserParams;
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.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
public class MainActivity2 extends AppCompatActivity {
public WebView webView;
TextView tvErrorMsg;
LinearLayout layoutError;
public ImageView show_top_v;
public ImageView showTopV1;
private LinearLayout showTopLy;
private View xCustomView;
private FrameLayout videoFullView;
private WebChromeClient.CustomViewCallback xCustomViewCallback;
private View topVvvv;
private ProgressBar progressBar;
public static String url = "https://candy916.co/";
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@Override
protected void onCreate(Bundle savedInstanceState) {
if (getInt(MainActivity2.this, "style_color_int", 0) != 0) {
getWindow().setNavigationBarColor(getInt(MainActivity2.this, "style_color_int", 0));
}
if (getInt(MainActivity2.this, "windows_color_int", 0) != 0) {
getWindow().getDecorView().setBackgroundColor(getInt(MainActivity2.this, "windows_color_int", 0));
}
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());
webView.loadUrl(getString(this, "base_url", "https://www.javrate.com/"));
}
public void setBackDrawables(int drawableId) {
showTopLy.setBackgroundResource(drawableId);
}
/**
* 显示圆角还是 原样显示
*
* @param isRound
*/
public void setImageView(boolean isRound) {
if (isRound) {
show_top_v.setVisibility(View.VISIBLE);
showTopV1.setVisibility(View.GONE);
} else {
show_top_v.setVisibility(View.GONE);
showTopV1.setVisibility(View.VISIBLE);
}
}
@Override
public void onBackPressed() {
if (webView.canGoBack()) {//当webview有多级能返回的时候
while (webView.canGoBack()) {
webView.goBack();
}
} else {
if (inCustomView()) {
hideCustomView();
} else {
webView.loadUrl("about:blank");
//不能返回了 关闭进程 退出程序
Intent homeIntent = new Intent(Intent.ACTION_MAIN);
homeIntent.addCategory(Intent.CATEGORY_HOME);
homeIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(homeIntent);
android.os.Process.killProcess(android.os.Process.myPid());
System.exit(1);
}
}
}
/**
* 全屏时按返加键执行退出全屏方法
*/
public void hideCustomView() {
webChromeClient.onHideCustomView();
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
/**
* 判断是否是全屏
*
* @return
*/
public boolean inCustomView() {
return (xCustomView != null);
}
@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);
videoFullView = (FrameLayout) findViewById(R.id.video_fullView);
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);
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.addJavascriptInterface(new JsInterface(), "WebViewHook");
showTopLy.setBackgroundColor(Color.parseColor(getString(MainActivity2.this, "windows_color", "#FFFFFF")));
webView.setDownloadListener(new DownloadListener() {
@Override
public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimeType, long contentLength) {
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();
}
}
});
LogUtils.i("userAgent:" + webView.getSettings().getUserAgentString());
}
private void enterImmersiveMode() {
getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN
);
// // 隐藏状态栏
// getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
// WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
private void exitImmersiveMode() {
if (getInt(MainActivity2.this, "style_color_int", 0) != 0) {
getWindow().setNavigationBarColor(getInt(MainActivity2.this, "style_color_int", 0));
}
if (getInt(MainActivity2.this, "windows_color_int", 0) != 0) {
getWindow().getDecorView().setBackgroundColor(getInt(MainActivity2.this, "windows_color_int", 0));
}
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
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);
}
}
Handler handler = new Handler();
// WebView webViews;
WebViewClient webViewClient = new WebViewClient() {
@Override
public void onPageStarted(WebView webView, String s, Bitmap bitmap) {
super.onPageStarted(webView, s, bitmap);
}
@Override
public void onPageFinished(WebView webView, String s) {
super.onPageFinished(webView, s);
LogUtils.i("URL是啥加载完成" + webView.getUrl());
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), 1000);
}
if (webView.getUrl().equals(url + "index") || webView.getUrl().equals(url + "/index")) {
isAtGame = false;
topVvvv.setVisibility(View.GONE);
} else {
if (isAtGame) {
topVvvv.setVisibility(View.VISIBLE);
} else {
topVvvv.setVisibility(View.GONE);
}
}
}
@Override
public WebResourceResponse shouldInterceptRequest(WebView webView, String s) {
return super.shouldInterceptRequest(webView, s);
}
@Override
public WebResourceResponse shouldInterceptRequest(WebView webView, WebResourceRequest webResourceRequest) {
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) {
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.GONE);
}
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) {
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.GONE);
}
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() {
webView.setVisibility(View.VISIBLE);
layoutError.setVisibility(View.GONE);
showTopLy.setVisibility(View.GONE);
}
boolean isAtGame = false;
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) {
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);
return false;
}
});
WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj;
transport.setWebView(newWebView);
resultMsg.sendToTarget();
return true;
}
@Override
public void onShowCustomView(View view, CustomViewCallback callback) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
webView.setVisibility(View.INVISIBLE);
// 如果一个视图已经存在,那么立刻终止并新建一个
if (xCustomView != null) {
callback.onCustomViewHidden();
return;
}
videoFullView.addView(view);
xCustomView = view;
xCustomViewCallback = callback;
videoFullView.setVisibility(View.VISIBLE);
enterImmersiveMode();
}
// 视频播放退出全屏会被调用的
@Override
public void onHideCustomView() {
if (xCustomView == null)// 不是全屏播放状态
return;
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
xCustomView.setVisibility(View.GONE);
videoFullView.removeView(xCustomView);
xCustomView = null;
videoFullView.setVisibility(View.GONE);
xCustomViewCallback.onCustomViewHidden();
webView.setVisibility(View.VISIBLE);
exitImmersiveMode();
}
@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.GONE);
}
}
// @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;
}
};
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 1111:
if (grantResults[0] == PackageManager.PERMISSION_GRANTED && permissionRequest != null) {
permissionRequest.grant(permissionRequest.getResources());
}
break;
}
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
}
@Override
public void onDestroy() {
super.onDestroy();
videoFullView.removeAllViews();
webView.loadUrl("about:blank");
webView.stopLoading();
webView.setWebChromeClient(null);
webView.setWebViewClient(null);
webView.destroy();
webView = null;
}
@Override
protected void onResume() {
super.onResume();
webView.onResume();
webView.resumeTimers();
/**
* 设置为横屏
*/
if (getRequestedOrientation() != ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
}
@Override
protected void onPause() {
super.onPause();
webView.onPause();
webView.pauseTimers();
}
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);
}
public static void saveString(Context context, String key, String value) {
SharedPreferences sp = context.getSharedPreferences("InitApp", Activity.MODE_PRIVATE);
SharedPreferences.Editor editor = sp.edit();
editor.putString(key, value);
editor.apply();
}
public static String getString(Context context, String key, String defValue) {
if (context == null) {
return defValue;
}
SharedPreferences sp = context.getSharedPreferences("InitApp", Activity.MODE_PRIVATE);
return sp.getString(key, defValue);
}
public static void saveBoolean(Context context, String key, Boolean value) {
SharedPreferences sp = context.getSharedPreferences("InitApp", Activity.MODE_PRIVATE);
SharedPreferences.Editor editor = sp.edit();
editor.putBoolean(key, value);
editor.apply();
}
public static Boolean getBoolean(Context context, String key, Boolean defValue) {
if (context == null) {
return defValue;
}
SharedPreferences sp = context.getSharedPreferences("InitApp", Activity.MODE_PRIVATE);
return sp.getBoolean(key, defValue);
}
}

View File

@@ -0,0 +1,44 @@
package com.web.base;
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();
}
}

View 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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

View 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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

View 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>

View 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="#ED9121"
android:centerColor="#FFD700"
android:endColor="#FFFFFF"
android:centerY="0.50" />
</shape>
</animated-rotate>

View 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>

View 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>

View 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>

View 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="4dp" />
<solid android:color="@color/style_color" />
</shape>

View File

@@ -0,0 +1,409 @@
<?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">
<RelativeLayout
android:id="@+id/top_vvvv"
android:layout_width="match_parent"
android:layout_height="40dp"
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/app_logo" />
</RelativeLayout>
<!-- webview 全屏状态 start -->
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_below="@id/top_vvvv">-->
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
<!-- android:id="@+id/layouttop_config"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:gravity="center_vertical"-->
<!-- android:visibility="gone"-->
<!-- app:layout_constraintTop_toTopOf="parent">-->
<!-- <ImageView-->
<!-- android:id="@+id/iv_topconfig"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:background="@color/color_red"-->
<!-- android:minHeight="80dp"-->
<!-- app:layout_constraintTop_toTopOf="parent" />-->
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="horizontal"-->
<!-- android:layout_marginBottom="10dp"-->
<!-- app:layout_constraintBottom_toBottomOf="@+id/iv_topconfig">-->
<!-- <TextView-->
<!-- android:id="@+id/home"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:gravity="center"-->
<!-- android:paddingStart="5dp"-->
<!-- android:paddingEnd="5dp"-->
<!-- android:text="Home"-->
<!-- android:textColor="@android:color/white"-->
<!-- android:textSize="20sp"-->
<!-- android:textStyle="bold" />-->
<!-- <TextView-->
<!-- android:id="@+id/tv_other"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginStart="10dp"-->
<!-- android:gravity="center"-->
<!-- android:paddingStart="5dp"-->
<!-- android:paddingEnd="5dp"-->
<!-- android:text="Miss AV"-->
<!-- android:textColor="@android:color/white"-->
<!-- android:textSize="20sp"-->
<!-- android:textStyle="bold" />-->
<!-- </LinearLayout>-->
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
<!-- <com.tencent.smtt.sdk.WebView-->
<!-- android:id="@+id/webview"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="0dp"-->
<!-- app:layout_constraintBottom_toTopOf="@+id/bottom_v"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/layouttop_config"-->
<!-- app:layout_goneMarginTop="40dp" />-->
<!-- <View-->
<!-- android:id="@+id/bottom_v"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="0dp"-->
<!-- app:layout_constraintBottom_toBottomOf="parent" />-->
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
<!-- webview 全屏状态 end -->
<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/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="@string/agentweb_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>
<androidx.cardview.widget.CardView
android:id="@+id/bt_otherapp"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_marginTop="90dp"
android:layout_marginRight="20dp"
android:visibility="invisible"
app:cardBackgroundColor="@color/dialog_bg"
app:cardCornerRadius="50dp">
<ImageView
android:id="@+id/iv_otherApp"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center"
android:src="@mipmap/ic_shousuo" />
</androidx.cardview.widget.CardView>
<!-- 分享的app -->
<LinearLayout
android:id="@+id/layout_otherapp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/bt_otherapp"
android:layout_alignStart="@+id/bt_otherapp"
android:layout_alignEnd="@+id/bt_otherapp"
android:layout_marginTop="10dp"
android:gravity="center_horizontal"
android:orientation="vertical"
android:visibility="visible">
<androidx.cardview.widget.CardView
android:id="@+id/iv_home"
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@android:color/white"
android:visibility="gone"
app:cardCornerRadius="50dp"
app:cardElevation="0dp">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@mipmap/ic_hometo" />
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/cv_share"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:visibility="gone"
app:cardBackgroundColor="@color/black"
app:cardCornerRadius="50dp"
app:cardElevation="2dp">
<ImageView
android:id="@+id/iv_share"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp"
android:scaleType="centerInside"
android:src="@mipmap/share_img"/>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/iv_link"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:visibility="gone"
app:cardBackgroundColor="@color/black"
app:cardCornerRadius="50dp"
app:cardElevation="2dp">
<ImageView
android:id="@+id/iv_linkbg"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<TextView
android:id="@+id/tv_link"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
android:gravity="center"
android:lines="1"
android:ellipsize="middle"
android:text="MISSAV"
android:textColor="@color/white"
android:textSize="12sp"
android:textStyle="bold" />
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/iv_facebook"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:background="@android:color/white"
android:visibility="gone"
app:cardCornerRadius="50dp"
app:cardElevation="0dp">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@mipmap/ic_facebook" />
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/iv_whatsapp"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:background="@android:color/white"
android:visibility="gone"
app:cardCornerRadius="50dp"
app:cardElevation="0dp">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@mipmap/ic_whatsapp" />
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/iv_tel"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:background="@android:color/white"
android:visibility="gone"
app:cardCornerRadius="50dp"
app:cardElevation="0dp">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@mipmap/ic_tel" />
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/bt_notifyitem"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:background="@android:color/black"
app:cardBackgroundColor="@color/dialog_bg"
android:visibility="gone"
app:cardCornerRadius="50dp"
app:cardElevation="0dp">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:padding="10dp"
android:src="@mipmap/ic_email1" />
</androidx.cardview.widget.CardView>
</LinearLayout>
<androidx.cardview.widget.CardView
android:id="@+id/bt_notify"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginStart="20dp"
android:layout_marginTop="160dp"
android:visibility="gone"
app:cardBackgroundColor="@color/black"
app:cardCornerRadius="50dp">
<ImageView
android:id="@+id/iv_notify"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center"
android:src="@mipmap/ic_email" />
</androidx.cardview.widget.CardView>
<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:visibility="visible">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="4"
android:orientation="vertical"
android:gravity="center">
<com.web.base.CircleImageView
android:id="@+id/show_top_v"
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@mipmap/app_logo"
android:visibility="visible"
app:ease_border_color="#EEEEEE"
app:ease_border_width="1px"
app:es_shape_type="round" />
<ImageView
android:id="@+id/show_top_v1"
android:layout_width="120dp"
android:layout_height="120dp"
android:maxWidth="200dp"
android:src="@mipmap/app_logo"
android:visibility="gone" />
</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>
<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:layout_alignParentRight="true"
android:layout_marginTop="10dp"
android:layout_marginRight="15dp"
android:indeterminateDrawable="@drawable/pass_word_bg2"
android:visibility="gone" />
<FrameLayout
android:id="@+id/video_fullView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:visibility="gone" >
</FrameLayout>
</RelativeLayout>

View 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="?actionBarSize"
android:background="@color/white"
android:visibility="visible">
<ImageView
android:id="@+id/back_iv"
android:layout_width="40dp"
android:layout_height="match_parent"
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>

View 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>

View File

@@ -0,0 +1,176 @@
<?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="wrap_content"
android:gravity="center_vertical"
android:orientation="vertical"
tools:ignore="MissingDefaultResource">
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
app:cardCornerRadius="10dp"
app:cardElevation="4dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/big_bg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/notify_imagecolor"
android:paddingStart="10dp"
android:paddingEnd="10dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_icon"
android:layout_width="30dp"
android:layout_height="30dp"
android:src="@mipmap/ic_notifylogo"
app:layout_constraintBottom_toBottomOf="@+id/tv_msg_type"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_msg_type" />
<TextView
android:id="@+id/tv_msg_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:background="@drawable/shape_notify_typebg"
android:paddingStart="10dp"
android:paddingTop="2dp"
android:paddingEnd="10dp"
android:paddingBottom="2dp"
android:textColor="@android:color/white"
android:textSize="12sp"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@+id/iv_icon"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_msg_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2025-1-8"
android:textColor="@color/black"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="@+id/tv_msg_type"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_msg_type" />
<TextView
android:id="@+id/iv_readtype"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_marginTop="5dp"
android:background="@drawable/shape_btn_bg"
android:visibility="gone"
app:layout_constraintRight_toRightOf="@+id/iv_icon"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_msg_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginEnd="15dp"
android:paddingStart="5dp"
android:textColor="#383838"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="@+id/iv_icon"
app:layout_constraintTop_toBottomOf="@+id/iv_icon" />
<ImageView
android:id="@+id/ic_notify_pull"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginBottom="5dp"
android:background="@mipmap/ic_notify_xiala"
android:paddingStart="5dp"
android:textColor="#6d80ff"
android:textSize="14sp"
android:layout_marginTop="4dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_msg_title" />
<TextView
android:id="@+id/look_iv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:drawableLeft="@mipmap/look_img"
android:drawablePadding="5dp"
android:gravity="center_vertical"
android:paddingStart="5dp"
android:text="0"
android:textColor="@color/black"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_marginTop="4dp"
app:layout_constraintTop_toBottomOf="@+id/tv_msg_title" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
<LinearLayout
android:id="@+id/layout_more"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="5dp"
android:visibility="gone">
<TextView
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginTop="10dp"
android:layout_marginBottom="5dp"
android:background="@android:color/black" />
<ImageView
android:id="@+id/iv_notifyimage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:adjustViewBounds="true" />
<TextView
android:id="@+id/iv_notifycontent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:textColor="#383838"
android:textSize="16sp" />
<TextView
android:id="@+id/iv_notifyjumpclick"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:textColor="#4169E1"
android:textSize="16sp"
android:visibility="gone" />
</LinearLayout>
</LinearLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 779 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,57 @@
<resources>
<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">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>
<string name="agentweb_loading">Loading…</string>
<string name="text_title">Text</string>
<string name="image_title">Image</string>
<string name="link_title">Jump link</string>
</resources>

View File

@@ -0,0 +1,69 @@
<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:navigationBarColor">@color/white</item>
<!-- <item name="android:windowBackground">@mipmap/big_bg</item>-->
<item name="android:forceDarkAllowed" tools:ignore="NewApi">false</item>
</style>
</resources>

View File

@@ -0,0 +1,23 @@
<?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">#FFFFFFFF</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">#ACDFEE</color>
<color name="notify_imagecolor">#BDDDB7</color>
<color name="notify_jumplinkcolor">#C3B5D0</color>
<color name="style_color">#000000</color>
</resources>

View File

@@ -0,0 +1,59 @@
<resources>
<string name="qsrlwmm_txt">请输入6位密码</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="agentweb_loading">Loading…</string>
<string name="text_title">文本</string>
<string name="image_title">图片</string>
<string name="link_title">链接</string>
</resources>

View 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">@color/white</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>
<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>

View 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>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true" />
</network-security-config>

View 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"异常的问题 -->

View File

@@ -0,0 +1,35 @@
package Tptogiar.calculcator;
import org.junit.Test;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
@Test
public void TestPattern(){
//
Pattern compile = Pattern.compile( "^(\\-|\\+)?\\d+(\\.\\d+)?$");
String a="+45.5";
boolean matches = compile.matcher(a).matches();
System.out.println(matches);
String result = compile.matcher(a).replaceAll("");
System.out.println(result);
}
}

View File

@@ -84,7 +84,7 @@ public class MainActivity2 extends AppCompatActivity {
public WebView webView;
TextView tvErrorMsg;
LinearLayout layoutError;
ImageView show_top_v;
public ImageView show_top_v;
public ImageView showTopV1;
private LinearLayout showTopLy;
CardView otherApp;
@@ -101,13 +101,13 @@ public class MainActivity2 extends AppCompatActivity {
CardView ivHome;
private View topVvvv;
private ProgressBar progressBar;
public static String url = "https://candy916.co/";
public static String url = "";
//先定义
private static final int REQUEST_EXTERNAL_STORAGE = 1;
public static int userId = 2;
private int contactApply = 1;
private int notifyApply = 1;
private int notifyApply = 2;
private String facebookUrl = "";
private String whatsappUrl = "";
private String telegramUrl = "";

2
cucislot365/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/build
/release

80
cucislot365/build.gradle Normal file
View File

@@ -0,0 +1,80 @@
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
}
android {
compileSdkVersion 31
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.xyz.cucislot365"
minSdkVersion 24
targetSdkVersion 31
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
debug {
storeFile file('justlet.jks')
storePassword "123456"
keyAlias 'key0'
keyPassword "123456"
}
release {
storeFile file('justlet.jks')
storePassword "123456"
keyAlias 'key0'
keyPassword "123456"
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
applicationVariants.all { variant ->
variant.outputs.all {
// def appName = "meemee99"
def appName = "cucislotjehtjuewrhrrregrgg"
def outputDir = new File(rootProject.ext.outputPath)
// 创建输出目录
outputDir.mkdirs()
def outputFileName = "${appName}.apk"
// 设置输出文件名
setOutputFileName(outputFileName)
// 计算新的输出文件
def newOutputFile = new File(outputDir, outputFileName)
// 如果新的输出目录不存在,则创建它
newOutputFile.parentFile.mkdirs()
// 在构建完成后将 APK 复制到新位置
variant.assemble.doLast {
try {
java.nio.file.Files.copy(
outputFile.toPath(),
newOutputFile.toPath(),
java.nio.file.StandardCopyOption.REPLACE_EXISTING
)
println "Success to copy APK !!!"
} catch (java.io.IOException e) {
println "Failed to copy APK: ${e.message}"
}
}
}
}
}
dependencies {
implementation project(path: ':base_theme')
}

View File

@@ -0,0 +1,29 @@
{
"project_info": {
"project_number": "719624001236",
"project_id": "cusl365",
"storage_bucket": "cusl365.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:719624001236:android:56a13fcef8eacbc1a84d41",
"android_client_info": {
"package_name": "com.xyz.cucislot365"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyD8RyUgAzvT9tN0P00dgOq1414c463bKPw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}

BIN
cucislot365/justlet.jks Normal file

Binary file not shown.

32
cucislot365/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,32 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-dontwarn dalvik.**
-dontwarn com.tencent.smtt.**
-keep class com.tencent.smtt.** {
*;
}
-keep class com.tencent.tbs.** {
*;
}

View File

@@ -0,0 +1,26 @@
package Tptogiar.calculcator;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("Tptogiar.calculcator", appContext.getPackageName());
}
}

View File

@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xyz.cucislot365">
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.camera2"
android:required="false" />
<!-- <uses-permission android:name="android.permission.READ_CONTACTS" />-->
<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" />
<uses-permission android:name="android.permission.VIBRATE" />
<!-- <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />-->
<!-- 多媒体相关 -->
<uses-permission android:name="android.permission.CAMERA" />
<!-- 8.0+系统需要-->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!--推送权限-->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<queries>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
</queries>
<application
android:name=".WebApplication"
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="@mipmap/app_logo"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/app_logo"
android:supportsRtl="true"
android:theme="@style/Theme.AppTheme"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="true"
android:hardwareAccelerated="true"
android:theme="@style/AppThemeStart">
<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>
<!-- <service-->
<!-- android:name="com.tencent.smtt.export.external.DexClassLoaderProviderService"-->
<!-- android:label="dexopt"-->
<!-- android:process=":dexopt" />-->
<service
android:name=".MyFirebaseMessageingService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@mipmap/app_logo" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/notify_color" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="@string/app_name" />
</application>
</manifest>

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

View File

@@ -0,0 +1,82 @@
package com.xyz.cucislot365;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import com.web.base.LogUtils;
import com.web.base.MainActivity2;
import com.google.firebase.messaging.FirebaseMessaging;
public class MainActivity extends MainActivity2 {
@Override
protected void onCreate(Bundle savedInstanceState) {
initConfig();
super.onCreate(savedInstanceState);
initWinwdowLogoConfig();
registerFCM();
}
/**
* 注册FCM
*/
private void registerFCM() {
//订阅主题
try {
FirebaseMessaging.getInstance().subscribeToTopic("demo")
.addOnCompleteListener(task -> {
String msg = "Subscribed";
if (!task.isSuccessful()) {
msg = "Subscribe failed";
}
LogUtils.i("结果:"+msg);
});
}catch (Exception e){
e.printStackTrace();
}
}
/**
* 用于修改大背景渐变色 不设置
* 大背景就是 windows_color 的颜色
* 不要动 都在 app_config.xml中修改
*/
private void initWinwdowLogoConfig() {
setBackDrawables(R.drawable.big_bg);
setImageView(getString(R.string.is_round).equals("1"));
}
/**
* 基础配置都在这里
* 不要动 都在 app_config.xml中修改
*/
private void initConfig() {
//===========================以下是APP的配置信息 都写在 app_config.xml中==================================
userId = Integer.parseInt(getString(R.string.userId));
saveInt(MainActivity.this,"user_code",userId);
saveInt(MainActivity.this,"version_code",getVersion());
saveString(this, "base_url",getString(R.string.base_url));
//网页的底部NavigationBar颜色
saveInt(this, "style_color_int", getColor(R.color.style_color));
//页面的大背景颜色
saveInt(this, "windows_color_int", getColor(R.color.windows_color));
//任务栏的文字颜色 0 黑 1白 默认黑
saveInt(MainActivity.this,"is_white",Integer.parseInt(getString(R.string.is_white)));
saveInt(MainActivity.this,"hasContact",Integer.parseInt(getString(R.string.has_contact)));
//===========================以上是APP的配置信息 都写在 app_config.xml中==================================
}
public int getVersion(){
try {
PackageManager packageManager = getPackageManager();
PackageInfo packageInfo = packageManager.getPackageInfo(getPackageName(), 0);
int versionCode = packageInfo.versionCode; // 版本码
return versionCode;
} catch (PackageManager.NameNotFoundException e) {
return 0;
}
}
}

View File

@@ -0,0 +1,125 @@
package com.xyz.cucislot365;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import androidx.annotation.NonNull;
import androidx.core.app.NotificationCompat;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
import com.google.gson.Gson;
import com.web.base.GsonUtils;
import com.web.base.MessageInfo;
import java.util.Map;
import java.util.Random;
public class MyFirebaseMessageingService extends FirebaseMessagingService {
public MyFirebaseMessageingService() {
}
@Override
public void onMessageReceived(@NonNull RemoteMessage remoteMessage) {
super.onMessageReceived(remoteMessage);
Map<String, String> serviceData = remoteMessage.getData(); //后台推送数据
if (serviceData != null && serviceData.containsKey("message")) {
String value = serviceData.get("message");
Gson gson = new Gson();
MessageInfo messageInfo = gson.fromJson(value, MessageInfo.class);
showNotification(messageInfo);
} else {
//收到通知 创建notify
if (remoteMessage.getNotification() != null) {
showNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody());
}
}
}
private void showNotification(MessageInfo messageInfo) {
Intent notifyIntent = new Intent(this, MainActivity.class);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) {
ComponentName launchComponent = null;
launchComponent = getApplication()
.getPackageManager()
.getLaunchIntentForPackage(getApplication().getPackageName())
.getComponent();
notifyIntent.setComponent(launchComponent);
}
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
notifyIntent.setAction(Intent.ACTION_VIEW);
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须
notifyIntent.putExtra("message", messageInfo);
PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE);
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
NotificationChannel channelwinway = null;
NotificationCompat.Builder notificationBuilder = null;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
channelwinway = new NotificationChannel(getString(com.web.base.R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT);
channelwinway.enableLights(true);
channelwinway.enableVibration(true);
notificationManager.createNotificationChannel(channelwinway);
notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId())
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(messageInfo.getTitle())
.setContentText(messageInfo.getContent())
.setAutoCancel(true)
.setContentIntent(pendingIntent);
} else {
notificationBuilder = new NotificationCompat.Builder(this, getString(com.web.base.R.string.app_name))
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(messageInfo.getTitle())
.setContentText(messageInfo.getContent())
.setAutoCancel(true)
.setContentIntent(pendingIntent);
}
notificationManager.notify(0, notificationBuilder.build());
}
private void showNotification(String title, String body) {
Intent notifyIntent = new Intent(this, MainActivity.class);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) {
ComponentName launchComponent = null;
launchComponent = getApplication()
.getPackageManager()
.getLaunchIntentForPackage(getApplication().getPackageName())
.getComponent();
notifyIntent.setComponent(launchComponent);
}
notifyIntent.putExtra("message", body);
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
notifyIntent.setAction(Intent.ACTION_VIEW);
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须
PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE);
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
NotificationChannel channelwinway = null;
NotificationCompat.Builder notificationBuilder = null;
MessageInfo messageInfo = GsonUtils.getObjFromJSON(body, MessageInfo.class);
if (messageInfo != null) {
body = messageInfo.getContent();
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
channelwinway = new NotificationChannel(getString(com.web.base.R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT);
channelwinway.enableLights(true);
channelwinway.enableVibration(true);
notificationManager.createNotificationChannel(channelwinway);
notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId())
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(title)
.setContentText(body)
.setAutoCancel(true)
.setContentIntent(pendingIntent);
} else {
notificationBuilder = new NotificationCompat.Builder(this, getString(com.web.base.R.string.app_name))
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(title)
.setContentText(body)
.setAutoCancel(true)
.setContentIntent(pendingIntent);
}
notificationManager.notify(0, notificationBuilder.build());
}
}

View File

@@ -0,0 +1,16 @@
package com.xyz.cucislot365;
import android.app.Application;
import android.content.Context;
public class WebApplication extends Application {
public static Context application;
@Override
public void onCreate() {
super.onCreate();
// 设置开启优化方案
application = this;
}
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="270"
android:startColor="@color/windows_color"
android:endColor="@color/style_color"/>
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

View File

@@ -0,0 +1,52 @@
<resources>
<!-- <string name="app_name">SlotKaki33</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">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>
</resources>

View 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/windows_color</item>
<item name="colorPrimaryDark">@color/windows_color</item>
<item name="colorAccent">@color/windows_color</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:navigationBarColor">@color/style_color</item>
<!-- <item name="android:windowBackground">@mipmap/big_bg</item>-->
<item name="android:forceDarkAllowed" tools:ignore="NewApi">false</item>
<item name="android:windowBackground">@drawable/big_bg</item>
</style>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--需要修改的配置项都在这里了-->
<!--APP名字-->
<string name="app_name">CUCISLOT365</string>
<!--唯一ID-->
<string name="userId">242</string>
<!--初始域名-->
<string name="base_url">https://cucislot365.com/</string>
<!--任务栏的文字颜色 0 黑 1白 默认黑-->
<string name="is_white">0</string>
<!--启动页logo 0 原图显示 1 强制修改为原型图片logo-->
<string name="is_round">0</string>
<!--是否需要通讯录权限 1 要 0 不要-->
<string name="has_contact">0</string>
<!--底部操作栏色调-->
<color name="style_color">#1f3681</color>
<!--整体背景色调 style_color和windows_color 一致 就是纯色 不然就是 w-s的上下渐变色-->
<color name="windows_color">#fdfdfe</color>
</resources>

View File

@@ -0,0 +1,16 @@
<?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">#1251a1</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>
</resources>

View File

@@ -0,0 +1,53 @@
<resources>
<string name="qsrlwmm_txt">请输入6位密码</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>
</resources>

View File

@@ -0,0 +1,90 @@
<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. -->
<item name="android:windowBackground">#000000</item>
</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/windows_color</item>
<item name="colorPrimaryDark">@color/windows_color</item>
<item name="colorAccent">@color/windows_color</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:navigationBarColor">@color/style_color</item>
<!-- <item name="android:windowBackground">@mipmap/big_bg</item>-->
<item name="android:forceDarkAllowed" tools:ignore="NewApi">false</item>
<item name="android:windowBackground">@drawable/big_bg</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>

View 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>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true" />
</network-security-config>

View 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"异常的问题 -->

View File

@@ -0,0 +1,35 @@
package Tptogiar.calculcator;
import org.junit.Test;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
@Test
public void TestPattern(){
//
Pattern compile = Pattern.compile( "^(\\-|\\+)?\\d+(\\.\\d+)?$");
String a="+45.5";
boolean matches = compile.matcher(a).matches();
System.out.println(matches);
String result = compile.matcher(a).replaceAll("");
System.out.println(result);
}
}

2
freecredit66/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/build
/release

80
freecredit66/build.gradle Normal file
View File

@@ -0,0 +1,80 @@
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
}
android {
compileSdkVersion 31
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.xyz.freecredit66"
minSdkVersion 24
targetSdkVersion 31
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
debug {
storeFile file('justlet.jks')
storePassword "123456"
keyAlias 'key0'
keyPassword "123456"
}
release {
storeFile file('justlet.jks')
storePassword "123456"
keyAlias 'key0'
keyPassword "123456"
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
applicationVariants.all { variant ->
variant.outputs.all {
// def appName = "meemee99"
def appName = "freecreditjdfjhhrhrrrrggfdjfkgfd"
def outputDir = new File(rootProject.ext.outputPath)
// 创建输出目录
outputDir.mkdirs()
def outputFileName = "${appName}.apk"
// 设置输出文件名
setOutputFileName(outputFileName)
// 计算新的输出文件
def newOutputFile = new File(outputDir, outputFileName)
// 如果新的输出目录不存在,则创建它
newOutputFile.parentFile.mkdirs()
// 在构建完成后将 APK 复制到新位置
variant.assemble.doLast {
try {
java.nio.file.Files.copy(
outputFile.toPath(),
newOutputFile.toPath(),
java.nio.file.StandardCopyOption.REPLACE_EXISTING
)
println "Success to copy APK !!!"
} catch (java.io.IOException e) {
println "Failed to copy APK: ${e.message}"
}
}
}
}
}
dependencies {
implementation project(path: ':base_theme')
}

View File

@@ -0,0 +1,29 @@
{
"project_info": {
"project_number": "221055460187",
"project_id": "freecredit66-68912",
"storage_bucket": "freecredit66-68912.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:221055460187:android:8b6e01d614f911b692f07e",
"android_client_info": {
"package_name": "com.xyz.freecredit66"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyCSKMrsizglKa7oEz4xMsSc_zaq781Lmro"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}

BIN
freecredit66/justlet.jks Normal file

Binary file not shown.

32
freecredit66/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,32 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-dontwarn dalvik.**
-dontwarn com.tencent.smtt.**
-keep class com.tencent.smtt.** {
*;
}
-keep class com.tencent.tbs.** {
*;
}

View File

@@ -0,0 +1,26 @@
package Tptogiar.calculcator;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("Tptogiar.calculcator", appContext.getPackageName());
}
}

View File

@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xyz.freecredit66">
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.camera2"
android:required="false" />
<!-- <uses-permission android:name="android.permission.READ_CONTACTS" />-->
<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" />
<uses-permission android:name="android.permission.VIBRATE" />
<!-- <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />-->
<!-- 多媒体相关 -->
<uses-permission android:name="android.permission.CAMERA" />
<!-- 8.0+系统需要-->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!--推送权限-->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<queries>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
</queries>
<application
android:name=".WebApplication"
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="@mipmap/app_logo"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/app_logo"
android:supportsRtl="true"
android:theme="@style/Theme.AppTheme"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="true"
android:hardwareAccelerated="true"
android:theme="@style/AppThemeStart">
<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>
<!-- <service-->
<!-- android:name="com.tencent.smtt.export.external.DexClassLoaderProviderService"-->
<!-- android:label="dexopt"-->
<!-- android:process=":dexopt" />-->
<service
android:name=".MyFirebaseMessageingService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@mipmap/app_logo" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/notify_color" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="@string/app_name" />
</application>
</manifest>

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

View File

@@ -0,0 +1,82 @@
package com.xyz.freecredit66;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import com.web.base.LogUtils;
import com.web.base.MainActivity2;
import com.google.firebase.messaging.FirebaseMessaging;
public class MainActivity extends MainActivity2 {
@Override
protected void onCreate(Bundle savedInstanceState) {
initConfig();
super.onCreate(savedInstanceState);
initWinwdowLogoConfig();
registerFCM();
}
/**
* 注册FCM
*/
private void registerFCM() {
//订阅主题
try {
FirebaseMessaging.getInstance().subscribeToTopic("demo")
.addOnCompleteListener(task -> {
String msg = "Subscribed";
if (!task.isSuccessful()) {
msg = "Subscribe failed";
}
LogUtils.i("结果:"+msg);
});
}catch (Exception e){
e.printStackTrace();
}
}
/**
* 用于修改大背景渐变色 不设置
* 大背景就是 windows_color 的颜色
* 不要动 都在 app_config.xml中修改
*/
private void initWinwdowLogoConfig() {
setBackDrawables(R.drawable.big_bg);
setImageView(getString(R.string.is_round).equals("1"));
}
/**
* 基础配置都在这里
* 不要动 都在 app_config.xml中修改
*/
private void initConfig() {
//===========================以下是APP的配置信息 都写在 app_config.xml中==================================
userId = Integer.parseInt(getString(R.string.userId));
saveInt(MainActivity.this,"user_code",userId);
saveInt(MainActivity.this,"version_code",getVersion());
saveString(this, "base_url",getString(R.string.base_url));
//网页的底部NavigationBar颜色
saveInt(this, "style_color_int", getColor(R.color.style_color));
//页面的大背景颜色
saveInt(this, "windows_color_int", getColor(R.color.windows_color));
//任务栏的文字颜色 0 黑 1白 默认黑
saveInt(MainActivity.this,"is_white",Integer.parseInt(getString(R.string.is_white)));
saveInt(MainActivity.this,"hasContact",Integer.parseInt(getString(R.string.has_contact)));
//===========================以上是APP的配置信息 都写在 app_config.xml中==================================
}
public int getVersion(){
try {
PackageManager packageManager = getPackageManager();
PackageInfo packageInfo = packageManager.getPackageInfo(getPackageName(), 0);
int versionCode = packageInfo.versionCode; // 版本码
return versionCode;
} catch (PackageManager.NameNotFoundException e) {
return 0;
}
}
}

View File

@@ -0,0 +1,125 @@
package com.xyz.freecredit66;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import androidx.annotation.NonNull;
import androidx.core.app.NotificationCompat;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
import com.google.gson.Gson;
import com.web.base.GsonUtils;
import com.web.base.MessageInfo;
import java.util.Map;
import java.util.Random;
public class MyFirebaseMessageingService extends FirebaseMessagingService {
public MyFirebaseMessageingService() {
}
@Override
public void onMessageReceived(@NonNull RemoteMessage remoteMessage) {
super.onMessageReceived(remoteMessage);
Map<String, String> serviceData = remoteMessage.getData(); //后台推送数据
if (serviceData != null && serviceData.containsKey("message")) {
String value = serviceData.get("message");
Gson gson = new Gson();
MessageInfo messageInfo = gson.fromJson(value, MessageInfo.class);
showNotification(messageInfo);
} else {
//收到通知 创建notify
if (remoteMessage.getNotification() != null) {
showNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody());
}
}
}
private void showNotification(MessageInfo messageInfo) {
Intent notifyIntent = new Intent(this, MainActivity.class);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) {
ComponentName launchComponent = null;
launchComponent = getApplication()
.getPackageManager()
.getLaunchIntentForPackage(getApplication().getPackageName())
.getComponent();
notifyIntent.setComponent(launchComponent);
}
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
notifyIntent.setAction(Intent.ACTION_VIEW);
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须
notifyIntent.putExtra("message", messageInfo);
PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE);
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
NotificationChannel channelwinway = null;
NotificationCompat.Builder notificationBuilder = null;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
channelwinway = new NotificationChannel(getString(com.web.base.R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT);
channelwinway.enableLights(true);
channelwinway.enableVibration(true);
notificationManager.createNotificationChannel(channelwinway);
notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId())
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(messageInfo.getTitle())
.setContentText(messageInfo.getContent())
.setAutoCancel(true)
.setContentIntent(pendingIntent);
} else {
notificationBuilder = new NotificationCompat.Builder(this, getString(com.web.base.R.string.app_name))
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(messageInfo.getTitle())
.setContentText(messageInfo.getContent())
.setAutoCancel(true)
.setContentIntent(pendingIntent);
}
notificationManager.notify(0, notificationBuilder.build());
}
private void showNotification(String title, String body) {
Intent notifyIntent = new Intent(this, MainActivity.class);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) {
ComponentName launchComponent = null;
launchComponent = getApplication()
.getPackageManager()
.getLaunchIntentForPackage(getApplication().getPackageName())
.getComponent();
notifyIntent.setComponent(launchComponent);
}
notifyIntent.putExtra("message", body);
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
notifyIntent.setAction(Intent.ACTION_VIEW);
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须
PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE);
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
NotificationChannel channelwinway = null;
NotificationCompat.Builder notificationBuilder = null;
MessageInfo messageInfo = GsonUtils.getObjFromJSON(body, MessageInfo.class);
if (messageInfo != null) {
body = messageInfo.getContent();
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
channelwinway = new NotificationChannel(getString(com.web.base.R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT);
channelwinway.enableLights(true);
channelwinway.enableVibration(true);
notificationManager.createNotificationChannel(channelwinway);
notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId())
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(title)
.setContentText(body)
.setAutoCancel(true)
.setContentIntent(pendingIntent);
} else {
notificationBuilder = new NotificationCompat.Builder(this, getString(com.web.base.R.string.app_name))
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(title)
.setContentText(body)
.setAutoCancel(true)
.setContentIntent(pendingIntent);
}
notificationManager.notify(0, notificationBuilder.build());
}
}

View File

@@ -0,0 +1,16 @@
package com.xyz.freecredit66;
import android.app.Application;
import android.content.Context;
public class WebApplication extends Application {
public static Context application;
@Override
public void onCreate() {
super.onCreate();
// 设置开启优化方案
application = this;
}
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="270"
android:startColor="@color/windows_color"
android:endColor="@color/style_color"/>
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

View File

@@ -0,0 +1,52 @@
<resources>
<!-- <string name="app_name">SlotKaki33</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">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>
</resources>

View 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/windows_color</item>
<item name="colorPrimaryDark">@color/windows_color</item>
<item name="colorAccent">@color/windows_color</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:navigationBarColor">@color/style_color</item>
<!-- <item name="android:windowBackground">@mipmap/big_bg</item>-->
<item name="android:forceDarkAllowed" tools:ignore="NewApi">false</item>
<item name="android:windowBackground">@drawable/big_bg</item>
</style>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--需要修改的配置项都在这里了-->
<!--APP名字-->
<string name="app_name">FREECREDIT66</string>
<!--唯一ID-->
<string name="userId">243</string>
<!--初始域名-->
<string name="base_url">https://freecredit66.com/</string>
<!--任务栏的文字颜色 0 黑 1白 默认黑-->
<string name="is_white">1</string>
<!--启动页logo 0 原图显示 1 强制修改为原型图片logo-->
<string name="is_round">0</string>
<!--是否需要通讯录权限 1 要 0 不要-->
<string name="has_contact">0</string>
<!--底部操作栏色调-->
<color name="style_color">#393939</color>
<!--整体背景色调 style_color和windows_color 一致 就是纯色 不然就是 w-s的上下渐变色-->
<color name="windows_color">#040404</color>
</resources>

View File

@@ -0,0 +1,16 @@
<?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">#1251a1</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>
</resources>

View File

@@ -0,0 +1,53 @@
<resources>
<string name="qsrlwmm_txt">请输入6位密码</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>
</resources>

View File

@@ -0,0 +1,90 @@
<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. -->
<item name="android:windowBackground">#000000</item>
</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/windows_color</item>
<item name="colorPrimaryDark">@color/windows_color</item>
<item name="colorAccent">@color/windows_color</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:navigationBarColor">@color/style_color</item>
<!-- <item name="android:windowBackground">@mipmap/big_bg</item>-->
<item name="android:forceDarkAllowed" tools:ignore="NewApi">false</item>
<item name="android:windowBackground">@drawable/big_bg</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>

View 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>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true" />
</network-security-config>

View 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"异常的问题 -->

View File

@@ -0,0 +1,35 @@
package Tptogiar.calculcator;
import org.junit.Test;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
@Test
public void TestPattern(){
//
Pattern compile = Pattern.compile( "^(\\-|\\+)?\\d+(\\.\\d+)?$");
String a="+45.5";
boolean matches = compile.matcher(a).matches();
System.out.println(matches);
String result = compile.matcher(a).replaceAll("");
System.out.println(result);
}
}

2
ironman98/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/build
/release

80
ironman98/build.gradle Normal file
View File

@@ -0,0 +1,80 @@
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
}
android {
compileSdkVersion 31
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.xyz.ironman98"
minSdkVersion 24
targetSdkVersion 31
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
debug {
storeFile file('justlet.jks')
storePassword "123456"
keyAlias 'key0'
keyPassword "123456"
}
release {
storeFile file('justlet.jks')
storePassword "123456"
keyAlias 'key0'
keyPassword "123456"
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
applicationVariants.all { variant ->
variant.outputs.all {
// def appName = "meemee99"
def appName = "ironman98dfgdfhdfhgdfhdhd"
def outputDir = new File(rootProject.ext.outputPath)
// 创建输出目录
outputDir.mkdirs()
def outputFileName = "${appName}.apk"
// 设置输出文件名
setOutputFileName(outputFileName)
// 计算新的输出文件
def newOutputFile = new File(outputDir, outputFileName)
// 如果新的输出目录不存在,则创建它
newOutputFile.parentFile.mkdirs()
// 在构建完成后将 APK 复制到新位置
variant.assemble.doLast {
try {
java.nio.file.Files.copy(
outputFile.toPath(),
newOutputFile.toPath(),
java.nio.file.StandardCopyOption.REPLACE_EXISTING
)
println "Success to copy APK !!!"
} catch (java.io.IOException e) {
println "Failed to copy APK: ${e.message}"
}
}
}
}
}
dependencies {
implementation project(path: ':base_theme')
}

View File

@@ -0,0 +1,29 @@
{
"project_info": {
"project_number": "300382353279",
"project_id": "ironman98",
"storage_bucket": "ironman98.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:300382353279:android:e60248efabfd2b97af4c4a",
"android_client_info": {
"package_name": "com.xyz.ironman98"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyCO-T_8eO8h2GKdvhJ129KZJRkB77Pg3ps"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}

BIN
ironman98/justlet.jks Normal file

Binary file not shown.

32
ironman98/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,32 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-dontwarn dalvik.**
-dontwarn com.tencent.smtt.**
-keep class com.tencent.smtt.** {
*;
}
-keep class com.tencent.tbs.** {
*;
}

View File

@@ -0,0 +1,26 @@
package Tptogiar.calculcator;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("Tptogiar.calculcator", appContext.getPackageName());
}
}

View File

@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xyz.ironman98">
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.camera2"
android:required="false" />
<!-- <uses-permission android:name="android.permission.READ_CONTACTS" />-->
<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" />
<uses-permission android:name="android.permission.VIBRATE" />
<!-- <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />-->
<!-- 多媒体相关 -->
<uses-permission android:name="android.permission.CAMERA" />
<!-- 8.0+系统需要-->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!--推送权限-->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<queries>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
</queries>
<application
android:name=".WebApplication"
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="@mipmap/ironman98"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/ironman98"
android:supportsRtl="true"
android:theme="@style/Theme.AppTheme"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="true"
android:hardwareAccelerated="true"
android:theme="@style/AppThemeStart">
<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>
<!-- <service-->
<!-- android:name="com.tencent.smtt.export.external.DexClassLoaderProviderService"-->
<!-- android:label="dexopt"-->
<!-- android:process=":dexopt" />-->
<service
android:name=".MyFirebaseMessageingService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@mipmap/app_logo" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/notify_color" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="@string/app_name" />
</application>
</manifest>

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

View File

@@ -0,0 +1,82 @@
package com.xyz.ironman98;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import com.web.base.LogUtils;
import com.web.base.MainActivity2;
import com.google.firebase.messaging.FirebaseMessaging;
public class MainActivity extends MainActivity2 {
@Override
protected void onCreate(Bundle savedInstanceState) {
initConfig();
super.onCreate(savedInstanceState);
initWinwdowLogoConfig();
registerFCM();
}
/**
* 注册FCM
*/
private void registerFCM() {
//订阅主题
try {
FirebaseMessaging.getInstance().subscribeToTopic("demo")
.addOnCompleteListener(task -> {
String msg = "Subscribed";
if (!task.isSuccessful()) {
msg = "Subscribe failed";
}
LogUtils.i("结果:"+msg);
});
}catch (Exception e){
e.printStackTrace();
}
}
/**
* 用于修改大背景渐变色 不设置
* 大背景就是 windows_color 的颜色
* 不要动 都在 app_config.xml中修改
*/
private void initWinwdowLogoConfig() {
setBackDrawables(R.drawable.big_bg);
setImageView(getString(R.string.is_round).equals("1"));
}
/**
* 基础配置都在这里
* 不要动 都在 app_config.xml中修改
*/
private void initConfig() {
//===========================以下是APP的配置信息 都写在 app_config.xml中==================================
userId = Integer.parseInt(getString(R.string.userId));
saveInt(MainActivity.this,"user_code",userId);
saveInt(MainActivity.this,"version_code",getVersion());
saveString(this, "base_url",getString(R.string.base_url));
//网页的底部NavigationBar颜色
saveInt(this, "style_color_int", getColor(R.color.style_color));
//页面的大背景颜色
saveInt(this, "windows_color_int", getColor(R.color.windows_color));
//任务栏的文字颜色 0 黑 1白 默认黑
saveInt(MainActivity.this,"is_white",Integer.parseInt(getString(R.string.is_white)));
saveInt(MainActivity.this,"hasContact",Integer.parseInt(getString(R.string.has_contact)));
//===========================以上是APP的配置信息 都写在 app_config.xml中==================================
}
public int getVersion(){
try {
PackageManager packageManager = getPackageManager();
PackageInfo packageInfo = packageManager.getPackageInfo(getPackageName(), 0);
int versionCode = packageInfo.versionCode; // 版本码
return versionCode;
} catch (PackageManager.NameNotFoundException e) {
return 0;
}
}
}

View File

@@ -0,0 +1,125 @@
package com.xyz.ironman98;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import androidx.annotation.NonNull;
import androidx.core.app.NotificationCompat;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
import com.google.gson.Gson;
import com.web.base.GsonUtils;
import com.web.base.MessageInfo;
import java.util.Map;
import java.util.Random;
public class MyFirebaseMessageingService extends FirebaseMessagingService {
public MyFirebaseMessageingService() {
}
@Override
public void onMessageReceived(@NonNull RemoteMessage remoteMessage) {
super.onMessageReceived(remoteMessage);
Map<String, String> serviceData = remoteMessage.getData(); //后台推送数据
if (serviceData != null && serviceData.containsKey("message")) {
String value = serviceData.get("message");
Gson gson = new Gson();
MessageInfo messageInfo = gson.fromJson(value, MessageInfo.class);
showNotification(messageInfo);
} else {
//收到通知 创建notify
if (remoteMessage.getNotification() != null) {
showNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody());
}
}
}
private void showNotification(MessageInfo messageInfo) {
Intent notifyIntent = new Intent(this, MainActivity.class);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) {
ComponentName launchComponent = null;
launchComponent = getApplication()
.getPackageManager()
.getLaunchIntentForPackage(getApplication().getPackageName())
.getComponent();
notifyIntent.setComponent(launchComponent);
}
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
notifyIntent.setAction(Intent.ACTION_VIEW);
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须
notifyIntent.putExtra("message", messageInfo);
PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE);
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
NotificationChannel channelwinway = null;
NotificationCompat.Builder notificationBuilder = null;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
channelwinway = new NotificationChannel(getString(com.web.base.R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT);
channelwinway.enableLights(true);
channelwinway.enableVibration(true);
notificationManager.createNotificationChannel(channelwinway);
notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId())
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(messageInfo.getTitle())
.setContentText(messageInfo.getContent())
.setAutoCancel(true)
.setContentIntent(pendingIntent);
} else {
notificationBuilder = new NotificationCompat.Builder(this, getString(com.web.base.R.string.app_name))
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(messageInfo.getTitle())
.setContentText(messageInfo.getContent())
.setAutoCancel(true)
.setContentIntent(pendingIntent);
}
notificationManager.notify(0, notificationBuilder.build());
}
private void showNotification(String title, String body) {
Intent notifyIntent = new Intent(this, MainActivity.class);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) {
ComponentName launchComponent = null;
launchComponent = getApplication()
.getPackageManager()
.getLaunchIntentForPackage(getApplication().getPackageName())
.getComponent();
notifyIntent.setComponent(launchComponent);
}
notifyIntent.putExtra("message", body);
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
notifyIntent.setAction(Intent.ACTION_VIEW);
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须
PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE);
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
NotificationChannel channelwinway = null;
NotificationCompat.Builder notificationBuilder = null;
MessageInfo messageInfo = GsonUtils.getObjFromJSON(body, MessageInfo.class);
if (messageInfo != null) {
body = messageInfo.getContent();
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
channelwinway = new NotificationChannel(getString(com.web.base.R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT);
channelwinway.enableLights(true);
channelwinway.enableVibration(true);
notificationManager.createNotificationChannel(channelwinway);
notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId())
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(title)
.setContentText(body)
.setAutoCancel(true)
.setContentIntent(pendingIntent);
} else {
notificationBuilder = new NotificationCompat.Builder(this, getString(com.web.base.R.string.app_name))
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(title)
.setContentText(body)
.setAutoCancel(true)
.setContentIntent(pendingIntent);
}
notificationManager.notify(0, notificationBuilder.build());
}
}

View File

@@ -0,0 +1,16 @@
package com.xyz.ironman98;
import android.app.Application;
import android.content.Context;
public class WebApplication extends Application {
public static Context application;
@Override
public void onCreate() {
super.onCreate();
// 设置开启优化方案
application = this;
}
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="270"
android:startColor="@color/windows_color"
android:endColor="@color/style_color"/>
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@@ -0,0 +1,52 @@
<resources>
<!-- <string name="app_name">SlotKaki33</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">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>
</resources>

View 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/windows_color</item>
<item name="colorPrimaryDark">@color/windows_color</item>
<item name="colorAccent">@color/windows_color</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:navigationBarColor">@color/style_color</item>
<!-- <item name="android:windowBackground">@mipmap/big_bg</item>-->
<item name="android:forceDarkAllowed" tools:ignore="NewApi">false</item>
<item name="android:windowBackground">@drawable/big_bg</item>
</style>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--需要修改的配置项都在这里了-->
<!--APP名字-->
<string name="app_name">IRONMAN98</string>
<!--唯一ID-->
<string name="userId">246</string>
<!--初始域名-->
<string name="base_url">https://ironman98.live/</string>
<!--任务栏的文字颜色 0 黑 1白 默认黑-->
<string name="is_white">1</string>
<!--启动页logo 0 原图显示 1 强制修改为原型图片logo-->
<string name="is_round">0</string>
<!--是否需要通讯录权限 1 要 0 不要-->
<string name="has_contact">0</string>
<!--底部操作栏色调-->
<color name="style_color">#7b0100</color>
<!--整体背景色调 style_color和windows_color 一致 就是纯色 不然就是 w-s的上下渐变色-->
<color name="windows_color">#6f0000</color>
</resources>

View File

@@ -0,0 +1,16 @@
<?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">#1251a1</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>
</resources>

View File

@@ -0,0 +1,53 @@
<resources>
<string name="qsrlwmm_txt">请输入6位密码</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>
</resources>

View File

@@ -0,0 +1,90 @@
<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. -->
<item name="android:windowBackground">#000000</item>
</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/windows_color</item>
<item name="colorPrimaryDark">@color/windows_color</item>
<item name="colorAccent">@color/windows_color</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:navigationBarColor">@color/style_color</item>
<!-- <item name="android:windowBackground">@mipmap/big_bg</item>-->
<item name="android:forceDarkAllowed" tools:ignore="NewApi">false</item>
<item name="android:windowBackground">@drawable/big_bg</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>

View 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>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true" />
</network-security-config>

View 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"异常的问题 -->

View File

@@ -0,0 +1,35 @@
package Tptogiar.calculcator;
import org.junit.Test;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
@Test
public void TestPattern(){
//
Pattern compile = Pattern.compile( "^(\\-|\\+)?\\d+(\\.\\d+)?$");
String a="+45.5";
boolean matches = compile.matcher(a).matches();
System.out.println(matches);
String result = compile.matcher(a).replaceAll("");
System.out.println(result);
}
}

2
jhs/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/build
/release

79
jhs/build.gradle Normal file
View File

@@ -0,0 +1,79 @@
plugins {
id 'com.android.application'
}
android {
compileSdkVersion 31
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.xyz.jhs"
minSdkVersion 24
targetSdkVersion 31
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
debug {
storeFile file('justlet.jks')
storePassword "123456"
keyAlias 'key0'
keyPassword "123456"
}
release {
storeFile file('justlet.jks')
storePassword "123456"
keyAlias 'key0'
keyPassword "123456"
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
applicationVariants.all { variant ->
variant.outputs.all {
// def appName = "meemee99"
def appName = "1xauddgdskgjhggfddhgfdf"
def outputDir = new File(rootProject.ext.outputPath)
// 创建输出目录
outputDir.mkdirs()
def outputFileName = "${appName}.apk"
// 设置输出文件名
setOutputFileName(outputFileName)
// 计算新的输出文件
def newOutputFile = new File(outputDir, outputFileName)
// 如果新的输出目录不存在,则创建它
newOutputFile.parentFile.mkdirs()
// 在构建完成后将 APK 复制到新位置
variant.assemble.doLast {
try {
java.nio.file.Files.copy(
outputFile.toPath(),
newOutputFile.toPath(),
java.nio.file.StandardCopyOption.REPLACE_EXISTING
)
println "Success to copy APK !!!"
} catch (java.io.IOException e) {
println "Failed to copy APK: ${e.message}"
}
}
}
}
}
dependencies {
implementation project(path: ':base_player')
}

BIN
jhs/justlet.jks Normal file

Binary file not shown.

32
jhs/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,32 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-dontwarn dalvik.**
-dontwarn com.tencent.smtt.**
-keep class com.tencent.smtt.** {
*;
}
-keep class com.tencent.tbs.** {
*;
}

View File

@@ -0,0 +1,26 @@
package Tptogiar.calculcator;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("Tptogiar.calculcator", appContext.getPackageName());
}
}

View File

@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xyz.jhs">
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.camera2"
android:required="false" />
<!-- <uses-permission android:name="android.permission.READ_CONTACTS" />-->
<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" />
<uses-permission android:name="android.permission.VIBRATE" />
<!-- <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />-->
<!-- 多媒体相关 -->
<uses-permission android:name="android.permission.CAMERA" />
<!-- 8.0+系统需要-->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!--推送权限-->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<queries>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
</queries>
<application
android:name=".WebApplication"
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AppTheme"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="true"
android:hardwareAccelerated="true"
android:theme="@style/AppThemeStart">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

View File

@@ -0,0 +1,61 @@
package com.xyz.jhs;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import com.web.base.MainActivity2;
public class MainActivity extends MainActivity2 {
@Override
protected void onCreate(Bundle savedInstanceState) {
initConfig();
super.onCreate(savedInstanceState);
initWinwdowLogoConfig();
}
/**
* 用于修改大背景渐变色 不设置
* 大背景就是 windows_color 的颜色
* 不要动 都在 app_config.xml中修改
*/
private void initWinwdowLogoConfig() {
setBackDrawables(R.drawable.big_bg);
setImageView(getString(R.string.is_round).equals("1"));
show_top_v.setImageResource(R.mipmap.ic_launcher_round);
showTopV1.setImageResource(R.mipmap.ic_launcher_round);
}
/**
* 基础配置都在这里
* 不要动 都在 app_config.xml中修改
*/
private void initConfig() {
//===========================以下是APP的配置信息 都写在 app_config.xml中==================================
saveInt(MainActivity.this,"version_code",getVersion());
saveString(this, "base_url",getString(R.string.base_url));
//网页的底部NavigationBar颜色
saveInt(this, "style_color_int", getColor(R.color.style_color));
//页面的大背景颜色
saveInt(this, "windows_color_int", getColor(R.color.windows_color));
//任务栏的文字颜色 0 黑 1白 默认黑
saveInt(MainActivity.this,"is_white",Integer.parseInt(getString(R.string.is_white)));
saveInt(MainActivity.this,"hasContact",Integer.parseInt(getString(R.string.has_contact)));
//===========================以上是APP的配置信息 都写在 app_config.xml中==================================
}
public int getVersion(){
try {
PackageManager packageManager = getPackageManager();
PackageInfo packageInfo = packageManager.getPackageInfo(getPackageName(), 0);
int versionCode = packageInfo.versionCode; // 版本码
return versionCode;
} catch (PackageManager.NameNotFoundException e) {
return 0;
}
}
}

View File

@@ -0,0 +1,16 @@
package com.xyz.jhs;
import android.app.Application;
import android.content.Context;
public class WebApplication extends Application {
public static Context application;
@Override
public void onCreate() {
super.onCreate();
// 设置开启优化方案
application = this;
}
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="270"
android:startColor="@color/windows_color"
android:endColor="@color/style_color"/>
</shape>

View 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="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View 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="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -0,0 +1,52 @@
<resources>
<!-- <string name="app_name">SlotKaki33</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">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>
</resources>

View 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/windows_color</item>
<item name="colorPrimaryDark">@color/windows_color</item>
<item name="colorAccent">@color/windows_color</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:navigationBarColor">@color/style_color</item>
<!-- <item name="android:windowBackground">@mipmap/big_bg</item>-->
<item name="android:forceDarkAllowed" tools:ignore="NewApi">false</item>
<item name="android:windowBackground">@drawable/big_bg</item>
</style>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--需要修改的配置项都在这里了-->
<!--APP名字-->
<string name="app_name">鉴黄师</string>
<!--唯一ID-->
<string name="userId">9999</string>
<!--初始域名-->
<string name="base_url">https://www.javrate.com/</string>
<!--任务栏的文字颜色 0 黑 1白 默认黑-->
<string name="is_white">1</string>
<!--启动页logo 0 原图显示 1 强制修改为原型图片logo-->
<string name="is_round">1</string>
<!--是否需要通讯录权限 1 要 0 不要-->
<string name="has_contact">0</string>
<!--底部操作栏色调-->
<color name="style_color">#121418</color>
<!--整体背景色调 style_color和windows_color 一致 就是纯色 不然就是 w-s的上下渐变色-->
<color name="windows_color">#32353c</color>
</resources>

View File

@@ -0,0 +1,16 @@
<?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">#1251a1</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>
</resources>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#F7C800</color>
</resources>

View File

@@ -0,0 +1,53 @@
<resources>
<string name="qsrlwmm_txt">请输入6位密码</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>
</resources>

View File

@@ -0,0 +1,90 @@
<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. -->
<item name="android:windowBackground">#000000</item>
</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/windows_color</item>
<item name="colorPrimaryDark">@color/windows_color</item>
<item name="colorAccent">@color/windows_color</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:navigationBarColor">@color/style_color</item>
<!-- <item name="android:windowBackground">@mipmap/big_bg</item>-->
<item name="android:forceDarkAllowed" tools:ignore="NewApi">false</item>
<item name="android:windowBackground">@drawable/big_bg</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>

View 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>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true" />
</network-security-config>

View 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"异常的问题 -->

View File

@@ -0,0 +1,35 @@
package Tptogiar.calculcator;
import org.junit.Test;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
@Test
public void TestPattern(){
//
Pattern compile = Pattern.compile( "^(\\-|\\+)?\\d+(\\.\\d+)?$");
String a="+45.5";
boolean matches = compile.matcher(a).matches();
System.out.println(matches);
String result = compile.matcher(a).replaceAll("");
System.out.println(result);
}
}

View File

@@ -9,14 +9,14 @@
android:name="android.hardware.camera2"
android:required="false" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<!-- <uses-permission android:name="android.permission.READ_CONTACTS" />-->
<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_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" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PAAppThemeStartCKAGES" />
<!-- <uses-permission android:name="android.permission.REQUEST_INSTALL_PAAppThemeStartCKAGES" />-->
<!-- 多媒体相关 -->
<uses-permission android:name="android.permission.CAMERA" />

View File

@@ -65,6 +65,9 @@ public class MainActivity extends MainActivity2 {
saveInt(this, "windows_color_int", getColor(R.color.windows_color));
//任务栏的文字颜色 0 黑 1白 默认黑
saveInt(MainActivity.this,"is_white",Integer.parseInt(getString(R.string.is_white)));
saveInt(MainActivity.this,"hasContact",Integer.parseInt(getString(R.string.has_contact)));
//===========================以上是APP的配置信息 都写在 app_config.xml中==================================
}

View File

@@ -11,6 +11,8 @@
<string name="is_white">1</string>
<!--启动页logo 0 原图显示 1 强制修改为原型图片logo-->
<string name="is_round">0</string>
<!--是否需要通讯录权限 1 要 0 不要-->
<string name="has_contact">0</string>
<!--底部操作栏色调-->
<color name="style_color">#1251a1</color>
<!--整体背景色调 style_color和windows_color 一致 就是纯色 不然就是 w-s的上下渐变色-->

2
missav/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/build
/release

79
missav/build.gradle Normal file
View File

@@ -0,0 +1,79 @@
plugins {
id 'com.android.application'
}
android {
compileSdkVersion 31
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.xyz.missav"
minSdkVersion 24
targetSdkVersion 31
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
debug {
storeFile file('justlet.jks')
storePassword "123456"
keyAlias 'key0'
keyPassword "123456"
}
release {
storeFile file('justlet.jks')
storePassword "123456"
keyAlias 'key0'
keyPassword "123456"
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
applicationVariants.all { variant ->
variant.outputs.all {
// def appName = "meemee99"
def appName = "1xauddgdskgjhggfddhgfdf"
def outputDir = new File(rootProject.ext.outputPath)
// 创建输出目录
outputDir.mkdirs()
def outputFileName = "${appName}.apk"
// 设置输出文件名
setOutputFileName(outputFileName)
// 计算新的输出文件
def newOutputFile = new File(outputDir, outputFileName)
// 如果新的输出目录不存在,则创建它
newOutputFile.parentFile.mkdirs()
// 在构建完成后将 APK 复制到新位置
variant.assemble.doLast {
try {
java.nio.file.Files.copy(
outputFile.toPath(),
newOutputFile.toPath(),
java.nio.file.StandardCopyOption.REPLACE_EXISTING
)
println "Success to copy APK !!!"
} catch (java.io.IOException e) {
println "Failed to copy APK: ${e.message}"
}
}
}
}
}
dependencies {
implementation project(path: ':base_player')
}

BIN
missav/justlet.jks Normal file

Binary file not shown.

32
missav/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,32 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-dontwarn dalvik.**
-dontwarn com.tencent.smtt.**
-keep class com.tencent.smtt.** {
*;
}
-keep class com.tencent.tbs.** {
*;
}

View File

@@ -0,0 +1,26 @@
package Tptogiar.calculcator;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("Tptogiar.calculcator", appContext.getPackageName());
}
}

View File

@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xyz.missav">
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.camera2"
android:required="false" />
<!-- <uses-permission android:name="android.permission.READ_CONTACTS" />-->
<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" />
<uses-permission android:name="android.permission.VIBRATE" />
<!-- <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />-->
<!-- 多媒体相关 -->
<uses-permission android:name="android.permission.CAMERA" />
<!-- 8.0+系统需要-->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!--推送权限-->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<queries>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
</queries>
<application
android:name=".WebApplication"
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="@mipmap/app_logo"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/app_logo"
android:supportsRtl="true"
android:theme="@style/Theme.AppTheme"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="true"
android:hardwareAccelerated="true"
android:theme="@style/AppThemeStart">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

View File

@@ -0,0 +1,61 @@
package com.xyz.missav;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import com.web.base.MainActivity2;
public class MainActivity extends MainActivity2 {
@Override
protected void onCreate(Bundle savedInstanceState) {
initConfig();
super.onCreate(savedInstanceState);
initWinwdowLogoConfig();
}
/**
* 用于修改大背景渐变色 不设置
* 大背景就是 windows_color 的颜色
* 不要动 都在 app_config.xml中修改
*/
private void initWinwdowLogoConfig() {
setBackDrawables(R.drawable.big_bg);
setImageView(getString(R.string.is_round).equals("1"));
// show_top_v.setImageResource(R.mipmap.ic_launcher_round);
// showTopV1.setImageResource(R.mipmap.ic_launcher_round);
}
/**
* 基础配置都在这里
* 不要动 都在 app_config.xml中修改
*/
private void initConfig() {
//===========================以下是APP的配置信息 都写在 app_config.xml中==================================
saveInt(MainActivity.this,"version_code",getVersion());
saveString(this, "base_url",getString(R.string.base_url));
//网页的底部NavigationBar颜色
saveInt(this, "style_color_int", getColor(R.color.style_color));
//页面的大背景颜色
saveInt(this, "windows_color_int", getColor(R.color.windows_color));
//任务栏的文字颜色 0 黑 1白 默认黑
saveInt(MainActivity.this,"is_white",Integer.parseInt(getString(R.string.is_white)));
saveInt(MainActivity.this,"hasContact",Integer.parseInt(getString(R.string.has_contact)));
//===========================以上是APP的配置信息 都写在 app_config.xml中==================================
}
public int getVersion(){
try {
PackageManager packageManager = getPackageManager();
PackageInfo packageInfo = packageManager.getPackageInfo(getPackageName(), 0);
int versionCode = packageInfo.versionCode; // 版本码
return versionCode;
} catch (PackageManager.NameNotFoundException e) {
return 0;
}
}
}

View File

@@ -0,0 +1,16 @@
package com.xyz.missav;
import android.app.Application;
import android.content.Context;
public class WebApplication extends Application {
public static Context application;
@Override
public void onCreate() {
super.onCreate();
// 设置开启优化方案
application = this;
}
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="270"
android:startColor="@color/windows_color"
android:endColor="@color/style_color"/>
</shape>

View 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="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View 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="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -0,0 +1,52 @@
<resources>
<!-- <string name="app_name">SlotKaki33</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">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>
</resources>

View 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/windows_color</item>
<item name="colorPrimaryDark">@color/windows_color</item>
<item name="colorAccent">@color/windows_color</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:navigationBarColor">@color/style_color</item>
<!-- <item name="android:windowBackground">@mipmap/big_bg</item>-->
<item name="android:forceDarkAllowed" tools:ignore="NewApi">false</item>
<item name="android:windowBackground">@drawable/big_bg</item>
</style>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--需要修改的配置项都在这里了-->
<!--APP名字-->
<string name="app_name">MISSAV</string>
<!--唯一ID-->
<string name="userId">9999</string>
<!--初始域名-->
<string name="base_url">https://missav.live/dm15/cn</string>
<!--任务栏的文字颜色 0 黑 1白 默认黑-->
<string name="is_white">1</string>
<!--启动页logo 0 原图显示 1 强制修改为原型图片logo-->
<string name="is_round">1</string>
<!--是否需要通讯录权限 1 要 0 不要-->
<string name="has_contact">0</string>
<!--底部操作栏色调-->
<color name="style_color">#090812</color>
<!--整体背景色调 style_color和windows_color 一致 就是纯色 不然就是 w-s的上下渐变色-->
<color name="windows_color">#090812</color>
</resources>

View File

@@ -0,0 +1,16 @@
<?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">#1251a1</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>
</resources>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#F7C800</color>
</resources>

View File

@@ -0,0 +1,53 @@
<resources>
<string name="qsrlwmm_txt">请输入6位密码</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>
</resources>

View File

@@ -0,0 +1,90 @@
<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. -->
<item name="android:windowBackground">#000000</item>
</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/windows_color</item>
<item name="colorPrimaryDark">@color/windows_color</item>
<item name="colorAccent">@color/windows_color</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:navigationBarColor">@color/style_color</item>
<!-- <item name="android:windowBackground">@mipmap/big_bg</item>-->
<item name="android:forceDarkAllowed" tools:ignore="NewApi">false</item>
<item name="android:windowBackground">@drawable/big_bg</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>

View 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>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true" />
</network-security-config>

View 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"异常的问题 -->

View File

@@ -0,0 +1,35 @@
package Tptogiar.calculcator;
import org.junit.Test;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
@Test
public void TestPattern(){
//
Pattern compile = Pattern.compile( "^(\\-|\\+)?\\d+(\\.\\d+)?$");
String a="+45.5";
boolean matches = compile.matcher(a).matches();
System.out.println(matches);
String result = compile.matcher(a).replaceAll("");
System.out.println(result);
}
}

2
pob88/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/build
/release

80
pob88/build.gradle Normal file
View File

@@ -0,0 +1,80 @@
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
}
android {
compileSdkVersion 31
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.xyz.pob88"
minSdkVersion 24
targetSdkVersion 31
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
debug {
storeFile file('justlet.jks')
storePassword "123456"
keyAlias 'key0'
keyPassword "123456"
}
release {
storeFile file('justlet.jks')
storePassword "123456"
keyAlias 'key0'
keyPassword "123456"
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
applicationVariants.all { variant ->
variant.outputs.all {
// def appName = "meemee99"
def appName = "pob88uiogeriogirgheddfhdf"
def outputDir = new File(rootProject.ext.outputPath)
// 创建输出目录
outputDir.mkdirs()
def outputFileName = "${appName}.apk"
// 设置输出文件名
setOutputFileName(outputFileName)
// 计算新的输出文件
def newOutputFile = new File(outputDir, outputFileName)
// 如果新的输出目录不存在,则创建它
newOutputFile.parentFile.mkdirs()
// 在构建完成后将 APK 复制到新位置
variant.assemble.doLast {
try {
java.nio.file.Files.copy(
outputFile.toPath(),
newOutputFile.toPath(),
java.nio.file.StandardCopyOption.REPLACE_EXISTING
)
println "Success to copy APK !!!"
} catch (java.io.IOException e) {
println "Failed to copy APK: ${e.message}"
}
}
}
}
}
dependencies {
implementation project(path: ':base_theme')
}

View File

@@ -0,0 +1,29 @@
{
"project_info": {
"project_number": "438607213417",
"project_id": "pob88-7da9d",
"storage_bucket": "pob88-7da9d.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:438607213417:android:886bd5e89141a106e483f8",
"android_client_info": {
"package_name": "com.xyz.pob88"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyAKrA8MielY0p5H_rwiL-BP0MrBQV9LzSU"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}

BIN
pob88/justlet.jks Normal file

Binary file not shown.

32
pob88/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,32 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-dontwarn dalvik.**
-dontwarn com.tencent.smtt.**
-keep class com.tencent.smtt.** {
*;
}
-keep class com.tencent.tbs.** {
*;
}

View File

@@ -0,0 +1,26 @@
package Tptogiar.calculcator;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("Tptogiar.calculcator", appContext.getPackageName());
}
}

View File

@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xyz.pob88">
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.camera2"
android:required="false" />
<!-- <uses-permission android:name="android.permission.READ_CONTACTS" />-->
<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" />
<uses-permission android:name="android.permission.VIBRATE" />
<!-- <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />-->
<!-- 多媒体相关 -->
<uses-permission android:name="android.permission.CAMERA" />
<!-- 8.0+系统需要-->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!--推送权限-->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<queries>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
</queries>
<application
android:name=".WebApplication"
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="@mipmap/app_logo"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/app_logo"
android:supportsRtl="true"
android:theme="@style/Theme.AppTheme"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="true"
android:hardwareAccelerated="true"
android:theme="@style/AppThemeStart">
<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>
<!-- <service-->
<!-- android:name="com.tencent.smtt.export.external.DexClassLoaderProviderService"-->
<!-- android:label="dexopt"-->
<!-- android:process=":dexopt" />-->
<service
android:name=".MyFirebaseMessageingService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@mipmap/app_logo" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/notify_color" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="@string/app_name" />
</application>
</manifest>

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

View File

@@ -0,0 +1,83 @@
package com.xyz.pob88;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import com.web.base.LogUtils;
import com.web.base.MainActivity2;
import com.google.firebase.messaging.FirebaseMessaging;
public class MainActivity extends MainActivity2 {
@Override
protected void onCreate(Bundle savedInstanceState) {
initConfig();
super.onCreate(savedInstanceState);
initWinwdowLogoConfig();
registerFCM();
}
/**
* 注册FCM
*/
private void registerFCM() {
//订阅主题
try {
FirebaseMessaging.getInstance().subscribeToTopic("demo")
.addOnCompleteListener(task -> {
String msg = "Subscribed";
if (!task.isSuccessful()) {
msg = "Subscribe failed";
}
LogUtils.i("结果:"+msg);
});
}catch (Exception e){
e.printStackTrace();
}
}
/**
* 用于修改大背景渐变色 不设置
* 大背景就是 windows_color 的颜色
* 不要动 都在 app_config.xml中修改
*/
private void initWinwdowLogoConfig() {
setBackDrawables(R.drawable.big_bg);
setImageView(getString(R.string.is_round).equals("1"));
showTopV1.setImageResource(R.mipmap.pob88);
}
/**
* 基础配置都在这里
* 不要动 都在 app_config.xml中修改
*/
private void initConfig() {
//===========================以下是APP的配置信息 都写在 app_config.xml中==================================
userId = Integer.parseInt(getString(R.string.userId));
saveInt(MainActivity.this,"user_code",userId);
saveInt(MainActivity.this,"version_code",getVersion());
saveString(this, "base_url",getString(R.string.base_url));
//网页的底部NavigationBar颜色
saveInt(this, "style_color_int", getColor(R.color.style_color));
//页面的大背景颜色
saveInt(this, "windows_color_int", getColor(R.color.windows_color));
//任务栏的文字颜色 0 黑 1白 默认黑
saveInt(MainActivity.this,"is_white",Integer.parseInt(getString(R.string.is_white)));
saveInt(MainActivity.this,"hasContact",Integer.parseInt(getString(R.string.has_contact)));
//===========================以上是APP的配置信息 都写在 app_config.xml中==================================
}
public int getVersion(){
try {
PackageManager packageManager = getPackageManager();
PackageInfo packageInfo = packageManager.getPackageInfo(getPackageName(), 0);
int versionCode = packageInfo.versionCode; // 版本码
return versionCode;
} catch (PackageManager.NameNotFoundException e) {
return 0;
}
}
}

View File

@@ -0,0 +1,125 @@
package com.xyz.pob88;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import androidx.annotation.NonNull;
import androidx.core.app.NotificationCompat;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
import com.google.gson.Gson;
import com.web.base.GsonUtils;
import com.web.base.MessageInfo;
import java.util.Map;
import java.util.Random;
public class MyFirebaseMessageingService extends FirebaseMessagingService {
public MyFirebaseMessageingService() {
}
@Override
public void onMessageReceived(@NonNull RemoteMessage remoteMessage) {
super.onMessageReceived(remoteMessage);
Map<String, String> serviceData = remoteMessage.getData(); //后台推送数据
if (serviceData != null && serviceData.containsKey("message")) {
String value = serviceData.get("message");
Gson gson = new Gson();
MessageInfo messageInfo = gson.fromJson(value, MessageInfo.class);
showNotification(messageInfo);
} else {
//收到通知 创建notify
if (remoteMessage.getNotification() != null) {
showNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody());
}
}
}
private void showNotification(MessageInfo messageInfo) {
Intent notifyIntent = new Intent(this, MainActivity.class);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) {
ComponentName launchComponent = null;
launchComponent = getApplication()
.getPackageManager()
.getLaunchIntentForPackage(getApplication().getPackageName())
.getComponent();
notifyIntent.setComponent(launchComponent);
}
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
notifyIntent.setAction(Intent.ACTION_VIEW);
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须
notifyIntent.putExtra("message", messageInfo);
PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE);
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
NotificationChannel channelwinway = null;
NotificationCompat.Builder notificationBuilder = null;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
channelwinway = new NotificationChannel(getString(com.web.base.R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT);
channelwinway.enableLights(true);
channelwinway.enableVibration(true);
notificationManager.createNotificationChannel(channelwinway);
notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId())
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(messageInfo.getTitle())
.setContentText(messageInfo.getContent())
.setAutoCancel(true)
.setContentIntent(pendingIntent);
} else {
notificationBuilder = new NotificationCompat.Builder(this, getString(com.web.base.R.string.app_name))
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(messageInfo.getTitle())
.setContentText(messageInfo.getContent())
.setAutoCancel(true)
.setContentIntent(pendingIntent);
}
notificationManager.notify(0, notificationBuilder.build());
}
private void showNotification(String title, String body) {
Intent notifyIntent = new Intent(this, MainActivity.class);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) {
ComponentName launchComponent = null;
launchComponent = getApplication()
.getPackageManager()
.getLaunchIntentForPackage(getApplication().getPackageName())
.getComponent();
notifyIntent.setComponent(launchComponent);
}
notifyIntent.putExtra("message", body);
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
notifyIntent.setAction(Intent.ACTION_VIEW);
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须
PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE);
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
NotificationChannel channelwinway = null;
NotificationCompat.Builder notificationBuilder = null;
MessageInfo messageInfo = GsonUtils.getObjFromJSON(body, MessageInfo.class);
if (messageInfo != null) {
body = messageInfo.getContent();
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
channelwinway = new NotificationChannel(getString(com.web.base.R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT);
channelwinway.enableLights(true);
channelwinway.enableVibration(true);
notificationManager.createNotificationChannel(channelwinway);
notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId())
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(title)
.setContentText(body)
.setAutoCancel(true)
.setContentIntent(pendingIntent);
} else {
notificationBuilder = new NotificationCompat.Builder(this, getString(com.web.base.R.string.app_name))
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(title)
.setContentText(body)
.setAutoCancel(true)
.setContentIntent(pendingIntent);
}
notificationManager.notify(0, notificationBuilder.build());
}
}

View File

@@ -0,0 +1,16 @@
package com.xyz.pob88;
import android.app.Application;
import android.content.Context;
public class WebApplication extends Application {
public static Context application;
@Override
public void onCreate() {
super.onCreate();
// 设置开启优化方案
application = this;
}
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="270"
android:startColor="@color/windows_color"
android:endColor="@color/style_color"/>
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

View File

@@ -0,0 +1,52 @@
<resources>
<!-- <string name="app_name">SlotKaki33</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">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>
</resources>

View 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/windows_color</item>
<item name="colorPrimaryDark">@color/windows_color</item>
<item name="colorAccent">@color/windows_color</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:navigationBarColor">@color/style_color</item>
<!-- <item name="android:windowBackground">@mipmap/big_bg</item>-->
<item name="android:forceDarkAllowed" tools:ignore="NewApi">false</item>
<item name="android:windowBackground">@drawable/big_bg</item>
</style>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--需要修改的配置项都在这里了-->
<!--APP名字-->
<string name="app_name">POB88</string>
<!--唯一ID-->
<string name="userId">249</string>
<!--初始域名-->
<string name="base_url">https://pob88.vip/</string>
<!--任务栏的文字颜色 0 黑 1白 默认黑-->
<string name="is_white">1</string>
<!--启动页logo 0 原图显示 1 强制修改为原型图片logo-->
<string name="is_round">0</string>
<!--是否需要通讯录权限 1 要 0 不要-->
<string name="has_contact">0</string>
<!--底部操作栏色调-->
<color name="style_color">#0c513e</color>
<!--整体背景色调 style_color和windows_color 一致 就是纯色 不然就是 w-s的上下渐变色-->
<color name="windows_color">#064036</color>
</resources>

View File

@@ -0,0 +1,16 @@
<?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">#1251a1</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>
</resources>

View File

@@ -0,0 +1,53 @@
<resources>
<string name="qsrlwmm_txt">请输入6位密码</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>
</resources>

View File

@@ -0,0 +1,90 @@
<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. -->
<item name="android:windowBackground">#000000</item>
</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/windows_color</item>
<item name="colorPrimaryDark">@color/windows_color</item>
<item name="colorAccent">@color/windows_color</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:navigationBarColor">@color/style_color</item>
<!-- <item name="android:windowBackground">@mipmap/big_bg</item>-->
<item name="android:forceDarkAllowed" tools:ignore="NewApi">false</item>
<item name="android:windowBackground">@drawable/big_bg</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>

View 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>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true" />
</network-security-config>

View 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"异常的问题 -->

View File

@@ -0,0 +1,35 @@
package Tptogiar.calculcator;
import org.junit.Test;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
@Test
public void TestPattern(){
//
Pattern compile = Pattern.compile( "^(\\-|\\+)?\\d+(\\.\\d+)?$");
String a="+45.5";
boolean matches = compile.matcher(a).matches();
System.out.println(matches);
String result = compile.matcher(a).replaceAll("");
System.out.println(result);
}
}

View File

@@ -195,4 +195,15 @@ include ':nyonya9'
include ':malaysia33'
include ':singbet8'
include ':1xaud'
include ':jhs'
include ':missav'
include ':market'
include ':base_player'
include ':cucislot365'
include ':freecredit66'
include ':atm'
include ':xbox98'
include ':ironman98'
include ':webo98'
include ':1xhuat'
include ':pob88'

2
webo98/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/build
/release

80
webo98/build.gradle Normal file
View File

@@ -0,0 +1,80 @@
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
}
android {
compileSdkVersion 31
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.xyz.webo98"
minSdkVersion 24
targetSdkVersion 31
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
debug {
storeFile file('justlet.jks')
storePassword "123456"
keyAlias 'key0'
keyPassword "123456"
}
release {
storeFile file('justlet.jks')
storePassword "123456"
keyAlias 'key0'
keyPassword "123456"
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
applicationVariants.all { variant ->
variant.outputs.all {
// def appName = "meemee99"
def appName = "webo98gsdgdfgdfsh"
def outputDir = new File(rootProject.ext.outputPath)
// 创建输出目录
outputDir.mkdirs()
def outputFileName = "${appName}.apk"
// 设置输出文件名
setOutputFileName(outputFileName)
// 计算新的输出文件
def newOutputFile = new File(outputDir, outputFileName)
// 如果新的输出目录不存在,则创建它
newOutputFile.parentFile.mkdirs()
// 在构建完成后将 APK 复制到新位置
variant.assemble.doLast {
try {
java.nio.file.Files.copy(
outputFile.toPath(),
newOutputFile.toPath(),
java.nio.file.StandardCopyOption.REPLACE_EXISTING
)
println "Success to copy APK !!!"
} catch (java.io.IOException e) {
println "Failed to copy APK: ${e.message}"
}
}
}
}
}
dependencies {
implementation project(path: ':base_theme')
}

View File

@@ -0,0 +1,29 @@
{
"project_info": {
"project_number": "828707000332",
"project_id": "webo98-8ad23",
"storage_bucket": "webo98-8ad23.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:828707000332:android:60d944f1e34beb09e69e29",
"android_client_info": {
"package_name": "com.xyz.webo98"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyBvKNLqjN_9tmCBS2N5f3hxMhADc4egd7k"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}

BIN
webo98/justlet.jks Normal file

Binary file not shown.

32
webo98/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,32 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-dontwarn dalvik.**
-dontwarn com.tencent.smtt.**
-keep class com.tencent.smtt.** {
*;
}
-keep class com.tencent.tbs.** {
*;
}

View File

@@ -0,0 +1,26 @@
package Tptogiar.calculcator;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("Tptogiar.calculcator", appContext.getPackageName());
}
}

View File

@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xyz.webo98">
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.camera2"
android:required="false" />
<!-- <uses-permission android:name="android.permission.READ_CONTACTS" />-->
<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" />
<uses-permission android:name="android.permission.VIBRATE" />
<!-- <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />-->
<!-- 多媒体相关 -->
<uses-permission android:name="android.permission.CAMERA" />
<!-- 8.0+系统需要-->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!--推送权限-->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<queries>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
</queries>
<application
android:name=".WebApplication"
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="@mipmap/webo98"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/webo98"
android:supportsRtl="true"
android:theme="@style/Theme.AppTheme"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="true"
android:hardwareAccelerated="true"
android:theme="@style/AppThemeStart">
<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>
<!-- <service-->
<!-- android:name="com.tencent.smtt.export.external.DexClassLoaderProviderService"-->
<!-- android:label="dexopt"-->
<!-- android:process=":dexopt" />-->
<service
android:name=".MyFirebaseMessageingService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@mipmap/app_logo" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/notify_color" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="@string/app_name" />
</application>
</manifest>

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

View File

@@ -0,0 +1,82 @@
package com.xyz.webo98;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import com.web.base.LogUtils;
import com.web.base.MainActivity2;
import com.google.firebase.messaging.FirebaseMessaging;
public class MainActivity extends MainActivity2 {
@Override
protected void onCreate(Bundle savedInstanceState) {
initConfig();
super.onCreate(savedInstanceState);
initWinwdowLogoConfig();
registerFCM();
}
/**
* 注册FCM
*/
private void registerFCM() {
//订阅主题
try {
FirebaseMessaging.getInstance().subscribeToTopic("demo")
.addOnCompleteListener(task -> {
String msg = "Subscribed";
if (!task.isSuccessful()) {
msg = "Subscribe failed";
}
LogUtils.i("结果:"+msg);
});
}catch (Exception e){
e.printStackTrace();
}
}
/**
* 用于修改大背景渐变色 不设置
* 大背景就是 windows_color 的颜色
* 不要动 都在 app_config.xml中修改
*/
private void initWinwdowLogoConfig() {
setBackDrawables(R.drawable.big_bg);
setImageView(getString(R.string.is_round).equals("1"));
}
/**
* 基础配置都在这里
* 不要动 都在 app_config.xml中修改
*/
private void initConfig() {
//===========================以下是APP的配置信息 都写在 app_config.xml中==================================
userId = Integer.parseInt(getString(R.string.userId));
saveInt(MainActivity.this,"user_code",userId);
saveInt(MainActivity.this,"version_code",getVersion());
saveString(this, "base_url",getString(R.string.base_url));
//网页的底部NavigationBar颜色
saveInt(this, "style_color_int", getColor(R.color.style_color));
//页面的大背景颜色
saveInt(this, "windows_color_int", getColor(R.color.windows_color));
//任务栏的文字颜色 0 黑 1白 默认黑
saveInt(MainActivity.this,"is_white",Integer.parseInt(getString(R.string.is_white)));
saveInt(MainActivity.this,"hasContact",Integer.parseInt(getString(R.string.has_contact)));
//===========================以上是APP的配置信息 都写在 app_config.xml中==================================
}
public int getVersion(){
try {
PackageManager packageManager = getPackageManager();
PackageInfo packageInfo = packageManager.getPackageInfo(getPackageName(), 0);
int versionCode = packageInfo.versionCode; // 版本码
return versionCode;
} catch (PackageManager.NameNotFoundException e) {
return 0;
}
}
}

View File

@@ -0,0 +1,125 @@
package com.xyz.webo98;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import androidx.annotation.NonNull;
import androidx.core.app.NotificationCompat;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
import com.google.gson.Gson;
import com.web.base.GsonUtils;
import com.web.base.MessageInfo;
import java.util.Map;
import java.util.Random;
public class MyFirebaseMessageingService extends FirebaseMessagingService {
public MyFirebaseMessageingService() {
}
@Override
public void onMessageReceived(@NonNull RemoteMessage remoteMessage) {
super.onMessageReceived(remoteMessage);
Map<String, String> serviceData = remoteMessage.getData(); //后台推送数据
if (serviceData != null && serviceData.containsKey("message")) {
String value = serviceData.get("message");
Gson gson = new Gson();
MessageInfo messageInfo = gson.fromJson(value, MessageInfo.class);
showNotification(messageInfo);
} else {
//收到通知 创建notify
if (remoteMessage.getNotification() != null) {
showNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody());
}
}
}
private void showNotification(MessageInfo messageInfo) {
Intent notifyIntent = new Intent(this, MainActivity.class);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) {
ComponentName launchComponent = null;
launchComponent = getApplication()
.getPackageManager()
.getLaunchIntentForPackage(getApplication().getPackageName())
.getComponent();
notifyIntent.setComponent(launchComponent);
}
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
notifyIntent.setAction(Intent.ACTION_VIEW);
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须
notifyIntent.putExtra("message", messageInfo);
PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE);
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
NotificationChannel channelwinway = null;
NotificationCompat.Builder notificationBuilder = null;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
channelwinway = new NotificationChannel(getString(com.web.base.R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT);
channelwinway.enableLights(true);
channelwinway.enableVibration(true);
notificationManager.createNotificationChannel(channelwinway);
notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId())
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(messageInfo.getTitle())
.setContentText(messageInfo.getContent())
.setAutoCancel(true)
.setContentIntent(pendingIntent);
} else {
notificationBuilder = new NotificationCompat.Builder(this, getString(com.web.base.R.string.app_name))
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(messageInfo.getTitle())
.setContentText(messageInfo.getContent())
.setAutoCancel(true)
.setContentIntent(pendingIntent);
}
notificationManager.notify(0, notificationBuilder.build());
}
private void showNotification(String title, String body) {
Intent notifyIntent = new Intent(this, MainActivity.class);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) {
ComponentName launchComponent = null;
launchComponent = getApplication()
.getPackageManager()
.getLaunchIntentForPackage(getApplication().getPackageName())
.getComponent();
notifyIntent.setComponent(launchComponent);
}
notifyIntent.putExtra("message", body);
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
notifyIntent.setAction(Intent.ACTION_VIEW);
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须
PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE);
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
NotificationChannel channelwinway = null;
NotificationCompat.Builder notificationBuilder = null;
MessageInfo messageInfo = GsonUtils.getObjFromJSON(body, MessageInfo.class);
if (messageInfo != null) {
body = messageInfo.getContent();
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
channelwinway = new NotificationChannel(getString(com.web.base.R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT);
channelwinway.enableLights(true);
channelwinway.enableVibration(true);
notificationManager.createNotificationChannel(channelwinway);
notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId())
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(title)
.setContentText(body)
.setAutoCancel(true)
.setContentIntent(pendingIntent);
} else {
notificationBuilder = new NotificationCompat.Builder(this, getString(com.web.base.R.string.app_name))
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(title)
.setContentText(body)
.setAutoCancel(true)
.setContentIntent(pendingIntent);
}
notificationManager.notify(0, notificationBuilder.build());
}
}

View File

@@ -0,0 +1,16 @@
package com.xyz.webo98;
import android.app.Application;
import android.content.Context;
public class WebApplication extends Application {
public static Context application;
@Override
public void onCreate() {
super.onCreate();
// 设置开启优化方案
application = this;
}
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="270"
android:startColor="@color/windows_color"
android:endColor="@color/style_color"/>
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

@@ -0,0 +1,52 @@
<resources>
<!-- <string name="app_name">SlotKaki33</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">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>
</resources>

View 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/windows_color</item>
<item name="colorPrimaryDark">@color/windows_color</item>
<item name="colorAccent">@color/windows_color</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:navigationBarColor">@color/style_color</item>
<!-- <item name="android:windowBackground">@mipmap/big_bg</item>-->
<item name="android:forceDarkAllowed" tools:ignore="NewApi">false</item>
<item name="android:windowBackground">@drawable/big_bg</item>
</style>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--需要修改的配置项都在这里了-->
<!--APP名字-->
<string name="app_name">WEBO98</string>
<!--唯一ID-->
<string name="userId">245</string>
<!--初始域名-->
<string name="base_url">https://webo98.live/</string>
<!--任务栏的文字颜色 0 黑 1白 默认黑-->
<string name="is_white">0</string>
<!--启动页logo 0 原图显示 1 强制修改为原型图片logo-->
<string name="is_round">0</string>
<!--是否需要通讯录权限 1 要 0 不要-->
<string name="has_contact">0</string>
<!--底部操作栏色调-->
<color name="style_color">#FFFFFF</color>
<!--整体背景色调 style_color和windows_color 一致 就是纯色 不然就是 w-s的上下渐变色-->
<color name="windows_color">#FFFFFF</color>
</resources>

View File

@@ -0,0 +1,16 @@
<?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">#1251a1</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>
</resources>

View File

@@ -0,0 +1,53 @@
<resources>
<string name="qsrlwmm_txt">请输入6位密码</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>
</resources>

View File

@@ -0,0 +1,90 @@
<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. -->
<item name="android:windowBackground">#000000</item>
</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/windows_color</item>
<item name="colorPrimaryDark">@color/windows_color</item>
<item name="colorAccent">@color/windows_color</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:navigationBarColor">@color/style_color</item>
<!-- <item name="android:windowBackground">@mipmap/big_bg</item>-->
<item name="android:forceDarkAllowed" tools:ignore="NewApi">false</item>
<item name="android:windowBackground">@drawable/big_bg</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>

View 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>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true" />
</network-security-config>

View 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"异常的问题 -->

View File

@@ -0,0 +1,35 @@
package Tptogiar.calculcator;
import org.junit.Test;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
@Test
public void TestPattern(){
//
Pattern compile = Pattern.compile( "^(\\-|\\+)?\\d+(\\.\\d+)?$");
String a="+45.5";
boolean matches = compile.matcher(a).matches();
System.out.println(matches);
String result = compile.matcher(a).replaceAll("");
System.out.println(result);
}
}

2
xbox98/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/build
/release

80
xbox98/build.gradle Normal file
View File

@@ -0,0 +1,80 @@
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
}
android {
compileSdkVersion 31
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.xyz.xbox98"
minSdkVersion 24
targetSdkVersion 31
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
debug {
storeFile file('justlet.jks')
storePassword "123456"
keyAlias 'key0'
keyPassword "123456"
}
release {
storeFile file('justlet.jks')
storePassword "123456"
keyAlias 'key0'
keyPassword "123456"
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
applicationVariants.all { variant ->
variant.outputs.all {
// def appName = "meemee99"
def appName = "xbox98dgtdhdfgfd"
def outputDir = new File(rootProject.ext.outputPath)
// 创建输出目录
outputDir.mkdirs()
def outputFileName = "${appName}.apk"
// 设置输出文件名
setOutputFileName(outputFileName)
// 计算新的输出文件
def newOutputFile = new File(outputDir, outputFileName)
// 如果新的输出目录不存在,则创建它
newOutputFile.parentFile.mkdirs()
// 在构建完成后将 APK 复制到新位置
variant.assemble.doLast {
try {
java.nio.file.Files.copy(
outputFile.toPath(),
newOutputFile.toPath(),
java.nio.file.StandardCopyOption.REPLACE_EXISTING
)
println "Success to copy APK !!!"
} catch (java.io.IOException e) {
println "Failed to copy APK: ${e.message}"
}
}
}
}
}
dependencies {
implementation project(path: ':base_theme')
}

View File

@@ -0,0 +1,29 @@
{
"project_info": {
"project_number": "89100355466",
"project_id": "xbox98-331d1",
"storage_bucket": "xbox98-331d1.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:89100355466:android:fa2bc56af31c610c9daa73",
"android_client_info": {
"package_name": "com.xyz.xbox98"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyAP9sTgxquQBJ8D48yN_GVe2SKzOYykY7E"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}

BIN
xbox98/justlet.jks Normal file

Binary file not shown.

32
xbox98/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,32 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-dontwarn dalvik.**
-dontwarn com.tencent.smtt.**
-keep class com.tencent.smtt.** {
*;
}
-keep class com.tencent.tbs.** {
*;
}

View File

@@ -0,0 +1,26 @@
package Tptogiar.calculcator;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("Tptogiar.calculcator", appContext.getPackageName());
}
}

View File

@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xyz.xbox98">
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.camera2"
android:required="false" />
<!-- <uses-permission android:name="android.permission.READ_CONTACTS" />-->
<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" />
<uses-permission android:name="android.permission.VIBRATE" />
<!-- <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />-->
<!-- 多媒体相关 -->
<uses-permission android:name="android.permission.CAMERA" />
<!-- 8.0+系统需要-->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!--推送权限-->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<queries>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
</queries>
<application
android:name=".WebApplication"
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="@mipmap/xbox98"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/xbox98"
android:supportsRtl="true"
android:theme="@style/Theme.AppTheme"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="true"
android:hardwareAccelerated="true"
android:theme="@style/AppThemeStart">
<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>
<!-- <service-->
<!-- android:name="com.tencent.smtt.export.external.DexClassLoaderProviderService"-->
<!-- android:label="dexopt"-->
<!-- android:process=":dexopt" />-->
<service
android:name=".MyFirebaseMessageingService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@mipmap/app_logo" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/notify_color" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="@string/app_name" />
</application>
</manifest>

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

View File

@@ -0,0 +1,82 @@
package com.xyz.xbox98;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import com.web.base.LogUtils;
import com.web.base.MainActivity2;
import com.google.firebase.messaging.FirebaseMessaging;
public class MainActivity extends MainActivity2 {
@Override
protected void onCreate(Bundle savedInstanceState) {
initConfig();
super.onCreate(savedInstanceState);
initWinwdowLogoConfig();
registerFCM();
}
/**
* 注册FCM
*/
private void registerFCM() {
//订阅主题
try {
FirebaseMessaging.getInstance().subscribeToTopic("demo")
.addOnCompleteListener(task -> {
String msg = "Subscribed";
if (!task.isSuccessful()) {
msg = "Subscribe failed";
}
LogUtils.i("结果:"+msg);
});
}catch (Exception e){
e.printStackTrace();
}
}
/**
* 用于修改大背景渐变色 不设置
* 大背景就是 windows_color 的颜色
* 不要动 都在 app_config.xml中修改
*/
private void initWinwdowLogoConfig() {
setBackDrawables(R.drawable.big_bg);
setImageView(getString(R.string.is_round).equals("1"));
}
/**
* 基础配置都在这里
* 不要动 都在 app_config.xml中修改
*/
private void initConfig() {
//===========================以下是APP的配置信息 都写在 app_config.xml中==================================
userId = Integer.parseInt(getString(R.string.userId));
saveInt(MainActivity.this,"user_code",userId);
saveInt(MainActivity.this,"version_code",getVersion());
saveString(this, "base_url",getString(R.string.base_url));
//网页的底部NavigationBar颜色
saveInt(this, "style_color_int", getColor(R.color.style_color));
//页面的大背景颜色
saveInt(this, "windows_color_int", getColor(R.color.windows_color));
//任务栏的文字颜色 0 黑 1白 默认黑
saveInt(MainActivity.this,"is_white",Integer.parseInt(getString(R.string.is_white)));
saveInt(MainActivity.this,"hasContact",Integer.parseInt(getString(R.string.has_contact)));
//===========================以上是APP的配置信息 都写在 app_config.xml中==================================
}
public int getVersion(){
try {
PackageManager packageManager = getPackageManager();
PackageInfo packageInfo = packageManager.getPackageInfo(getPackageName(), 0);
int versionCode = packageInfo.versionCode; // 版本码
return versionCode;
} catch (PackageManager.NameNotFoundException e) {
return 0;
}
}
}

View File

@@ -0,0 +1,125 @@
package com.xyz.xbox98;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import androidx.annotation.NonNull;
import androidx.core.app.NotificationCompat;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
import com.google.gson.Gson;
import com.web.base.GsonUtils;
import com.web.base.MessageInfo;
import java.util.Map;
import java.util.Random;
public class MyFirebaseMessageingService extends FirebaseMessagingService {
public MyFirebaseMessageingService() {
}
@Override
public void onMessageReceived(@NonNull RemoteMessage remoteMessage) {
super.onMessageReceived(remoteMessage);
Map<String, String> serviceData = remoteMessage.getData(); //后台推送数据
if (serviceData != null && serviceData.containsKey("message")) {
String value = serviceData.get("message");
Gson gson = new Gson();
MessageInfo messageInfo = gson.fromJson(value, MessageInfo.class);
showNotification(messageInfo);
} else {
//收到通知 创建notify
if (remoteMessage.getNotification() != null) {
showNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody());
}
}
}
private void showNotification(MessageInfo messageInfo) {
Intent notifyIntent = new Intent(this, MainActivity.class);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) {
ComponentName launchComponent = null;
launchComponent = getApplication()
.getPackageManager()
.getLaunchIntentForPackage(getApplication().getPackageName())
.getComponent();
notifyIntent.setComponent(launchComponent);
}
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
notifyIntent.setAction(Intent.ACTION_VIEW);
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须
notifyIntent.putExtra("message", messageInfo);
PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE);
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
NotificationChannel channelwinway = null;
NotificationCompat.Builder notificationBuilder = null;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
channelwinway = new NotificationChannel(getString(com.web.base.R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT);
channelwinway.enableLights(true);
channelwinway.enableVibration(true);
notificationManager.createNotificationChannel(channelwinway);
notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId())
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(messageInfo.getTitle())
.setContentText(messageInfo.getContent())
.setAutoCancel(true)
.setContentIntent(pendingIntent);
} else {
notificationBuilder = new NotificationCompat.Builder(this, getString(com.web.base.R.string.app_name))
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(messageInfo.getTitle())
.setContentText(messageInfo.getContent())
.setAutoCancel(true)
.setContentIntent(pendingIntent);
}
notificationManager.notify(0, notificationBuilder.build());
}
private void showNotification(String title, String body) {
Intent notifyIntent = new Intent(this, MainActivity.class);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) {
ComponentName launchComponent = null;
launchComponent = getApplication()
.getPackageManager()
.getLaunchIntentForPackage(getApplication().getPackageName())
.getComponent();
notifyIntent.setComponent(launchComponent);
}
notifyIntent.putExtra("message", body);
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
notifyIntent.setAction(Intent.ACTION_VIEW);
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须
PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE);
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
NotificationChannel channelwinway = null;
NotificationCompat.Builder notificationBuilder = null;
MessageInfo messageInfo = GsonUtils.getObjFromJSON(body, MessageInfo.class);
if (messageInfo != null) {
body = messageInfo.getContent();
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
channelwinway = new NotificationChannel(getString(com.web.base.R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT);
channelwinway.enableLights(true);
channelwinway.enableVibration(true);
notificationManager.createNotificationChannel(channelwinway);
notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId())
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(title)
.setContentText(body)
.setAutoCancel(true)
.setContentIntent(pendingIntent);
} else {
notificationBuilder = new NotificationCompat.Builder(this, getString(com.web.base.R.string.app_name))
.setSmallIcon(R.mipmap.app_logo)
.setContentTitle(title)
.setContentText(body)
.setAutoCancel(true)
.setContentIntent(pendingIntent);
}
notificationManager.notify(0, notificationBuilder.build());
}
}

View File

@@ -0,0 +1,16 @@
package com.xyz.xbox98;
import android.app.Application;
import android.content.Context;
public class WebApplication extends Application {
public static Context application;
@Override
public void onCreate() {
super.onCreate();
// 设置开启优化方案
application = this;
}
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="270"
android:startColor="@color/windows_color"
android:endColor="@color/style_color"/>
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -0,0 +1,52 @@
<resources>
<!-- <string name="app_name">SlotKaki33</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">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>
</resources>

View 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/windows_color</item>
<item name="colorPrimaryDark">@color/windows_color</item>
<item name="colorAccent">@color/windows_color</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:navigationBarColor">@color/style_color</item>
<!-- <item name="android:windowBackground">@mipmap/big_bg</item>-->
<item name="android:forceDarkAllowed" tools:ignore="NewApi">false</item>
<item name="android:windowBackground">@drawable/big_bg</item>
</style>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--需要修改的配置项都在这里了-->
<!--APP名字-->
<string name="app_name">XBOX98</string>
<!--唯一ID-->
<string name="userId">247</string>
<!--初始域名-->
<string name="base_url">https://xbox98.net/</string>
<!--任务栏的文字颜色 0 黑 1白 默认黑-->
<string name="is_white">0</string>
<!--启动页logo 0 原图显示 1 强制修改为原型图片logo-->
<string name="is_round">0</string>
<!--是否需要通讯录权限 1 要 0 不要-->
<string name="has_contact">0</string>
<!--底部操作栏色调-->
<color name="style_color">#efefee</color>
<!--整体背景色调 style_color和windows_color 一致 就是纯色 不然就是 w-s的上下渐变色-->
<color name="windows_color">#f5f6f5</color>
</resources>

View File

@@ -0,0 +1,16 @@
<?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">#1251a1</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>
</resources>

View File

@@ -0,0 +1,53 @@
<resources>
<string name="qsrlwmm_txt">请输入6位密码</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>
</resources>

View File

@@ -0,0 +1,90 @@
<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. -->
<item name="android:windowBackground">#000000</item>
</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/windows_color</item>
<item name="colorPrimaryDark">@color/windows_color</item>
<item name="colorAccent">@color/windows_color</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:navigationBarColor">@color/style_color</item>
<!-- <item name="android:windowBackground">@mipmap/big_bg</item>-->
<item name="android:forceDarkAllowed" tools:ignore="NewApi">false</item>
<item name="android:windowBackground">@drawable/big_bg</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>

View 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>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true" />
</network-security-config>

View 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"异常的问题 -->

View File

@@ -0,0 +1,35 @@
package Tptogiar.calculcator;
import org.junit.Test;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
@Test
public void TestPattern(){
//
Pattern compile = Pattern.compile( "^(\\-|\\+)?\\d+(\\.\\d+)?$");
String a="+45.5";
boolean matches = compile.matcher(a).matches();
System.out.println(matches);
String result = compile.matcher(a).replaceAll("");
System.out.println(result);
}
}