精简控制台模块,控制台已移动至AuthCenterConsoleApp项目。
This commit is contained in:
@@ -43,10 +43,27 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(':libauthcenterapp')
|
||||
// 轻量HTTP服务库,适配Android全版本,支持Java7,无多余依赖
|
||||
//implementation 'org.nanohttpd:nanohttpd:2.3.1'
|
||||
// 网络连接类库
|
||||
api 'com.squareup.okhttp3:okhttp:4.4.1'
|
||||
// Html 解析
|
||||
api 'org.jsoup:jsoup:1.13.1'
|
||||
|
||||
// AndroidX 类库
|
||||
api 'androidx.appcompat:appcompat:1.1.0'
|
||||
//api 'com.google.android.material:material:1.4.0'
|
||||
//api 'androidx.viewpager:viewpager:1.0.0'
|
||||
//api 'androidx.vectordrawable:vectordrawable:1.1.0'
|
||||
//api 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
|
||||
//api 'androidx.fragment:fragment:1.1.0'
|
||||
|
||||
// WinBoLL库 nexus.winboll.cc 地址
|
||||
api 'cc.winboll.studio:libaes:15.15.7'
|
||||
api 'cc.winboll.studio:libappbase:15.15.4'
|
||||
|
||||
// WinBoLL备用库 jitpack.io 地址
|
||||
//api 'com.github.ZhanGSKen:AES:aes-v15.15.7'
|
||||
//api 'com.github.ZhanGSKen:APPBase:appbase-v15.15.4'
|
||||
|
||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Wed Jan 14 03:45:26 GMT 2026
|
||||
#Wed Jan 14 11:21:14 GMT 2026
|
||||
stageCount=0
|
||||
libraryProject=libauthcenterapp
|
||||
libraryProject=
|
||||
baseVersion=15.0
|
||||
publishVersion=15.0.0
|
||||
buildCount=24
|
||||
buildCount=27
|
||||
baseBetaVersion=15.0.1
|
||||
|
||||
@@ -3,12 +3,10 @@ package cc.winboll.studio.authcenterapp;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Switch;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import cc.winboll.studio.authcenterapp.R;
|
||||
import cc.winboll.studio.authcenterapp.activities.BaseWinBoLLActivity;
|
||||
@@ -17,29 +15,24 @@ import cc.winboll.studio.libaes.utils.WinBoLLActivityManager;
|
||||
import cc.winboll.studio.libappbase.LogActivity;
|
||||
import cc.winboll.studio.libappbase.LogUtils;
|
||||
import cc.winboll.studio.libappbase.ToastUtils;
|
||||
import cc.winboll.studio.libauthcenterapp.auth.AuthCenterHttpService;
|
||||
|
||||
/**
|
||||
* @Author 豆包&ZhanGSKen<zhangsken@qq.com>
|
||||
* @Date 2026/01/14 02:03:00
|
||||
* @LastEditTime 2026/01/14 23:18:45
|
||||
* @LastEditTime 2026/01/15 10:28:16
|
||||
* @Describe 应用主界面 Activity(入口界面)
|
||||
* 包含功能测试按钮(崩溃测试、日志查看、Toast测试)、顶部工具栏(菜单功能)、AuthCenter服务启停开关,是应用交互的核心入口
|
||||
* 包含功能测试按钮(崩溃测试、日志查看、Toast测试)、顶部工具栏(菜单功能),是应用交互的核心入口
|
||||
*/
|
||||
public class MainActivity extends BaseWinBoLLActivity {
|
||||
|
||||
public static final String TAG = "MainActivity";
|
||||
private static final int AUTH_SERVICE_PORT = 8080;
|
||||
|
||||
private Toolbar mToolbar;
|
||||
private Switch mAuthServiceSwitch;
|
||||
private AuthCenterHttpService mAuthHttpService;
|
||||
private boolean isServiceRunning = false;
|
||||
|
||||
@Override
|
||||
public String getTag() {
|
||||
return TAG;
|
||||
}
|
||||
@Override
|
||||
public String getTag() {
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -49,107 +42,27 @@ public class MainActivity extends BaseWinBoLLActivity {
|
||||
|
||||
mToolbar = findViewById(R.id.toolbar);
|
||||
setSupportActionBar(mToolbar);
|
||||
// 修正1:启用ActionBar显示图标(默认隐藏)
|
||||
// 启用ActionBar显示图标(默认隐藏)
|
||||
if (getSupportActionBar() != null) {
|
||||
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||
getSupportActionBar().setDisplayUseLogoEnabled(true);
|
||||
}
|
||||
initAuthServiceSwitch();
|
||||
}
|
||||
|
||||
private void initAuthServiceSwitch() {
|
||||
mAuthServiceSwitch = findViewById(R.id.switch_auth_service);
|
||||
mAuthServiceSwitch.setOnCheckedChangeListener(new android.widget.CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(android.widget.CompoundButton buttonView, boolean isChecked) {
|
||||
if (isChecked) {
|
||||
startAuthHttpService();
|
||||
} else {
|
||||
stopAuthHttpService();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void startAuthHttpService() {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
|
||||
ToastUtils.show("当前系统版本不支持,需Android 10及以上");
|
||||
mAuthServiceSwitch.setChecked(false);
|
||||
LogUtils.w(TAG, "服务启动失败:系统SDK=" + Build.VERSION.SDK_INT + ",低于最低要求API29");
|
||||
return;
|
||||
}
|
||||
if (isServiceRunning) {
|
||||
ToastUtils.show("服务已在运行,无需重复启动");
|
||||
mAuthServiceSwitch.setChecked(true);
|
||||
return;
|
||||
}
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
mAuthHttpService = new AuthCenterHttpService(AUTH_SERVICE_PORT);
|
||||
mAuthHttpService.start();
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
isServiceRunning = true;
|
||||
ToastUtils.show("AuthCenter服务启动成功(8080端口)");
|
||||
LogUtils.i(TAG, "AuthCenter Http服务启动成功,端口:" + AUTH_SERVICE_PORT);
|
||||
}
|
||||
});
|
||||
} catch (final Exception e) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
isServiceRunning = false;
|
||||
mAuthServiceSwitch.setChecked(false);
|
||||
ToastUtils.show("服务启动失败:" + e.getMessage());
|
||||
LogUtils.e(TAG, "AuthCenter服务启动失败", e);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
private void stopAuthHttpService() {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
|
||||
mAuthServiceSwitch.setChecked(false);
|
||||
return;
|
||||
}
|
||||
if (!isServiceRunning || mAuthHttpService == null) {
|
||||
ToastUtils.show("服务未运行,无需停止");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
mAuthHttpService.stop();
|
||||
isServiceRunning = false;
|
||||
mAuthHttpService = null;
|
||||
ToastUtils.show("AuthCenter服务已停止");
|
||||
LogUtils.i(TAG, "AuthCenter Http服务已优雅停机");
|
||||
} catch (Exception e) {
|
||||
ToastUtils.show("服务停止异常:" + e.getMessage());
|
||||
LogUtils.e(TAG, "AuthCenter服务停止失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
if (isServiceRunning) {
|
||||
stopAuthHttpService();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.toolbar_main, menu);
|
||||
// 修正2:遍历菜单项,强制显示图标(AppCompat默认隐藏菜单图标)
|
||||
// 遍历菜单项,强制显示图标(AppCompat默认隐藏菜单图标)
|
||||
for (int i = 0; i < menu.size(); i++) {
|
||||
MenuItem item = menu.getItem(i);
|
||||
item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
|
||||
}
|
||||
return true; // 修正3:返回true确保菜单正常显示
|
||||
return true; // 返回true确保菜单正常显示
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -158,7 +71,7 @@ public class MainActivity extends BaseWinBoLLActivity {
|
||||
case R.id.item_home:
|
||||
openWebsiteInBrowser(this);
|
||||
break;
|
||||
case R.id.item_console:
|
||||
case R.id.item_console:
|
||||
WinBoLLActivityManager.getInstance().startWinBoLLActivity(getApplicationContext(), ConsoleActivity.class);
|
||||
break;
|
||||
}
|
||||
@@ -185,7 +98,7 @@ public class MainActivity extends BaseWinBoLLActivity {
|
||||
Thread.sleep(2000);
|
||||
ToastUtils.show("Thread.sleep(2000);ToastUtils.show...");
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
LogUtils.e(TAG, "线程休眠被中断", e);
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
@@ -198,11 +111,10 @@ public class MainActivity extends BaseWinBoLLActivity {
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
public void onAboutActivity(View view) {
|
||||
public void onAboutActivity(View view) {
|
||||
LogUtils.d(TAG, "startAboutActivity() 调用");
|
||||
Intent aboutIntent = new Intent(getApplicationContext(), AboutActivity.class);
|
||||
startActivity(aboutIntent);
|
||||
LogUtils.d(TAG, "startAboutActivity: 关于页面已启动");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package cc.winboll.studio.libauthcenterapp.auth;
|
||||
package cc.winboll.studio.authcenterapp.auth;
|
||||
|
||||
import cc.winboll.studio.libauthcenterapp.models.PingPongModel;
|
||||
import cc.winboll.studio.authcenterapp.models.PingPongModel;
|
||||
import cc.winboll.studio.libappbase.LogUtils;
|
||||
|
||||
/**
|
||||
@@ -1,4 +1,4 @@
|
||||
package cc.winboll.studio.libauthcenterapp.models;
|
||||
package cc.winboll.studio.authcenterapp.models;
|
||||
|
||||
import android.util.JsonReader;
|
||||
import android.util.JsonWriter;
|
||||
@@ -70,23 +70,6 @@
|
||||
android:onClick="onAboutActivity"
|
||||
android:layout_margin="10dp"/>
|
||||
|
||||
<!-- 新增 AuthCenter 服务启停开关+状态提示 -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="AuthCenter Http服务状态"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginHorizontal="34dp"
|
||||
android:layout_marginTop="10dp"/>
|
||||
<Switch
|
||||
android:id="@+id/switch_auth_service"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="启停服务(8080端口)"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:layout_margin="10dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
1
libauthcenterapp/.gitignore
vendored
1
libauthcenterapp/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
/build
|
||||
@@ -1,41 +0,0 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'maven-publish'
|
||||
apply from: '../.winboll/winboll_lib_build.gradle'
|
||||
apply from: '../.winboll/winboll_lint_build.gradle'
|
||||
|
||||
android {
|
||||
// 适配MIUI12
|
||||
compileSdkVersion 30
|
||||
buildToolsVersion "30.0.3"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// AndroidX 类库
|
||||
api 'androidx.appcompat:appcompat:1.1.0'
|
||||
//api 'com.google.android.material:material:1.4.0'
|
||||
//api 'androidx.viewpager:viewpager:1.0.0'
|
||||
//api 'androidx.vectordrawable:vectordrawable:1.1.0'
|
||||
//api 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
|
||||
//api 'androidx.fragment:fragment:1.1.0'
|
||||
|
||||
// WinBoLL库 nexus.winboll.cc 地址
|
||||
api 'cc.winboll.studio:libaes:15.15.7'
|
||||
api 'cc.winboll.studio:libappbase:15.15.4'
|
||||
|
||||
// WinBoLL备用库 jitpack.io 地址
|
||||
//api 'com.github.ZhanGSKen:AES:aes-v15.15.7'
|
||||
//api 'com.github.ZhanGSKen:APPBase:appbase-v15.15.4'
|
||||
|
||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Wed Jan 14 03:45:26 GMT 2026
|
||||
stageCount=0
|
||||
libraryProject=libauthcenterapp
|
||||
baseVersion=15.0
|
||||
publishVersion=15.0.0
|
||||
buildCount=24
|
||||
baseBetaVersion=15.0.1
|
||||
Binary file not shown.
17
libauthcenterapp/proguard-rules.pro
vendored
17
libauthcenterapp/proguard-rules.pro
vendored
@@ -1,17 +0,0 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in C:/tools/adt-bundle-windows-x86_64-20131030/sdk/tools/proguard/proguard-android.txt
|
||||
# You can edit the include path and order by changing the proguardFiles
|
||||
# directive in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# Add any project specific keep options here:
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<manifest
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="cc.winboll.studio.libauthcenterapp">
|
||||
|
||||
<application>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -1,70 +0,0 @@
|
||||
package cc.winboll.studio.libauthcenterapp.auth;
|
||||
|
||||
import cc.winboll.studio.libappbase.LogUtils;
|
||||
import fi.iki.elonen.NanoHTTPD;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* 轻量Http服务类(NanoHTTPD适配版,兼容Android API30、Java7)
|
||||
* 仅处理/authcenter/ping存活检测请求
|
||||
* @Author 豆包&ZhanGSKen<zhangsken@qq.com>
|
||||
* @Date 2026/01/14 02:03:00
|
||||
* @LastEditTime 2026/01/14 23:10:00
|
||||
*/
|
||||
public class AuthCenterHttpService extends NanoHTTPD {
|
||||
private static final String TAG = "AuthCenterHttpService";
|
||||
private boolean isRunning = false;
|
||||
|
||||
// 构造方法传入端口,初始化NanoHTTPD
|
||||
public AuthCenterHttpService(int port) {
|
||||
super(port);
|
||||
LogUtils.d(TAG, "构造方法调用,监听端口:" + port);
|
||||
}
|
||||
|
||||
/** 启动HTTP服务 */
|
||||
public void start() throws IOException {
|
||||
LogUtils.d(TAG, "start() 函数调用,启动HTTP服务");
|
||||
super.start(NanoHTTPD.SOCKET_READ_TIMEOUT, false);
|
||||
isRunning = true;
|
||||
LogUtils.i(TAG, "HTTP服务启动成功,端口:" + getListeningPort() + ",监听/authcenter/ping");
|
||||
}
|
||||
|
||||
/** 停止HTTP服务 */
|
||||
public void stop() {
|
||||
LogUtils.d(TAG, "stop() 函数调用,停止HTTP服务");
|
||||
if (isRunning) {
|
||||
super.stop();
|
||||
isRunning = false;
|
||||
LogUtils.i(TAG, "HTTP服务已停止");
|
||||
} else {
|
||||
LogUtils.w(TAG, "HTTP服务未运行,无需停止");
|
||||
}
|
||||
}
|
||||
|
||||
// 核心:处理所有HTTP请求,仅响应/authcenter/ping
|
||||
@Override
|
||||
public Response serve(IHTTPSession session) {
|
||||
String uri = session.getUri();
|
||||
String method = session.getMethod().name();
|
||||
LogUtils.d(TAG, "接收请求:method=" + method + ",uri=" + uri);
|
||||
|
||||
// 匹配 GET /authcenter/ping 请求
|
||||
if (Method.GET.equals(session.getMethod()) && "/authcenter/ping".equals(uri)) {
|
||||
LogUtils.d(TAG, "ping请求响应成功,返回pong");
|
||||
//return newFixedLengthResponse(Response.Status.OK, "text/plain", "PONG");
|
||||
// 替换原返回逻辑,返回JSON格式响应
|
||||
return newFixedLengthResponse(Response.Status.OK, "application/json",
|
||||
"{\"createDateTime\":" + System.currentTimeMillis() + ",\"authToken\":\"winboll_auth_6a8d2f7c9e4b3a01\",\"name\":\"cc.winboll.studio.authcenterapp.models.PingPongModel\"}");
|
||||
|
||||
} else {
|
||||
// 其他请求返回404
|
||||
LogUtils.d(TAG, "非目标请求,返回404");
|
||||
return newFixedLengthResponse(Response.Status.NOT_FOUND, "text/plain", "404 Not Found");
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isRunning() {
|
||||
return isRunning;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
package cc.winboll.studio.libauthcenterapp.auth;
|
||||
|
||||
import cc.winboll.studio.libauthcenterapp.models.PingPongModel;
|
||||
import cc.winboll.studio.libappbase.LogUtils;
|
||||
|
||||
/**
|
||||
* @Author 豆包&ZhanGSKen<zhangsken@qq.com>
|
||||
* @Date 2026/01/13 22:51
|
||||
* @LastEditTime 2026/01/14 08:01:26
|
||||
* @Describe 服务器PONG回复APP
|
||||
*/
|
||||
public class PONG {
|
||||
// 排序:常量 → 静态单例实例 → 成员变量,符合规范
|
||||
public static final String TAG = "PONG";
|
||||
private static volatile PONG sInstance;
|
||||
private volatile boolean isPonging = false;
|
||||
|
||||
// 私有构造器,禁止外部实例化,保障单例唯一性
|
||||
private PONG() {}
|
||||
|
||||
// 双重校验锁单例,Java7兼容,线程安全且高效,适配API30无兼容问题
|
||||
public static PONG getInstance() {
|
||||
if (sInstance == null) {
|
||||
synchronized (PONG.class) {
|
||||
if (sInstance == null) {
|
||||
sInstance = new PONG();
|
||||
LogUtils.d(TAG, "PONG 单例初始化完成");
|
||||
}
|
||||
}
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
// 核心业务方法,完善调试日志,精简冗余信息
|
||||
public PingPongModel pong(PingPongModel pingPongModel) {
|
||||
// 打印函数调用及入参信息,关键调试点留存
|
||||
LogUtils.d(TAG, "pong() 函数调用,传入参数:" + (pingPongModel == null ? "null" : pingPongModel.toString()));
|
||||
|
||||
if (!isPonging) {
|
||||
isPonging = true;
|
||||
try {
|
||||
LogUtils.d(TAG, "开始模拟服务器PONG响应,休眠1000ms");
|
||||
Thread.sleep(1000);
|
||||
// 模拟服务器返回数据
|
||||
PingPongModel returnPingPongModel = new PingPongModel("Hello, WinBoLL!");
|
||||
LogUtils.d(TAG, "PONG响应模拟完成,返回数据:" + returnPingPongModel.toString());
|
||||
isPonging = false;
|
||||
return returnPingPongModel;
|
||||
} catch (InterruptedException e) {
|
||||
LogUtils.d(TAG, "线程休眠被中断,重置pong状态", e);
|
||||
isPonging = false;
|
||||
}
|
||||
} else {
|
||||
LogUtils.d(TAG, "当前正处于PONG响应中,拒绝重复调用,返回null");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<array name="enum_loglevel_array">
|
||||
<item>Off</item>
|
||||
<item>Error</item>
|
||||
<item>Warn</item>
|
||||
<item>Info</item>
|
||||
<item>Debug</item>
|
||||
<item>Verbose</item>
|
||||
</array>
|
||||
</resources>
|
||||
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<attr name="themeGlobalCrashActivity" format="reference"/>
|
||||
|
||||
<declare-styleable name="GlobalCrashActivity">
|
||||
<attr name="colorTittle" format="color" />
|
||||
<attr name="colorTittleBackgound" format="color" />
|
||||
<attr name="colorText" format="color" />
|
||||
<attr name="colorTextBackgound" format="color" />
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
@@ -1,74 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#FF00B322</color>
|
||||
<color name="colorPrimaryDark">#FF005C12</color>
|
||||
<color name="colorAccent">#FF8DFFA2</color>
|
||||
<color name="colorText">#FFFFFB8D</color>
|
||||
<color name="colorTextBackgound">#FF000000</color>
|
||||
|
||||
<!-- ============== 基础黑白(必含,适配文字/背景) ============== -->
|
||||
<color name="white">#FFFFFF</color> <!-- 纯白色(文字/背景) -->
|
||||
<color name="black">#000000</color> <!-- 近黑色(重要文字) -->
|
||||
|
||||
<!-- ============== 基础色系(按钮/强调色常用) ============== -->
|
||||
<!-- 蓝色系(常用:确认/链接/主题色) -->
|
||||
<color name="blue_light">#4A90E2</color> <!-- 浅蓝(次要按钮) -->
|
||||
<color name="blue_normal">#2196F3</color> <!-- 标准蓝(主题/确认按钮) -->
|
||||
<color name="blue_dark">#1976D2</color> <!-- 深蓝(按压态/重要强调) -->
|
||||
<!-- 绿色系(常用:成功/完成/安全提示) -->
|
||||
<color name="green_light">#66BB6A</color> <!-- 浅绿(次要成功态) -->
|
||||
<color name="green_normal">#4CAF50</color> <!-- 标准绿(成功按钮/提示) -->
|
||||
<color name="green_dark">#388E3C</color> <!-- 深绿(按压态/重要成功) -->
|
||||
<!-- 红色系(常用:错误/警告/删除按钮) -->
|
||||
<color name="red_light">#EF5350</color> <!-- 浅红(次要错误提示) -->
|
||||
<color name="red_normal">#F44336</color> <!-- 标准红(删除/错误按钮) -->
|
||||
<color name="red_dark">#D32F2F</color> <!-- 深红(按压态/重要错误) -->
|
||||
<!-- 黄色系(常用:警告/提醒/高亮) -->
|
||||
<color name="yellow_light">#FFF59D</color> <!-- 浅黄(次要提醒) -->
|
||||
<color name="yellow_normal">#FFC107</color> <!-- 标准黄(警告提示/高亮) -->
|
||||
<color name="yellow_dark">#FFA000</color> <!-- 深黄(重要警告) -->
|
||||
<!-- 橙色系(常用:提醒/进度/活力色) -->
|
||||
<color name="orange_normal">#FF9800</color> <!-- 标准橙(提醒按钮/进度) -->
|
||||
<!-- 紫色系(常用:特殊强调/个性按钮) -->
|
||||
<color name="purple_normal">#9C27B0</color> <!-- 标准紫(特殊功能按钮) -->
|
||||
|
||||
<!-- ============== 透明色(遮罩/背景叠加) ============== -->
|
||||
<color name="transparent">#00000000</color> <!-- 全透明 -->
|
||||
<color name="black_transparent_50">#80000000</color> <!-- 50%透明黑(遮罩) -->
|
||||
|
||||
|
||||
|
||||
<!-- 1. 不透明灰色(常用深浅梯度,直接用) -->
|
||||
<color name="gray_100">#F5F5F5</color> <!-- 极浅灰(接近白色,背景用) -->
|
||||
<color name="gray_200">#EEEEEE</color> <!-- 浅灰(卡片/分割线背景) -->
|
||||
<color name="gray_300">#E0E0E0</color> <!-- 中浅灰(边框/次要背景) -->
|
||||
<color name="gray_400">#BDBDBD</color> <!-- 中灰(次要文字/图标) -->
|
||||
<color name="gray_500">#9E9E9E</color> <!-- 标准中灰(常用辅助文字) -->
|
||||
<color name="gray_600">#757575</color> <!-- 中深灰(常规辅助文字) -->
|
||||
<color name="gray_700">#616161</color> <!-- 深灰(重要辅助文字) -->
|
||||
<color name="gray_800">#424242</color> <!-- 极深灰(接近黑色,标题副文本) -->
|
||||
<color name="gray_900">#212121</color> <!-- 近黑色(特殊场景用) -->
|
||||
|
||||
<!-- 2. 半透明灰色(带透明度,遮罩/蒙层用) -->
|
||||
<color name="gray_transparent_30">#4D9E9E9E</color> <!-- 30%透明中灰(A=4D) -->
|
||||
<color name="gray_transparent_50">#809E9E9E</color> <!-- 50%透明中灰(A=80) -->
|
||||
<color name="gray_transparent_70">#B39E9E9E</color> <!-- 70%透明中灰(A=B3) -->
|
||||
|
||||
<color name="gray_light">#EEE</color> <!-- 等价 #EEEEEE(浅灰) -->
|
||||
<color name="gray_mid">#999</color> <!-- 等价 #999999(中灰) -->
|
||||
<color name="gray_dark">#666</color> <!-- 等价 #666666(深灰) -->
|
||||
<color name="gray_black">#333</color> <!-- 等价 #333333(极深灰) -->
|
||||
|
||||
<!-- 50% 透明中灰(弹窗遮罩常用) -->
|
||||
<color name="mask_gray">#809E9E9E</color>
|
||||
<!-- 30% 透明深灰(背景叠加) -->
|
||||
<color name="bg_overlay_gray">#4D424242</color>
|
||||
|
||||
<!-- 1. 常规灰色(按钮默认态,常用中灰) -->
|
||||
<color name="btn_gray_normal">#9E9E9E</color>
|
||||
<!-- 2. 按压深色(按钮点击态,加深一级,提升交互感) -->
|
||||
<color name="btn_gray_pressed">#757575</color>
|
||||
<!-- 3. 禁用灰色(按钮不可点击态,浅灰) -->
|
||||
<color name="btn_gray_disabled">#E0E0E0</color>
|
||||
|
||||
</resources>
|
||||
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="log_text_size">12dp</dimen>
|
||||
<dimen name="log_text_padding">2dp</dimen>
|
||||
|
||||
<dimen name="log_button_width">65dp</dimen>
|
||||
<dimen name="log_button_height">34dp</dimen>
|
||||
|
||||
<dimen name="log_checkbox_width">100dp</dimen>
|
||||
<dimen name="log_checkbox_height">20dp</dimen>
|
||||
|
||||
<dimen name="log_spinner_width">60dp</dimen>
|
||||
<dimen name="log_spinner_height">16dp</dimen>
|
||||
<dimen name="log_spinner_item_width">@dimen/log_spinner_width</dimen>
|
||||
<dimen name="log_spinner_item_height">@dimen/log_spinner_height</dimen>
|
||||
<dimen name="log_spinner_text_size">@dimen/log_text_size</dimen>
|
||||
<dimen name="log_spinner_text_padding">@dimen/log_text_padding</dimen>
|
||||
|
||||
</resources>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="lib_name">libappbase</string>
|
||||
<string name="hello_world">Hello, world!</string>
|
||||
</resources>
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="APPBaseTheme" parent="@android:style/Theme.DeviceDefault.Light.NoActionBar">
|
||||
<item name="themeGlobalCrashActivity">@style/GlobalCrashActivityTheme</item>
|
||||
</style>
|
||||
|
||||
<style name="GlobalCrashActivityTheme" parent="@android:style/Theme.DeviceDefault.Light.NoActionBar">
|
||||
<item name="colorTittle">#FFFFF600</item>
|
||||
<item name="colorTittleBackgound">#FF00B322</item>
|
||||
<item name="colorText">#FF00B322</item>
|
||||
<item name="colorTextBackgound">#FF000000</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -32,7 +32,6 @@
|
||||
|
||||
// AuthCenterAPP 项目编译设置
|
||||
//include ':authcenterapp'
|
||||
//include ':libauthcenterapp'
|
||||
//rootProject.name = "authcenterapp"
|
||||
|
||||
// Contacts 项目编译设置
|
||||
|
||||
Reference in New Issue
Block a user