Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

localised text in strings.xml #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 0 additions & 116 deletions .idea/codeStyles/Project.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/misc.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

4 changes: 2 additions & 2 deletions app/src/main/res/layout/content_answer_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
android:layout_marginTop="16dp"
android:gravity="end"
android:textSize="24sp"
android:text="Total Calculation"
android:text="@string/total_calculation"
android:textColor="#757575"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
Expand All @@ -24,7 +24,7 @@
android:layout_marginEnd="16dp"
android:gravity="end"
android:textSize="32sp"
android:text="Current Calculation"
android:text="@string/current_calculation"
android:textColor="#757575"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
Expand Down
38 changes: 19 additions & 19 deletions app/src/main/res/layout/content_number_board.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<com.google.android.material.button.MaterialButton
android:id="@+id/btn_clear"
android:text="C"
android:text="@string/clear"
android:backgroundTint="@color/colorClearKey"
style="@style/CalculatorKeys"
android:layout_marginTop="16dp"
Expand All @@ -24,7 +24,7 @@
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_opening_brace"
style="@style/CalculatorKeys"
android:text="("
android:text="@string/left_parenthese"
app:layout_constraintBottom_toBottomOf="@+id/btn_clear"
app:layout_constraintEnd_toStartOf="@+id/btn_closing_brace"
app:layout_constraintHorizontal_bias="0.5"
Expand All @@ -33,7 +33,7 @@

<com.google.android.material.button.MaterialButton
android:id="@+id/btn_closing_brace"
android:text=")"
android:text="@string/right_parenthese"
style="@style/CalculatorKeys"
app:layout_constraintBottom_toBottomOf="@+id/btn_opening_brace"
app:layout_constraintEnd_toStartOf="@+id/btn_division"
Expand All @@ -43,7 +43,7 @@

<com.google.android.material.button.MaterialButton
android:id="@+id/btn_division"
android:text="/"
android:text="@string/divided"
android:textColor="@android:color/white"
android:backgroundTint="@color/colorOperatorKey"
style="@style/CalculatorKeys"
Expand All @@ -56,7 +56,7 @@

<com.google.android.material.button.MaterialButton
android:id="@+id/btn_seven"
android:text="7"
android:text="@string/seven"
style="@style/CalculatorKeys"
app:layout_constraintBottom_toTopOf="@+id/btn_four"
app:layout_constraintEnd_toStartOf="@+id/btn_eight"
Expand All @@ -66,7 +66,7 @@

<com.google.android.material.button.MaterialButton
android:id="@+id/btn_eight"
android:text="8"
android:text="@string/eight"
style="@style/CalculatorKeys"
app:layout_constraintBottom_toBottomOf="@+id/btn_seven"
app:layout_constraintEnd_toStartOf="@+id/btn_nine"
Expand All @@ -75,7 +75,7 @@
app:layout_constraintTop_toTopOf="@+id/btn_seven" />

<com.google.android.material.button.MaterialButton
android:text="9"
android:text="@string/nine"
android:id="@+id/btn_nine"
style="@style/CalculatorKeys"
app:layout_constraintBottom_toBottomOf="@+id/btn_eight"
Expand All @@ -85,7 +85,7 @@
app:layout_constraintTop_toTopOf="@+id/btn_eight" />

<com.google.android.material.button.MaterialButton
android:text="X"
android:text="@string/multiplied"
android:textColor="@android:color/white"
android:backgroundTint="@color/colorOperatorKey"
android:id="@+id/btn_multiplication"
Expand All @@ -98,7 +98,7 @@

<com.google.android.material.button.MaterialButton
android:id="@+id/btn_four"
android:text="4"
android:text="@string/four"
style="@style/CalculatorKeys"
app:layout_constraintBottom_toTopOf="@+id/btn_one"
app:layout_constraintEnd_toStartOf="@+id/btn_five"
Expand All @@ -108,7 +108,7 @@

<com.google.android.material.button.MaterialButton
android:id="@+id/btn_five"
android:text="5"
android:text="@string/five"
style="@style/CalculatorKeys"
app:layout_constraintBottom_toBottomOf="@+id/btn_four"
app:layout_constraintEnd_toStartOf="@+id/btn_six"
Expand All @@ -118,7 +118,7 @@

<com.google.android.material.button.MaterialButton
android:id="@+id/btn_six"
android:text="6"
android:text="@string/six"
style="@style/CalculatorKeys"
app:layout_constraintBottom_toBottomOf="@+id/btn_five"
app:layout_constraintEnd_toStartOf="@+id/btn_subtraction"
Expand All @@ -129,7 +129,7 @@
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_subtraction"
style="@style/CalculatorKeys"
android:text="-"
android:text="@string/minus"
android:textColor="@android:color/white"
android:backgroundTint="@color/colorOperatorKey"
app:layout_constraintBottom_toBottomOf="@+id/btn_six"
Expand All @@ -140,7 +140,7 @@

<com.google.android.material.button.MaterialButton
android:id="@+id/btn_one"
android:text="1"
android:text="@string/one"
style="@style/CalculatorKeys"
app:layout_constraintBottom_toTopOf="@+id/btn_zero"
app:layout_constraintEnd_toStartOf="@+id/btn_two"
Expand All @@ -150,7 +150,7 @@

<com.google.android.material.button.MaterialButton
android:id="@+id/btn_two"
android:text="2"
android:text="@string/two"
style="@style/CalculatorKeys"
app:layout_constraintBottom_toBottomOf="@+id/btn_one"
app:layout_constraintEnd_toStartOf="@+id/btn_three"
Expand All @@ -161,7 +161,7 @@
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_three"
style="@style/CalculatorKeys"
android:text="3"
android:text="@string/three"
app:layout_constraintBottom_toBottomOf="@+id/btn_two"
app:layout_constraintEnd_toStartOf="@+id/btn_addition"
app:layout_constraintHorizontal_bias="0.5"
Expand All @@ -171,7 +171,7 @@
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_addition"
style="@style/CalculatorKeys"
android:text="+"
android:text="@string/plus"
android:textColor="@android:color/white"
android:backgroundTint="@color/colorOperatorKey"
app:layout_constraintBottom_toBottomOf="@+id/btn_three"
Expand All @@ -185,7 +185,7 @@
style="@style/CalculatorKeys"
android:layout_width="0dp"
android:width="0dp"
android:text="0"
android:text="@string/zero"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/btn_two"
app:layout_constraintHorizontal_bias="0.5"
Expand All @@ -195,7 +195,7 @@
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_point"
style="@style/CalculatorKeys"
android:text="."
android:text="@string/dot"
app:layout_constraintBottom_toBottomOf="@+id/btn_zero"
app:layout_constraintEnd_toStartOf="@+id/btn_equals"
app:layout_constraintHorizontal_bias="0.5"
Expand All @@ -205,7 +205,7 @@
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_equals"
style="@style/CalculatorKeys"
android:text="="
android:text="@string/equal_to"
android:textColor="@android:color/white"
android:backgroundTint="@color/colorEqualKey"
app:layout_constraintBottom_toBottomOf="@+id/btn_point"
Expand Down
21 changes: 21 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
<resources>
<string name="app_name">Calci</string>
<string name="total_calculation">Total Calculation</string>
<string name="current_calculation">Current Calculation</string>
<string name="clear">C</string>
<string name="left_parenthese">(</string>
<string name="right_parenthese">)</string>
<string name="divided">/</string>
<string name="seven">7</string>
<string name="eight">8</string>
<string name="nine">9</string>
<string name="multiplied">X</string>
<string name="four">4</string>
<string name="five">5</string>
<string name="six">6</string>
<string name="minus">-</string>
<string name="one">1</string>
<string name="two">2</string>
<string name="three">3</string>
<string name="plus">+</string>
<string name="zero">0</string>
<string name="dot">.</string>
<string name="equal_to">=</string>
</resources>