Add more settings and more example videos

This commit is contained in:
Isaac Shoebottom 2022-12-08 13:11:02 -04:00
parent 24db0cef52
commit 57dda5ae8e
7 changed files with 24 additions and 4 deletions

View File

@ -40,7 +40,10 @@ class SettingsFragment : Fragment() {
//updates size when size selection changes
binding.settingRadioGroup.setOnCheckedChangeListener{ group,checkedID ->
if(checkedID == binding.settingDefaultSizeVideo.id){
if (checkedID == binding.settingSmallVideoSize.id) {
settingsViewModel.size.value = 8.0
}
else if(checkedID == binding.settingDefaultSizeVideo.id){
settingsViewModel.size.value = 25.0
}else if(checkedID == binding.settingBigSizeVideo.id){
settingsViewModel.size.value = 50.0

View File

@ -13,7 +13,7 @@ class SettingsViewModel : ViewModel() {
//size of the file, grab this for use
private val _size = MutableLiveData<Double>().apply {
value = 25.0
value = 8.0
}
val size: MutableLiveData<Double> = _size

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -7,7 +8,15 @@
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<RadioGroup
android:id="@+id/setting_radio_group"
@ -21,10 +30,16 @@
android:text="@string/settings_video_size" />
<RadioButton
android:id="@+id/setting_default_size_video"
android:id="@+id/setting_small_video_size"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/settings_small_size" />
<RadioButton
android:id="@+id/setting_default_size_video"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/settings_default_size" />
<RadioButton

View File

@ -5,6 +5,7 @@
<string name="title_settings">Settings</string>
<string name="settings_video_size">Video Size</string>
<string name="settings_image_size">Image Size</string>
<string name="settings_small_size">8mb</string>
<string name="settings_default_size">25mb</string>
<string name="settings_big_size">50mb</string>
<string name="settings_huge_size">500mb</string>
@ -15,4 +16,5 @@
<string name="share_button">Share</string>
<string name="delete">Delete</string>
<string name="cancel">Cancel</string>
</resources>

Binary file not shown.

Binary file not shown.

Binary file not shown.