// Path: app/src/main/java/com/asha/nightowl/DetailActivity.java
// public class DetailActivity extends AppCompatActivity {
// 
//     public static void launch(Context context){
//         Intent i = new Intent(context,DetailActivity.class);
//         context.startActivity(i);
//     }
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         NightOwl.owlBeforeCreate(this);
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_detail);
//         NightOwl.owlAfterCreate(this);
// 
//         Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
//         setSupportActionBar(toolbar);
//         if (getSupportActionBar() != null) getSupportActionBar().setDisplayShowHomeEnabled(true);
//     }
// 
//     @Override
//     protected void onResume() {
//         super.onResume();
//         NightOwl.owlResume(this);
//     }
// 
//     @Override
//     public boolean onOptionsItemSelected(MenuItem item) {
//         switch (item.getItemId()){
//             case android.R.id.home: this.finish(); return true;
//         }
//         return super.onOptionsItemSelected(item);
//     }
// }
// 
// Path: app/src/main/java/com/asha/nightowl/DemoUtil.java
// public static int fetchFakeImage(int positon){
// 
//     return FakeImage[positon % FakeImage.length];
// }


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.asha.nightowl.DetailActivity;
import com.asha.nightowl.R;
import static com.asha.nightowl.DemoUtil.fetchFakeImage;
        return fragment;
    }

    public RecyclerViewFragment() {
    }
    RecyclerView recyclerView;
    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        recyclerView = (RecyclerView) view.findViewById(R.id.recyclerView);
        recyclerView.setLayoutManager(new LinearLayoutManager(view.getContext()));
        recyclerView.setAdapter(new DemoAdapter());
    }

    @Override
    public void onResume() {
        super.onResume();
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        return inflater.inflate(R.layout.fragment_recycler_view, container, false);
    }
    public static class VH extends RecyclerView.ViewHolder{
        ImageView mImageView;
        public VH(View itemView) {
            super(itemView);
            itemView.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
// Path: app/src/main/java/com/asha/nightowl/DetailActivity.java
// public class DetailActivity extends AppCompatActivity {
// 
//     public static void launch(Context context){
//         Intent i = new Intent(context,DetailActivity.class);
//         context.startActivity(i);
//     }
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         NightOwl.owlBeforeCreate(this);
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_detail);
//         NightOwl.owlAfterCreate(this);
// 
//         Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
//         setSupportActionBar(toolbar);
//         if (getSupportActionBar() != null) getSupportActionBar().setDisplayShowHomeEnabled(true);
//     }
// 
//     @Override
//     protected void onResume() {
//         super.onResume();
//         NightOwl.owlResume(this);
//     }
// 
//     @Override
//     public boolean onOptionsItemSelected(MenuItem item) {
//         switch (item.getItemId()){
//             case android.R.id.home: this.finish(); return true;
//         }
//         return super.onOptionsItemSelected(item);
//     }
// }
// 
// Path: app/src/main/java/com/asha/nightowl/DemoUtil.java
// public static int fetchFakeImage(int positon){
// 
//     return FakeImage[positon % FakeImage.length];
// }


// Path: app/src/main/java/com/asha/nightowl/fragments/RecyclerViewFragment.java
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.asha.nightowl.DetailActivity;
import com.asha.nightowl.R;
import static com.asha.nightowl.DemoUtil.fetchFakeImage;

        return fragment;
    }

    public RecyclerViewFragment() {
    }
    RecyclerView recyclerView;
    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        recyclerView = (RecyclerView) view.findViewById(R.id.recyclerView);
        recyclerView.setLayoutManager(new LinearLayoutManager(view.getContext()));
        recyclerView.setAdapter(new DemoAdapter());
    }

    @Override
    public void onResume() {
        super.onResume();
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        return inflater.inflate(R.layout.fragment_recycler_view, container, false);
    }
    public static class VH extends RecyclerView.ViewHolder{
        ImageView mImageView;
        public VH(View itemView) {
            super(itemView);
            itemView.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    DetailActivity.launch(v.getContext());