Skip to content
A component that allows you to freely place and move pieces on a chess board.
Branch: master
Clone or download
Latest commit 57853a3 Oct 2, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
chessboardeditor Correct the chessboard orientation Oct 2, 2019
LICENSE Create LICENSE Sep 24, 2019 Fixed a big when calling setFen Sep 24, 2019
build.gradle Initial commit Sep 23, 2019
gradlew.bat Initial commit Sep 23, 2019

Chess Board Editor

A component that allows you to freely place and move pieces on a chess board.

To include this library in your project:


Step 1 - Add the JitPack repository to your root build.gradle, at the end of repositories:

allprojects {
	repositories {
		maven { url '' }

Step 2 - Add the dependency to your sub build.gradle:

dependencies {
        implementation 'com.github.bakkenbaeck:chessboardeditor:v1.0.2'

How to use:

Currently the board view can be initialized with any valid FEN string using the ChessBoardView::setFen() method. Call the ChessBoardView::getFen() method anytime to return the current board setup in FEN representation (more info on FEN).

Here's an example on how to load a chess board with the default starting setup:

Step 1 - Add this layout to your xml layout file:


Step 2 - Call ChessBoardView::setFen() in onViewCreated (if using fragments):

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        chessBoard.setFen("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1")

Step 3 - Call ChessBoardView::getFen() whenever required:

    val fen = chessBoard.getFen()



You can’t perform that action at this time.