Okay, I decided that using TabHost would be nice in my little app. However, under Android 6.0+, TabActivity and several others have been deprecated. So I have written this:
public class TabMain extends Activity{
@Override
protected void onCreate(Bundle bundle){
super.onCreate(bundle);
setContentView(R.layout.tab_main);
TabHost tabHost = (TabHost)findViewById(R.id.tab_main_tabhost);
tabHost.setup();//several lines here....}}
And when I run this code, IDE throws me an RuntimtException: "java.lang.IllegalStateException: Did you forget to call 'public void setup(LocalActivityManager activityGroup)'?" And I found out that ActivityGroup is also deprecated. How should I bypass this?
try this
in your activity
method is