You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Android Studio cannot render SpectrumPalette in its Preview
I've had this problem with v0.6 for several months, today I switched to 0.7 in hope it had been fixed but same thing, stacktrace:
java.lang.NullPointerException at com.thebluealliance.spectrum.SpectrumPalette.computeHeight(SpectrumPalette.java:186) at com.thebluealliance.spectrum.SpectrumPalette.onMeasure_Original(SpectrumPalette.java:153) at com.thebluealliance.spectrum.SpectrumPalette.onMeasure(SpectrumPalette.java:-1) at android.view.View.measure(View.java:19731) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6120) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464) at android.widget.LinearLayout.measureVertical(LinearLayout.java:758) at android.widget.LinearLayout.onMeasure(LinearLayout.java:640) at android.view.View.measure(View.java:19731) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6120) at android.support.design.widget.CoordinatorLayout.onMeasureChild(CoordinatorLayout.java:714) at android.support.design.widget.CoordinatorLayout.onMeasure_Original(CoordinatorLayout.java:786) at android.support.design.widget.CoordinatorLayout.onMeasure(CoordinatorLayout.java:-1) at android.view.View.measure(View.java:19731) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6120) at android.widget.FrameLayout.onMeasure(FrameLayout.java:185) at android.view.View.measure(View.java:19731) at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461) at android.view.View.measure(View.java:19731)
Does it not support being a child of a CoordinatorLayout?
I have: (I tried formatting but never came out better than this, sorry)
The text was updated successfully, but these errors were encountered:
ripern
changed the title
Rendering problems in Android Studio because of NPE on computeHeight
Can't rendering SpectrumPalette in Android Studio because of NPE on computeHeight
Dec 22, 2016
ripern
changed the title
Can't rendering SpectrumPalette in Android Studio because of NPE on computeHeight
Can't render SpectrumPalette in Android Studio because of NPE on computeHeight
Dec 22, 2016
That shouldn't be throwing exceptions; I'll release a fix for that. Regardless, the layout previewer won't be of much use if you set the colors programmatically. If you want to see anything other than an empty box in the previewer, you'll have to provide the colors array with the spectrum_colors attribute.
Android Studio cannot render SpectrumPalette in its Preview
I've had this problem with v0.6 for several months, today I switched to 0.7 in hope it had been fixed but same thing, stacktrace:
java.lang.NullPointerException at com.thebluealliance.spectrum.SpectrumPalette.computeHeight(SpectrumPalette.java:186) at com.thebluealliance.spectrum.SpectrumPalette.onMeasure_Original(SpectrumPalette.java:153) at com.thebluealliance.spectrum.SpectrumPalette.onMeasure(SpectrumPalette.java:-1) at android.view.View.measure(View.java:19731) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6120) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464) at android.widget.LinearLayout.measureVertical(LinearLayout.java:758) at android.widget.LinearLayout.onMeasure(LinearLayout.java:640) at android.view.View.measure(View.java:19731) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6120) at android.support.design.widget.CoordinatorLayout.onMeasureChild(CoordinatorLayout.java:714) at android.support.design.widget.CoordinatorLayout.onMeasure_Original(CoordinatorLayout.java:786) at android.support.design.widget.CoordinatorLayout.onMeasure(CoordinatorLayout.java:-1) at android.view.View.measure(View.java:19731) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6120) at android.widget.FrameLayout.onMeasure(FrameLayout.java:185) at android.view.View.measure(View.java:19731) at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461) at android.view.View.measure(View.java:19731)
Does it not support being a child of a CoordinatorLayout?
I have: (I tried formatting but never came out better than this, sorry)
`
<android.support.design.widget.CoordinatorLayout
android:id="@+id/prefsCoordinator"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.design.widget.CoordinatorLayout>
`
The text was updated successfully, but these errors were encountered: