Back to project page ihatecolor_and.
The source code is released under:
Copyright (c) 2013, Sewon Ann All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * ...
If you think the Android project ihatecolor_and listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package kr.pe.kingori.ihatecolor.util; /*from w w w. j av a 2s .c o m*/ import android.content.Context; import android.graphics.Point; import android.view.WindowManager; import android.widget.Toast; import kr.pe.kingori.ihatecolor.Application; public class UiUtil { private UiUtil() { } public static void showToast(String message) { Toast.makeText(Application.context, message, Toast.LENGTH_SHORT).show(); } public static boolean isWideDevice(Context context) { Point size = new Point(); ((WindowManager) context.getSystemService(Context.WINDOW_SERVICE)) .getDefaultDisplay().getSize(size); return (float) size.x / size.y > 0.72; } }