mirror of
https://github.com/cmclark00/TetriStats.git
synced 2025-05-17 22:55:21 +01:00
Add button to access scaling factor analysis tool
This commit is contained in:
parent
a79783d712
commit
cbeadcafda
2 changed files with 19 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
package com.accidentalproductions.tetristats.ui.home
|
package com.accidentalproductions.tetristats.ui.home
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
@ -7,7 +8,9 @@ import android.view.ViewGroup
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
|
import com.accidentalproductions.tetristats.R
|
||||||
import com.accidentalproductions.tetristats.databinding.FragmentHomeBinding
|
import com.accidentalproductions.tetristats.databinding.FragmentHomeBinding
|
||||||
|
import com.accidentalproductions.tetristats.ui.ScalingFactorTestActivity
|
||||||
|
|
||||||
class HomeFragment : Fragment() {
|
class HomeFragment : Fragment() {
|
||||||
|
|
||||||
|
@ -32,6 +35,11 @@ class HomeFragment : Fragment() {
|
||||||
homeViewModel.text.observe(viewLifecycleOwner) {
|
homeViewModel.text.observe(viewLifecycleOwner) {
|
||||||
textView.text = it
|
textView.text = it
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binding.buttonScalingAnalysis.setOnClickListener {
|
||||||
|
startActivity(Intent(requireContext(), ScalingFactorTestActivity::class.java))
|
||||||
|
}
|
||||||
|
|
||||||
return root
|
return root
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,18 @@
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/button_scaling_analysis"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Scaling Factor Analysis"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/text_home"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Add table
Add a link
Reference in a new issue