Redesign Import, still some todos and regression bugs
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
package org.sufficientlysecure.keychain.helper;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.Spanned;
|
||||
@@ -67,4 +68,12 @@ public class OtherHelper {
|
||||
return sb;
|
||||
}
|
||||
|
||||
public static int dpToPx(Context context, int dp) {
|
||||
return (int) ((dp * context.getResources().getDisplayMetrics().density) + 0.5);
|
||||
}
|
||||
|
||||
public static int pxToDp(Context context, int px) {
|
||||
return (int) ((px / context.getResources().getDisplayMetrics().density) + 0.5);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user