TAB: 3개의 글
activity_main.xml MainActivity.java @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); mTabHost = (TabHost) findViewById(android.R.id.tabhost); setupTab(new TextView(this), "Tab 1"); setupTab(new TextView(this), "Tab 2"); setupTab(new TextView(this), "Tab 3"); } private void setupTab(final View view, final String tag) { ..
MainActivity.javaimport android.app.TabActivity;import android.content.Context;import android.os.Bundle;import android.view.LayoutInflater;import android.view.View;import android.widget.ImageView;import android.widget.TabHost;import android.widget.TextView; public class MainActivity extends TabActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceStat..
MainActivity.javapackage com.example.com.test; import android.app.TabActivity;import android.content.Intent;import android.os.Bundle;import android.widget.TabHost; public class MainActivity extends TabActivity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ..