Android Open Source - Parcial2 Mostrar






From Project

Back to project page Parcial2.

License

The source code is released under:

CC0 1.0 Universal Statement of Purpose The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent...

If you think the Android project Parcial2 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.ness.parcial2;
/* w  w  w . j  a v a2  s  . c  o m*/
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.TextView;

public class Mostrar extends Activity {
  TextView ts, tr, tm, td;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_mostrar);
    
    ts = (TextView) findViewById(R.id.ts);
    tr = (TextView) findViewById(R.id.tr);
    tm = (TextView) findViewById(R.id.tm);
    td = (TextView) findViewById(R.id.td);
    
    Bundle bl = this.getIntent().getExtras();
    
    ts.setText(""+bl.getDouble("suma"));
    tr.setText(""+bl.getDouble("resta"));
    tm.setText(""+bl.getDouble("multi"));
    td.setText(""+bl.getDouble("divi"));
  }

  public void regresar(View v){
    this.finish();
  }
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.mostrar, menu);
    return true;
  }

}




Java Source Code List

com.ness.parcial2.MainActivity.java
com.ness.parcial2.Mostrar.java