[2.8.0-f] 屏幕适配

This commit is contained in:
yangyakun
2022-10-28 20:44:07 +08:00
parent 27f40d2d2c
commit 20509fce0c
449 changed files with 5435 additions and 6549 deletions

View File

@@ -41,6 +41,9 @@ import androidx.core.app.NotificationManagerCompat;
import androidx.core.content.ContextCompat;
import androidx.core.view.ViewCompat;
import me.jessyan.autosize.AutoSizeCompat;
import me.jessyan.autosize.AutoSizeConfig;
/**
* <pre>
* author: Blankj

View File

@@ -14,6 +14,8 @@ import java.util.Locale;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import me.jessyan.autosize.AutoSizeCompat;
/**
* <pre>
* author: Blankj
@@ -117,6 +119,7 @@ public class ViewUtils {
public static View layoutId2View(@LayoutRes final int layoutId) {
LayoutInflater inflate =
(LayoutInflater) Utils.getApp().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
AutoSizeCompat.autoConvertDensity(inflate.getContext().getResources(), 2560, true);//如果有自定义需求就用这个方法
return inflate.inflate(layoutId, null);
}