Archived
Migrated the project to AGP 8.0 / JVM 17
This commit is contained in:
@@ -12,6 +12,7 @@ import com.denizk0461.studip.BuildConfig
|
||||
import com.denizk0461.studip.R
|
||||
import com.denizk0461.studip.activity.FetcherActivity
|
||||
import com.denizk0461.studip.databinding.FragmentSettingsBinding
|
||||
import com.denizk0461.studip.sheet.DevCodeSheet
|
||||
import com.denizk0461.studip.sheet.TextSheet
|
||||
import com.denizk0461.studip.viewmodel.SettingsViewModel
|
||||
import java.text.SimpleDateFormat
|
||||
@@ -104,6 +105,12 @@ class SettingsFragment : AppFragment() {
|
||||
)
|
||||
}
|
||||
|
||||
// Set long click listener for licences button to open dev code sheet
|
||||
binding.buttonLicences.setOnLongClickListener {
|
||||
openBottomSheet(DevCodeSheet())
|
||||
true
|
||||
}
|
||||
|
||||
// Set click listener for the app version button
|
||||
binding.buttonAppVersion.setOnClickListener {
|
||||
when (appVersionClick) {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.denizk0461.studip.sheet
|
||||
|
||||
import com.denizk0461.studip.R
|
||||
|
||||
/**
|
||||
* Sheet that presents the user / developer with a text field to input developer codes / cheat
|
||||
* codes.
|
||||
*/
|
||||
class DevCodeSheet : AppSheet(R.layout.sheet_dev_code) {
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
|
||||
|
||||
<com.google.android.material.bottomsheet.BottomSheetDragHandleView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_header"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="22sp"
|
||||
android:fontFamily="@font/lato_bolditalic"
|
||||
android:paddingHorizontal="24dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/sheet_cheat_header"/>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scrollbars="horizontal">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
style="@style/Widget.Material3.TextInputEditText.OutlinedBox"
|
||||
android:maxLines="1"
|
||||
android:maxLength="1"
|
||||
android:id="@+id/input_0"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="2dp"/>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
style="@style/Widget.Material3.TextInputEditText.OutlinedBox"
|
||||
android:maxLines="1"
|
||||
android:maxLength="1"
|
||||
android:id="@+id/input_1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="2dp"/>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
style="@style/Widget.Material3.TextInputEditText.OutlinedBox"
|
||||
android:maxLines="1"
|
||||
android:maxLength="1"
|
||||
android:id="@+id/input_2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="2dp"/>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
style="@style/Widget.Material3.TextInputEditText.OutlinedBox"
|
||||
android:maxLines="1"
|
||||
android:maxLength="1"
|
||||
android:id="@+id/input_3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="2dp"/>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
style="@style/Widget.Material3.TextInputEditText.OutlinedBox"
|
||||
android:maxLines="1"
|
||||
android:maxLength="1"
|
||||
android:id="@+id/input_4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="2dp"/>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
style="@style/Widget.Material3.TextInputEditText.OutlinedBox"
|
||||
android:maxLines="1"
|
||||
android:maxLength="1"
|
||||
android:id="@+id/input_5"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"/>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
@@ -136,6 +136,9 @@
|
||||
|
||||
<string name="settings_licences_title">View licences</string>
|
||||
<string name="settings_licences_subtitle">Resources that made this app possible</string>
|
||||
|
||||
<string name="sheet_cheat_header" translatable="false">Cheat Codes</string>
|
||||
|
||||
<string name="settings_app_version">App Version</string>
|
||||
|
||||
<string name="with_love">with ♡️ from Bremen-Osterholz\nmade by denizk0461 \\__*</string>
|
||||
|
||||
Reference in New Issue
Block a user