I currently have a DrawingView which looks like this:
<com.example.drawingapp.DrawingView android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/drawing_view" android:background="#80ffffff" /> Within my code, I am setting the background to nothing earlier on using:
drawing_view.setBackgroundResource(0) What I want to be able to do is be able to revert the background back to '#80ffffff' through my code. I have the following which is wrong:
drawing_view.setBackgroundResource(ContextCompat.getColor(context, Color.parseColor("#80ffffff"))) Thanks!