Thursday, February 16, 2012

Table Layout in Tab Layout in Android


I've got a problem in Android. I'm quite new in this thing so please don't treat me so hard. So my problem is i wanna integrate a table layout in a tab layout. I wrote the code and the IDE doesn't show any problems, it install it to the emulator with no problem, but when i wanna run the application it gives me an error(unfortunately, applicaton name has stopped). And that's it. I link some code here. I thanks forward your helps.




package hu.EasyBank;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;

public class BetetAttekint extends TabActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);


TabHost tabhost=getTabHost();
TabHost.TabSpec spec;
Intent intent;

intent=new Intent().setClass(this, BetetAttekint.class);

spec=tabhost.newTabSpec("betet").setIndicator("Betétek Áttekintése").setContent(intent);
tabhost.addTab(spec);





}


}

No comments:

Post a Comment