package com.samples.hardware.batteryusage;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class BatteryUsageActivity extends Activity 
    implements OnClickListener {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        final Button bPowerUsage = (Button)findViewById(R.id.bBatteryUsage);
        bPowerUsage.setOnClickListener(this);
    }

	@Override
	public void onClick(View arg0) {
		Intent intent = new Intent(Intent.ACTION_POWER_USAGE_SUMMARY);
		startActivity(intent);
	}
}