Extending classes is a tricky question in java.
One way to do it, it will improve code segregation, is to create another class B that extends Swipper. There, you will create the public methods you need to interact with it.
In VideoPlayerActivity class you create an instance of B, or pass it as an argument. The VideoPlayerActivity only interacts with class B , so there is no need for VideoPlayerActivity inheriting from Swipper.
That way VideoPlayerActivity can extend AppCompatActivity
class B extends Swipper{
int a,b;
//override swipper functions
@Override
public void play(){
}
}
class VideoPlayerActivity extends AppCompatActivity{
B instanceB = new B();
public void play(){
instanceB.play();
}
//instead of calling directly, since this class does not extends swipper, you call that function of class B, that extenda Swipper
public void inheritedFunction(){
instanceB.inheritedFunction()
}
}