First, the TabHost widget is a popular widget in previous versions, and supports up to the Android 2.3 (API 10) gingerbread, but later versions may warn you or may not be compatible.
TabHost may be used a lot these days, but I think it's usually composed of TabLayout and ViewPager. The link below is how to use TabLayout, so please refer to it if you need it.
What comes to mind when you look at the source is that you should connect the Intent part to the class that constitutes the first tab, not the main class.
Please refer to the link above for instructions on how to use TabHost.
© 2024 OneMinuteCode. All rights reserved.