Programa eclipse 7
-
Upload
aylin-serrano -
Category
Internet
-
view
24 -
download
3
Transcript of Programa eclipse 7
![Page 1: Programa eclipse 7](https://reader033.fdocuments.net/reader033/viewer/2022042716/55b92a14bb61eb6c5b8b4653/html5/thumbnails/1.jpg)
PROGRAMA 7Guerrero Serrano Aylin Miroslawa
Posadas Pérez Yanori Marlene
Olvera Olmos Adrián
![Page 2: Programa eclipse 7](https://reader033.fdocuments.net/reader033/viewer/2022042716/55b92a14bb61eb6c5b8b4653/html5/thumbnails/2.jpg)
![Page 3: Programa eclipse 7](https://reader033.fdocuments.net/reader033/viewer/2022042716/55b92a14bb61eb6c5b8b4653/html5/thumbnails/3.jpg)
![Page 4: Programa eclipse 7](https://reader033.fdocuments.net/reader033/viewer/2022042716/55b92a14bb61eb6c5b8b4653/html5/thumbnails/4.jpg)
![Page 5: Programa eclipse 7](https://reader033.fdocuments.net/reader033/viewer/2022042716/55b92a14bb61eb6c5b8b4653/html5/thumbnails/5.jpg)
![Page 6: Programa eclipse 7](https://reader033.fdocuments.net/reader033/viewer/2022042716/55b92a14bb61eb6c5b8b4653/html5/thumbnails/6.jpg)
![Page 7: Programa eclipse 7](https://reader033.fdocuments.net/reader033/viewer/2022042716/55b92a14bb61eb6c5b8b4653/html5/thumbnails/7.jpg)
package com.example.programa7;
import android.os.Bundle;import android.app.Activity;import android.view.Menu;import android.view.View;import android.widget.EditText;import android.widget.TextView;
public class MainActivity extends Activity {
@Overrideprotected void onCreate(Bundle
savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);
}
@Overridepublic boolean onCreateOptionsMenu(Menu menu)
{// Inflate the menu; this adds items to the action
bar if it is present.
![Page 8: Programa eclipse 7](https://reader033.fdocuments.net/reader033/viewer/2022042716/55b92a14bb61eb6c5b8b4653/html5/thumbnails/8.jpg)
getMenuInflater().inflate(R.menu.main, menu);return true;
}
public void calcular(View v){EditText
n=(EditText)findViewById(R.id.editText1);
TextView r=(TextView)findViewById(R.id.textView3);
double d=Double.parseDouble(n.getText().toString());
if(d<0){r.setText("Negativo");
}r.setText("Positivo");
}
}