Home Ask Login Register

Developers Planet

Your answer is one click away!

jerm dimarciello February 2016

Trying to extend a class, while onseekbarchangelistener is implemented?

I have 3 classes i am working with, a drawing view which sits inside of the drawing box and a tools button. My tools button has the seekbar and listener for the size change of my stroke, the stroke is in the canvasview class, i am trying to extend my canvas view with the tools class but i have the

public class Toolbox extends AppCompatActivity implements SeekBar.OnSeekBarChangeListener

when i try to add the extends canvasview i get an error. How do i go about doing this?


Guy February 2016

The error is not in implements OnSeekBarChangeListener, but in extending Canvas. You can extend only one class in Java. Toolbox already extends AppCompatActivity.

Post Status

Asked in February 2016
Viewed 2,575 times
Voted 4
Answered 1 times


Leave an answer

Quote of the day: live life