This repository was archived by the owner on May 14, 2025. It is now read-only.
This repository was archived by the owner on May 14, 2025. It is now read-only.
Add isInEditMode checks for preview rendering. #176
Open
Description
Hey people!
I am trying to use TimesSquare but am getting a NullPointerException in a simple preview from Android Studio like:
Looking through the code it seems a bit strange that it should be working...
This code seems like will always throw a null pointer exception but I may be mistaken...
The layout file I am trying to preview is:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.squareup.timessquare.CalendarPickerView
android:id="@+id/calendar_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
When I run it the app crashes just the same.
Am I missing something? Thanks in advance