Skip to content

Commit

Permalink
临时方案修复浮动按钮跳动问题、新增可设置测试版猜版默认后缀 (#40)
Browse files Browse the repository at this point in the history
* 临时方案修复浮动按钮跳动问题、新增可设置测试版猜版默认后缀

* 文案修订

* 上游更新 Kotlin 至 2.0.0-RC2

* Update build.gradle.kts

* KTX Core和MDC上游更新
  • Loading branch information
ArcticFoxPro authored May 4, 2024
1 parent 005085f commit 0cfd431
Show file tree
Hide file tree
Showing 7 changed files with 560 additions and 70 deletions.
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ android {
minSdk = 24
targetSdk = 34
versionCode = gitCommitCount
versionName = "1.2.6-$gitCommitHash"
versionName = "1.2.7-$gitCommitHash"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down Expand Up @@ -69,11 +69,11 @@ android {
}

dependencies {
implementation("androidx.core:core-ktx:1.13.0-rc01")
implementation("androidx.core:core-ktx:1.13.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.core:core-splashscreen:1.1.0-rc01")
implementation("com.google.android.material:material:1.12.0-rc01")
implementation("com.google.android.material:material:1.12.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
Expand Down
331 changes: 272 additions & 59 deletions app/src/main/java/com/xiaoniu/qqversionlist/ui/MainActivity.kt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="猜版"
android:minWidth="0dp"
app:icon="@drawable/search_line"
app:layout_anchor="@id/bottomAppBar"
app:removeEmbeddedFabElevation="true" />
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/dialog_setting.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="扩展猜版测试版直链格式" />
android:text="扩展测试版猜版直链格式" />

<TextView
android:id="@+id/dialog_suffix_define_click"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="自定义猜版后缀"
android:text="猜版后缀设置"
android:textColor="?attr/colorOnSurface"
android:drawablePadding="8dp"
app:drawableEndCompat="@drawable/arrow_right_s_line"
Expand Down
282 changes: 279 additions & 3 deletions app/src/main/res/layout/dialog_suffix_define.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?><!--
QQ Version Tool for Android™
Copyright (C) 2023 klxiaoniu
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/dialog_suffix_define_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="12dp"
android:paddingStart="20dp"
android:paddingTop="12dp"
android:paddingEnd="20dp"
android:paddingBottom="20dp">

Expand All @@ -26,15 +43,274 @@
android:singleLine="true" />
</com.google.android.material.textfield.TextInputLayout>

<LinearLayout
android:id="@+id/suffix_define_check_group_all"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/suffix_define_button_group"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/setting_suffix_define">

<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbarStyle="insideOverlay">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<LinearLayout
android:id="@+id/suffix_define_checkbox_group1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/setting_suffix_define">

<CheckBox
android:id="@+id/suffix_define_checkbox_64hb"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="_64_HB" />

<CheckBox
android:id="@+id/suffix_define_checkbox_hb64"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="_HB_64" />

</LinearLayout>

<LinearLayout
android:id="@+id/suffix_define_checkbox_group2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/suffix_define_checkbox_group1">

<CheckBox
android:id="@+id/suffix_define_checkbox_64hb1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="_64_HB1" />

<CheckBox
android:id="@+id/suffix_define_checkbox_hb164"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="_HB1_64" />

</LinearLayout>

<LinearLayout
android:id="@+id/suffix_define_checkbox_group3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/suffix_define_checkbox_group2">

<CheckBox
android:id="@+id/suffix_define_checkbox_64hb2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="_64_HB2" />

<CheckBox
android:id="@+id/suffix_define_checkbox_hb264"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="_HB2_64" />

</LinearLayout>

<LinearLayout
android:id="@+id/suffix_define_checkbox_group4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/suffix_define_checkbox_group3">

<CheckBox
android:id="@+id/suffix_define_checkbox_64hb3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="_64_HB3" />

<CheckBox
android:id="@+id/suffix_define_checkbox_hb364"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="_HB3_64" />

</LinearLayout>

<LinearLayout
android:id="@+id/suffix_define_checkbox_group5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/suffix_define_checkbox_group4">

<CheckBox
android:id="@+id/suffix_define_checkbox_64hd"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="_64_HD" />

<CheckBox
android:id="@+id/suffix_define_checkbox_hd64"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="_HD_64" />

</LinearLayout>

<LinearLayout
android:id="@+id/suffix_define_checkbox_group6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/suffix_define_checkbox_group5">

<CheckBox
android:id="@+id/suffix_define_checkbox_64hd1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="_64_HD1" />

<CheckBox
android:id="@+id/suffix_define_checkbox_hd164"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="_HD1_64" />

</LinearLayout>

<LinearLayout
android:id="@+id/suffix_define_checkbox_group7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/suffix_define_checkbox_group6">

<CheckBox
android:id="@+id/suffix_define_checkbox_64hd2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="_64_HD2" />

<CheckBox
android:id="@+id/suffix_define_checkbox_hd264"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="_HD2_64" />

</LinearLayout>

<LinearLayout
android:id="@+id/suffix_define_checkbox_group8"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/suffix_define_checkbox_group7">

<CheckBox
android:id="@+id/suffix_define_checkbox_64hd3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="_64_HD3" />

<CheckBox
android:id="@+id/suffix_define_checkbox_hd364"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="_HD3_64" />

</LinearLayout>

<LinearLayout
android:id="@+id/suffix_define_checkbox_group9"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/suffix_define_checkbox_group8">

<CheckBox
android:id="@+id/suffix_define_checkbox_64hd1hb"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="_64_HD1HB" />

<CheckBox
android:id="@+id/suffix_define_checkbox_hd1hb64"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="_HD1HB_64" />

</LinearLayout>
</LinearLayout>

</ScrollView>
</LinearLayout>


<LinearLayout
android:id="@+id/suffix_define_button_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/setting_suffix_define">
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/suffix_define_check_group_all">

<Button
android:id="@+id/btn_suffix_cancel"
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "8.3.2" apply false
id("org.jetbrains.kotlin.android") version "2.0.0-RC1" apply false
id("com.android.application") version "8.4.0" apply false
id("org.jetbrains.kotlin.android") version "2.0.0-RC2" apply false
}

0 comments on commit 0cfd431

Please sign in to comment.