diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml new file mode 100644 index 0000000..039b804 --- /dev/null +++ b/.idea/deploymentTargetDropDown.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/com/jorgecruces/metrometro/activities/PlayGameActivity.java b/app/src/main/java/com/jorgecruces/metrometro/activities/PlayGameActivity.java index d81c2c6..5fc9633 100644 --- a/app/src/main/java/com/jorgecruces/metrometro/activities/PlayGameActivity.java +++ b/app/src/main/java/com/jorgecruces/metrometro/activities/PlayGameActivity.java @@ -13,6 +13,8 @@ import android.util.Log; import android.util.TypedValue; import android.view.View; +import android.view.animation.Animation; +import android.view.animation.AnimationUtils; import android.widget.Button; import android.widget.HorizontalScrollView; import android.widget.ImageView; @@ -320,12 +322,20 @@ private void setCurrentAlternativesViews() { currentTextView.setText(currentStation.getName()); } + Animation scaleAnimation = AnimationUtils.loadAnimation(this,R.anim.scale); + + // OnClickListener for (TextView textView: alternativesTextView) { String lineName = textView.getText().toString(); - textView.setOnClickListener(view -> this.checkAlternative(lineName)); + textView.setOnClickListener(view -> { + view.startAnimation(scaleAnimation); + this.checkAlternative(lineName); + }); } + + } private void setCurrentStationData(int position) { diff --git a/app/src/main/res/anim/scale.xml b/app/src/main/res/anim/scale.xml new file mode 100644 index 0000000..ff30162 --- /dev/null +++ b/app/src/main/res/anim/scale.xml @@ -0,0 +1,15 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index fe07728..017ead0 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -16,7 +16,9 @@ app:layout_constraintHorizontal_bias="0.497" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:srcCompat="@drawable/logo" /> + app:srcCompat="@drawable/logo" + android:contentDescription="@string/content_description_menu_logo" + /> + app:srcCompat="@drawable/main_menu_button_play" + android:contentDescription="@string/content_description_button_play" + /> + android:contentDescription="@string/content_description_button_information" + /> + app:srcCompat="@drawable/main_menu_button_reset" + android:contentDescription="@string/content_description_button_reset" + /> + app:srcCompat="@drawable/main_menu_configuration" + android:contentDescription="@string/content_description_button_configuration" + /> + tools:ignore="MissingConstraints" /> \ No newline at end of file diff --git a/app/src/main/res/layout/activity_menu_metro.xml b/app/src/main/res/layout/activity_menu_metro.xml index c846295..23c740f 100644 --- a/app/src/main/res/layout/activity_menu_metro.xml +++ b/app/src/main/res/layout/activity_menu_metro.xml @@ -18,7 +18,7 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - tools:ignore="MissingConstraints"> + tools:ignore="MissingConstraints" /> - + app:layout_constraintTop_toBottomOf="@+id/imageViewLineMenuTitle" + > + app:srcCompat="@drawable/lines_metro_title" + android:contentDescription="@string/content_description_title_menu" + /> + app:srcCompat="@drawable/lines_metro_button_back" + android:contentDescription="@string/content_description_go_back_button" + /> \ No newline at end of file diff --git a/app/src/main/res/layout/activity_metro_information.xml b/app/src/main/res/layout/activity_metro_information.xml index 9d51a60..95230b0 100644 --- a/app/src/main/res/layout/activity_metro_information.xml +++ b/app/src/main/res/layout/activity_metro_information.xml @@ -7,23 +7,12 @@ android:background="@drawable/lines_metro_background" tools:context=".activities.MetroInformationActivity"> - - + android:layout_height="match_parent" + android:contentDescription="@string/description_metro_information_scroll" + > + app:srcCompat="@drawable/lines_metro_button_back" + android:contentDescription="@string/content_description_go_back_button" + /> + app:srcCompat="@drawable/info_metro_image_map" + tools:ignore="ImageContrastCheck" + android:contentDescription="@string/image_metro_santiago" + /> + app:layout_constraintTop_toTopOf="parent" /> + android:text="@string/separator_current_number_question" + android:textSize="30sp" + tools:ignore="TextContrastCheck" /> @@ -167,7 +168,9 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/textViewTitle"> + app:layout_constraintTop_toBottomOf="@+id/textViewTitle" + android:contentDescription="@string/description_scroll_view_gameplay" + > + app:layout_constraintTop_toBottomOf="@+id/switchSoundConfiguration" + tools:ignore="UseSwitchCompatOrMaterialXml" /> + app:layout_constraintTop_toBottomOf="@+id/lostTextView" + tools:ignore="UseSwitchCompatOrMaterialXml" /> + app:srcCompat="@drawable/lines_metro_button_back" + android:contentDescription="@string/content_description_go_back_button" + /> \ No newline at end of file diff --git a/app/src/main/res/layout/confirmation_reset_dialog.xml b/app/src/main/res/layout/confirmation_reset_dialog.xml index 1da3578..c3c1006 100644 --- a/app/src/main/res/layout/confirmation_reset_dialog.xml +++ b/app/src/main/res/layout/confirmation_reset_dialog.xml @@ -13,15 +13,15 @@ android:layout_height="wrap_content" android:fontFamily="@font/titiliumweb_bold" android:padding="20dp" - android:text="¿Estas seguro que quieres reiniciar? (Perderas todo tu progreso)" + android:text="@string/reset_question" android:textAlignment="center" android:textColor="#000000" android:textSize="24sp" android:textStyle="bold" - app:layout_constraintBottom_toTopOf="@+id/imageViewConfirmationDialog" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="1.0" - app:layout_constraintStart_toStartOf="parent" /> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" />