Android Open Source - Android-Project-Manager Content Task






From Project

Back to project page Android-Project-Manager.

License

The source code is released under:

GNU General Public License

If you think the Android project Android-Project-Manager 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.vaquerosisd.projectmanager;
/* ww  w  .  ja  v  a 2s . c o m*/
import com.vaquerosisd.fragments.TaskDescriptionFragment;
import com.vaquerosisd.fragments.VideoNotesFragment;
import com.vaquerosisd.fragments.VoiceNotesFragment;
import com.vaquerosisd.utils.TabListener;

import android.app.ActionBar;
import android.app.ActionBar.Tab;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.NavUtils;
import android.view.MenuItem;

public class ContentTask extends Activity {
  Bundle bundle;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    
    //Get projectId and projectName from ProjectList
    bundle = getIntent().getExtras();

      // setup action bar for tabs
      ActionBar actionBar = getActionBar();
      actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
      actionBar.setDisplayShowTitleEnabled(false);

      Tab tab = actionBar.newTab();
      tab.setText("Description");
      tab.setTag(bundle);
      tab.setTabListener(new TabListener<TaskDescriptionFragment>(this, "Description", TaskDescriptionFragment.class));
      actionBar.addTab(tab);

      tab = actionBar.newTab();
      tab.setText("Voice Notes");
      tab.setTag(bundle);
      tab.setTabListener(new TabListener<VoiceNotesFragment>(this, "Voice Notes", VoiceNotesFragment.class));
      actionBar.addTab(tab);
      
      tab = actionBar.newTab();
      tab.setText("Videos");
      tab.setTag(bundle);
      tab.setTabListener(new TabListener<VideoNotesFragment>(this, "Videos", VideoNotesFragment.class));
      actionBar.addTab(tab);
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      switch (item.getItemId()) {
      
      // Respond to the action bar's Up/Home button
      case android.R.id.home:
        Intent navigationIntent = NavUtils.getParentActivityIntent(this);
      navigationIntent.putExtra("ProjectID", bundle.getInt("ProjectId"));
      navigationIntent.putExtra("ProjectName", bundle.getString("ProjectName"));
          NavUtils.navigateUpTo(this, navigationIntent);
          return true;
      }
      return super.onOptionsItemSelected(item);
  }
}




Java Source Code List

com.vaquerosisd.adapters.ProjectListViewAdapter.java
com.vaquerosisd.adapters.TaskListViewAdapter.java
com.vaquerosisd.adapters.VideoNoteGridViewAdapter.java
com.vaquerosisd.adapters.VoiceNoteGridViewAdapter.java
com.vaquerosisd.database.DatabaseHelper.java
com.vaquerosisd.database.ProjectOperations.java
com.vaquerosisd.dialog.CustomStatus.java
com.vaquerosisd.dialog.DatePickerFragment.java
com.vaquerosisd.dialog.DeleteDialog.java
com.vaquerosisd.dialog.DeletePhotoDialog.java
com.vaquerosisd.dialog.DeleteTaskDialog.java
com.vaquerosisd.dialog.EditProject.java
com.vaquerosisd.fragments.TaskDescriptionFragment.java
com.vaquerosisd.fragments.VideoNotesFragment.java
com.vaquerosisd.fragments.VoiceNotesFragment.java
com.vaquerosisd.object.JsonWrapper.java
com.vaquerosisd.object.PhotoRef.java
com.vaquerosisd.object.Project.java
com.vaquerosisd.object.Task.java
com.vaquerosisd.object.User.java
com.vaquerosisd.object.WebServiceManager.java
com.vaquerosisd.projectmanager.About.java
com.vaquerosisd.projectmanager.ContentTask.java
com.vaquerosisd.projectmanager.Login.java
com.vaquerosisd.projectmanager.MainActivity.java
com.vaquerosisd.projectmanager.NewAccount.java
com.vaquerosisd.projectmanager.NewProject.java
com.vaquerosisd.projectmanager.NewTask.java
com.vaquerosisd.projectmanager.OnSwipeListener.java
com.vaquerosisd.projectmanager.PhotoManager.java
com.vaquerosisd.projectmanager.ProjectList.java
com.vaquerosisd.projectmanager.TaskList.java
com.vaquerosisd.projectmanager.WebserviceCallback.java
com.vaquerosisd.utils.FileOperations.java
com.vaquerosisd.utils.OnSwipeListener.java
com.vaquerosisd.utils.SpinnerUtil.java
com.vaquerosisd.utils.TabListener.java