// Path: app/src/main/java/com/yoga/oneweather/MyApplication.java
// public class MyApplication extends Application {
// 
//     private static Context context;
//     private static Gson mGson = new Gson();
// 
// 
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         context = getApplicationContext();
//         LitePal.initialize(context);
//         DBManager.getInstance().copyCitysToDB();
// 
// 
// 
//     }
// 
//     public static Gson getGson() {
//         return mGson;
//     }
// 
//     public static Context getContext() {
//         return context;
//     }
// }


import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;
import com.yoga.oneweather.MyApplication;
import com.yoga.oneweather.R;
package com.yoga.oneweather.city;



/**
 * Created by wyg on 2017/7/24.
 */

public class HeaderHolder extends RecyclerView.ViewHolder {
    RecyclerView header_recyclerView;
    TextView locateText;



    public HeaderHolder(View itemView) {
        super(itemView);
        header_recyclerView = (RecyclerView) itemView.findViewById(R.id.header_recyclerView);
        locateText = (TextView) itemView.findViewById(R.id.located_city);

// Path: app/src/main/java/com/yoga/oneweather/MyApplication.java
// public class MyApplication extends Application {
// 
//     private static Context context;
//     private static Gson mGson = new Gson();
// 
// 
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         context = getApplicationContext();
//         LitePal.initialize(context);
//         DBManager.getInstance().copyCitysToDB();
// 
// 
// 
//     }
// 
//     public static Gson getGson() {
//         return mGson;
//     }
// 
//     public static Context getContext() {
//         return context;
//     }
// }


// Path: app/src/main/java/com/yoga/oneweather/city/HeaderHolder.java
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;
import com.yoga.oneweather.MyApplication;
import com.yoga.oneweather.R;

package com.yoga.oneweather.city;



/**
 * Created by wyg on 2017/7/24.
 */

public class HeaderHolder extends RecyclerView.ViewHolder {
    RecyclerView header_recyclerView;
    TextView locateText;



    public HeaderHolder(View itemView) {
        super(itemView);
        header_recyclerView = (RecyclerView) itemView.findViewById(R.id.header_recyclerView);
        locateText = (TextView) itemView.findViewById(R.id.located_city);

        header_recyclerView.setLayoutManager(new GridLayoutManager(MyApplication.getContext(),3));