Comments (4)
I have the same issue.
FATAL EXCEPTION: main
java.lang.NullPointerException
at android.text.Layout.getDesiredWidth(Layout.java:68)
at org.jraf.android.backport.switchwidget.Switch.makeLayout(Switch.java:350)
at org.jraf.android.backport.switchwidget.Switch.onMeasure(Switch.java:302)
at android.view.View.measure(View.java:12758)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:594)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:376)
at android.view.View.measure(View.java:12758)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:594)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:376)
at android.view.View.measure(View.java:12758)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1369)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:660)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:553)
at android.view.View.measure(View.java:12758)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1369)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:660)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:553)
at android.view.View.measure(View.java:12758)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1369)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:660)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:553)
at android.view.View.measure(View.java:12758)
at android.widget.ScrollView.measureChildWithMargins(ScrollView.java:1163)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
at android.widget.ScrollView.onMeasure(ScrollView.java:312)
at android.view.View.measure(View.java:12758)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
at android.view.View.measure(View.java:12758)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
at android.view.View.measure(View.java:12758)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
at android.view.View.measure(View.java:12758)
at android.support.v4.widget.DrawerLayout.onMeasure(DrawerLayout.java:851)
at android.view.View.measure(View.java:12758)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
at android.view.View.measure(View.java:12758)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
at android.support.v7.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:453)
at android.view.View.measure(View.java:12758)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
at android.view.View.measure(View.java:12758)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1369)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:660)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:553)
at android.view.View.measure(View.java:12758)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2092)
at android.view.View.measure(View.java:12758)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1064)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2445)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.
from android-switch-backport.
Hi! I am sorry I haven't been very reactive on this issue. Just to be sure I am not missing anything - since the support library now features a SwitchCompat, can you tell me why you are trying to use it in conjunction with this library?
from android-switch-backport.
Quite simple. The SwitchCompat in a Preference is not compatible with APIs lower than 14 since it depends on SwitchPreference which was added in API 14. Yours is compatible with those versions
from android-switch-backport.
Just release v2 of this lib that has a SwitchPreference that uses the SwitchCompat.
from android-switch-backport.
Related Issues (20)
- No titlebar crash the example HOT 1
- [Q] Is it possible to resize the Switch height to make it bigger? HOT 1
- [Q] Is it there a way to change the color of the ON button? HOT 1
- Track does not work in switch preference HOT 1
- Can't get the preference to show up! HOT 2
- Text color of switch not set correctly HOT 2
- Gradle build gets stuck after including repo and dependency HOT 3
- JRAF repo not responding HOT 9
- Rendering Problems HOT 1
- Attribute has already been defined exception when using lib with compile ('com.doomonafireball.betterpickers:library:1.5.2') HOT 14
- Customize text on switch and color HOT 4
- Problem to change thumb and track drawables HOT 1
- Nullpointerexception when used on Nexus4 HOT 2
- OnPreferenceChange return False, Switch Changes HOT 3
- NullPointerException HOT 8
- Publish artefact on maven central instead on your own nexus HOT 3
- Publish on Maven Central or JCenter HOT 4
- JRAF.org is down HOT 3
- Getting Null pointer exception HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-switch-backport.