Android Open Source - Quiet-Hours Quiet Hours






From Project

Back to project page Quiet-Hours.

License

The source code is released under:

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions...

If you think the Android project Quiet-Hours 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 net.sturmen.quiet.hours;
/*  w  ww. j  a v a2s. co m*/
import android.os.Bundle;
import android.app.Activity;
import android.app.FragmentTransaction;
import android.view.Menu;
import android.view.View;




public class QuietHours extends Activity {

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.fragment_quiet_hours);
    FragmentTransaction transaction = getFragmentManager().beginTransaction().add(android.R.id.content, new IntroFragment());
    transaction.commit();
  }

  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.activity_quiet_hours, menu);
    return true;
  }
  public void openSettings(View view){
    // Display the fragment as the main content.
    FragmentTransaction transaction = getFragmentManager().beginTransaction().replace(android.R.id.content, new SettingsFragment());
    transaction.addToBackStack(null);
    transaction.commit();
  }
}




Java Source Code List

net.sturmen.quiet.hours.IntroFragment.java
net.sturmen.quiet.hours.PhoneStateListener.java
net.sturmen.quiet.hours.QuietHours.java
net.sturmen.quiet.hours.SettingsFragment.java