Compare commits
7 Commits
app-v15.0.
...
aes-v15.2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4449fe6598 | ||
|
|
1e2661f640 | ||
|
|
1d2b595859 | ||
|
|
4afc4aafa9 | ||
|
|
bd6eae16e3 | ||
|
|
5b82baead5 | ||
|
|
a9ce480f9f |
20
README.md
20
README.md
@@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
## WinBoll 项目组研发计划
|
## WinBoll 项目组研发计划
|
||||||
致力于把 WinBoll-APP 应用在手机端 Android 项目开发。
|
致力于把 WinBoll-APP 应用在手机端 Android 项目开发。
|
||||||
也在探索 https://gitea.winboll.cc/<WinBoll 项目组>/APP.git 应用于 WinBoll-APP APK 分发。
|
也在探索 https://gitea.winboll.cc/<WinBoll 项目组>/WinBoll-APP.git 应用于 WinBoll-APP APK 分发。
|
||||||
更想进阶 https://github.com/<WinBoll 项目组>/APP.git 应用于 WinBoll-APP Beta APK 分发。
|
更想进阶 https://github.com/<WinBoll 项目组>/WinBoll-APP.git 应用于 WinBoll-APP Beta APK 分发。
|
||||||
|
|
||||||
## WinBoll-APP 汗下...
|
## WinBoll-APP 汗下...
|
||||||
#### ☁应用何置如此呢。且观用户云云。
|
#### ☁应用何置如此呢。且观用户云云。
|
||||||
@@ -55,10 +55,10 @@
|
|||||||
☁ WinBoll 主机建立 1Panel Gitea 应用。
|
☁ WinBoll 主机建立 1Panel Gitea 应用。
|
||||||
☁ WinBoll 主机设置 WinBoll 应用为非登录状态。
|
☁ WinBoll 主机设置 WinBoll 应用为非登录状态。
|
||||||
☁ WinBoll 主机建立 WinBoll 账户与 WinBoll 用户组。
|
☁ WinBoll 主机建立 WinBoll 账户与 WinBoll 用户组。
|
||||||
☁ WinBoll 账户 User ID 为: J。
|
☁ WinBoll 账户 User ID 为: winboll。
|
||||||
☁ WinBoll 用户组 Group ID 为: Studio。
|
☁ WinBoll 用户组 Group ID 为: winboll。
|
||||||
☁ WinBoll 主机 WinBoll 1Panel Gitea 建立 WinBoll 工作组。
|
☁ WinBoll 主机 WinBoll 1Panel Gitea 建立 WinBoll 工作组。
|
||||||
☁ WinBoll 主机 WinBoll 1Panel Gitea 用户项目 APK 编译输出目录为 /sdcard/WinBollStudio/<用户名>/APKs/
|
☁ WinBoll 主机 WinBoll 1Panel Gitea 用户项目 APK 编译输出目录为 /sdcard/<用户名>/WinBoll/app/
|
||||||
☁ WinBoll 项目配置文件示例为 "<WinBoll 项目根目录>/.winboll/winboll.properties-demo"(WinBoll 项目已设置)
|
☁ WinBoll 项目配置文件示例为 "<WinBoll 项目根目录>/.winboll/winboll.properties-demo"(WinBoll 项目已设置)
|
||||||
☁ WinBoll 项目配置文件为 "<WinBoll 项目根目录>/.winboll/winboll.properties"
|
☁ WinBoll 项目配置文件为 "<WinBoll 项目根目录>/.winboll/winboll.properties"
|
||||||
☁ WinBoll 项目配置文件设定为源码提交时忽略。(WinBoll 项目已设置)
|
☁ WinBoll 项目配置文件设定为源码提交时忽略。(WinBoll 项目已设置)
|
||||||
@@ -72,17 +72,17 @@
|
|||||||
☁ MySQL winbollclient 数据库中
|
☁ MySQL winbollclient 数据库中
|
||||||
WinBoll 客户端用户信息设定为:
|
WinBoll 客户端用户信息设定为:
|
||||||
<用户名, 验证密码, 验证邮箱, 验证手机, 唯一存储令牌Token, 备用验证邮箱>。
|
<用户名, 验证密码, 验证邮箱, 验证手机, 唯一存储令牌Token, 备用验证邮箱>。
|
||||||
☁ WinBoll 项目源码仓库托管在 WinBoll 1Panel Gitea 目录 /opt/1panel/apps/gitea/gitea/data/git/repositories/studio/app.git中。
|
☁ WinBoll 项目源码仓库托管在 WinBoll 1Panel Gitea 目录 /opt/1panel/apps/gitea/gitea/data/git/repositories/winboll/winboll.git中。
|
||||||
☁ WinBoll 主机提供 WinBoll 1Panel Gitea 应用的 WinBoll 项目源码仓库存取功能。(Gitea 应用已提供)
|
☁ WinBoll 主机提供 WinBoll 1Panel Gitea 应用的 WinBoll 项目源码仓库存取功能。(Gitea 应用已提供)
|
||||||
☁ WinBoll 主机提供 WinBoll Gitea 项目仓库存档功能。(Gitea 应用已提供)
|
☁ WinBoll 主机提供 WinBoll Gitea 项目仓库存档功能。(Gitea 应用已提供)
|
||||||
☁ 提供 WinBoll 客户端用户登录功能。(Gitea 应用已提供)
|
☁ 提供 WinBoll 客户端用户登录功能。(Gitea 应用已提供)
|
||||||
|
|
||||||
### ☁ 看远方 ☁ ###
|
### ☁ 看远方 ☁ ###
|
||||||
### ☁ 心忧虑 ☁ WinBoll-APP 应用前置需求
|
### ☁ 心忧虑 ☁ WinBoll-APP 应用前置需求
|
||||||
☁ WinBoll-APP WinBoll 项目根目录设定为手机的 /sdcard/WinBollStudio/Sources 目录。(需要用户手动建立文件夹)
|
☁ WinBoll-APP WinBoll 项目根目录设定为手机的 /sdcard/WinBoll 目录。(需要用户手动建立文件夹)
|
||||||
☁ WinBoll-APP 具有手机 /sdcard/WinBoll 目录的存储权限。(需要手机操作系统授权)
|
☁ WinBoll-APP 具有手机 /sdcard/WinBoll 目录的存储权限。(需要手机操作系统授权)
|
||||||
☁ WinBoll-APP WinBoll 项目仓库源码存储路径为 /sdcard/WinBollStudio/Sources/APP.git(需要用户手动建立文件夹)
|
☁ WinBoll-APP WinBoll 项目仓库源码存储路径为 /sdcard/WinBoll/repositories/winboll.git(需要用户手动建立文件夹)
|
||||||
☁ WinBoll-APP 项目 APK 编译输出目录为 /sdcard/WinBollStudio/APKs/
|
☁ WinBoll-APP 项目 APK 编译输出目录为 /sdcard/WinBoll/app/
|
||||||
☁ WinBoll-APP 应用签名验证可定制化。(WinBoll 项目已提供)
|
☁ WinBoll-APP 应用签名验证可定制化。(WinBoll 项目已提供)
|
||||||
☁ WinBoll-APP 与系列衍生 APP 应用共享 cc.winboll.studio 命名空间资源。(WinBoll 项目已提供)
|
☁ WinBoll-APP 与系列衍生 APP 应用共享 cc.winboll.studio 命名空间资源。(WinBoll 项目已提供)
|
||||||
☁ WinBoll-APP 用户客户端信息存储在命名空间为 WinBoll APP MySQLLite 应用的 winbollappclient 数据库中。
|
☁ WinBoll-APP 用户客户端信息存储在命名空间为 WinBoll APP MySQLLite 应用的 winbollappclient 数据库中。
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
|
|
||||||
### ☁ 云游四方 ☁ ###
|
### ☁ 云游四方 ☁ ###
|
||||||
### ☁ 呔! ☁ WinBoll-APP 应用需求规划
|
### ☁ 呔! ☁ WinBoll-APP 应用需求规划
|
||||||
☁ WinBoll-APP 提供手机目录 /sdcard/WinBollStudio/Sources 的 WinBoll 项目源码管理功能。
|
☁ WinBoll-APP 提供手机目录 /sdcard/WinBoll 的 WinBoll 项目源码管理功能。
|
||||||
|
|
||||||
### ☁ 吁! ☁ WinBoll-APP 共享计划前景
|
### ☁ 吁! ☁ WinBoll-APP 共享计划前景
|
||||||
☁ WinBoll-APP 将会实现 https://winboll.cc/api 访问功能。
|
☁ WinBoll-APP 将会实现 https://winboll.cc/api 访问功能。
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Mon Mar 31 19:41:19 HKT 2025
|
#Thu Apr 03 11:13:53 HKT 2025
|
||||||
stageCount=5
|
stageCount=7
|
||||||
libraryProject=libaes
|
libraryProject=libaes
|
||||||
baseVersion=15.2
|
baseVersion=15.2
|
||||||
publishVersion=15.2.4
|
publishVersion=15.2.6
|
||||||
buildCount=0
|
buildCount=0
|
||||||
baseBetaVersion=15.2.5
|
baseBetaVersion=15.2.7
|
||||||
|
|||||||
@@ -86,6 +86,8 @@ public class AboutActivity extends WinBollActivity implements IWinBollActivity {
|
|||||||
appInfo.setAppHomePage("https://www.winboll.cc/studio/details.php?app=AES");
|
appInfo.setAppHomePage("https://www.winboll.cc/studio/details.php?app=AES");
|
||||||
appInfo.setAppAPKName("AES");
|
appInfo.setAppAPKName("AES");
|
||||||
appInfo.setAppAPKFolderName("AES");
|
appInfo.setAppAPKFolderName("AES");
|
||||||
|
//appInfo.setIsAddDebugTools(false);
|
||||||
|
appInfo.setIsAddDebugTools(BuildConfig.DEBUG);
|
||||||
return new AboutView(mContext, appInfo);
|
return new AboutView(mContext, appInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,19 +5,26 @@ package cc.winboll.studio.aes;
|
|||||||
* @Date 2024/06/13 19:03:58
|
* @Date 2024/06/13 19:03:58
|
||||||
* @Describe AES应用类
|
* @Describe AES应用类
|
||||||
*/
|
*/
|
||||||
|
import android.view.Gravity;
|
||||||
import cc.winboll.studio.libappbase.GlobalApplication;
|
import cc.winboll.studio.libappbase.GlobalApplication;
|
||||||
import com.hjq.toast.ToastUtils;
|
import com.hjq.toast.ToastUtils;
|
||||||
|
|
||||||
|
|
||||||
public class App extends GlobalApplication {
|
public class App extends GlobalApplication {
|
||||||
|
|
||||||
public static final String TAG = "App";
|
public static final String TAG = "App";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
|
|
||||||
|
// 初始化 Toast 框架
|
||||||
ToastUtils.init(this);
|
ToastUtils.init(this);
|
||||||
//ToastUtils.show("App onCreate");
|
// 设置 Toast 布局样式
|
||||||
|
ToastUtils.setView(R.layout.view_toast);
|
||||||
|
//ToastUtils.setStyle(new WhiteToastStyle());
|
||||||
|
ToastUtils.setGravity(Gravity.BOTTOM, 0, 200);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "cc.winboll.studio.androidxdemo"
|
applicationId "cc.winboll.studio.androidxdemo"
|
||||||
minSdkVersion 24
|
minSdkVersion 26
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 1
|
versionCode 1
|
||||||
// versionName 更新后需要手动设置
|
// versionName 更新后需要手动设置
|
||||||
@@ -67,7 +67,7 @@ dependencies {
|
|||||||
//api 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
|
//api 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
|
||||||
//api 'androidx.fragment:fragment:1.1.0'
|
//api 'androidx.fragment:fragment:1.1.0'
|
||||||
|
|
||||||
api 'cc.winboll.studio:libaes:15.2.4'
|
api 'cc.winboll.studio:libaes:15.2.1'
|
||||||
api 'cc.winboll.studio:libapputils:15.2.1'
|
api 'cc.winboll.studio:libapputils:15.2.1'
|
||||||
api 'cc.winboll.studio:libappbase:15.2.2'
|
api 'cc.winboll.studio:libappbase:15.2.2'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Mon Mar 31 11:42:18 GMT 2025
|
#Sat Mar 29 04:28:00 GMT 2025
|
||||||
stageCount=0
|
stageCount=0
|
||||||
libraryProject=
|
libraryProject=
|
||||||
baseVersion=15.0
|
baseVersion=15.0
|
||||||
publishVersion=15.0.0
|
publishVersion=15.0.0
|
||||||
buildCount=13
|
buildCount=11
|
||||||
baseBetaVersion=15.0.1
|
baseBetaVersion=15.0.1
|
||||||
|
|||||||
0
app/app.md
Normal file
0
app/app.md
Normal file
0
app/app.perl
Normal file
0
app/app.perl
Normal file
0
app/app.php
Normal file
0
app/app.php
Normal file
0
app/app.py
Normal file
0
app/app.py
Normal file
0
app/app.sh
Normal file
0
app/app.sh
Normal file
0
app/app.txt
Normal file
0
app/app.txt
Normal file
@@ -19,17 +19,17 @@ def genVersionName(def versionName){
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 32
|
compileSdkVersion 32
|
||||||
buildToolsVersion "32.0.0"
|
buildToolsVersion "33.0.3"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "cc.winboll.studio.app"
|
applicationId "cc.winboll.studio.app"
|
||||||
minSdkVersion 24
|
minSdkVersion 21
|
||||||
targetSdkVersion 29
|
targetSdkVersion 30
|
||||||
versionCode 1
|
versionCode 1
|
||||||
// versionName 更新后需要手动设置
|
// versionName 更新后需要手动设置
|
||||||
// 项目模块目录的 build.gradle 文件的 stageCount=0
|
// 项目模块目录的 build.gradle 文件的 stageCount=0
|
||||||
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
||||||
versionName "15.0"
|
versionName "1.8"
|
||||||
if(true) {
|
if(true) {
|
||||||
versionName = genVersionName("${versionName}")
|
versionName = genVersionName("${versionName}")
|
||||||
}
|
}
|
||||||
@@ -41,32 +41,14 @@ android {
|
|||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_17
|
||||||
|
targetCompatibility JavaVersion.VERSION_17
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
api project(':winboll-shared')
|
||||||
// SSH
|
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
api 'com.jcraft:jsch:0.1.55'
|
|
||||||
// Html 解析
|
|
||||||
api 'org.jsoup:jsoup:1.13.1'
|
|
||||||
// 二维码类库
|
|
||||||
api 'com.google.zxing:core:3.4.1'
|
|
||||||
api 'com.journeyapps:zxing-android-embedded:3.6.0'
|
|
||||||
// 应用介绍页类库
|
|
||||||
api 'io.github.medyo:android-about-page:2.0.0'
|
|
||||||
// 吐司类库
|
|
||||||
api 'com.github.getActivity:ToastUtils:10.5'
|
|
||||||
// 网络连接类库
|
|
||||||
api 'com.squareup.okhttp3:okhttp:4.4.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'
|
|
||||||
|
|
||||||
api 'cc.winboll.studio:libaes:15.2.4'
|
|
||||||
api 'cc.winboll.studio:libapputils:15.2.1'
|
|
||||||
api 'cc.winboll.studio:libappbase:15.2.2'
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Fri Apr 11 12:16:58 HKT 2025
|
#Sun Jan 05 07:55:24 HKT 2025
|
||||||
stageCount=4
|
stageCount=17
|
||||||
libraryProject=
|
libraryProject=winboll-shared
|
||||||
baseVersion=15.0
|
baseVersion=1.8
|
||||||
publishVersion=15.0.3
|
publishVersion=1.8.16
|
||||||
buildCount=0
|
buildCount=0
|
||||||
baseBetaVersion=15.0.4
|
baseBetaVersion=1.8.17
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<string name="app_name">APP+</string>
|
<string name="app_name">WinBoll-APP+</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@drawable/ic_winboll"
|
android:icon="@drawable/ic_winboll"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:theme="@style/AESTheme"
|
android:theme="@style/WinBoll.SupportThemeNoActionBar"
|
||||||
android:supportsRtl="true">
|
android:supportsRtl="true">
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
@@ -42,7 +42,6 @@
|
|||||||
|
|
||||||
</provider>
|
</provider>
|
||||||
|
|
||||||
<activity android:name=".AboutActivity"/>
|
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
|||||||
@@ -1,88 +0,0 @@
|
|||||||
package cc.winboll.studio.app;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author ZhanGSKen@AliYun.Com
|
|
||||||
* @Date 2025/03/24 23:52:29
|
|
||||||
* @Describe 应用介绍窗口
|
|
||||||
*/
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import androidx.appcompat.widget.Toolbar;
|
|
||||||
import cc.winboll.studio.app.R;
|
|
||||||
import cc.winboll.studio.libaes.winboll.APPInfo;
|
|
||||||
import cc.winboll.studio.libaes.winboll.AboutView;
|
|
||||||
import cc.winboll.studio.libappbase.GlobalApplication;
|
|
||||||
import cc.winboll.studio.libappbase.winboll.IWinBollActivity;
|
|
||||||
|
|
||||||
public class AboutActivity extends WinBollActivity implements IWinBollActivity {
|
|
||||||
|
|
||||||
public static final String TAG = "AboutActivity";
|
|
||||||
|
|
||||||
Context mContext;
|
|
||||||
Toolbar mToolbar;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Activity getActivity() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getTag() {
|
|
||||||
return TAG;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
mContext = this;
|
|
||||||
setContentView(R.layout.activity_about);
|
|
||||||
|
|
||||||
mToolbar = findViewById(R.id.toolbar);
|
|
||||||
setSupportActionBar(mToolbar);
|
|
||||||
mToolbar.setSubtitle(TAG);
|
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
||||||
|
|
||||||
AboutView aboutView = CreateAboutView();
|
|
||||||
// 在 Activity 的 onCreate 或其他生命周期方法中调用
|
|
||||||
// LinearLayout layout = new LinearLayout(this);
|
|
||||||
// layout.setOrientation(LinearLayout.VERTICAL);
|
|
||||||
// // 创建布局参数(宽度和高度)
|
|
||||||
// ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(
|
|
||||||
// ViewGroup.LayoutParams.MATCH_PARENT,
|
|
||||||
// ViewGroup.LayoutParams.MATCH_PARENT
|
|
||||||
// );
|
|
||||||
// addContentView(aboutView, params);
|
|
||||||
|
|
||||||
LinearLayout layout = findViewById(R.id.aboutviewroot_ll);
|
|
||||||
// 创建布局参数(宽度和高度)
|
|
||||||
ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(
|
|
||||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
|
||||||
ViewGroup.LayoutParams.MATCH_PARENT
|
|
||||||
);
|
|
||||||
layout.addView(aboutView, params);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDestroy() {
|
|
||||||
super.onDestroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
public AboutView CreateAboutView() {
|
|
||||||
String szBranchName = "app";
|
|
||||||
APPInfo appInfo = new APPInfo();
|
|
||||||
appInfo.setAppName("APP");
|
|
||||||
appInfo.setAppIcon(cc.winboll.studio.libaes.R.drawable.ic_winboll);
|
|
||||||
appInfo.setAppDescription("WinBoll APP");
|
|
||||||
appInfo.setAppGitName("APP");
|
|
||||||
appInfo.setAppGitOwner("Studio");
|
|
||||||
appInfo.setAppGitAPPBranch(szBranchName);
|
|
||||||
appInfo.setAppGitAPPSubProjectFolder(szBranchName);
|
|
||||||
appInfo.setAppHomePage("https://www.winboll.cc/studio/details.php?app=APP");
|
|
||||||
appInfo.setAppAPKName("APP");
|
|
||||||
appInfo.setAppAPKFolderName("APP");
|
|
||||||
return new AboutView(mContext, appInfo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -5,26 +5,20 @@ package cc.winboll.studio.app;
|
|||||||
* @Date 2024/12/08 15:10:51
|
* @Date 2024/12/08 15:10:51
|
||||||
* @Describe 全局应用类
|
* @Describe 全局应用类
|
||||||
*/
|
*/
|
||||||
import android.view.Gravity;
|
import cc.winboll.studio.shared.app.WinBollApplication;
|
||||||
import cc.winboll.studio.libappbase.GlobalApplication;
|
import cc.winboll.studio.shared.log.LogUtils;
|
||||||
import cc.winboll.studio.libappbase.winboll.WinBollActivityManager;
|
|
||||||
import com.hjq.toast.ToastUtils;
|
|
||||||
|
|
||||||
public class App extends GlobalApplication {
|
public class App extends WinBollApplication {
|
||||||
|
|
||||||
public static final String TAG = "App";
|
public static final String TAG = "App";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
|
// 必须在调用基类前设置应用调试标志,
|
||||||
|
// 这样可以预先设置日志与数据的存储根目录。
|
||||||
|
//setIsDebug(BuildConfig.DEBUG);
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
|
LogUtils.d(TAG, "onCreate");
|
||||||
// 初始化 Toast 框架
|
|
||||||
ToastUtils.init(this);
|
|
||||||
// 设置 Toast 布局样式
|
|
||||||
//ToastUtils.setView(R.layout.toast_custom_view);
|
|
||||||
//ToastUtils.setStyle(new WhiteToastStyle());
|
|
||||||
ToastUtils.setGravity(Gravity.BOTTOM, 0, 200);
|
|
||||||
|
|
||||||
getWinBollActivityManager().setWinBollUI_TYPE(WinBollActivityManager.WinBollUI_TYPE.Service);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,26 +1,98 @@
|
|||||||
package cc.winboll.studio.app;
|
package cc.winboll.studio.app;
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import androidx.appcompat.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
import cc.winboll.studio.app.R;
|
import cc.winboll.studio.shared.app.WinBollActivity;
|
||||||
import cc.winboll.studio.libappbase.LogUtils;
|
import cc.winboll.studio.shared.app.WinBollActivityManager;
|
||||||
import cc.winboll.studio.libappbase.dialogs.YesNoAlertDialog;
|
import cc.winboll.studio.shared.app.WinBollApplication;
|
||||||
import cc.winboll.studio.libappbase.winboll.IWinBollActivity;
|
import cc.winboll.studio.shared.log.LogUtils;
|
||||||
import cc.winboll.studio.libappbase.winboll.WinBollActivityManager;
|
import cc.winboll.studio.shared.util.UriUtils;
|
||||||
|
import cc.winboll.studio.shared.view.StringToQrCodeView;
|
||||||
|
import cc.winboll.studio.shared.view.YesNoAlertDialog;
|
||||||
|
import cc.winboll.studio.unittest.UnitTestActivity;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Paths;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
final public class MainActivity extends WinBollActivity implements IWinBollActivity {
|
final public class MainActivity extends WinBollActivity {
|
||||||
|
|
||||||
public static final String TAG = "MainActivity";
|
public static final String TAG = "MainActivity";
|
||||||
|
|
||||||
Toolbar mToolbar;
|
public static final int REQUEST_HOME_ACTIVITY = 0;
|
||||||
|
public static final int REQUEST_ABOUT_ACTIVITY = 1;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Activity getActivity() {
|
protected boolean isEnableDisplayHomeAsUp() {
|
||||||
return this;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
// 接收并处理 Intent 数据,函数 Intent 处理接收就直接返回
|
||||||
|
if (prosessIntents(getIntent())) return;
|
||||||
|
// 以下正常创建主窗口
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_main);
|
||||||
|
// 设置 WinBoll 应用 UI 类型
|
||||||
|
WinBollApplication.setWinBollUI_TYPE(WinBollApplication.WinBollUI_TYPE.Aplication);
|
||||||
|
//ToastUtils.show("WinBollUI_TYPE " + WinBollApplication.getWinBollUI_TYPE());
|
||||||
|
LogUtils.d(TAG, "BuildConfig.DEBUG : " + Boolean.toString(BuildConfig.DEBUG));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPostCreate(Bundle savedInstanceState) {
|
||||||
|
super.onPostCreate(savedInstanceState);
|
||||||
|
setSubTitle("");
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// 处理传入的 Intent 数据
|
||||||
|
//
|
||||||
|
boolean prosessIntents(Intent intent) {
|
||||||
|
if (intent == null
|
||||||
|
|| intent.getAction() == null
|
||||||
|
|| intent.getAction().equals(""))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (intent.getAction().equals(StringToQrCodeView.ACTION_UNITTEST_QRCODE)) {
|
||||||
|
try {
|
||||||
|
WinBollActivity clazzActivity = UnitTestActivity.class.newInstance();
|
||||||
|
String tag = clazzActivity.getTag();
|
||||||
|
LogUtils.d(TAG, "String tag = clazzActivity.getTag(); tag " + tag);
|
||||||
|
Intent subIntent = new Intent(this, UnitTestActivity.class);
|
||||||
|
subIntent.setAction(intent.getAction());
|
||||||
|
File file = new File(getCacheDir(), UUID.randomUUID().toString());
|
||||||
|
//取出文件uri
|
||||||
|
Uri uri = intent.getData();
|
||||||
|
if (uri == null) {
|
||||||
|
uri = intent.getParcelableExtra(Intent.EXTRA_STREAM);
|
||||||
|
}
|
||||||
|
//获取文件真实地址
|
||||||
|
String szSrcPath = UriUtils.getFileFromUri(getApplication(), uri);
|
||||||
|
if (TextUtils.isEmpty(szSrcPath)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Files.copy(Paths.get(szSrcPath), Paths.get(file.getPath()));
|
||||||
|
//startWinBollActivity(subIntent, tag);
|
||||||
|
WinBollActivityManager.getInstance(this).startWinBollActivity(this, subIntent, UnitTestActivity.class);
|
||||||
|
} catch (IllegalAccessException | InstantiationException | IOException e) {
|
||||||
|
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
||||||
|
// 函数处理异常返回失败
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
LogUtils.d(TAG, "prosessIntents|" + intent.getAction() + "|yet");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -28,25 +100,10 @@ final public class MainActivity extends WinBollActivity implements IWinBollActiv
|
|||||||
return TAG;
|
return TAG;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
LogUtils.d(TAG, "onCreate(Bundle savedInstanceState)");
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_main);
|
|
||||||
|
|
||||||
mToolbar = findViewById(R.id.toolbar);
|
|
||||||
setSupportActionBar(mToolbar);
|
|
||||||
mToolbar.setSubtitle(TAG);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPostCreate(Bundle savedInstanceState) {
|
protected boolean isAddWinBollToolBar() {
|
||||||
super.onPostCreate(savedInstanceState);
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDestroy() {
|
|
||||||
super.onDestroy();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -59,7 +116,7 @@ final public class MainActivity extends WinBollActivity implements IWinBollActiv
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onYes() {
|
public void onYes() {
|
||||||
App.getWinBollActivityManager().finishAll();
|
WinBollActivityManager.getInstance(getApplicationContext()).finishAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -69,23 +126,43 @@ final public class MainActivity extends WinBollActivity implements IWinBollActiv
|
|||||||
YesNoAlertDialog.show(this, "[ " + getString(R.string.app_name) + " ]", "Exit(Yes/No).\nIs close all activity?", listener);
|
YesNoAlertDialog.show(this, "[ " + getString(R.string.app_name) + " ]", "Exit(Yes/No).\nIs close all activity?", listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Toolbar initToolBar() {
|
||||||
|
return findViewById(R.id.activitymainToolbar1);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
getMenuInflater().inflate(R.menu.toolbar_main, menu);
|
getMenuInflater().inflate(R.menu.toolbar_winboll_app_main, menu);
|
||||||
return super.onCreateOptionsMenu(menu);
|
return super.onCreateOptionsMenu(menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
if (item.getItemId() == R.id.item_log) {
|
if (item.getItemId() == R.id.item_unittest) {
|
||||||
App.getWinBollActivityManager().startLogActivity(this);
|
WinBollActivityManager.getInstance(this).startWinBollActivity(this, UnitTestActivity.class);
|
||||||
} else if (item.getItemId() == R.id.item_about) {
|
|
||||||
App.getWinBollActivityManager().startWinBollActivity(this, AboutActivity.class);
|
|
||||||
} else if (item.getItemId() == R.id.item_exit) {
|
} else if (item.getItemId() == R.id.item_exit) {
|
||||||
exit();
|
exit();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
|
switch (resultCode) {
|
||||||
|
case REQUEST_HOME_ACTIVITY : {
|
||||||
|
LogUtils.d(TAG, "REQUEST_HOME_ACTIVITY");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case REQUEST_ABOUT_ACTIVITY : {
|
||||||
|
LogUtils.d(TAG, "REQUEST_ABOUT_ACTIVITY");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default : {
|
||||||
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,66 +0,0 @@
|
|||||||
package cc.winboll.studio.app;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author ZhanGSKen@AliYun.Com
|
|
||||||
* @Date 2025/04/01 12:55:32
|
|
||||||
* @Describe 应用窗口基类
|
|
||||||
*/
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.MenuItem;
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
|
||||||
import cc.winboll.studio.libaes.beans.AESThemeBean;
|
|
||||||
import cc.winboll.studio.libaes.utils.AESThemeUtil;
|
|
||||||
import cc.winboll.studio.libappbase.winboll.IWinBollActivity;
|
|
||||||
|
|
||||||
public class WinBollActivity extends AppCompatActivity implements IWinBollActivity {
|
|
||||||
|
|
||||||
public static final String TAG = "WinBollActivity";
|
|
||||||
|
|
||||||
protected volatile AESThemeBean.ThemeType mThemeType;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Activity getActivity() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getTag() {
|
|
||||||
return TAG;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
mThemeType = getThemeType();
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
App.getWinBollActivityManager().add(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDestroy() {
|
|
||||||
super.onDestroy();
|
|
||||||
App.getWinBollActivityManager().registeRemove(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
AESThemeBean.ThemeType getThemeType() {
|
|
||||||
/*SharedPreferences sharedPreferences = getSharedPreferences(
|
|
||||||
SHAREDPREFERENCES_NAME, MODE_PRIVATE);
|
|
||||||
return AESThemeBean.ThemeType.values()[((sharedPreferences.getInt(DRAWER_THEME_TYPE, AESThemeBean.ThemeType.DEFAULT.ordinal())))];
|
|
||||||
*/
|
|
||||||
return AESThemeBean.getThemeStyleType(AESThemeUtil.getThemeTypeID(getApplicationContext()));
|
|
||||||
}
|
|
||||||
|
|
||||||
void setThemeStyle() {
|
|
||||||
//setTheme(AESThemeBean.getThemeStyle(getThemeType()));
|
|
||||||
setTheme(AESThemeUtil.getThemeTypeID(getApplicationContext()));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
|
||||||
if (item.getItemId() == android.R.id.home) {
|
|
||||||
finish();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return super.onOptionsItemSelected(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<cc.winboll.studio.libaes.views.ASupportToolbar
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/toolbar"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_weight="1.0"
|
|
||||||
android:id="@+id/aboutviewroot_ll"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
@@ -5,10 +5,10 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<cc.winboll.studio.libaes.views.ASupportToolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/toolbar"/>
|
android:id="@+id/activitymainToolbar1"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
<item
|
|
||||||
android:id="@+id/item_log"
|
|
||||||
android:title="Log"/>
|
|
||||||
<item
|
|
||||||
android:id="@+id/item_about"
|
|
||||||
android:title="About"/>
|
|
||||||
</menu>
|
</menu>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<string name="app_name">APP</string>
|
<string name="app_name">WinBoll-APP</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -51,6 +51,6 @@ dependencies {
|
|||||||
//api 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
|
//api 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
|
||||||
//api 'androidx.fragment:fragment:1.1.0'
|
//api 'androidx.fragment:fragment:1.1.0'
|
||||||
|
|
||||||
api 'cc.winboll.studio:libapputils:15.2.1'
|
api 'cc.winboll.studio:libapputils:15.2.2'
|
||||||
api 'cc.winboll.studio:libappbase:15.2.2'
|
api 'cc.winboll.studio:libappbase:15.2.2'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Mon Mar 31 19:41:08 HKT 2025
|
#Thu Apr 03 11:13:53 HKT 2025
|
||||||
stageCount=5
|
stageCount=7
|
||||||
libraryProject=libaes
|
libraryProject=libaes
|
||||||
baseVersion=15.2
|
baseVersion=15.2
|
||||||
publishVersion=15.2.4
|
publishVersion=15.2.6
|
||||||
buildCount=0
|
buildCount=0
|
||||||
baseBetaVersion=15.2.5
|
baseBetaVersion=15.2.7
|
||||||
|
|||||||
@@ -32,7 +32,9 @@ public class APPInfo implements Serializable {
|
|||||||
String appAPKName;
|
String appAPKName;
|
||||||
// 应用包存储文件夹名称
|
// 应用包存储文件夹名称
|
||||||
String appAPKFolderName;
|
String appAPKFolderName;
|
||||||
|
// 是否添加调试工具
|
||||||
|
boolean isAddDebugTools;
|
||||||
|
|
||||||
public APPInfo(String appName, int appIcon, String appDescription, String appGitName, String appGitOwner, String appGitAPPBranch, String appGitAPPSubProjectFolder, String appHomePage, String appAPKName, String appAPKFolderName) {
|
public APPInfo(String appName, int appIcon, String appDescription, String appGitName, String appGitOwner, String appGitAPPBranch, String appGitAPPSubProjectFolder, String appHomePage, String appAPKName, String appAPKFolderName) {
|
||||||
this.appName = appName;
|
this.appName = appName;
|
||||||
this.appIcon = appIcon;
|
this.appIcon = appIcon;
|
||||||
@@ -44,6 +46,21 @@ public class APPInfo implements Serializable {
|
|||||||
this.appHomePage = appHomePage;
|
this.appHomePage = appHomePage;
|
||||||
this.appAPKName = appAPKName;
|
this.appAPKName = appAPKName;
|
||||||
this.appAPKFolderName = appAPKFolderName;
|
this.appAPKFolderName = appAPKFolderName;
|
||||||
|
this.isAddDebugTools = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public APPInfo(String appName, int appIcon, String appDescription, String appGitName, String appGitOwner, String appGitAPPBranch, String appGitAPPSubProjectFolder, String appHomePage, String appAPKName, String appAPKFolderName, boolean isAddDebugTools) {
|
||||||
|
this.appName = appName;
|
||||||
|
this.appIcon = appIcon;
|
||||||
|
this.appDescription = appDescription;
|
||||||
|
this.appGitName = appGitName;
|
||||||
|
this.appGitOwner = appGitOwner;
|
||||||
|
this.appGitAPPBranch = appGitAPPBranch;
|
||||||
|
this.appGitAPPSubProjectFolder = appGitAPPSubProjectFolder;
|
||||||
|
this.appHomePage = appHomePage;
|
||||||
|
this.appAPKName = appAPKName;
|
||||||
|
this.appAPKFolderName = appAPKFolderName;
|
||||||
|
this.isAddDebugTools = isAddDebugTools;
|
||||||
}
|
}
|
||||||
|
|
||||||
public APPInfo() {
|
public APPInfo() {
|
||||||
@@ -58,6 +75,15 @@ public class APPInfo implements Serializable {
|
|||||||
this.appHomePage = "https://www.winboll.cc/studio/details.php?app=APP";
|
this.appHomePage = "https://www.winboll.cc/studio/details.php?app=APP";
|
||||||
this.appAPKName = "APP";
|
this.appAPKName = "APP";
|
||||||
this.appAPKFolderName = "APP";
|
this.appAPKFolderName = "APP";
|
||||||
|
this.isAddDebugTools = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsAddDebugTools(boolean isAddDebugTools) {
|
||||||
|
this.isAddDebugTools = isAddDebugTools;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAddDebugTools() {
|
||||||
|
return isAddDebugTools;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAppGitOwner(String appGitOwner) {
|
public void setAppGitOwner(String appGitOwner) {
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import okhttp3.Credentials;
|
|||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import okhttp3.Request;
|
import okhttp3.Request;
|
||||||
import okhttp3.Response;
|
import okhttp3.Response;
|
||||||
|
import mehdi.sakout.aboutpage.BuildConfig;
|
||||||
|
|
||||||
public class AboutView extends LinearLayout {
|
public class AboutView extends LinearLayout {
|
||||||
|
|
||||||
@@ -50,6 +51,7 @@ public class AboutView extends LinearLayout {
|
|||||||
String mszAppGitName = "";
|
String mszAppGitName = "";
|
||||||
String mszAppVersionName = "";
|
String mszAppVersionName = "";
|
||||||
String mszCurrentAppPackageName = "";
|
String mszCurrentAppPackageName = "";
|
||||||
|
boolean mIsAddDebugTools;
|
||||||
volatile String mszNewestAppPackageName = "";
|
volatile String mszNewestAppPackageName = "";
|
||||||
String mszAppDescription = "";
|
String mszAppDescription = "";
|
||||||
String mszHomePage = "";
|
String mszHomePage = "";
|
||||||
@@ -91,6 +93,7 @@ public class AboutView extends LinearLayout {
|
|||||||
appInfo.setAppGitAPPSubProjectFolder(typedArray.getString(R.styleable.AboutView_app_gitappsubprojectfolder));
|
appInfo.setAppGitAPPSubProjectFolder(typedArray.getString(R.styleable.AboutView_app_gitappsubprojectfolder));
|
||||||
appInfo.setAppDescription(typedArray.getString(R.styleable.AboutView_appdescription));
|
appInfo.setAppDescription(typedArray.getString(R.styleable.AboutView_appdescription));
|
||||||
appInfo.setAppIcon(typedArray.getResourceId(R.styleable.AboutView_appicon, R.drawable.ic_winboll));
|
appInfo.setAppIcon(typedArray.getResourceId(R.styleable.AboutView_appicon, R.drawable.ic_winboll));
|
||||||
|
appInfo.setIsAddDebugTools(typedArray.getBoolean(R.styleable.AboutView_is_adddebugtools, false));
|
||||||
// 返回一个绑定资源结束的信号给资源
|
// 返回一个绑定资源结束的信号给资源
|
||||||
typedArray.recycle();
|
typedArray.recycle();
|
||||||
return appInfo;
|
return appInfo;
|
||||||
@@ -118,7 +121,7 @@ public class AboutView extends LinearLayout {
|
|||||||
} else {
|
} else {
|
||||||
mszGitea = "https://gitea.winboll.cc/" + mAPPInfo.getAppGitOwner() + "/" + mszAppGitName + "/src/branch/" + mAPPInfo.getAppGitAPPBranch() + "/" + mAPPInfo.getAppGitAPPSubProjectFolder();
|
mszGitea = "https://gitea.winboll.cc/" + mAPPInfo.getAppGitOwner() + "/" + mszAppGitName + "/src/branch/" + mAPPInfo.getAppGitAPPBranch() + "/" + mAPPInfo.getAppGitAPPSubProjectFolder();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (GlobalApplication.isDebuging()) {
|
if (GlobalApplication.isDebuging()) {
|
||||||
LayoutInflater inflater = LayoutInflater.from(mContext);
|
LayoutInflater inflater = LayoutInflater.from(mContext);
|
||||||
@@ -150,7 +153,7 @@ public class AboutView extends LinearLayout {
|
|||||||
|
|
||||||
// 初始化标题栏
|
// 初始化标题栏
|
||||||
//setSubtitle(getContext().getString(R.string.text_about));
|
//setSubtitle(getContext().getString(R.string.text_about));
|
||||||
|
|
||||||
// LinearLayout llMain = findViewById(R.id.viewaboutLinearLayout1);
|
// LinearLayout llMain = findViewById(R.id.viewaboutLinearLayout1);
|
||||||
// llMain.addView(createAboutPage());
|
// llMain.addView(createAboutPage());
|
||||||
|
|
||||||
@@ -210,16 +213,6 @@ public class AboutView extends LinearLayout {
|
|||||||
};
|
};
|
||||||
|
|
||||||
protected View createAboutPage() {
|
protected View createAboutPage() {
|
||||||
// 定义应用调试按钮
|
|
||||||
//
|
|
||||||
Element elementAppMode;
|
|
||||||
if (GlobalApplication.isDebuging()) {
|
|
||||||
elementAppMode = new Element(mContext.getString(R.string.app_normal), R.drawable.ic_winboll);
|
|
||||||
elementAppMode.setOnClickListener(mAppNormalOnClickListener);
|
|
||||||
} else {
|
|
||||||
elementAppMode = new Element(mContext.getString(R.string.app_debug), R.drawable.ic_winboll);
|
|
||||||
elementAppMode.setOnClickListener(mAppDebugOnClickListener);
|
|
||||||
}
|
|
||||||
// 定义 GitWeb 按钮
|
// 定义 GitWeb 按钮
|
||||||
//
|
//
|
||||||
Element elementGitWeb = new Element(mContext.getString(R.string.gitea_home), R.drawable.ic_winboll);
|
Element elementGitWeb = new Element(mContext.getString(R.string.gitea_home), R.drawable.ic_winboll);
|
||||||
@@ -237,8 +230,8 @@ public class AboutView extends LinearLayout {
|
|||||||
} catch (PackageManager.NameNotFoundException e) {
|
} catch (PackageManager.NameNotFoundException e) {
|
||||||
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
||||||
}
|
}
|
||||||
View aboutPage = new AboutPage(mContext)
|
AboutPage aboutPage = new AboutPage(mContext);
|
||||||
.setDescription(szAppInfo)
|
aboutPage.setDescription(szAppInfo)
|
||||||
//.isRTL(false)
|
//.isRTL(false)
|
||||||
//.setCustomFont(String) // or Typeface
|
//.setCustomFont(String) // or Typeface
|
||||||
.setImage(mnAppIcon)
|
.setImage(mnAppIcon)
|
||||||
@@ -247,17 +240,31 @@ public class AboutView extends LinearLayout {
|
|||||||
//.addGroup("Connect with us")
|
//.addGroup("Connect with us")
|
||||||
.addEmail("ZhanGSKen@AliYun.Com")
|
.addEmail("ZhanGSKen@AliYun.Com")
|
||||||
.addWebsite(mszHomePage)
|
.addWebsite(mszHomePage)
|
||||||
.addItem(elementAppMode)
|
|
||||||
.addItem(elementGitWeb)
|
.addItem(elementGitWeb)
|
||||||
.addItem(elementAppUpdate)
|
.addItem(elementAppUpdate);
|
||||||
//.addFacebook("the.medy")
|
//.addFacebook("the.medy")
|
||||||
//.addTwitter("medyo80")
|
//.addTwitter("medyo80")
|
||||||
//.addYoutube("UCdPQtdWIsg7_pi4mrRu46vA")
|
//.addYoutube("UCdPQtdWIsg7_pi4mrRu46vA")
|
||||||
//.addPlayStore("com.ideashower.readitlater.pro")
|
//.addPlayStore("com.ideashower.readitlater.pro")
|
||||||
//.addGitHub("medyo")
|
//.addGitHub("medyo")
|
||||||
//.addInstagram("medyo80")
|
//.addInstagram("medyo80")
|
||||||
.create();
|
//.create();
|
||||||
return aboutPage;
|
|
||||||
|
if (mAPPInfo.isAddDebugTools()) {
|
||||||
|
// 定义应用调试按钮
|
||||||
|
//
|
||||||
|
Element elementAppMode;
|
||||||
|
if (GlobalApplication.isDebuging()) {
|
||||||
|
elementAppMode = new Element(mContext.getString(R.string.app_normal), R.drawable.ic_winboll);
|
||||||
|
elementAppMode.setOnClickListener(mAppNormalOnClickListener);
|
||||||
|
} else {
|
||||||
|
elementAppMode = new Element(mContext.getString(R.string.app_debug), R.drawable.ic_winboll);
|
||||||
|
elementAppMode.setOnClickListener(mAppDebugOnClickListener);
|
||||||
|
}
|
||||||
|
aboutPage.addItem(elementAppMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
return aboutPage.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
View.OnClickListener mAppDebugOnClickListener = new View.OnClickListener(){
|
View.OnClickListener mAppDebugOnClickListener = new View.OnClickListener(){
|
||||||
@@ -324,14 +331,17 @@ public class AboutView extends LinearLayout {
|
|||||||
PrefUtils.saveString(mContext, "metDevUserName", metDevUserName.getText().toString());
|
PrefUtils.saveString(mContext, "metDevUserName", metDevUserName.getText().toString());
|
||||||
PrefUtils.saveString(mContext, "metDevUserPassword", metDevUserPassword.getText().toString());
|
PrefUtils.saveString(mContext, "metDevUserPassword", metDevUserPassword.getText().toString());
|
||||||
} else {
|
} else {
|
||||||
credential = Credentials.basic("WinBoll", "WinBollPowerByZhanGSKen");
|
String username = "WinBoll";
|
||||||
|
String password = "WinBollPowerByZhanGSKen";
|
||||||
|
credential = Credentials.basic(username, password);
|
||||||
}
|
}
|
||||||
OkHttpClient client = new OkHttpClient();
|
|
||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
.url(szUrl)
|
.url(szUrl)
|
||||||
.header("Accept", "text/plain") // 设置正确的Content-Type头
|
.header("Accept", "text/plain") // 设置正确的Content-Type头
|
||||||
.header("Authorization", credential)
|
.header("Authorization", credential)
|
||||||
.build();
|
.build();
|
||||||
|
OkHttpClient client = new OkHttpClient();
|
||||||
Call call = client.newCall(request);
|
Call call = client.newCall(request);
|
||||||
call.enqueue(new Callback() {
|
call.enqueue(new Callback() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -252,6 +252,7 @@ public class WinBollServiceStatusView extends LinearLayout {
|
|||||||
username = "WinBoll";
|
username = "WinBoll";
|
||||||
password = "WinBollPowerByZhanGSKen";
|
password = "WinBollPowerByZhanGSKen";
|
||||||
}
|
}
|
||||||
|
|
||||||
LogUtils.d(TAG, String.format("Connection Start. targetUrl %s", targetUrl));
|
LogUtils.d(TAG, String.format("Connection Start. targetUrl %s", targetUrl));
|
||||||
WinBollServerConnectionThread thread = new WinBollServerConnectionThread(
|
WinBollServerConnectionThread thread = new WinBollServerConnectionThread(
|
||||||
targetUrl,
|
targetUrl,
|
||||||
|
|||||||
@@ -1,62 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
<!-- 边框阴影部分 -->
|
android:shape="rectangle">
|
||||||
<!-- 相对边框的Offset设置(android:left, top, right, bottom) -->
|
<solid android:color="#BF4C4C4C" />
|
||||||
<item
|
<!-- 定义成圆角的 -->
|
||||||
android:left="0dp"
|
<corners android:radius="15dp" />
|
||||||
android:top="0dp"
|
</shape>
|
||||||
android:right="0dp"
|
|
||||||
android:bottom="0dp">
|
|
||||||
<shape android:shape="rectangle" >
|
|
||||||
<gradient
|
|
||||||
android:angle="270"
|
|
||||||
android:startColor="@color/colorToastShadow"
|
|
||||||
android:centerColor="@color/colorToastShadow"
|
|
||||||
android:endColor="@color/colorToastShadow"/>
|
|
||||||
<corners
|
|
||||||
android:bottomLeftRadius="10dip"
|
|
||||||
android:bottomRightRadius="10dip"
|
|
||||||
android:topLeftRadius="10dip"
|
|
||||||
android:topRightRadius="10dip" />
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
<!-- 边框部分 -->
|
|
||||||
<item
|
|
||||||
android:left="0dp"
|
|
||||||
android:top="0dp"
|
|
||||||
android:right="1dp"
|
|
||||||
android:bottom="2dp">
|
|
||||||
<shape android:shape="rectangle" >
|
|
||||||
<gradient
|
|
||||||
android:angle="270"
|
|
||||||
android:startColor="@color/colorToastFrame"
|
|
||||||
android:centerColor="@color/colorToastFrame"
|
|
||||||
android:endColor="@color/colorToastFrame"/>
|
|
||||||
<corners
|
|
||||||
android:bottomLeftRadius="10dip"
|
|
||||||
android:bottomRightRadius="10dip"
|
|
||||||
android:topLeftRadius="10dip"
|
|
||||||
android:topRightRadius="10dip" />
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
<!-- 背景主体部分 -->
|
|
||||||
<item
|
|
||||||
android:left="2dp"
|
|
||||||
android:top="2dp"
|
|
||||||
android:right="3dp"
|
|
||||||
android:bottom="3dp">
|
|
||||||
<shape android:shape="rectangle" >
|
|
||||||
<gradient
|
|
||||||
android:type="linear"
|
|
||||||
android:angle="90"
|
|
||||||
android:startColor="@color/colorToastBackgroung"
|
|
||||||
android:centerColor="@color/colorToastBackgroung"
|
|
||||||
android:endColor="@color/colorToastBackgroung"/>
|
|
||||||
<corners
|
|
||||||
android:bottomLeftRadius="10dip"
|
|
||||||
android:bottomRightRadius="10dip"
|
|
||||||
android:topLeftRadius="10dip"
|
|
||||||
android:topRightRadius="10dip" />
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
</layer-list>
|
|
||||||
|
|||||||
@@ -1,35 +1,38 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:background="@drawable/toast_frame"
|
android:background="@drawable/toast_frame"
|
||||||
android:padding="10dp">
|
android:padding="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="14sp"
|
android:text="@string/app_name"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:id="@+id/customtoastTextView1"
|
android:textColor="#FFFFFFFF"/>
|
||||||
android:background="#FFFFFFFF"
|
|
||||||
android:gravity="center_horizontal"/>
|
|
||||||
|
|
||||||
<View
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:orientation="horizontal"
|
||||||
android:layout_height="1dp"
|
android:layout_width="wrap_content"
|
||||||
android:background="#FFE8E8E8"/>
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<TextView
|
<ImageView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="40dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="40dp"
|
||||||
android:textSize="14sp"
|
android:src="@drawable/ic_launcher"/>
|
||||||
android:text="Text"
|
|
||||||
android:id="@+id/customtoastTextView2"
|
<TextView
|
||||||
android:background="#FFFFFFFF"
|
android:id="@android:id/message"
|
||||||
android:gravity="center_horizontal"/>
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:textColor="#FFFFFFFF"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,20 @@
|
|||||||
<attr name="attrAToolbarStartColor" format="color" />
|
<attr name="attrAToolbarStartColor" format="color" />
|
||||||
<attr name="attrAToolbarCenterColor" format="color" />
|
<attr name="attrAToolbarCenterColor" format="color" />
|
||||||
<attr name="attrAToolbarEndColor" format="color" />
|
<attr name="attrAToolbarEndColor" format="color" />
|
||||||
|
|
||||||
|
<declare-styleable name="AboutView">
|
||||||
|
<attr name="app_name" format="string" />
|
||||||
|
<attr name="app_apkfoldername" format="string" />
|
||||||
|
<attr name="app_apkname" format="string" />
|
||||||
|
<attr name="app_gitname" format="string" />
|
||||||
|
<attr name="app_gitowner" format="string" />
|
||||||
|
<attr name="app_gitappbranch" format="string" />
|
||||||
|
<attr name="app_gitappsubprojectfolder" format="string" />
|
||||||
|
<attr name="appdescription" format="string" />
|
||||||
|
<attr name="appicon" format="reference" />
|
||||||
|
<attr name="is_adddebugtools" format="boolean" />
|
||||||
|
</declare-styleable>
|
||||||
|
|
||||||
<declare-styleable name="AToolbar">
|
<declare-styleable name="AToolbar">
|
||||||
<attr name="attrAToolbarTitleTextColor"/>
|
<attr name="attrAToolbarTitleTextColor"/>
|
||||||
<attr name="attrAToolbarStartColor"/>
|
<attr name="attrAToolbarStartColor"/>
|
||||||
|
|||||||
@@ -2,8 +2,9 @@
|
|||||||
//include ':demo'
|
//include ':demo'
|
||||||
//rootProject.name = "demo"
|
//rootProject.name = "demo"
|
||||||
|
|
||||||
// APP 项目编译设置
|
// WinBoll-APP 项目编译设置
|
||||||
//include ':app'
|
//include ':app'
|
||||||
|
//include ':winboll-shared'
|
||||||
//rootProject.name = "app"
|
//rootProject.name = "app"
|
||||||
|
|
||||||
// AutoInstaller 项目编译设置
|
// AutoInstaller 项目编译设置
|
||||||
|
|||||||
Reference in New Issue
Block a user