是否出于性能原因禁用Android自动填充?

时间:2018-11-09 06:45:40

标签: android performance autofill

在不需要自动填充服务的活动中,我们可以(或应该?)在onCreate()方法中禁用自动填充:

getWindow()
  .getDecorView()
  .setImportantForAutofill(View.IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS);

或在根布局容器上设置属性:

android:importantForAutofill="noExcludeDescendants"

问题是,出于性能方面的考虑,这是一种好习惯吗?节省电池或类似的东西吗?

否则,自动填充服务会尝试使用启发式方法确定每个视图的类型。

0 个答案:

没有答案