// Path: flowr/src/main/java/com/fueled/flowr/NavigationIconType.java
// public enum NavigationIconType {
//     HIDDEN,
//     HAMBURGER,
//     BACK,
//     CUSTOM
// }
// 
// Path: sample/src/main/java/com/fueled/flowr/sample/core/AbstractFragment.java
// public abstract class AbstractFragment extends AbstractFlowrFragment {
// 
//     private Disposable fragmentResultSubscription;
// 
//     private String title;
// 
//     public abstract @LayoutRes int getLayoutId();
// 
//     protected abstract void setupView(View view);
// 
//     @Override
//     public View onCreateView(LayoutInflater inflater, ViewGroup container,
//                              Bundle savedInstanceState) {
//         View view = inflater.inflate(getLayoutId(), container, false);
//         view.setClickable(true);
//         setupView(view);
//         return view;
//     }
// 
//     @Override
//     @SuppressWarnings("unchecked")
//     public void onActivityCreated(Bundle savedInstanceState) {
//         super.onActivityCreated(savedInstanceState);
//         listenToResults();
// 
//         title = getString(R.string.app_name);
//         getFlowr().syncScreenState();
//     }
// 
//     protected Flowr getFlowr() {
//         if (getActivity() != null && getActivity() instanceof AbstractActivity) {
//             return ((AbstractActivity) getActivity()).getFlowr();
//         }
// 
//         return null;
//     }
// 
//     private void listenToResults() {
//         removeFragmentResultSubscription();
//         fragmentResultSubscription = FragmentResultPublisherImpl.getInstance()
//                 .observeResultsForFragment(getFragmentId(), new Consumer<ResultResponse>() {
//                     @Override
//                     public void accept(ResultResponse resultResponse) throws Exception {
//                         onFragmentResults(resultResponse.requestCode, resultResponse.resultCode,
//                                 resultResponse.data);
//                     }
//                 });
//     }
// 
//     private void removeFragmentResultSubscription() {
//         if (fragmentResultSubscription != null && !fragmentResultSubscription.isDisposed()) {
//             fragmentResultSubscription.dispose();
//         }
//     }
// 
//     @Override
//     public String getTitle() {
//         return title;
//     }
// }


import android.view.View;
import com.fueled.flowr.NavigationIconType;
import com.fueled.flowr.annotations.DeepLink;
import com.fueled.flowr.sample.core.AbstractFragment;
package com.fueled.flowr.sample;



/**
 * Created by hussein@fueled.com on 18/05/2017.
 * Copyright (c) 2017 Fueled. All rights reserved.
 */

@DeepLink(value = "/first")
public class FirstFragment extends AbstractFragment implements View.OnClickListener {

    @Override
    public int getLayoutId() {
        return R.layout.fragment_first;
    }

    @Override
    protected void setupView(View view) {
        view.findViewById(R.id.add_stack_button).setOnClickListener(this);
    }

    @Override
    public String getTitle() {
        return "First Fragment";
    }

    @Override
// Path: flowr/src/main/java/com/fueled/flowr/NavigationIconType.java
// public enum NavigationIconType {
//     HIDDEN,
//     HAMBURGER,
//     BACK,
//     CUSTOM
// }
// 
// Path: sample/src/main/java/com/fueled/flowr/sample/core/AbstractFragment.java
// public abstract class AbstractFragment extends AbstractFlowrFragment {
// 
//     private Disposable fragmentResultSubscription;
// 
//     private String title;
// 
//     public abstract @LayoutRes int getLayoutId();
// 
//     protected abstract void setupView(View view);
// 
//     @Override
//     public View onCreateView(LayoutInflater inflater, ViewGroup container,
//                              Bundle savedInstanceState) {
//         View view = inflater.inflate(getLayoutId(), container, false);
//         view.setClickable(true);
//         setupView(view);
//         return view;
//     }
// 
//     @Override
//     @SuppressWarnings("unchecked")
//     public void onActivityCreated(Bundle savedInstanceState) {
//         super.onActivityCreated(savedInstanceState);
//         listenToResults();
// 
//         title = getString(R.string.app_name);
//         getFlowr().syncScreenState();
//     }
// 
//     protected Flowr getFlowr() {
//         if (getActivity() != null && getActivity() instanceof AbstractActivity) {
//             return ((AbstractActivity) getActivity()).getFlowr();
//         }
// 
//         return null;
//     }
// 
//     private void listenToResults() {
//         removeFragmentResultSubscription();
//         fragmentResultSubscription = FragmentResultPublisherImpl.getInstance()
//                 .observeResultsForFragment(getFragmentId(), new Consumer<ResultResponse>() {
//                     @Override
//                     public void accept(ResultResponse resultResponse) throws Exception {
//                         onFragmentResults(resultResponse.requestCode, resultResponse.resultCode,
//                                 resultResponse.data);
//                     }
//                 });
//     }
// 
//     private void removeFragmentResultSubscription() {
//         if (fragmentResultSubscription != null && !fragmentResultSubscription.isDisposed()) {
//             fragmentResultSubscription.dispose();
//         }
//     }
// 
//     @Override
//     public String getTitle() {
//         return title;
//     }
// }


// Path: sample/src/main/java/com/fueled/flowr/sample/FirstFragment.java
import android.view.View;
import com.fueled.flowr.NavigationIconType;
import com.fueled.flowr.annotations.DeepLink;
import com.fueled.flowr.sample.core.AbstractFragment;

package com.fueled.flowr.sample;



/**
 * Created by hussein@fueled.com on 18/05/2017.
 * Copyright (c) 2017 Fueled. All rights reserved.
 */

@DeepLink(value = "/first")
public class FirstFragment extends AbstractFragment implements View.OnClickListener {

    @Override
    public int getLayoutId() {
        return R.layout.fragment_first;
    }

    @Override
    protected void setupView(View view) {
        view.findViewById(R.id.add_stack_button).setOnClickListener(this);
    }

    @Override
    public String getTitle() {
        return "First Fragment";
    }

    @Override
    public NavigationIconType getNavigationIconType() {