Skip to content
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
@cs-victor-nascimento

Description

@cs-victor-nascimento

Hey people!

I am trying to use TimesSquare but am getting a NullPointerException in a simple preview from Android Studio like:

npe_timessquare
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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions