Back to project page on-the-hook.
The source code is released under:
MIT License
If you think the Android project on-the-hook listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.yoandinkov.onthehook; /*from w w w .ja v a 2 s .c o m*/ import java.util.List; import com.yoandinkov.onthehook.adapters.FishAdapter; import com.yoandinkov.onthehook.db.DatabaseManager; import com.yoandinkov.onthehook.db.models.FishDbModel; import android.os.Bundle; import android.app.Activity; import android.app.ListActivity; import android.view.Menu; import android.widget.ListView; import android.widget.Toast; public class DraughtActivity extends Activity { private ListView ListViewMain; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_draught); DatabaseManager.init(this); List<FishDbModel> fishes = DatabaseManager.getInstance().getAllFishesList(); this.setListViewMain((ListView)findViewById(R.id.draughtListViewMain)); FishAdapter adapter = new FishAdapter(this, R.layout.list_view_draugh_layout, fishes); this.getListViewMain().setAdapter(adapter); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.draught, menu); return true; } public ListView getListViewMain() { return ListViewMain; } public void setListViewMain(ListView listViewMain) { ListViewMain = listViewMain; } // get from db all fishes or not show no fishes yet }