how to "get" an upper layer from an existing (layerDrawable) background of an imagebutton?

72 Views Asked by At

I am creating an android app for playing Chess.

I have used layerDrawable to display 2 layers of background (one layer to display a square of the Chessboard and another for the piece on it).

But the problem is when I want to move the piece from the existing square, I only need the upper layer (the piece) to move.

Is there any way that I can "get" the upper layer.

I tried getBackground() method, but it only returns a drawable, not a layerDrawable.

0

There are 0 best solutions below