Rename some classes to mmake them more consistent
This commit is contained in:
parent
3c4716b0c4
commit
6b70d109c4
6 changed files with 13 additions and 26 deletions
|
@ -11,7 +11,7 @@
|
||||||
android:theme="@style/AppTheme">
|
android:theme="@style/AppTheme">
|
||||||
<activity android:name=".LevelSelectActivity" android:parentActivityName=".MainActivity"></activity>
|
<activity android:name=".LevelSelectActivity" android:parentActivityName=".MainActivity"></activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".TrainingActivity"
|
android:name=".SounderActivity"
|
||||||
android:parentActivityName=".MainActivity"
|
android:parentActivityName=".MainActivity"
|
||||||
android:windowSoftInputMode="stateAlwaysVisible">
|
android:windowSoftInputMode="stateAlwaysVisible">
|
||||||
<meta-data
|
<meta-data
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
android:value=".MainActivity" />
|
android:value=".MainActivity" />
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".CWSettingsActivity"
|
android:name=".SettingsActivity"
|
||||||
android:parentActivityName=".MainActivity">
|
android:parentActivityName=".MainActivity">
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="android.support.PARENT_ACTIVITY"
|
android:name="android.support.PARENT_ACTIVITY"
|
||||||
|
|
|
@ -2,14 +2,11 @@ package com.example.ecwt
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import com.google.android.material.snackbar.Snackbar
|
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
|
||||||
import kotlinx.android.synthetic.main.activity_main.*
|
|
||||||
|
|
||||||
const val SOUNDER_MODE = "es.eoinrul.ecwt.SOUNDER_MODE"
|
const val SOUNDER_MODE = "es.eoinrul.ecwt.SOUNDER_MODE"
|
||||||
const val SOUNDER_MODE_USER_INPUT = "es.eoinrul.ecwt.SOUNDER_MODE.USER_INPUT";
|
const val SOUNDER_MODE_USER_INPUT = "es.eoinrul.ecwt.SOUNDER_MODE.USER_INPUT";
|
||||||
|
|
||||||
|
@ -43,12 +40,12 @@ class MainActivity : AppCompatActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun openSettings(view: View) {
|
fun openSettings(view: View) {
|
||||||
val intent = Intent(this, CWSettingsActivity::class.java);
|
val intent = Intent(this, SettingsActivity::class.java);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
fun openSounder(view: View) {
|
fun openSounder(view: View) {
|
||||||
val intent = Intent(this, TrainingActivity::class.java).apply {
|
val intent = Intent(this, SounderActivity::class.java).apply {
|
||||||
putExtra(SOUNDER_MODE, SOUNDER_MODE_USER_INPUT)
|
putExtra(SOUNDER_MODE, SOUNDER_MODE_USER_INPUT)
|
||||||
}
|
}
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
|
|
@ -7,7 +7,7 @@ import android.os.Bundle
|
||||||
|
|
||||||
//const val PREFERENCES_FILE = "es.eoinrul.ecwt.PREFERENCES"
|
//const val PREFERENCES_FILE = "es.eoinrul.ecwt.PREFERENCES"
|
||||||
|
|
||||||
class CWSettingsActivity : AppCompatActivity() {
|
class SettingsActivity : AppCompatActivity() {
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
|
@ -8,15 +8,16 @@ import android.widget.TextView
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.preference.PreferenceManager
|
import androidx.preference.PreferenceManager
|
||||||
|
|
||||||
class TrainingActivity : AppCompatActivity() {
|
// Activity that only echos any inputs typed on a keyboard
|
||||||
|
class SounderActivity : AppCompatActivity() {
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_training)
|
setContentView(R.layout.activity_sounder)
|
||||||
|
|
||||||
//val sounderMode = intent.getStringExtra(SOUNDER_MODE);
|
//val sounderMode = intent.getStringExtra(SOUNDER_MODE);
|
||||||
|
|
||||||
mTextViewTest = findViewById<TextView>(R.id.TestEnteredText);
|
mTextViewTest = findViewById<TextView>(R.id.keyedText);
|
||||||
|
|
||||||
initSoundPlayer()
|
initSoundPlayer()
|
||||||
onKeyUp(KeyEvent.KEYCODE_E, KeyEvent(0,0))
|
onKeyUp(KeyEvent.KEYCODE_E, KeyEvent(0,0))
|
|
@ -4,7 +4,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".CWSettingsActivity">
|
tools:context=".SettingsActivity">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView"
|
android:id="@+id/textView"
|
||||||
|
|
|
@ -4,26 +4,15 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".TrainingActivity">
|
tools:context=".SounderActivity">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/TestEnteredText"
|
android:id="@+id/keyedText"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="TestEnteredText"
|
android:text="Entered Text Will Go Here"
|
||||||
android:textSize="36sp"
|
android:textSize="36sp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
tools:layout_editor_absoluteY="44dp" />
|
tools:layout_editor_absoluteY="44dp" />
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/button4"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="161dp"
|
|
||||||
android:layout_marginTop="40dp"
|
|
||||||
android:onClick="startTraining"
|
|
||||||
android:text="Button"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/TestEnteredText" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Add table
Reference in a new issue