228 Android RecyclerView Tutorial Part 4 |

slidenerd · 97K views · 2014 · 10:31

Open on YouTube

Software (other)Python, Ruby & scripting languagestutorialdated

Why Stack Overflow recommends it

Stack Overflow users cite it as the tutorial they followed when asking why their RecyclerView adapter code in a navigation drawer fragment throws errors or shows nothing.

Recommended by 0 people across 0 different months, 2015 to 2016.

What it is

Part 4 of slidenerd's Android RecyclerView tutorial series from 2014. It shows how to display a RecyclerView using a RecyclerView.Adapter backed by a List, using Collections.emptyList to avoid null pointer issues, and adds material-design icons at 54% opacity.

What people said

Cites Dump Choenthanomwong · 2015-02 · Stack Overflow · on “I'm using arraylist in xml and cycling but navigation drawer doesn't show”

How do I fix it? Navigation Drawer.java public class NavigationDrawerFragment extends Fragment { public static final String PRE_FILE_NAME = "testpre"; public static final String KEY_USER_LEARNED_DRAWER = "user_learned_drawer"; private RecyclerView recyclerView; private ActionBarDrawerToggle mDrawerToggle; private DrawerLayout mDrawerLayout; private MyAdapter adapter; private boolean mUserLearnedDrawer; private boolean mFromSavedInstanceState; private View containerView; public NavigationDrawerFragment() { // Required empty public constructor } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mUserLearnedDrawer = Boolean.valueOf(readFromPreferenc

Cites wayanz · 2015-07 · Stack Overflow · on “Error GetData() when make adapter variable”

I was watch Android tutorial from Slidenerd about make Recycle View on Android. This the link: [this video] . When i make a adapter variable, i got an error. This is my full code: NavigationDrawerFragment.java package com.balinez.wdharmana.doahindu; import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBarDrawerToggle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import a

Cites Vivek Mahendra · 2016-02 · Stack Overflow · on “No adapter attached; skipping layout onCreateView()”

Trying to implement RecyclerView into my application, I don't understand why i'm getting "No adapter attached; skipping layout" I thought i clearly set it up in the onCreateView. Some other posts suggested to move it to Oncreate() but when i do that i get many more errors. I followed this tutorial [this video] if it helps. Here is my Main Activity class I do not believe this is a duplicate of another question, although it might be similar. when moved to onCreate() the entire application crashes. public class MainActivity extends ActionBarActivity { private Toolbar toolbar; private RecyclerView recyclerView; private Adapter adapter; @Override protected void onCreate(Bundle savedInstanceState) { su