public class SQLView extends Activity{
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO 自動生成されたメソッド・スタブ
super.onCreate(savedInstanceState);
setContentView(R.layout.sqlview);
TextView tv = (TextView) findViewById (R.id.tvSQLinfo);
HotOrNot info = new HotOrNot(this);
info.open();
String data = info.getData();
info.close();
tv.setText(data);
}
}
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TableLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TableRow>
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="Names"
android:layout_weight="1"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="Hotness"
android:layout_weight="1"/>
</TableRow>
</TableLayout>
<TextView
android:id="@+id/tvSQLinfo"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="get info from db" />
</LinearLayout>