Logcat error: “addView(View, LayoutParams) is not supported in AdapterView” in a ListView

前端 未结 5 1295
误落风尘
误落风尘 2020-12-01 10:22

I\'m doing an application for Android and something I need is that it shows a list of all files and directories in the SD Card and it has to be able to move through the diff

5条回答
  •  余生分开走
    2020-12-01 10:56

    For others who have this problem and have inflated a layout in ArrayAdapter's getView, set the parent parameter to null, as in view = inflater.inflate(R.layout.mylayout, null);

提交回复
热议问题