get Gravity End - Android Phone

Android examples for Phone:Phone Information

Description

get Gravity End

Demo Code


//package com.java2s;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;

import android.os.Build;
import android.view.Gravity;

public class Main {
    @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
    @SuppressLint("RtlHardcoded")
    public static int getGravityEnd() {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
            return Gravity.END;
        }/*from w  w  w .  ja v  a2  s .  c  o  m*/
        return Gravity.RIGHT;
    }
}

Related Tutorials