最新一次版本提交
This commit is contained in:
2
7pokies/.gitignore
vendored
Normal file
2
7pokies/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/build
|
||||
/release
|
||||
78
7pokies/build.gradle
Normal file
78
7pokies/build.gradle
Normal file
@@ -0,0 +1,78 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'com.google.gms.google-services'
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 31
|
||||
buildToolsVersion "30.0.3"
|
||||
defaultConfig {
|
||||
applicationId "com.web.pokies7"
|
||||
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 = "7pokies"
|
||||
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
7pokies/google-services.json
Normal file
29
7pokies/google-services.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "1060218410128",
|
||||
"project_id": "maucuci-9651c",
|
||||
"storage_bucket": "maucuci-9651c.firebasestorage.app"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:1060218410128:android:0b8a700289378d4dba7415",
|
||||
"android_client_info": {
|
||||
"package_name": "com.web.pokies7"
|
||||
}
|
||||
},
|
||||
"oauth_client": [],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyBb107_oeQFeofrtoa70tN80ukITSHgSrg"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
BIN
7pokies/justlet.jks
Normal file
BIN
7pokies/justlet.jks
Normal file
Binary file not shown.
32
7pokies/proguard-rules.pro
vendored
Normal file
32
7pokies/proguard-rules.pro
vendored
Normal 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.** {
|
||||
*;
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
104
7pokies/src/main/AndroidManifest.xml
Normal file
104
7pokies/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.web.pokies7">
|
||||
|
||||
<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_PAAppThemeStartCKAGES" />
|
||||
<!-- 多媒体相关 -->
|
||||
<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>
|
||||
|
||||
<!-- <activity-->
|
||||
<!-- android:name=".TestActivity"-->
|
||||
<!-- android:configChanges="orientation|keyboardHidden|screenSize"-->
|
||||
<!-- android:exported="true"-->
|
||||
<!-- android:hardwareAccelerated="true"-->
|
||||
<!-- android:theme="@style/AppThemeStart1">-->
|
||||
|
||||
<!-- <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=".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>
|
||||
82
7pokies/src/main/java/com/web/pokies7/MainActivity.java
Normal file
82
7pokies/src/main/java/com/web/pokies7/MainActivity.java
Normal file
@@ -0,0 +1,82 @@
|
||||
package com.web.pokies7;
|
||||
|
||||
|
||||
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)));
|
||||
//===========================以上是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;
|
||||
}
|
||||
}
|
||||
}
|
||||
57
7pokies/src/main/java/com/web/pokies7/MyCustomLayout.java
Normal file
57
7pokies/src/main/java/com/web/pokies7/MyCustomLayout.java
Normal file
@@ -0,0 +1,57 @@
|
||||
package com.web.pokies7;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.TextView;
|
||||
|
||||
/**
|
||||
* **********************
|
||||
*
|
||||
* @Author bug machine
|
||||
* 创建时间: 2025/12/25 17:16
|
||||
* 用途
|
||||
* **********************
|
||||
*/
|
||||
public class MyCustomLayout extends LinearLayout {
|
||||
|
||||
private TextView leftTv;
|
||||
private TextView rightTv;
|
||||
|
||||
public MyCustomLayout(Context context) {
|
||||
super(context);
|
||||
init(context);
|
||||
}
|
||||
|
||||
public MyCustomLayout(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init(context);
|
||||
}
|
||||
|
||||
public MyCustomLayout(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
init(context);
|
||||
}
|
||||
|
||||
private void init(Context context) {
|
||||
// 加载XML布局
|
||||
View view = LayoutInflater.from(context).inflate(R.layout.customview, this, true);
|
||||
// 初始化子控件
|
||||
leftTv = (TextView) view.findViewById(R.id.left_tv);
|
||||
rightTv = (TextView) view.findViewById(R.id.right_tv);
|
||||
|
||||
}
|
||||
|
||||
public void setLeftTv(String leftTvString){
|
||||
if(leftTv!=null){
|
||||
leftTv.setText(leftTvString);
|
||||
}
|
||||
}
|
||||
public void setRightTv(String rightTvString){
|
||||
if(rightTv!=null){
|
||||
rightTv.setText(rightTvString);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
package com.web.pokies7;
|
||||
|
||||
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());
|
||||
}
|
||||
}
|
||||
45
7pokies/src/main/java/com/web/pokies7/TestActivity.java
Normal file
45
7pokies/src/main/java/com/web/pokies7/TestActivity.java
Normal file
@@ -0,0 +1,45 @@
|
||||
package com.web.pokies7;
|
||||
|
||||
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.google.firebase.messaging.FirebaseMessaging;
|
||||
import com.web.base.LogUtils;
|
||||
import com.web.base.MainActivity2;
|
||||
|
||||
public class TestActivity extends AppCompatActivity {
|
||||
private MyCustomLayout mycly;
|
||||
|
||||
|
||||
private MyCustomLayout mycly1;
|
||||
private MyCustomLayout mycly2;
|
||||
private MyCustomLayout mycly3;
|
||||
private MyCustomLayout mycly4;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.test);
|
||||
mycly = (MyCustomLayout) findViewById(R.id.mycly);
|
||||
mycly.setLeftTv("我是左边");
|
||||
mycly.setRightTv("那我只能在心里边");
|
||||
mycly1 = (MyCustomLayout) findViewById(R.id.mycly1);
|
||||
mycly1.setLeftTv("左边");
|
||||
mycly1.setRightTv("右边");
|
||||
mycly2 = (MyCustomLayout) findViewById(R.id.mycly2);
|
||||
mycly2.setLeftTv("如何让富婆爱上我?");
|
||||
mycly2.setRightTv("你就是");
|
||||
mycly3 = (MyCustomLayout) findViewById(R.id.mycly3);
|
||||
mycly3.setLeftTv("我是1");
|
||||
mycly3.setRightTv("我也是1");
|
||||
mycly4 = (MyCustomLayout) findViewById(R.id.mycly4);
|
||||
mycly4.setLeftTv("问");
|
||||
mycly4.setRightTv("如何让富婆爱上我");
|
||||
|
||||
}
|
||||
}
|
||||
18
7pokies/src/main/java/com/web/pokies7/WebApplication.java
Normal file
18
7pokies/src/main/java/com/web/pokies7/WebApplication.java
Normal file
@@ -0,0 +1,18 @@
|
||||
package com.web.pokies7;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public class WebApplication extends Application {
|
||||
|
||||
|
||||
public static Context application;
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
// 设置开启优化方案
|
||||
application = this;
|
||||
}
|
||||
}
|
||||
8
7pokies/src/main/res/drawable/big_bg.xml
Normal file
8
7pokies/src/main/res/drawable/big_bg.xml
Normal 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>
|
||||
45
7pokies/src/main/res/layout/customview.xml
Normal file
45
7pokies/src/main/res/layout/customview.xml
Normal file
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView 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="wrap_content"
|
||||
app:cardElevation="5dp"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_height="40dp"
|
||||
app:cardCornerRadius="20dp">
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#1f6eef"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="15dp"
|
||||
android:text=""
|
||||
android:textStyle="bold"
|
||||
android:id="@+id/left_tv"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@mipmap/tixing" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingRight="15dp"
|
||||
android:lines="1"
|
||||
android:ellipsize="middle"
|
||||
android:id="@+id/right_tv"
|
||||
android:textStyle="bold|italic"
|
||||
android:text=""
|
||||
android:textColor="@color/black" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
31
7pokies/src/main/res/layout/test.xml
Normal file
31
7pokies/src/main/res/layout/test.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
<com.web.pokies7.MyCustomLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/mycly"/>
|
||||
<com.web.pokies7.MyCustomLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/mycly1"/>
|
||||
<com.web.pokies7.MyCustomLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/mycly2"/>
|
||||
<com.web.pokies7.MyCustomLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/mycly3"/>
|
||||
<com.web.pokies7.MyCustomLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/mycly4"/>
|
||||
</LinearLayout>
|
||||
BIN
7pokies/src/main/res/mipmap-xxhdpi/app_logo.png
Normal file
BIN
7pokies/src/main/res/mipmap-xxhdpi/app_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 270 KiB |
BIN
7pokies/src/main/res/mipmap-xxhdpi/tixing.png
Normal file
BIN
7pokies/src/main/res/mipmap-xxhdpi/tixing.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
52
7pokies/src/main/res/values-en/strings.xml
Normal file
52
7pokies/src/main/res/values-en/strings.xml
Normal 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>
|
||||
70
7pokies/src/main/res/values-night/themes.xml
Normal file
70
7pokies/src/main/res/values-night/themes.xml
Normal file
@@ -0,0 +1,70 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.Calculcator" parent="Theme.MaterialComponents.DayNight.DarkActionBar.Bridge">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_200</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/black</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_200</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
<style name="Theme.Calculcator1" parent="Theme.MaterialComponents.DayNight.DarkActionBar.Bridge">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_500</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_700</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<item name="android:windowFullscreen">true</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
<declare-styleable name="CircleImageView">
|
||||
<attr name="ease_border_color" format="color" />
|
||||
<attr name="ease_border_width" format="dimension" />
|
||||
<attr name="ease_press_alpha" format="integer" />
|
||||
<attr name="ease_press_color" format="color" />
|
||||
<attr name="ease_radius" format="dimension" />
|
||||
<attr name="es_shape_type" format="enum">
|
||||
<enum name="none" value="0" />
|
||||
<enum name="round" value="1" />
|
||||
<enum name="rectangle" value="2" />
|
||||
</attr>
|
||||
</declare-styleable>
|
||||
|
||||
|
||||
<!-- 注意:当前AppTheme主题,在values-v23中单独重复维护。原因是Android 6以下系统不支持设置
|
||||
系统状态栏颜色,如果按照设计,状态栏使用素色则在android6以下手机上就看不清系统状态栏文字了(
|
||||
因为系统文字是白色)。在values-v23表示当Android 23(即android 6)及以上版本将自动使用该目录
|
||||
下的主题(即 colorPrimaryDark 使用素色,从而跟标题栏颜色保持一致,实现沉浸式ui效果)。-->
|
||||
<style name="AppThemeStart" parent="@style/Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="android:windowTranslucentStatus">false</item>
|
||||
<item name="android:windowTranslucentNavigation">false</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="colorPrimary">@color/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>
|
||||
18
7pokies/src/main/res/values/app_config.xml
Normal file
18
7pokies/src/main/res/values/app_config.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!--需要修改的配置项都在这里了-->
|
||||
<!--APP名字-->
|
||||
<string name="app_name">7POKIES</string>
|
||||
<!--唯一ID-->
|
||||
<string name="userId">50</string>
|
||||
<!--初始域名-->
|
||||
<string name="base_url">https://7pokies.me/</string>
|
||||
<!--任务栏的文字颜色 0 黑 1白 默认黑-->
|
||||
<string name="is_white">1</string>
|
||||
<!--启动页logo 0 原图显示 1 强制修改为原型图片logo-->
|
||||
<string name="is_round">1</string>
|
||||
<!--底部操作栏色调-->
|
||||
<color name="style_color">#8b0001</color>
|
||||
<!--整体背景色调 style_color和windows_color 一致 就是纯色 不然就是 w-s的上下渐变色-->
|
||||
<color name="windows_color">#003bfb</color>
|
||||
</resources>
|
||||
16
7pokies/src/main/res/values/colors.xml
Normal file
16
7pokies/src/main/res/values/colors.xml
Normal 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>
|
||||
53
7pokies/src/main/res/values/strings.xml
Normal file
53
7pokies/src/main/res/values/strings.xml
Normal 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>
|
||||
109
7pokies/src/main/res/values/themes.xml
Normal file
109
7pokies/src/main/res/values/themes.xml
Normal file
@@ -0,0 +1,109 @@
|
||||
<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="AppThemeStart1" 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:navigationBarColor">@color/white</item>
|
||||
<!-- <item name="android:windowBackground">@mipmap/big_bg</item>-->
|
||||
<item name="android:forceDarkAllowed" tools:ignore="NewApi">false</item>
|
||||
<item name="android:windowBackground">@color/white</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="MaterialDesignDialog" parent="@style/Theme.AppCompat.Dialog">
|
||||
<!-- 背景透明 -->
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<!-- 浮于Activity之上 -->
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<!-- 边框 -->
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<!-- Dialog以外的区域模糊效果 -->
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
<!-- 无标题 -->
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<!-- 半透明 -->
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowCloseOnTouchOutside">true</item>
|
||||
</style>
|
||||
</resources>
|
||||
10
7pokies/src/main/res/xml/app_updater_paths.xml
Normal file
10
7pokies/src/main/res/xml/app_updater_paths.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<paths>
|
||||
<root-path name="app_root_path" path="/"/>
|
||||
<external-path name="app_external_path" path="/"/>
|
||||
<external-cache-path name="app_external_cache_path" path="/"/>
|
||||
<external-files-path name="app_external_files_path" path="/"/>
|
||||
<files-path name="app_files_path" path="/"/>
|
||||
<cache-path name="app_cache_path" path="/"/>
|
||||
|
||||
</paths>
|
||||
4
7pokies/src/main/res/xml/network_security_config.xml
Normal file
4
7pokies/src/main/res/xml/network_security_config.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config>
|
||||
<base-config cleartextTrafficPermitted="true" />
|
||||
</network-security-config>
|
||||
13
7pokies/src/main/res/xml/provider_paths.xml
Normal file
13
7pokies/src/main/res/xml/provider_paths.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding= "utf-8"?>
|
||||
<resources>
|
||||
<paths >
|
||||
<external-path name="external_files" path="."/>
|
||||
<root-path name="root" path="." />
|
||||
<files-path name="files" path="." />
|
||||
<cache-path name="cache" path="." />
|
||||
<external-files-path name="external_files_f" path="." />
|
||||
<external-cache-path name="external_cache" path="." />
|
||||
</paths >
|
||||
</resources>
|
||||
<!-- 适配7.0及其以上,配合com.eva.android.OpenFileUtil,用于解决调用系统Intent查看大文件内
|
||||
容、拍照保存图片的功能时出现"android.os.FileUriExposedException"异常的问题 -->
|
||||
@@ -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);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user