Skip to content

Commit

Permalink
🎨 更新上游webui
Browse files Browse the repository at this point in the history
  • Loading branch information
Szzrain committed Mar 20, 2023
1 parent ba0e154 commit cdd696c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId "com.sealdice.dice"
minSdk 26
targetSdk 28
versionCode 20
versionName "0.4.0-rc"
versionCode 21
versionName "0.4.1-rc"

testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/java/com/sealdice/dice/FirstFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ class FirstFragment : Fragment() {
startActivity(intent)
}
}
binding.buttonTut.setOnClickListener {
val address = "https://docs.qq.com/doc/DREhHbHVGenR3QmNV"
val uri = Uri.parse(address)
val intent = Intent()
intent.action = "android.intent.action.VIEW"
intent.data = uri
startActivity(intent)
}
binding.buttonExit.setOnClickListener {
this.activity?.let { it1 -> finishAffinity(it1) } // Finishes all activities.
exitProcess(0)
Expand Down Expand Up @@ -245,6 +253,7 @@ class FirstFragment : Fragment() {
}
val args = sharedPreferences?.getString("launch_args", "")
execShell("cd sealdice&&./sealdice-core $args",true)
binding.buttonTut.visibility = View.GONE
binding.buttonInput.visibility = View.GONE
binding.buttonOutput.visibility = View.GONE
binding.buttonReset.visibility = View.GONE
Expand Down
11 changes: 11 additions & 0 deletions app/src/main/res/layout/fragment_first.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<Button
android:id="@+id/button_tut"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="290dp"
android:background="?attr/seal_buttonColor"
android:text="配置教程"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<Button
android:id="@+id/button_third"
android:layout_width="wrap_content"
Expand Down

0 comments on commit cdd696c

Please sign in to comment.