How to test the Custom view performance
问题 I want to test my Custom component UI rendering performance. I used the following test case to check the rendering performance. private long getLayoutTime(int layoutRes) { final Context targetContext = getInstrumentation().getTargetContext(); final LayoutInflater layoutInflater = LayoutInflater.from(targetContext); final long startTime = System.currentTimeMillis(); for (int i = 0; i < 1000; i++) { final View view = layoutInflater.inflate(layoutRes, null); view.setLayoutParams(new ViewGroup