Android Open Source - power-consumption-android Tips






From Project

Back to project page power-consumption-android.

License

The source code is released under:

Apache License

If you think the Android project power-consumption-android 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.wolfsoft.epower;
//from   ww  w  .j  a  v a  2 s  . c  o  m



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

public class Tips extends Activity {
  
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    
    setContentView(R.layout.tips); 
    
    // get action bar   
        ActionBar actionBar = getActionBar();
        // Enabling Up / Back navigation
        actionBar.setDisplayHomeAsUpEnabled(true);
        
   
  }

  
  public void heatcold(View v)
  {
    Intent intent2 = new Intent(Tips.this, Heatcold.class);
        startActivity(intent2);
        overridePendingTransition(R.anim.anim_slide_in_left,
                R.anim.anim_slide_out_right);
  }
  
  
  public void lighttips(View v)
  {
    Intent intent2 = new Intent(Tips.this, Lighttips.class);
        startActivity(intent2);
        overridePendingTransition(R.anim.anim_slide_in_left,
                R.anim.anim_slide_out_right);
  }
  
  public void appliancetips(View v)
  {
    Intent intent2 = new Intent(Tips.this, Appliancetips.class);
        startActivity(intent2);
        overridePendingTransition(R.anim.anim_slide_in_left,
                R.anim.anim_slide_out_right);
  }
  
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) { 
      switch (item.getItemId()) {
      case android.R.id.home:
      Intent intent = new Intent(this,MainActivity.class);
      intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
      startActivity(intent);
       overridePendingTransition(R.anim.anim_slide_in_left,
                    R.anim.anim_slide_out_right);
              default:
              return super.onOptionsItemSelected(item); 
      }
}
}




Java Source Code List

com.wolfsoft.epower.Appliancetips.java
com.wolfsoft.epower.EstimateCost.java
com.wolfsoft.epower.Heatcold.java
com.wolfsoft.epower.Lighttips.java
com.wolfsoft.epower.Links.java
com.wolfsoft.epower.MainActivity.java
com.wolfsoft.epower.Question2.java
com.wolfsoft.epower.Question3.java
com.wolfsoft.epower.Question4.java
com.wolfsoft.epower.Question5.java
com.wolfsoft.epower.Takequiz.java
com.wolfsoft.epower.Tips.java
com.wolfsoft.epower.Total.java