You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
344 B
14 lines
344 B
package edu.hzuapps.androidlabs.watchtv.until;
|
|
|
|
import androidx.fragment.app.FragmentActivity;
|
|
|
|
public class ToolUtils {
|
|
|
|
public static int dip2px(FragmentActivity context, float dpValue) {
|
|
final float scale = context.getResources().getDisplayMetrics().density;
|
|
return (int) (dpValue * scale + 0.5f);
|
|
}
|
|
|
|
|
|
}
|