Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/186.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 循环视图滚动速度慢_Android_Json_Android Recyclerview_Nestedrecyclerview - Fatal编程技术网

Android 循环视图滚动速度慢

Android 循环视图滚动速度慢,android,json,android-recyclerview,nestedrecyclerview,Android,Json,Android Recyclerview,Nestedrecyclerview,当我从Json获取数据并放入recyclerview时。它滚动得很慢?请帮我解决这个问题 recyclerView = findViewById(R.id.recycleview); adapter1 = new Landing_recycler_adapter(MainActivity.this, movieList); GridLayoutManager gridLayoutManager = new GridLayoutManager(get

当我从Json获取数据并放入recyclerview时。它滚动得很慢?请帮我解决这个问题

recyclerView = findViewById(R.id.recycleview);
            adapter1 = new Landing_recycler_adapter(MainActivity.this, movieList);
            GridLayoutManager gridLayoutManager = new GridLayoutManager(getApplicationContext(),2);
            gridLayoutManager.setOrientation(LinearLayoutManager.VERTICAL); // set Horizontal Orientation
            recyclerView.setLayoutManager(gridLayoutManager); // set LayoutManager to RecyclerView
    //        recyclerView.setLayoutManager(new GridLayoutManager(this, GridLayoutManager.HORIZONTAL, true));


            recyclerView.setHasFixedSize(true);
            recyclerView.setAdapter(adapter1);

            getJsonData();
用这个

            getJsonData();
            recyclerView = findViewById(R.id.recycleview);
            adapter1 = new Landing_recycler_adapter(MainActivity.this, movieList);

            recyclerView.setLayoutManager(new LinearLayoutManager(this));
            recyclerView.setAdapter(adapter1);


并禁用RecyclerView的嵌套滚动

recyclerView.setNestedScrollingEnabled(false);

你为什么要设置两次layoutmanager?@sanjeev一行在评论下LOL:)很高兴你编辑了这篇文章。您是否在recyclerview外使用滚动视图?2。您将获得
getJsonData()设置适配器后?3.电影列表包含哪些内容?请提供更多的代码。我没有得到确切的答案。请提供更多的代码,这个问题可能与其他行动有关。没有日志错误。只是慢慢地走。表示性能非常差。如果您在recyclerView的项目视图中将图像设置为imageView,则只需使用Glide或毕加索进行设置。无Logcate错误。只是慢慢地走。意味着性能非常差。
recyclerView.setNestedScrollingEnabled(false);