I have a problem comparing Background
of a ImageButton
with a drawable
IB6
is my ImageButton
and wanted to see if it has drawable def
, when it arrives at this if
the application for and gives error in equals
if (IB6.getDrawable().getConstantState().equals(getResources().getDrawable(R.drawable.def).getConstantState()))
The program goes below because I'm comparing the Background
of ImageButton
to drawable
badly.
How do I if
check whether Background
IB6
is equal to drawable def
??