1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-23 04:41:16 +00:00

Removed DpConverter class

This commit is contained in:
Felix Ableitner 2016-10-15 16:29:57 +09:00
parent e7e0e061a1
commit 0488324843

View file

@ -1,20 +0,0 @@
package com.nutomic.syncthingandroid.util;
import android.content.Context;
import static android.util.TypedValue.COMPLEX_UNIT_DIP;
import static android.util.TypedValue.applyDimension;
public abstract class DpConverter {
/**
* Converts dips to pixels.
*
* @param dp Number of dps
* @param c The context to convert in.
* @return Number of pixels that equal dp in context.
*/
public static int dp(int dp, Context c) {
return (int) applyDimension(COMPLEX_UNIT_DIP, dp, c.getResources().getDisplayMetrics());
}
}