{ const val hoge = "Sample.hoge" } fun SampleActivity.Companion.createIntent(context: Context, hoge: String): Intent = Intent(context, SampleActivity::class.java).apply { put(Keys.hoge, hoge) } fun SampleFragment.Companion.newInstance(hoge: String): SampleFragment = SampleFragment().apply { arguments = Bundle().apply { putString(Keys.hoge, hoge) } } fun SampleActivity.createFragment(): SampleFragment = SampleFragment.newInstance(intent.getStringExtra(Keys.hoge)) fun SampleFragment.parseHoge(): String = arguments.getString(Keys.hoge) ※SampleActivityͱSampleFragmentʹɺͦΕͧΕ companion object;ͱ͍͏ܗͷهࡌ͕ඞཁɻ