skip to Main Content

Android Studio – How can I use a Timer of 2 seconds inside a fragment?

This is my Fragment.kt class SplashFragment : Fragment() { override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ): View? { return inflater.inflate(R.layout.fragment_splash, container, false) } override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) // My Timer Timer().schedule(object :…

VIEW QUESTION

Android Studio – Kotlin : packageManager.getLaunchIntentForPackage() can't launch apps

I have kotlin apps program like this: package com.test.openchrome import android.content.Intent import android.net.Uri import android.os.Bundle import android.widget.Button import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) val launcher = findViewById<Button>(R.id.openchrome) launcher.setOnClickListener{ var launchIntent: Intent? =…

VIEW QUESTION
Back To Top
Search