get Span Emoji Size - Android Graphics

Android examples for Graphics:Spannable

Description

get Span Emoji Size

Demo Code


import android.content.Context;

public class Main{
    public static int getSpanEmojSize() {

        return (int) getDensity(CommUtil.getContext()) * 20;
    }//from www. ja v a 2s  .  c  om
    public static float getDensity(Context ctx) {
        return ctx.getResources().getDisplayMetrics().density;
    }
}

Related Tutorials