<commit_before>package org.firezenk.kartographer.pages.page2

import android.os.Bundle
import android.support.v4.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import kotlinx.android.synthetic.main.page_view.*
import org.firezenk.kartographer.R
import org.firezenk.kartographer.SampleApplication
import org.firezenk.kartographer.library.Kartographer
import org.firezenk.kartographer.library.dsl.route
import javax.inject.Inject

/**
 * Project: Kartographer
 *
 * Created by <NAME>, aka firezenk on 14/12/17.
 * Copyright © <NAME> 2017
 */
class Page2 : Fragment() {

    @Inject lateinit var router: Kartographer

    private var counter : Int = 0

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        return View.inflate(context, R.layout.page_view, null)
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)

        counter = arguments!!.getInt("counter")

        SampleApplication.component.injectTo(this)

        text2.text = "${Page2Route.PATH}: $counter"

        text2.setOnClickListener {
            router next route<Any> {
                target = Page2Route::class
                params = mapOf("counter" to counter + 10)
                anchor = getView()!!.parent
            }
        }
    }
}<commit_msg>Clean Fragment sample<commit_after>package org.firezenk.kartographer.pages.page2

import android.os.Bundle
import android.support.v4.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import kotlinx.android.synthetic.main.page_view.*
import org.firezenk.kartographer.R
import org.firezenk.kartographer.SampleApplication
import org.firezenk.kartographer.library.Kartographer
import org.firezenk.kartographer.library.dsl.route
import javax.inject.Inject

/**
 * Project: Kartographer
 *
 * Created by <NAME>, aka firezenk on 14/12/17.
 * Copyright © <NAME> 2017
 */
class Page2 : Fragment() {

    @Inject lateinit var router: Kartographer

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        return View.inflate(context, R.layout.page_view, null)
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)

        val counter = arguments!!.getInt("counter")

        SampleApplication.component.injectTo(this)

        text2.text = "${Page2Route.PATH}: $counter"

        text2.setOnClickListener {
            router next route<Any> {
                target = Page2Route::class
                params = mapOf("counter" to counter + 10)
                anchor = getView()!!.parent
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.10179010179010178, 'fraction_numerical': 0.01368901368901369, 'mean_word_length': 3.305135951661631, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6346483', 'n_tokens_mistral': 874, 'n_tokens_neox': 807, 'n_words': 178}