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:
parent
e7e0e061a1
commit
0488324843
1 changed files with 0 additions and 20 deletions
|
@ -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());
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue