Android Open Source - ChessBoardLayout Layout Utils






From Project

Back to project page ChessBoardLayout.

License

The source code is released under:

Apache License

If you think the Android project ChessBoardLayout listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.jungkai.chessboardlayout;
/*from  www.  j  a va2  s  . c om*/
import android.content.Context;
import android.content.res.Configuration;
import android.os.Build;
import android.view.View;

/**
 * Created by jungkai on 2014. 6. 27..
 */
public class LayoutUtils {

    //To support RTL layout (upper than sdk version 17)
    public static boolean isLayoutRTL(Context context) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
            Configuration config = context.getResources().getConfiguration();
            return config.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL;
        } else {
            return false;
        }
    }
}




Java Source Code List

com.jungkai.chessboardlayout.ApplicationTest.java
com.jungkai.chessboardlayout.ChessBoardLayout.java
com.jungkai.chessboardlayout.LayoutUtils.java
com.kai.sample.app.ApplicationTest.java
com.kai.sample.app.Fruit.java
com.kai.sample.app.MainActivity.java