From 54112f73f1460482387c7f04e095b4960d71eb0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Pich?= Date: Wed, 1 Nov 2017 22:14:44 +0100 Subject: [PATCH] Change dialog closing button text (#32) --- .../grades/GradesDialogFragment.java | 5 ++-- app/src/main/res/layout/grades_dialog.xml | 23 ++++++++----------- app/src/main/res/values-pl/strings.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/app/src/main/java/io/github/wulkanowy/activity/dashboard/grades/GradesDialogFragment.java b/app/src/main/java/io/github/wulkanowy/activity/dashboard/grades/GradesDialogFragment.java index c50ce156..5138e76a 100644 --- a/app/src/main/java/io/github/wulkanowy/activity/dashboard/grades/GradesDialogFragment.java +++ b/app/src/main/java/io/github/wulkanowy/activity/dashboard/grades/GradesDialogFragment.java @@ -6,6 +6,7 @@ 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 io.github.wulkanowy.R; @@ -35,7 +36,7 @@ public class GradesDialogFragment extends DialogFragment { TextView teacherText = view.findViewById(R.id.teacher_dialog_text_value); TextView dateText = view.findViewById(R.id.date_dialog_text_value); TextView colorText = view.findViewById(R.id.color_dialog_text_value); - TextView okTextClick = view.findViewById(R.id.OK_dialog); + Button closeDialog = view.findViewById(R.id.close_dialog); subjectText.setText(grade.getSubject()); gradeText.setText(grade.getValue()); @@ -58,7 +59,7 @@ public class GradesDialogFragment extends DialogFragment { teacherText.setText(grade.getTeacher()); } - okTextClick.setOnClickListener(new View.OnClickListener() { + closeDialog.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dismiss(); diff --git a/app/src/main/res/layout/grades_dialog.xml b/app/src/main/res/layout/grades_dialog.xml index 68aa48d3..4b610000 100644 --- a/app/src/main/res/layout/grades_dialog.xml +++ b/app/src/main/res/layout/grades_dialog.xml @@ -167,23 +167,20 @@ android:textIsSelectable="true" android:textSize="12sp" /> - + android:text="@string/dialog_close" + android:textAllCaps="true" + android:textSize="15sp" + /> - \ No newline at end of file + diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 483941ad..fd5bbde3 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -44,7 +44,7 @@ Niebieski Zielony Brak koloru - OK + Zamknij "Podczas odświeżania zawartości wystąpił błąd. " Brak nowych ocen Ilość nowych ocen: %1$d diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6d5e8459..1266ac87 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -44,7 +44,7 @@ Blue Green No color - OK + Close An error occurred while refreshing the content. No new grades Number of new grades: %1$d