Use new classes
This commit is contained in:
@@ -7,135 +7,203 @@ import androidx.appcompat.app.AppCompatActivity
|
|||||||
import androidx.core.widget.doOnTextChanged
|
import androidx.core.widget.doOnTextChanged
|
||||||
import kotlinx.android.synthetic.main.content_main.*
|
import kotlinx.android.synthetic.main.content_main.*
|
||||||
import android.text.InputType
|
import android.text.InputType
|
||||||
import kotlinx.coroutines.sync.Mutex
|
import android.widget.ScrollView
|
||||||
|
|
||||||
class MainActivity : AppCompatActivity() {
|
class MainActivity : AppCompatActivity() {
|
||||||
|
|
||||||
var mut = Mutex()
|
|
||||||
|
|
||||||
private var listA: List<Int> = emptyList()
|
private var listA: List<Int> = emptyList()
|
||||||
private var listB: List<Int> = emptyList()
|
private var listB: List<Int> = emptyList()
|
||||||
|
|
||||||
private var tempCounterTeamA: Int = 0
|
|
||||||
private var tempCounterTeamB: Int = 0
|
|
||||||
|
|
||||||
private var counterTeamA: Int = 0
|
private var counterTeamA: Int = 0
|
||||||
private var counterTeamB: Int = 0
|
private var counterTeamB: Int = 0
|
||||||
|
|
||||||
|
private var invertA: Boolean = false
|
||||||
|
private var invertB: Boolean = false
|
||||||
|
|
||||||
|
private var updateOnChange: Boolean = true
|
||||||
|
|
||||||
|
private var history = History()
|
||||||
|
private var currentRound = Round()
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_main)
|
setContentView(R.layout.activity_main)
|
||||||
setSupportActionBar(findViewById(R.id.toolbar))
|
setSupportActionBar(findViewById(R.id.toolbar))
|
||||||
inputTeamA.setRawInputType(InputType.TYPE_NULL)
|
inputTeamA.setRawInputType(InputType.TYPE_NULL)
|
||||||
inputTeamB.setRawInputType(InputType.TYPE_NULL)
|
inputTeamB.setRawInputType(InputType.TYPE_NULL)
|
||||||
|
inputTeamA.requestFocus()
|
||||||
|
disableSubmitButton()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inputTeamA.doOnTextChanged { text, start, count, after ->
|
inputTeamA.doOnTextChanged { text, start, count, after ->
|
||||||
if (inputTeamA.isFocused) {
|
if (inputTeamA.isFocused) {
|
||||||
if (inputTeamA.text.isNotEmpty()){
|
if (inputTeamA.text.isNotEmpty()){
|
||||||
inputTeamB.setText(updateNumber(text, tempCounterTeamA + tempCounterTeamB))
|
if(updateOnChange){
|
||||||
|
currentRound = try {
|
||||||
|
Round(text.toString().toInt(), true)
|
||||||
|
|
||||||
|
} catch (e: java.lang.Exception){
|
||||||
|
Round(0, 0)
|
||||||
|
}
|
||||||
|
inputTeamB.setText(currentRound.scoreB.toString())
|
||||||
|
}else{
|
||||||
|
updateOnChange = true
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
inputTeamA.text.clear()
|
inputTeamA.text.clear()
|
||||||
inputTeamB.text.clear()
|
inputTeamB.text.clear()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(currentRound.isValidRound()){
|
||||||
|
enableSubmitButton()
|
||||||
|
}else{
|
||||||
|
disableSubmitButton()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inputTeamB.doOnTextChanged { text, start, count, after ->
|
inputTeamB.doOnTextChanged { text, start, count, after ->
|
||||||
if (inputTeamB.isFocused) {
|
if (inputTeamB.isFocused) {
|
||||||
if (inputTeamB.text.isNotEmpty()){
|
if (inputTeamB.text.isNotEmpty()){
|
||||||
inputTeamA.setText(updateNumber(text, tempCounterTeamB + tempCounterTeamA))
|
if(updateOnChange){
|
||||||
|
currentRound = try {
|
||||||
|
Round(text.toString().toInt(), false)
|
||||||
|
|
||||||
|
} catch (e: java.lang.Exception){
|
||||||
|
Round(0, 0)
|
||||||
|
}
|
||||||
|
inputTeamA.setText(currentRound.scoreA.toString())
|
||||||
|
|
||||||
|
}else{
|
||||||
|
updateOnChange = true
|
||||||
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
inputTeamA.text.clear()
|
inputTeamA.text.clear()
|
||||||
inputTeamB.text.clear()
|
inputTeamB.text.clear()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(currentRound.isValidRound()){
|
||||||
|
enableSubmitButton()
|
||||||
|
}else{
|
||||||
|
disableSubmitButton()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buttonAdd100.setOnClickListener {
|
buttonAdd100.setOnClickListener {
|
||||||
if (inputTeamA.isFocused) {
|
if (inputTeamA.isFocused) {
|
||||||
tempCounterTeamA += 100
|
|
||||||
val temp = try {
|
val temp = try {
|
||||||
inputTeamA.text.toString().toInt() + 100
|
inputTeamA.text.toString().toInt() + 100
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
100
|
100
|
||||||
}
|
}
|
||||||
|
updateOnChange = false
|
||||||
inputTeamA.setText(temp.toString())
|
inputTeamA.setText(temp.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inputTeamB.isFocused) {
|
if (inputTeamB.isFocused) {
|
||||||
tempCounterTeamB += 100
|
|
||||||
val temp = try {
|
val temp = try {
|
||||||
inputTeamB.text.toString().toInt() + 100
|
inputTeamB.text.toString().toInt() + 100
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
100
|
100
|
||||||
}
|
}
|
||||||
|
updateOnChange = false
|
||||||
inputTeamB.setText(temp.toString())
|
inputTeamB.setText(temp.toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buttonSub100.setOnClickListener {
|
buttonSub100.setOnClickListener {
|
||||||
if (inputTeamA.isFocused) {
|
if (inputTeamA.isFocused) {
|
||||||
tempCounterTeamA -= 100
|
|
||||||
val temp = try {
|
val temp = try {
|
||||||
inputTeamA.text.toString().toInt() - 100
|
inputTeamA.text.toString().toInt() - 100
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
-100
|
-100
|
||||||
}
|
}
|
||||||
|
updateOnChange = false
|
||||||
inputTeamA.setText(temp.toString())
|
inputTeamA.setText(temp.toString())
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inputTeamB.isFocused) {
|
if (inputTeamB.isFocused) {
|
||||||
tempCounterTeamB -= 100
|
|
||||||
val temp = try {
|
val temp = try {
|
||||||
inputTeamB.text.toString().toInt() - 100
|
inputTeamB.text.toString().toInt() - 100
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
-100
|
-100
|
||||||
}
|
}
|
||||||
|
updateOnChange = false
|
||||||
inputTeamB.setText(temp.toString())
|
inputTeamB.setText(temp.toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
button0.setOnClickListener {
|
button0.setOnClickListener {
|
||||||
appedtoFocusedInput('0')
|
appendToFocusedInput('0')
|
||||||
}
|
}
|
||||||
|
|
||||||
button1.setOnClickListener {
|
button1.setOnClickListener {
|
||||||
appedtoFocusedInput('1')
|
appendToFocusedInput('1')
|
||||||
}
|
}
|
||||||
|
|
||||||
button2.setOnClickListener {
|
button2.setOnClickListener {
|
||||||
appedtoFocusedInput('2')
|
appendToFocusedInput('2')
|
||||||
}
|
}
|
||||||
|
|
||||||
button3.setOnClickListener {
|
button3.setOnClickListener {
|
||||||
appedtoFocusedInput('3')
|
appendToFocusedInput('3')
|
||||||
}
|
}
|
||||||
|
|
||||||
button4.setOnClickListener {
|
button4.setOnClickListener {
|
||||||
appedtoFocusedInput('4')
|
appendToFocusedInput('4')
|
||||||
}
|
}
|
||||||
|
|
||||||
button5.setOnClickListener {
|
button5.setOnClickListener {
|
||||||
appedtoFocusedInput('5')
|
appendToFocusedInput('5')
|
||||||
}
|
}
|
||||||
|
|
||||||
button6.setOnClickListener {
|
button6.setOnClickListener {
|
||||||
appedtoFocusedInput('6')
|
appendToFocusedInput('6')
|
||||||
}
|
}
|
||||||
|
|
||||||
button7.setOnClickListener {
|
button7.setOnClickListener {
|
||||||
appedtoFocusedInput('7')
|
appendToFocusedInput('7')
|
||||||
}
|
}
|
||||||
|
|
||||||
button8.setOnClickListener {
|
button8.setOnClickListener {
|
||||||
appedtoFocusedInput('8')
|
appendToFocusedInput('8')
|
||||||
}
|
}
|
||||||
|
|
||||||
button9.setOnClickListener {
|
button9.setOnClickListener {
|
||||||
appedtoFocusedInput('9')
|
appendToFocusedInput('9')
|
||||||
|
}
|
||||||
|
|
||||||
|
buttonInv.setOnClickListener {
|
||||||
|
var tempInt: Int
|
||||||
|
|
||||||
|
|
||||||
|
if(inputTeamA.isFocused ){
|
||||||
|
if (inputTeamA.text.isNotEmpty()){
|
||||||
|
tempInt = inputTeamA.text.toString().toInt() * -1
|
||||||
|
inputTeamA.setText(tempInt.toString())
|
||||||
|
}else{
|
||||||
|
invertB = false
|
||||||
|
invertA = true
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}else if(inputTeamB.isFocused) {
|
||||||
|
if(inputTeamB.text.isNotEmpty()){
|
||||||
|
tempInt = inputTeamB.text.toString().toInt() * -1
|
||||||
|
inputTeamB.setText(tempInt.toString())
|
||||||
|
} else{
|
||||||
|
invertA = false
|
||||||
|
invertB = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buttonBack.setOnClickListener{
|
buttonBack.setOnClickListener{
|
||||||
@@ -153,23 +221,21 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
add.setOnClickListener {
|
submit.setOnClickListener {
|
||||||
|
|
||||||
if (inputTeamA.text.isNotEmpty() && inputTeamB.text.isNotEmpty()) {
|
if (inputTeamA.text.isNotEmpty() && inputTeamB.text.isNotEmpty()) {
|
||||||
tempCounterTeamA = 0
|
|
||||||
tempCounterTeamB = 0
|
|
||||||
|
|
||||||
counterTeamA += inputTeamA.text.toString().toInt()
|
history.logRound(Round(inputTeamA.text.toString().toInt(), inputTeamB.text.toString().toInt()))
|
||||||
counterTeamB += inputTeamB.text.toString().toInt()
|
|
||||||
|
|
||||||
historyA.text = historyA.text.toString().plus(scoreA.text.toString().plus("\n"))
|
|
||||||
historyB.text = historyB.text.toString().plus(scoreB.text.toString().plus("\n"))
|
|
||||||
|
|
||||||
scoreA.text = counterTeamA.toString()
|
updateView()
|
||||||
scoreB.text = counterTeamB.toString()
|
|
||||||
|
|
||||||
inputTeamA.text.clear()
|
inputTeamA.text.clear()
|
||||||
inputTeamB.text.clear()
|
inputTeamB.text.clear()
|
||||||
|
|
||||||
|
scrolViewHistory.fullScroll(ScrollView.FOCUS_DOWN)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -186,41 +252,69 @@ class MainActivity : AppCompatActivity() {
|
|||||||
clearAll()
|
clearAll()
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
R.id.action_undo -> {
|
||||||
|
undoLastRound()
|
||||||
|
true
|
||||||
|
}
|
||||||
else -> super.onOptionsItemSelected(item)
|
else -> super.onOptionsItemSelected(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun undoLastRound(){
|
||||||
|
|
||||||
|
history.revertLastRound()
|
||||||
|
updateView()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun updateView()
|
||||||
|
{
|
||||||
|
scoreA.text = history.getScoreA().toString()
|
||||||
|
scoreB.text = history.getScoreB().toString()
|
||||||
|
|
||||||
|
historyA.text = history.getHistoryA()
|
||||||
|
historyB.text = history.getHistoryB()
|
||||||
|
}
|
||||||
|
|
||||||
private fun clearAll() {
|
private fun clearAll() {
|
||||||
historyA.text = ""
|
historyA.text = ""
|
||||||
historyB.text = ""
|
historyB.text = ""
|
||||||
inputTeamA.text.clear()
|
inputTeamA.text.clear()
|
||||||
inputTeamB.text.clear()
|
inputTeamB.text.clear()
|
||||||
scoreA.text = ""
|
scoreA.text = "0"
|
||||||
scoreB.text = ""
|
scoreB.text = "0"
|
||||||
|
|
||||||
|
history.clearAll()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun appedtoFocusedInput(toAppend: Char){
|
private fun appendToFocusedInput(toAppend: Char){
|
||||||
if(inputTeamA.isFocused){
|
if(inputTeamA.isFocused){
|
||||||
|
if(invertA){
|
||||||
|
invertA = false
|
||||||
|
inputTeamA.text.append('-')
|
||||||
|
}
|
||||||
|
|
||||||
inputTeamA.text.append(toAppend)
|
inputTeamA.text.append(toAppend)
|
||||||
}else if(inputTeamB.isFocused)
|
}else if(inputTeamB.isFocused)
|
||||||
{
|
{
|
||||||
|
if(invertB){
|
||||||
|
invertB = false
|
||||||
|
inputTeamB.text.append('-')
|
||||||
|
}
|
||||||
inputTeamB.text.append(toAppend)
|
inputTeamB.text.append(toAppend)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun enableSubmitButton() {
|
||||||
private fun updateNumber(inputText: CharSequence?, offset: Int): String {
|
submit.imageAlpha = 255 // 0 being transparent and 255 being opaque
|
||||||
var toSet: Int = 0
|
submit.isEnabled = true
|
||||||
|
|
||||||
toSet = try {
|
|
||||||
100 - inputText.toString().toInt()
|
|
||||||
|
|
||||||
} catch (e: Exception) {
|
|
||||||
0
|
|
||||||
}
|
|
||||||
|
|
||||||
toSet += offset
|
|
||||||
|
|
||||||
return "$toSet"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun disableSubmitButton(){
|
||||||
|
submit.imageAlpha = 60 // 0 being transparent and 255 being opaque
|
||||||
|
submit.isEnabled = false
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -14,6 +14,8 @@ class Round() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
constructor(score: String, isScoreA: Boolean): this(score.toInt(), isScoreA)
|
||||||
|
|
||||||
constructor(scoreA: Int, scoreB: Int) : this() {
|
constructor(scoreA: Int, scoreB: Int) : this() {
|
||||||
this.scoreA = scoreA
|
this.scoreA = scoreA
|
||||||
this.scoreB = scoreB
|
this.scoreB = scoreB
|
||||||
|
|||||||
BIN
app/src/main/res/drawable/checkmark.png
Normal file
BIN
app/src/main/res/drawable/checkmark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
@@ -33,19 +33,49 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/Score"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/Names">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/scoreA"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="0"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/scoreB"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="0"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/divider5"
|
android:id="@+id/divider5"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:background="?android:attr/listDivider"
|
android:background="?android:attr/listDivider"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/scrollView2" />
|
app:layout_constraintBottom_toBottomOf="@+id/scrolViewHistory" />
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:id="@+id/scrollView2"
|
android:id="@+id/scrolViewHistory"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/Score"
|
android:layout_marginTop="16dp"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/Names">
|
app:layout_constraintBottom_toTopOf="@+id/Input"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/Score">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -69,33 +99,6 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/Score"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/Input">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/scoreA"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
|
||||||
android:textSize="18sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/scoreB"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
|
||||||
android:textSize="18sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/divider6"
|
android:id="@+id/divider6"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -116,10 +119,10 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
|
android:gravity="center"
|
||||||
android:hint="0"
|
android:hint="0"
|
||||||
android:importantForAutofill="no"
|
android:importantForAutofill="no"
|
||||||
android:inputType="numberSigned"
|
android:inputType="numberSigned" />
|
||||||
android:gravity="center"/>
|
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/inputTeamB"
|
android:id="@+id/inputTeamB"
|
||||||
@@ -127,10 +130,10 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
|
android:gravity="center"
|
||||||
android:hint="0"
|
android:hint="0"
|
||||||
android:importantForAutofill="no"
|
android:importantForAutofill="no"
|
||||||
android:inputType="numberSigned"
|
android:inputType="numberSigned" />
|
||||||
android:gravity="center"/>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -255,10 +258,12 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
tools:layout_editor_absoluteX="1dp">
|
tools:layout_editor_absoluteX="1dp">
|
||||||
|
|
||||||
<Space
|
<Button
|
||||||
|
android:id="@+id/buttonInv"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1.0" />
|
android:layout_weight="1.0"
|
||||||
|
android:text="+/-" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/button0"
|
android:id="@+id/button0"
|
||||||
@@ -272,11 +277,12 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1.0" />
|
android:layout_weight="1.0" />
|
||||||
|
|
||||||
<Button
|
<ImageButton
|
||||||
android:id="@+id/add"
|
android:id="@+id/submit"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1.0"
|
android:layout_weight="1.0"
|
||||||
android:text="@string/add" />
|
android:scaleType="fitCenter"
|
||||||
|
app:srcCompat="@drawable/checkmark" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -8,4 +8,8 @@
|
|||||||
android:orderInCategory="100"
|
android:orderInCategory="100"
|
||||||
android:title="@string/clear"
|
android:title="@string/clear"
|
||||||
app:showAsAction="never" />
|
app:showAsAction="never" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_undo"
|
||||||
|
android:icon="@android:drawable/ic_menu_revert"
|
||||||
|
android:title="@string/undo" />
|
||||||
</menu>
|
</menu>
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="team_a">Team A</string>
|
<string name="clear">Neues Spiel Starten</string>
|
||||||
<string name="team_b">Team B</string>
|
<string name="undo">Letzte Runde Löschen</string>
|
||||||
<string name="clear">Löschen</string>
|
|
||||||
<string name="add">Hinzufügen</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="clear">Lösche</string>
|
<string name="clear">Neus Spil Starte</string>
|
||||||
<string name="team_a">Team A</string>
|
<string name="undo">Letschti Rundi Lösche</string>
|
||||||
<string name="team_b">Team B</string>
|
|
||||||
<string name="add">Drzuetue</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
<string name="app_name" translatable="false">Tichu Counter</string>
|
<string name="app_name" translatable="false">Tichu Counter</string>
|
||||||
<!-- Strings used for fragments for navigation -->
|
<!-- Strings used for fragments for navigation -->
|
||||||
|
|
||||||
<string name="team_a">Team A</string>
|
<string name="team_a" translatable="false">Team A</string>
|
||||||
<string name="team_b">Team B</string>
|
<string name="team_b" translatable="false">Team B</string>
|
||||||
<string name="add">Add</string>
|
<string name="clear">Start New Game</string>
|
||||||
<string name="clear">Clear</string>
|
<string name="undo">Undo Last Round</string>
|
||||||
</resources>
|
</resources>
|
||||||
Reference in New Issue
Block a user