Compare commits
4 Commits
appbase-v1
...
appbase-v1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9052a3924b | ||
|
|
9642ad1966 | ||
|
|
6686da0e8f | ||
|
|
9e7aff09d1 |
@@ -29,7 +29,7 @@ android {
|
||||
// versionName 更新后需要手动设置
|
||||
// .winboll/winbollBuildProps.properties 文件的 stageCount=0
|
||||
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
||||
versionName "1.2"
|
||||
versionName "1.3"
|
||||
if(true) {
|
||||
versionName = genVersionName("${versionName}")
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Tue Feb 11 00:31:50 HKT 2025
|
||||
stageCount=5
|
||||
#Tue Feb 11 13:11:17 HKT 2025
|
||||
stageCount=1
|
||||
libraryProject=libappbase
|
||||
baseVersion=1.2
|
||||
publishVersion=1.2.4
|
||||
baseVersion=1.3
|
||||
publishVersion=1.3.0
|
||||
buildCount=0
|
||||
baseBetaVersion=1.2.5
|
||||
baseBetaVersion=1.3.1
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Tue Feb 11 00:31:50 HKT 2025
|
||||
stageCount=5
|
||||
#Tue Feb 11 13:11:17 HKT 2025
|
||||
stageCount=1
|
||||
libraryProject=libappbase
|
||||
baseVersion=1.2
|
||||
publishVersion=1.2.4
|
||||
baseVersion=1.3
|
||||
publishVersion=1.3.0
|
||||
buildCount=0
|
||||
baseBetaVersion=1.2.5
|
||||
baseBetaVersion=1.3.1
|
||||
|
||||
@@ -10,7 +10,7 @@ import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Resources;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Color;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
@@ -30,35 +30,46 @@ public final class GlobalCrashActivity extends Activity implements MenuItem.OnMe
|
||||
private static final int MENUITEM_RESTART = 1;
|
||||
|
||||
String mLog;
|
||||
|
||||
int colorTittle;
|
||||
int colorTittleBackground;
|
||||
int colorText;
|
||||
int colorTextBackground;
|
||||
|
||||
public static final String TAG = "GlobalCrashActivity";
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
CrashHandler.AppCrashSafetyWire.getInstance().postResumeCrashSafetyWireHandler(getApplicationContext());
|
||||
|
||||
mLog = getIntent().getStringExtra(CrashHandler.EXTRA_CRASH_INFO);
|
||||
setTheme(android.R.style.Theme_DeviceDefault_NoActionBar);
|
||||
|
||||
//setTheme(android.R.style.Theme_Holo_Light_NoActionBar);
|
||||
setTheme(R.style.APPBaseTheme);
|
||||
setContentView(R.layout.activity_globalcrash);
|
||||
|
||||
TypedArray a = obtainStyledAttributes(R.styleable.GlobalCrashActivity);
|
||||
colorTittle = a.getColor(R.styleable.GlobalCrashActivity_colorTittle, Color.WHITE);
|
||||
colorTittleBackground = a.getColor(R.styleable.GlobalCrashActivity_colorTittleBackgound, Color.BLACK);
|
||||
colorText = a.getColor(R.styleable.GlobalCrashActivity_colorText, Color.RED);
|
||||
colorTextBackground = a.getColor(R.styleable.GlobalCrashActivity_colorTextBackgound, Color.RED);
|
||||
// 返回一个绑定资源结束的信号给资源
|
||||
a.recycle();
|
||||
|
||||
LinearLayout llMain = findViewById(R.id.activityglobalcrashLinearLayout1);
|
||||
llMain.setBackgroundColor(Color.GRAY);
|
||||
llMain.setBackgroundColor(colorTextBackground);
|
||||
Toolbar toolbar = findViewById(R.id.activityglobalcrashToolbar1);
|
||||
toolbar.setBackgroundColor(Color.BLACK);
|
||||
toolbar.setTitleTextColor(Color.WHITE);
|
||||
toolbar.setSubtitleTextColor(Color.WHITE);
|
||||
toolbar.setBackgroundColor(colorTittleBackground);
|
||||
toolbar.setTitleTextColor(colorTittle);
|
||||
toolbar.setSubtitleTextColor(colorTittle);
|
||||
setActionBar(toolbar);
|
||||
TextView tvLog = findViewById(R.id.activityglobalcrashTextView1);
|
||||
tvLog.setText(mLog);
|
||||
tvLog.setTextColor(Color.BLACK);
|
||||
tvLog.setBackgroundColor(Color.GRAY);
|
||||
tvLog.setTextColor(colorText);
|
||||
tvLog.setBackgroundColor(colorTextBackground);
|
||||
|
||||
getActionBar().setTitle(CrashHandler.TITTLE);
|
||||
getActionBar().setSubtitle(GlobalApplication.getAppName(getApplicationContext()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
@@ -108,7 +119,7 @@ public final class GlobalCrashActivity extends Activity implements MenuItem.OnMe
|
||||
for (int i = 0; i < menu.size(); i++) {
|
||||
MenuItem item = menu.getItem(i);
|
||||
SpannableString spanString = new SpannableString(item.getTitle().toString());
|
||||
spanString.setSpan(new ForegroundColorSpan(Color.WHITE), 0, spanString.length(), 0);
|
||||
spanString.setSpan(new ForegroundColorSpan(colorTittle), 0, spanString.length(), 0);
|
||||
item.setTitle(spanString);
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/activityglobalcrashLinearLayout1">
|
||||
android:id="@+id/activityglobalcrashLinearLayout1"
|
||||
style="@style/APPBaseTheme">
|
||||
|
||||
<android.widget.Toolbar
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="AppTheme" parent="@android:style/Theme.Material.Light">
|
||||
</style>
|
||||
</resources>
|
||||
@@ -1,7 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<attr name="attrTextColor" format="color" />
|
||||
<attr name="attrPrimaryColor" format="color" />
|
||||
<attr name="attrPrimaryDarkColor" format="color" />
|
||||
<attr name="attrAccentColor" format="color" />
|
||||
|
||||
<attr name="globalCrashActivity" 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,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#FF03AB4E</color>
|
||||
<color name="colorPrimaryDark">#FF027C39</color>
|
||||
<color name="colorAccent">#FF3DDC84</color>
|
||||
<color name="colorText">#FF000000</color>
|
||||
<color name="colorPrimary">#FFFFE200</color>
|
||||
<color name="colorPrimaryDark">#FFFFE200</color>
|
||||
<color name="colorAccent">#FFFFE200</color>
|
||||
<color name="colorText">#FFFFE200</color>
|
||||
</resources>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="AppTheme" parent="@android:style/Theme.Holo.Light">
|
||||
<item name="attrTextColor">#FF000000</item>
|
||||
<item name="attrPrimaryColor">@color/colorPrimary</item>
|
||||
<item name="attrPrimaryDarkColor">@color/colorPrimaryDark</item>
|
||||
<item name="attrAccentColor">@color/colorAccent</item>
|
||||
<style name="APPBaseTheme" parent="@android:style/Theme.Holo.Light.NoActionBar">
|
||||
<item name="colorTittle">#FFFFF600</item>
|
||||
<item name="colorTittleBackgound">#FF00B322</item>
|
||||
<item name="colorText">#FF00B322</item>
|
||||
<item name="colorTextBackgound">#FF000000</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user