modified files to reduce redundancy, clean things up
This commit is contained in:
parent
0154d47660
commit
06fc51cf13
@ -8,7 +8,6 @@ import android.widget.TextView
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.gridlayout.widget.GridLayout
|
||||
import androidx.appcompat.app.AppCompatDelegate
|
||||
import androidx.fragment.app.DialogFragment
|
||||
|
||||
class MainActivity : AppCompatActivity(), View.OnClickListener {
|
||||
// Private member variables per the layout
|
||||
@ -22,9 +21,6 @@ class MainActivity : AppCompatActivity(), View.OnClickListener {
|
||||
private lateinit var mGameboardButtonSeven: Button
|
||||
private lateinit var mGameboardButtonEight: Button
|
||||
private lateinit var mGameboardButtonNine: Button
|
||||
private lateinit var mGameStatsButton: Button
|
||||
private lateinit var mResetGameButton: Button
|
||||
private lateinit var mGameStatDialog: DialogFragment
|
||||
private lateinit var mGameStatusTextView: TextView
|
||||
|
||||
// Private variables - other variables
|
||||
|
@ -2,15 +2,10 @@ package com.wyattjmiller.tictactoeapp
|
||||
|
||||
import android.app.Dialog
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.Button
|
||||
import android.widget.TextView
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.fragment.app.Fragment
|
||||
import org.w3c.dom.Text
|
||||
|
||||
class StatsDialogFragment(): DialogFragment() {
|
||||
private lateinit var mGameTitle: TextView
|
||||
|
@ -21,7 +21,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:width="30dp"
|
||||
android:onClick="clickButtonOne"
|
||||
app:layout_column="0"
|
||||
app:layout_row="0" />
|
||||
|
||||
@ -30,7 +29,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:width="30dp"
|
||||
android:onClick="clickButtonTwo"
|
||||
app:layout_column="1"
|
||||
app:layout_row="0" />
|
||||
|
||||
@ -39,7 +37,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:width="30dp"
|
||||
android:onClick="clickButtonThree"
|
||||
app:layout_column="2"
|
||||
app:layout_row="0" />
|
||||
|
||||
@ -48,7 +45,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:width="30dp"
|
||||
android:onClick="clickButtonFour"
|
||||
app:layout_column="0"
|
||||
app:layout_row="1" />
|
||||
|
||||
@ -57,7 +53,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:width="30dp"
|
||||
android:onClick="clickButtonFive"
|
||||
app:layout_column="1"
|
||||
app:layout_row="1" />
|
||||
|
||||
@ -66,7 +61,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:width="30dp"
|
||||
android:onClick="clickButtonSix"
|
||||
app:layout_column="2"
|
||||
app:layout_row="1" />
|
||||
|
||||
@ -75,7 +69,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:width="30dp"
|
||||
android:onClick="clickButtonSeven"
|
||||
app:layout_column="0"
|
||||
app:layout_row="2" />
|
||||
|
||||
@ -84,7 +77,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:width="30dp"
|
||||
android:onClick="clickButtonEight"
|
||||
app:layout_column="1"
|
||||
app:layout_row="2" />
|
||||
|
||||
@ -93,7 +85,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:width="30dp"
|
||||
android:onClick="clickButtonNine"
|
||||
app:layout_column="2"
|
||||
app:layout_row="2" />
|
||||
</androidx.gridlayout.widget.GridLayout>
|
||||
|
Loading…
Reference in New Issue
Block a user