Tri-State-Checkbox
Tri-State-Checkbox copied to clipboard
Checkbox not rendering
Tried out your library but unfortunately the checkbox is not rendered. When I add the android:text attribute I can see the text label but no checkbox. This is on a project with min SDK 23.
Kind of the same situation. I ran it in an emulator and the app kept crashing. When I looked at logcat I noticed that it couldn't resolve the reference to Timber, so I added it. After I added it the checkbox in the preview disappeared but the app runs now, obviously without a checkbox.
imho a library should not have a hard dependency on a logging framework like Timber. But it seems this is not the root of the problem...
@svenjacobs when you remove the android:text does the checkbox appear? I had a rough time even building and running the solution after I added this library. Up until the time that I added the dependency for Timber like I mentioned before.
@innov83r No, the checkbox does not appear with our without the text attribute.
@svenjacobs did you have issues installing and building this library? Because I did.
@sephiroth74 which installation instruction set is the correct one?
did you have issues installing and building this library
No, I didn't. I didn't even notice that the library depends on Timber. Timber is a transitive dependency so I wonder why it didn't work for you? Unless you have some special Gradle configuration?
did you have issues installing and building this library
No, I didn't. I didn't even notice that the library depends on Timber. Timber is a transitive dependency so I wonder why it didn't work for you? Unless you have some special Gradle configuration?
It didn't work because I had the '@aar' suffix on my dependency. I removed it and it let me build. I also started playing around with it a bit and was able to get a checkbox by explicitly showing one via the drawables resource. I'm going to work on implementing the kotlin code to see if I can get it to be selectable. I'll post once I have more news.
I spent some time this weekend and I was able to get a checkbox to display by putting this in my main activity: checkBox1.setChecked(false, false). Without that line I looks like text gets rendered but not the checkbox.
I'm also having difficulty with the checkbox not rendering, even with innov83r's Mar 1 suggestion, even in a completely vanilla project in Android Studio. The install was easy with the android-arsenal instructions.
My Gradle file, for a Java project, SDK <= 28, has:
implementation 'com.github.sephiroth74:Tri-State-Checkbox:v1.0.0'
For me what fixed it was making sure to include the style attribute in the layout:
<it.sephiroth.android.library.checkbox3state.CheckBox3
android:id="@+id/cb"
style="@style/Sephiroth.Widget.Checkbox3"
Sadly, it's still not rendering in my own app...
Apparently, adding style="@style/Sephiroth.Widget.Checkbox3" in the XML layout definition fixes the issue...