Skip to content

Commit 9eac1f7

Browse files
committed
Use tools:text for placeholder text
1 parent 0384931 commit 9eac1f7

13 files changed

Lines changed: 28 additions & 29 deletions

app/src/main/java/com/cornellappdev/coursegrab/MainActivity.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,7 @@ class MainActivity : AppCompatActivity() {
212212
availableCourses[position].title
213213
)
214214
holder.courseTime.text = availableCourses[position].section.uppercase(getDefault())
215-
holder.coursePin.text =
216-
context.getString(R.string.course_pin_format, availableCourses[position].catalogNum)
215+
holder.coursePin.text = availableCourses[position].catalogNum.toString()
217216
holder.courseStatus.setImageResource(if (availableCourses[position].isOpen) R.drawable.ic_status_open else R.drawable.ic_status_closed)
218217

219218
holder.removeButton.setOnClickListener {
@@ -268,8 +267,7 @@ class MainActivity : AppCompatActivity() {
268267
awaitingCourses[position].title
269268
)
270269
holder.courseTime.text = awaitingCourses[position].section.uppercase(getDefault())
271-
holder.coursePin.text =
272-
context.getString(R.string.course_pin_format, awaitingCourses[position].catalogNum)
270+
holder.coursePin.text = awaitingCourses[position].catalogNum.toString()
273271
holder.courseStatus.setImageResource(if (awaitingCourses[position].isOpen) R.drawable.ic_status_open else R.drawable.ic_status_closed)
274272

275273
holder.removeButton.setOnClickListener {

app/src/main/java/com/cornellappdev/coursegrab/NotificationModal.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class NotificationModal : AppCompatActivity() {
2828
course.title
2929
)
3030
binding.courseSection.text = course.section
31-
binding.coursePin.text = getString(R.string.course_pin_format, course.catalogNum)
31+
binding.coursePin.text = course.catalogNum.toString()
3232

3333
binding.buttonStudentCenter.setOnClickListener {
3434
val browserIntent =

app/src/main/res/layout/activity_course_details.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
android:maxLines="2"
6969
android:paddingStart="14dp"
7070
android:scrollHorizontally="true"
71-
android:text="CS 1998: Intro to Android"
71+
tools:text="CS 1998: Intro to Android"
7272
android:textColor="@android:color/black"
7373
android:textSize="18sp" />
7474

@@ -82,7 +82,7 @@
8282
android:fontFamily="sans-serif-medium"
8383
android:gravity="bottom"
8484
android:paddingLeft="14dp"
85-
android:text="LEC 006 / M 7:30PM"
85+
tools:text="LEC 006 / M 7:30PM"
8686
android:textSize="16sp" />
8787

8888
</LinearLayout>

app/src/main/res/layout/activity_main.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
android:paddingStart="16dp"
8585
android:paddingTop="16dp"
8686
android:paddingBottom="4dp"
87-
android:text="0 Available"
87+
tools:text="0 Available"
8888
android:textColor="@color/greenTextColor"
8989
android:textSize="20sp" />
9090

@@ -115,7 +115,7 @@
115115
android:paddingStart="16dp"
116116
android:paddingTop="16dp"
117117
android:paddingBottom="4dp"
118-
android:text="0 Awaiting"
118+
tools:text="0 Awaiting"
119119
android:textColor="@android:color/black"
120120
android:textSize="20sp" />
121121

app/src/main/res/layout/activity_notification_modal.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
android:layout_marginStart="20dp"
3030
android:layout_marginTop="45dp"
3131
android:layout_marginEnd="20dp"
32-
android:text="CS 1998: Intro to Android Development"
32+
tools:text="CS 1998: Intro to Android Development"
3333
android:textAlignment="center"
3434
android:textAllCaps="false"
3535
android:textColor="@color/white"
@@ -45,7 +45,7 @@
4545
android:layout_height="wrap_content"
4646
android:layout_marginStart="20dp"
4747
android:layout_marginEnd="20dp"
48-
android:text="10032"
48+
tools:text="10032"
4949
android:textAlignment="center"
5050
android:textAllCaps="false"
5151
android:textColor="@color/white"
@@ -64,7 +64,7 @@
6464
android:layout_marginTop="20dp"
6565
android:layout_marginEnd="20dp"
6666
android:fontFamily="sans-serif-medium"
67-
android:text="lec 001 / TR 1:25pm"
67+
tools:text="lec 001 / TR 1:25pm"
6868
android:textAlignment="center"
6969
android:textAllCaps="true"
7070
android:textColor="@color/white"

app/src/main/res/layout/activity_search.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
android:paddingStart="14dp"
7373
android:paddingTop="16dp"
7474
android:paddingBottom="10dp"
75-
android:text="0 Results"
75+
tools:text="0 Results"
7676
android:textColor="@color/black"
7777
android:textSize="24sp" />
7878

app/src/main/res/layout/course_available_list_item.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
34
xmlns:app="http://schemas.android.com/apk/res-auto"
45
android:layout_width="match_parent"
56
android:layout_height="wrap_content"
@@ -25,7 +26,7 @@
2526
android:maxLines="2"
2627
android:paddingStart="16dp"
2728
android:scrollHorizontally="true"
28-
android:text="CS 1998: Intro to Android"
29+
tools:text="CS 1998: Intro to Android"
2930
android:textColor="@android:color/black"
3031
android:textSize="18sp" />
3132

@@ -57,7 +58,7 @@
5758
android:fontFamily="sans-serif-medium"
5859
android:gravity="bottom"
5960
android:paddingStart="14dp"
60-
android:text="LEC 006 / M 7:30PM"
61+
tools:text="LEC 006 / M 7:30PM"
6162
android:textSize="16sp" />
6263

6364
<TextView
@@ -68,7 +69,7 @@
6869
android:fontFamily="sans-serif-medium"
6970
android:gravity="bottom|end"
7071
android:paddingRight="16dp"
71-
android:text="10032"
72+
tools:text="10032"
7273
android:textSize="16sp" />
7374
</LinearLayout>
7475

app/src/main/res/layout/course_available_list_item_v2.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
android:gravity="bottom"
3333
android:maxLines="2"
3434
android:scrollHorizontally="true"
35-
android:text="CS 1998: Intro to Android"
35+
tools:text="CS 1998: Intro to Android"
3636
android:textColor="@android:color/black"
3737
android:textSize="18sp"
3838
app:layout_constraintEnd_toStartOf="@+id/course_status"
@@ -58,7 +58,7 @@
5858
android:layout_marginTop="12dp"
5959
android:fontFamily="sans-serif-medium"
6060
android:gravity="bottom"
61-
android:text="LEC 006 / M 7:30PM"
61+
tools:text="LEC 006 / M 7:30PM"
6262
android:textSize="16sp"
6363
app:layout_constraintEnd_toStartOf="@+id/course_pin"
6464
app:layout_constraintStart_toStartOf="parent"
@@ -70,7 +70,7 @@
7070
android:layout_height="wrap_content"
7171
android:layout_marginEnd="16dp"
7272
android:fontFamily="sans-serif-medium"
73-
android:text="10032"
73+
tools:text="10032"
7474
android:textSize="16sp"
7575
app:layout_constraintBottom_toBottomOf="@+id/course_time"
7676
app:layout_constraintEnd_toEndOf="parent"

app/src/main/res/layout/course_awaiting_list_item.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
android:gravity="bottom"
2020
android:maxLines="2"
2121
android:scrollHorizontally="true"
22-
android:text="CS 1998: Intro to Android"
22+
tools:text="CS 1998: Intro to Android"
2323
android:textColor="@android:color/black"
2424
android:textSize="18sp"
2525
app:layout_constraintEnd_toStartOf="@+id/course_status"
@@ -45,7 +45,7 @@
4545
android:layout_marginTop="12dp"
4646
android:fontFamily="sans-serif-medium"
4747
android:gravity="bottom"
48-
android:text="LEC 006 / M 7:30PM"
48+
tools:text="LEC 006 / M 7:30PM"
4949
android:textSize="16sp"
5050
app:layout_constraintEnd_toStartOf="@+id/course_pin"
5151
app:layout_constraintStart_toStartOf="parent"
@@ -57,7 +57,7 @@
5757
android:layout_height="wrap_content"
5858
android:layout_marginEnd="16dp"
5959
android:fontFamily="sans-serif-medium"
60-
android:text="10032"
60+
tools:text="10032"
6161
android:textSize="16sp"
6262
app:layout_constraintBottom_toBottomOf="@+id/course_time"
6363
app:layout_constraintEnd_toEndOf="parent"

app/src/main/res/layout/course_awaiting_list_item_v2.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
android:gravity="bottom"
3636
android:maxLines="2"
3737
android:scrollHorizontally="true"
38-
android:text="CS 1998: Intro to Android"
38+
tools:text="CS 1998: Intro to Android"
3939
android:textColor="@android:color/black"
4040
android:textSize="18sp"
4141
android:translationZ="2dp"
@@ -64,7 +64,7 @@
6464
android:layout_marginTop="12dp"
6565
android:fontFamily="sans-serif-medium"
6666
android:gravity="bottom"
67-
android:text="LEC 006 / M 7:30PM"
67+
tools:text="LEC 006 / M 7:30PM"
6868
android:textSize="16sp"
6969
android:translationZ="2dp"
7070
app:layout_constraintEnd_toStartOf="@+id/course_pin"
@@ -77,7 +77,7 @@
7777
android:layout_height="wrap_content"
7878
android:layout_marginEnd="16dp"
7979
android:fontFamily="sans-serif-medium"
80-
android:text="10032"
80+
tools:text="10032"
8181
android:textSize="16sp"
8282
android:translationZ="2dp"
8383
app:layout_constraintBottom_toBottomOf="@+id/course_time"

0 commit comments

Comments
 (0)