Redesign Import, still some todos and regression bugs
This commit is contained in:
1 parent
21e9d0b7b4
commit
8c7a360d6e
34 files changed
+1204
-460
No files matched your search
@@ -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