Android Open Source - soundheap Soundheap Activity






From Project

Back to project page soundheap.

License

The source code is released under:

Copyright (c) 2014, Nicholas Wertzberger All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are...

If you think the Android project soundheap 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.ideaheap.sound.ui;
/*from   w ww .j  a va 2s.  c o m*/
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.util.Log;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.WindowManager;
import android.widget.Toast;

import com.actionbarsherlock.app.ActionBar.Tab;
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;
import com.actionbarsherlock.view.MenuItem;
import com.ideaheap.sound.R;
import com.ideaheap.sound.context.SoundheapContext;

/**
 * The main ui of the simple audio recorder / playback / project selector.
 * This is the entry point for everything else.
 * 
 * This class is responsible for interfacing with UI elements, and calling the
 * appropriate hooks into services.
 * @author nwertzberger
 *
 */
public class SoundheapActivity extends SherlockFragmentActivity {
    private static final String TAG = SoundheapActivity.class.toString();
  private SoundheapContext context;
  private final SherlockFragmentActivity thisActivity = this;
  
  /** 
   * Ensures presence of sound repository folder. It also sets up the UI.
   * 
   */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        Log.d(TAG, "Starting Up");
        context = SoundheapContext.generateContext(this);
        context.mainController.setup();
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    }
    
    @Override
    public void onResume() {
      super.onResume();
    }
    
    @Override
    public void onPause() {
      super.onPause();
    }
    
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
      context.mainController.inflateMenu(menu);
    return super.onCreateOptionsMenu(menu);
    }
}




Java Source Code List

com.ideaheap.sound.context.SoundheapContext.java
com.ideaheap.sound.context.SoundheapException.java
com.ideaheap.sound.control.MainController.java
com.ideaheap.sound.control.PlaybackController.java
com.ideaheap.sound.control.ProjectController.java
com.ideaheap.sound.control.RecordController.java
com.ideaheap.sound.control.TabController.java
com.ideaheap.sound.control.TabListener.java
com.ideaheap.sound.service.AudioLevelListener.java
com.ideaheap.sound.service.AudioPlayService.java
com.ideaheap.sound.service.AudioRecordService.java
com.ideaheap.sound.service.AudioUpdateListener.java
com.ideaheap.sound.service.RepositoryService.java
com.ideaheap.sound.ui.PlaybackFragment.java
com.ideaheap.sound.ui.ProjectFragment.java
com.ideaheap.sound.ui.RecordFragment.java
com.ideaheap.sound.ui.SoundheapActivity.java
com.ideaheap.sound.ui.tabs.PlaybackTab.java
com.ideaheap.sound.ui.tabs.ProjectTab.java