I am trying to use android's built in control CompoundButton, however I have no luck using it in xml, here is my code
<CompoundButton
android:id="@+id/mini_recorder_play"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/play_d" />
it is throwing exception while inflating.
CompoundButton is an abstract class, you cannot instantiate it directly. You must either instantiate one of its subclasses (e.g. CheckBox, RadioButton, ToggleButton) or create your own customized subclass if none of those widgets fits your needs.
HTH
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With