app/src/main/java/com/example/android/sunshine/ui/list/ForecastAdapter.java
@Override
    public ForecastAdapterViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {

        int layoutId = getLayoutIdByType(viewType);
        View view = LayoutInflater.from(mContext).inflate(layoutId, viewGroup, false);
        view.setFocusable(true);
        return new ForecastAdapterViewHolder(view);
    }
/**
     * This gets called when each new ViewHolder is created. This happens when the RecyclerView
     * is laid out. Enough ViewHolders will be created to fill the screen and allow for scrolling.
     *
     * @param viewGroup The ViewGroup that these ViewHolders are contained within.
     * @param viewType  If your RecyclerView has more than one type of item (like ours does) you
     *                  can use this viewType integer to provide a different layout. See
     *                  {@link android.support.v7.widget.RecyclerView.Adapter#getItemViewType(int)}
     *                  for more details.
     * @return A new ForecastAdapterViewHolder that holds the View for each list item
     */
This gets called when each new ViewHolder is created. This happens when the RecyclerView
is laid out. Enough ViewHolders will be created to fill the screen and allow for scrolling.

@param viewGroup The ViewGroup that these ViewHolders are contained within.
@param viewType  If your RecyclerView has more than one type of item (like ours does) you
can use this viewType integer to provide a different layout.
This gets called when each new ViewHolder is created . This happens when the RecyclerView is laid out . Enough ViewHolders will be created to fill the screen and allow for scrolling . @param viewGroup The ViewGroup that these ViewHolders are contained within . @param viewType If your RecyclerView has more than one type of item ( like ours does ) you can use this viewType integer to provide a different layout .
@Override
    public ForecastAdapterViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {
        int layoutId = getLayoutIdByType(viewType);
        View view = LayoutInflater.from(mContext).inflate(layoutId, viewGroup, false);
        view.setFocusable(true);
        return new ForecastAdapterViewHolder(view);
    }
@ Override public ForecastAdapterViewHolder onCreateViewHolder ( ViewGroup viewGroup , int viewType ) { int layoutId = getLayoutIdByType ( viewType ) ; View view = LayoutInflater . from ( mContext ) . inflate ( layoutId , viewGroup , false ) ; view . setFocusable ( true ) ; return new ForecastAdapterViewHolder ( view ) ; }
This gets called when each new ViewHolder is created.
This gets called when each new ViewHolder is created .