Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class TestFragment : Fragment() {
- override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
- return inflater.inflate(R.layout.fragment_test, container, false)
- }
- }
- class TestActivity : AppCompatActivity() {
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- setContentView(R.layout.activity_test)
- supportFragmentManager
- .beginTransaction()
- .replace(R.id.container, TestFragment())
- .commit()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement