Skip to content

Commit 060eb21

Browse files
author
luca
committed
fix nullability issues and crash in sample app, added title to main screen
1 parent 05e4e92 commit 060eb21

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

lib/src/main/java/com/kirkbushman/zammad/models/OnlineNotification.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ data class OnlineNotification(
1919
val objId: Int,
2020

2121
@Json(name = "object")
22-
val objectType: String,
22+
val objectType: String?,
2323

2424
@Json(name = "type")
25-
val type: NotificationType,
25+
val type: NotificationType?,
2626

2727
@Json(name = "seen")
2828
val seen: Boolean,

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

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<androidx.coordinatorlayout.widget.CoordinatorLayout
3-
xmlns:android="http://schemas.android.com/apk/res/android"
2+
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
43
xmlns:tools="http://schemas.android.com/tools"
54
android:layout_width="match_parent"
65
android:layout_height="match_parent"
6+
xmlns:app="http://schemas.android.com/apk/res-auto"
77
tools:context=".MainActivity">
88

99
<com.google.android.material.appbar.AppBarLayout
@@ -14,7 +14,8 @@
1414
<androidx.appcompat.widget.Toolbar
1515
android:id="@+id/toolbar"
1616
android:layout_width="match_parent"
17-
android:layout_height="?attr/actionBarSize" />
17+
android:layout_height="?attr/actionBarSize"
18+
app:title="@string/app_name" />
1819

1920
</com.google.android.material.appbar.AppBarLayout>
2021

sampleapp/src/main/res/layout/item_overview.xml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:orientation="vertical"
4-
android:layout_width="match_parent"
5-
android:layout_height="wrap_content">
3+
android:id="@+id/container"
4+
android:orientation="vertical"
5+
android:layout_width="match_parent"
6+
android:layout_height="wrap_content">
67

78
<TextView
89
android:id="@+id/overview_name"

0 commit comments

Comments
 (0)