Skip to content

Commit d923c34

Browse files
committed
add table column for courses
1 parent 5ffac2a commit d923c34

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

app/src/main/java/dev/lucalewin/planer/iserv/IservPlanRow.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
package dev.lucalewin.planer.iserv;
22

33
import android.content.Context;
4-
import android.view.Gravity;
5-
import android.view.View;
6-
import android.widget.LinearLayout;
74
import android.widget.TableRow;
85
import android.widget.TextView;
96

@@ -31,7 +28,7 @@ public IservPlanRow(String hour, String missing, String replacing, String subjec
3128
this.text = text;
3229
}
3330

34-
public View toTableRow(Context context) {
31+
public TableRow toTableRow(Context context) {
3532
TableRow tableRow = new TableRow(context);
3633

3734
TextView hourTw = new TextView(context);
@@ -42,6 +39,10 @@ public View toTableRow(Context context) {
4239
missingTw.setText(missing);
4340
tableRow.addView(missingTw);
4441

42+
TextView courseTw = new TextView(context);
43+
courseTw.setText(subject);
44+
tableRow.addView(courseTw);
45+
4546
TextView typeTw = new TextView(context);
4647
typeTw.setText(type);
4748
tableRow.addView(typeTw);

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

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,19 @@
3838
android:layout_width="match_parent"
3939
android:layout_height="match_parent">
4040
<TextView
41-
android:text="@string/hour"
41+
android:text="@string/lesson"
4242
android:layout_marginRight="16dp"
4343
android:textColor="@color/sesl_edit_text_color"
4444
android:textSize="@dimen/sesl4_edit_text_size"
4545
tools:ignore="RtlHardcoded" />
4646
<TextView
47-
android:text="@string/missing"
47+
android:text="@string/teacher"
48+
android:layout_marginRight="16dp"
49+
android:textColor="@color/sesl_edit_text_color"
50+
android:textSize="@dimen/sesl4_edit_text_size"
51+
tools:ignore="RtlHardcoded" />
52+
<TextView
53+
android:text="@string/course"
4854
android:layout_marginRight="16dp"
4955
android:textColor="@color/sesl_edit_text_color"
5056
android:textSize="@dimen/sesl4_edit_text_size"
@@ -79,13 +85,19 @@
7985
android:layout_width="match_parent"
8086
android:layout_height="match_parent">
8187
<TextView
82-
android:text="@string/hour"
88+
android:text="@string/lesson"
89+
android:layout_marginRight="16dp"
90+
android:textColor="@color/sesl_edit_text_color"
91+
android:textSize="@dimen/sesl4_edit_text_size"
92+
tools:ignore="RtlHardcoded" />
93+
<TextView
94+
android:text="@string/teacher"
8395
android:layout_marginRight="16dp"
8496
android:textColor="@color/sesl_edit_text_color"
8597
android:textSize="@dimen/sesl4_edit_text_size"
8698
tools:ignore="RtlHardcoded" />
8799
<TextView
88-
android:text="@string/missing"
100+
android:text="@string/course"
89101
android:layout_marginRight="16dp"
90102
android:textColor="@color/sesl_edit_text_color"
91103
android:textSize="@dimen/sesl4_edit_text_size"

0 commit comments

Comments
 (0)