7 Commits
Author SHA1 Message Date
amos 6f59b83443 feat: 恢复完整首页界面布局和功能
Android Release / release (push) Successful in 50s
2026-06-03 00:22:53 +08:00
amos ca9388e334 fix: 添加应用图标引用到 AndroidManifest
Android Release / release (push) Successful in 47s
2026-06-03 00:12:24 +08:00
amos 43277c5c67 feat: 设置应用图标 (ARKJ)
Android Release / release (push) Successful in 49s
2026-06-03 00:04:54 +08:00
amos 3cc811cd8e debug: 添加网络调试和多 endpoint 尝试
Android Release / release (push) Successful in 43s
2026-06-02 23:55:22 +08:00
amos 56298d080f fix: 修复变量传递问题
Android Release / release (push) Failing after 35s
2026-06-02 23:50:57 +08:00
amos 5cafc3b41c fix: 使用 Authorization: Basic Auth 认证
Android Release / release (push) Failing after 28s
2026-06-02 23:48:10 +08:00
amos 8971e8885d fix: 简化 Release 流程,直接使用 Basic Auth
Android Release / release (push) Failing after 28s
2026-06-02 23:44:43 +08:00
9 changed files with 441 additions and 53 deletions
+41 -46
View File
@@ -50,53 +50,48 @@ jobs:
echo "APK_FILE=$APK_FILE" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Create or Update Release
id: create_release
env:
GITEA_USER: ${{ secrets.GITEAUSER }}
GITEA_PASS: ${{ secrets.GITEAPASS }}
- name: Debug Network
run: |
VERSION=${{ env.VERSION }}
REPO="${{ github.repository }}"
echo "Creating release for $VERSION..."
# 检查 Release 是否已存在
EXISTING=$(curl -s -u "$GITEA_USER:$GITEA_PASS" "https://gitea.kg8.net/api/v1/repos/$REPO/releases/tags/$VERSION")
RELEASE_ID=$(echo "$EXISTING" | grep -o '"id":[0-9]*' | head -1 | cut -d':' -f2)
if [ -n "$RELEASE_ID" ]; then
echo "Release 已存在 (ID: $RELEASE_ID),删除旧的..."
curl -s -X DELETE -u "$GITEA_USER:$GITEA_PASS" "https://gitea.kg8.net/api/v1/repos/$REPO/releases/$RELEASE_ID"
sleep 2
fi
# 创建新的 Release
RESPONSE=$(curl -s -X POST "https://gitea.kg8.net/api/v1/repos/$REPO/releases" \
-u "$GITEA_USER:$GITEA_PASS" \
-H "Content-Type: application/json" \
-d "{\"tag_name\":\"$VERSION\",\"name\":\"Release $VERSION\",\"draft\":false,\"prerelease\":false}")
echo "Response: $RESPONSE"
NEW_RELEASE_ID=$(echo "$RESPONSE" | grep -o '"id":[0-9]*' | head -1 | cut -d':' -f2)
if [ -z "$NEW_RELEASE_ID" ]; then
echo "❌ Failed to create release"
exit 1
fi
echo "release_id=$NEW_RELEASE_ID" >> $GITHUB_OUTPUT
echo "✅ Release 创建成功 (ID: $NEW_RELEASE_ID)"
echo "Testing network connectivity..."
ping -c 2 gitea.kg8.net || echo "ping failed"
curl -v "https://gitea.kg8.net/api/v1/version" 2>&1 | head -20 || echo "curl failed"
- name: Upload APK
- name: Create Release and Upload APK
env:
GITEA_USER: ${{ secrets.GITEAUSER }}
GITEA_PASS: ${{ secrets.GITEAPASS }}
AUTH: ${{ secrets.AUTHB64 }}
VERSION: ${{ env.VERSION }}
APK_FILE: ${{ env.APK_FILE }}
REPO: ${{ github.repository }}
run: |
echo "Uploading: ${{ env.APK_FILE }}"
ls -lh ${{ env.APK_FILE }}
curl -s -X POST "https://gitea.kg8.net/api/v1/repos/${{ github.repository }}/releases/${{ steps.create_release.outputs.release_id }}/assets" \
-u "$GITEA_USER:$GITEA_PASS" \
-F "attachment=@${{ env.APK_FILE }}"
echo '✅ APK 上传成功!'
echo "Creating release for ${VERSION}..."
# 尝试不同的 API endpoint
for API_URL in "https://gitea.kg8.net/api/v1" "http://localhost:3000/api/v1" "http://127.0.0.1:3000/api/v1"; do
echo "Trying: ${API_URL}"
RESPONSE=$(curl -s -X POST "${API_URL}/repos/${REPO}/releases" \
-H "Authorization: Basic ${AUTH}" \
-H "Content-Type: application/json" \
-d "{\"tag_name\":\"${VERSION}\",\"name\":\"Release ${VERSION}\",\"draft\":false,\"prerelease\":false}" \
--connect-timeout 5)
echo "Response: ${RESPONSE}"
RELEASE_ID=$(echo "$RESPONSE" | grep -o '"id":[0-9]*' | head -1 | cut -d':' -f2)
if [ -n "$RELEASE_ID" ]; then
echo "✅ Release 创建成功 (ID: ${RELEASE_ID}) via ${API_URL}"
# 上传 APK
echo "Uploading APK: ${APK_FILE}"
UPLOAD_RESPONSE=$(curl -s -X POST "${API_URL}/repos/${REPO}/releases/${RELEASE_ID}/assets" \
-H "Authorization: Basic ${AUTH}" \
-F "attachment=@${APK_FILE}")
echo "Upload Response: ${UPLOAD_RESPONSE}"
echo '✅ APK 上传成功!'
exit 0
fi
done
echo "❌ Failed to create release on all endpoints"
exit 1
+1
View File
@@ -4,6 +4,7 @@
<application
android:allowBackup="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@android:style/Theme.DeviceDefault.Light.NoActionBar">
<activity
@@ -2,11 +2,71 @@ package com.arkj.app;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// 设置功能按钮点击事件
setupFunctionButtons();
// 设置底部导航点击事件
setupBottomNavigation();
}
}
private void setupFunctionButtons() {
// 备忘录
findViewById(R.id.btnMemo).setOnClickListener(v ->
Toast.makeText(this, "打开备忘录", Toast.LENGTH_SHORT).show());
// 二维码
findViewById(R.id.btnQRCode).setOnClickListener(v ->
Toast.makeText(this, "打开二维码扫描", Toast.LENGTH_SHORT).show());
// 谁在干活
findViewById(R.id.btnWhoWorking).setOnClickListener(v ->
Toast.makeText(this, "查看谁在干活", Toast.LENGTH_SHORT).show());
// PVE
findViewById(R.id.btnPVE).setOnClickListener(v ->
Toast.makeText(this, "打开 PVE", Toast.LENGTH_SHORT).show());
// 快递
findViewById(R.id.btnExpress).setOnClickListener(v ->
Toast.makeText(this, "查看快递", Toast.LENGTH_SHORT).show());
// 纪念日
findViewById(R.id.btnAnniversary).setOnClickListener(v ->
Toast.makeText(this, "查看纪念日", Toast.LENGTH_SHORT).show());
// 记账
findViewById(R.id.btnAccounting).setOnClickListener(v ->
Toast.makeText(this, "打开记账", Toast.LENGTH_SHORT).show());
// 资料
findViewById(R.id.btnMaterials).setOnClickListener(v ->
Toast.makeText(this, "查看资料", Toast.LENGTH_SHORT).show());
// 更多
findViewById(R.id.btnMore).setOnClickListener(v ->
Toast.makeText(this, "更多功能", Toast.LENGTH_SHORT).show());
}
private void setupBottomNavigation() {
// 首页
findViewById(R.id.navHome).setOnClickListener(v ->
Toast.makeText(this, "已在首页", Toast.LENGTH_SHORT).show());
// 中间按钮
findViewById(R.id.navCenter).setOnClickListener(v ->
Toast.makeText(this, "快速操作", Toast.LENGTH_SHORT).show());
// 我的
findViewById(R.id.navProfile).setOnClickListener(v ->
Toast.makeText(this, "打开个人中心", Toast.LENGTH_SHORT).show());
}
}
+338 -6
View File
@@ -3,12 +3,344 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center">
android:background="@drawable/bg_gradient">
<TextView
android:layout_width="wrap_content"
<!-- 顶部搜索栏 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="ARKJ"
android:textSize="32sp"/>
android:orientation="horizontal"
android:padding="16dp"
android:gravity="center_vertical">
</LinearLayout>
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/ic_speaker"
android:layout_marginEnd="12dp"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
android:background="@drawable/bg_search"
android:padding="10dp"
android:gravity="center_vertical">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@drawable/ic_search"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/search_hint"
android:textColor="#999"
android:layout_marginStart="8dp"/>
</LinearLayout>
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/ic_scan"
android:layout_marginStart="12dp"/>
</LinearLayout>
<!-- 功能网格 -->
<GridLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:rowCount="3"
android:columnCount="3"
android:padding="16dp">
<!-- 备忘录 -->
<LinearLayout
android:id="@+id/btnMemo"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_columnWeight="1"
android:layout_rowWeight="1"
android:orientation="vertical"
android:gravity="center"
android:background="@drawable/bg_function_icon"
android:layout_margin="8dp">
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/ic_memo"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/memo"
android:textColor="#333"
android:layout_marginTop="4dp"/>
</LinearLayout>
<!-- 二维码 -->
<LinearLayout
android:id="@+id/btnQRCode"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_columnWeight="1"
android:layout_rowWeight="1"
android:orientation="vertical"
android:gravity="center"
android:background="@drawable/bg_function_icon"
android:layout_margin="8dp">
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/ic_qrcode"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/qrcode"
android:textColor="#333"
android:layout_marginTop="4dp"/>
</LinearLayout>
<!-- 谁在干活 -->
<LinearLayout
android:id="@+id/btnWhoWorking"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_columnWeight="1"
android:layout_rowWeight="1"
android:orientation="vertical"
android:gravity="center"
android:background="@drawable/bg_function_icon"
android:layout_margin="8dp">
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/ic_star"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/who_working"
android:textColor="#333"
android:layout_marginTop="4dp"/>
</LinearLayout>
<!-- PVE -->
<LinearLayout
android:id="@+id/btnPVE"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_columnWeight="1"
android:layout_rowWeight="1"
android:orientation="vertical"
android:gravity="center"
android:background="@drawable/bg_function_icon"
android:layout_margin="8dp">
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/ic_pve"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pve"
android:textColor="#333"
android:layout_marginTop="4dp"/>
</LinearLayout>
<!-- 快递 -->
<LinearLayout
android:id="@+id/btnExpress"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_columnWeight="1"
android:layout_rowWeight="1"
android:orientation="vertical"
android:gravity="center"
android:background="@drawable/bg_function_icon"
android:layout_margin="8dp">
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/ic_express"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/express"
android:textColor="#333"
android:layout_marginTop="4dp"/>
</LinearLayout>
<!-- 纪念日 -->
<LinearLayout
android:id="@+id/btnAnniversary"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_columnWeight="1"
android:layout_rowWeight="1"
android:orientation="vertical"
android:gravity="center"
android:background="@drawable/bg_function_icon"
android:layout_margin="8dp">
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/ic_anniversary"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/anniversary"
android:textColor="#333"
android:layout_marginTop="4dp"/>
</LinearLayout>
<!-- 记账 -->
<LinearLayout
android:id="@+id/btnAccounting"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_columnWeight="1"
android:layout_rowWeight="1"
android:orientation="vertical"
android:gravity="center"
android:background="@drawable/bg_function_icon"
android:layout_margin="8dp">
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/ic_accounting"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/accounting"
android:textColor="#333"
android:layout_marginTop="4dp"/>
</LinearLayout>
<!-- 资料 -->
<LinearLayout
android:id="@+id/btnMaterials"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_columnWeight="1"
android:layout_rowWeight="1"
android:orientation="vertical"
android:gravity="center"
android:background="@drawable/bg_function_icon"
android:layout_margin="8dp">
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/ic_materials"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/materials"
android:textColor="#333"
android:layout_marginTop="4dp"/>
</LinearLayout>
<!-- 更多 -->
<LinearLayout
android:id="@+id/btnMore"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_columnWeight="1"
android:layout_rowWeight="1"
android:orientation="vertical"
android:gravity="center"
android:background="@drawable/bg_function_icon"
android:layout_margin="8dp">
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/ic_more"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="更多"
android:textColor="#333"
android:layout_marginTop="4dp"/>
</LinearLayout>
</GridLayout>
<!-- 底部导航 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:padding="8dp"
android:background="@drawable/bg_menu_button">
<LinearLayout
android:id="@+id/navHome"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center"
android:padding="8dp">
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/ic_home_active"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/home"
android:textColor="#333"
android:layout_marginTop="2dp"/>
</LinearLayout>
<ImageView
android:id="@+id/navCenter"
android:layout_width="64dp"
android:layout_height="64dp"
android:src="@drawable/ic_center_button"
android:layout_marginHorizontal="16dp"/>
<LinearLayout
android:id="@+id/navProfile"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center"
android:padding="8dp">
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/ic_profile"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/profile"
android:textColor="#333"
android:layout_marginTop="2dp"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB