I tried the TabLayout tutorial from the official developers site. I did not copy it as such and some minor changes and corrections for typos in tut.
package com.org.example;
import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;
public class HalloTabLayout extends TabActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Intent intent;
TabHost tabhost = getTabHost();
TabHost.TabSpec tabspec;
Resources res = getResources();
intent = new Intent().setClass(this, FamilyLayout.class);
tabspec = tabhost.newTabSpec("family").setIndicator("Family", res.getDrawable(R.drawable.tab_spec)).setContent(intent);
tabhost.addTab(tabspec);
tabhost.setCurrentTabByTag("family");
}
}
As a first step and make sure the code is right, I wanted one tab to be displayed.
I added FamilyLayout activity to the AndroidManifest.xml file, as well as the changes made here. Problems with Android TabHost Example
But the application continues to crash at runtime in the emulator. Any help is appreciated.
[:] .jpeg (3,5 ), . , pic . , 1600 * 900 . , .