找传奇、传世资源到传世资源站!

好例android sqlite数据库操作_DataStorage

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

from clipboardfrom clipboardpackage com.example.datastorage;import android.os.Bundle;import android.app.Activity;import android.app.TabActivity;import android.content.Intent;import android.view.Menu;import android.widget.TabHost;import android.widget.TabHost.TabSpec;public class MainActivity extends TabActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TabHost tabHost = (TabHost) findViewById(android.R.id.tabhost);/** tid# is firstTabSpec Id. Its used to access outside. */TabSpec tabAddMsg = tabHost.newTabSpec("tid1");TabSpec tabDisMsg = tabHost.newTabSpec("tid2");TabSpec tabAddMsgSQL = tabHost.newTabSpec("tid3");TabSpec tabDisMsgSQL = tabHost.newTabSpec("tid4");tabAddMsg.setIndicator(getResources().getString(R.string.tab_add),getResources().getDrawable(R.drawable.ic_tab_dir)).setContent(new Intent(this, AddMsg.class));tabDisMsg.setIndicator(getResources().getString(R.string.tab_dis),getResources().getDrawable(R.drawable.ic_tab_pic)).setContent(new Intent(this, DisMsg.class));tabAddMsgSQL.setIndicator(getResources().getString(R.string.tab_add),getResources().getDrawable(R.drawable.ic_tab_dir)).setContent(new Intent(this, AddMsgSQL.class));tabDisMsgSQL.setIndicator(getResources().getString(R.string.tab_dis),getResources().getDrawable(R.drawable.ic_tab_pic)).setContent(new Intent(this, DisMsgSQL.class));tabHost.addTab(tabAddMsg);tabHost.addTab(tabDisMsg);tabHost.addTab(tabAddMsgSQL);tabHost.addTab(tabDisMsgSQL); } }

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复