|
|
@@ -125,9 +125,7 @@ public class ViewTool {
|
|
|
|
|
|
}
|
|
|
|
|
|
- public static View inflateLayoutPixels(Context context, View views,
|
|
|
- int width, int height) {
|
|
|
-// View views = LayoutInflater.from(context).inflate(layoutId, null);
|
|
|
+ public static View inflateLayoutPixels(Context context, View views, int width, int height) {
|
|
|
if (views == null) {
|
|
|
return null;
|
|
|
}
|
|
|
@@ -135,7 +133,6 @@ public class ViewTool {
|
|
|
((WindowManager) context.getSystemService(Context.WINDOW_SERVICE))
|
|
|
.getDefaultDisplay().getMetrics(dm2);
|
|
|
if (heightPixels <= 0) {
|
|
|
- // DisplayMetrics dm2 = context.getResources().getDisplayMetrics();
|
|
|
heightPixels = dm2.heightPixels;
|
|
|
widthPixels = dm2.widthPixels;
|
|
|
Class<?> c = null;
|
|
|
@@ -208,7 +205,6 @@ public class ViewTool {
|
|
|
((WindowManager) context.getSystemService(Context.WINDOW_SERVICE))
|
|
|
.getDefaultDisplay().getMetrics(dm2);
|
|
|
if (heightPixels <= 0) {
|
|
|
- // DisplayMetrics dm2 = context.getResources().getDisplayMetrics();
|
|
|
heightPixels = dm2.heightPixels;
|
|
|
widthPixels = dm2.widthPixels;
|
|
|
Class<?> c = null;
|
|
|
@@ -280,7 +276,6 @@ public class ViewTool {
|
|
|
((WindowManager) context.getSystemService(Context.WINDOW_SERVICE))
|
|
|
.getDefaultDisplay().getMetrics(dm2);
|
|
|
if (heightPixels <= 0) {
|
|
|
- // DisplayMetrics dm2 = context.getResources().getDisplayMetrics();
|
|
|
heightPixels = dm2.heightPixels;
|
|
|
widthPixels = dm2.widthPixels;
|
|
|
Class<?> c = null;
|
|
|
@@ -345,7 +340,6 @@ public class ViewTool {
|
|
|
}
|
|
|
|
|
|
public static View inflateFragmentPixels(Context context, View views, int width, int height) {
|
|
|
-// View views = LayoutInflater.from(context).inflate(layoutId, container, false);
|
|
|
if (views == null) {
|
|
|
return null;
|
|
|
}
|
|
|
@@ -353,7 +347,6 @@ public class ViewTool {
|
|
|
((WindowManager) context.getSystemService(Context.WINDOW_SERVICE))
|
|
|
.getDefaultDisplay().getMetrics(dm2);
|
|
|
if (heightPixels <= 0) {
|
|
|
- // DisplayMetrics dm2 = context.getResources().getDisplayMetrics();
|
|
|
heightPixels = dm2.heightPixels;
|
|
|
widthPixels = dm2.widthPixels;
|
|
|
Class<?> c = null;
|