Android Open Source - AndroidModelView Dummy Detail Activity






From Project

Back to project page AndroidModelView.

License

The source code is released under:

MIT License

If you think the Android project AndroidModelView listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.kharcustom.testframework;
/*from ww  w.ja  v  a  2 s  .  co  m*/
import com.khar.isframework.DataAccess;
import com.khar.isframework.Model;
import com.khar.isframework.SqliteDataAccess;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;

public class DummyDetailActivity extends Activity {
  Model m;
  DataAccess dataAccess;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    dataAccess = new SqliteDataAccess(getApplicationContext());
    
    m=getIntent().getParcelableExtra("model");
    m.setDataAccess(dataAccess);
    m.setScenario(Model.VIEW);
    View v = m.getView(this, Model.VIEW);
    setContentView(v);
  }
  @Override
  public boolean onMenuItemSelected(int featureId, MenuItem item) {
    switch(item.getItemId()){
    case R.id.action_edit:
      m.setScenario(Model.EDIT);
      Intent i = new Intent(this, DummyEditForm.class);
      i.putExtra("model", m);
      startActivity(i);
      return true;
    case R.id.action_delete:
      m.delete();
      finish();
      return true;
    }
    return true;
  }

  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.dummy_detail, menu);
    return true;
  }

}




Java Source Code List

com.khar.isframework.DataAccess.java
com.khar.isframework.FlexibleModel.java
com.khar.isframework.ModelAdapter.java
com.khar.isframework.ModelListFragment.java
com.khar.isframework.Model.java
com.khar.isframework.MySqliteHelper.java
com.khar.isframework.Query.java
com.khar.isframework.SqliteDataAccess.java
com.khar.isframework.formbuilder.BasicTheme.java
com.khar.isframework.formbuilder.FormBuilder.java
com.khar.isframework.formbuilder.Theme.java
com.khar.isframework.models.ibu.IbuListFragment.java
com.khar.isframework.models.ibu.Ibu.java
com.khar.isframework.models.rs.RSDetailFragment.java
com.khar.isframework.models.rs.RSListFragment.java
com.khar.isframework.models.rs.RumahSakit.java
com.khar.isframework.validator.BasicValidator.java
com.khar.isframework.validator.DateValidator.java
com.khar.isframework.validator.Validator.java
com.kharcustom.testframework.DummyDetailActivity.java
com.kharcustom.testframework.DummyDetailFragment.java
com.kharcustom.testframework.DummyEditForm.java
com.kharcustom.testframework.EmptyDetilFragment.java
com.kharcustom.testframework.FormTester.java
com.kharcustom.testframework.GenericForm.java
com.kharcustom.testframework.IbuDetailActivity.java
com.kharcustom.testframework.IbuDetailFragment.java
com.kharcustom.testframework.IbuListActivity.java
com.kharcustom.testframework.ModuleMenuHandler.java
com.kharcustom.testframework.dummy.DummyContent.java