Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Final project done #3

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
android:roundIcon="@mipmap/ic_launcher_custom"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".prescription"></activity>
<activity android:name=".fourthactivity"></activity>
<activity android:name=".prescription" />
<activity android:name=".FRONTACTIVITY" />
<activity android:name=".MainActivity">
<intent-filter>
Expand Down
26 changes: 18 additions & 8 deletions app/src/main/java/com/example/voiceprescription/FRONTACTIVITY.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
Expand All @@ -14,6 +15,10 @@

public class FRONTACTIVITY extends AppCompatActivity implements AdapterView.OnItemSelectedListener
{
String user;
String age;
EditText name;
EditText ag;

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand All @@ -24,10 +29,13 @@ protected void onCreate(Bundle savedInstanceState) {
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner.setAdapter(adapter);
spinner.setOnItemSelectedListener(this);
EditText name =(EditText) findViewById(R.id.editText);
EditText age =(EditText) findViewById(R.id.editText1);
Spinner gen = (Spinner) findViewById(R.id.spinner);
Button pro = (Button)findViewById(R.id.button);
name = findViewById(R.id.editText);
ag = findViewById(R.id.editText1);
Spinner gen = findViewById(R.id.spinner);
Button pro = findViewById(R.id.button);




pro.setOnClickListener (new View.OnClickListener() {
@Override
Expand All @@ -36,6 +44,12 @@ public void onClick(View v)


Intent in= new Intent(FRONTACTIVITY.this, prescription.class);
user = name.getText().toString();
age= ag.getText().toString();

in.putExtra("Name",user);
in.putExtra("Age",age);

startActivity(in);

}
Expand All @@ -52,9 +66,5 @@ public void onItemSelected(AdapterView<?> parent, View view, int position, long
public void onNothingSelected(AdapterView<?> parent) {

}
public void text1(View view)
{


}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
package com.example.voiceprescription;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

public class fourthactivity extends AppCompatActivity {

TextView tv;
String st;
TextView tv1;
String st1;

TextView tv2;
String st2;

TextView tv3;
String st3;

TextView tv4;
String st4;

TextView tv5;
String st5;

TextView tv6;
String st6;


TextView tv7;
String st7;



@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_fourthactivity);

tv=findViewById(R.id.textView5);
st= getIntent().getStringExtra("Name1");
Log.i("TAG",st);
tv.setText(st);

tv1 =findViewById(R.id.textView8);
st1=getIntent().getStringExtra("Age1");
tv1.setText(st1);



tv2 =findViewById(R.id.diag);
st2=getIntent().getStringExtra("Diag");
tv2.setText(st2);

tv3 =findViewById(R.id.sym);
st3=getIntent().getStringExtra("sym");
tv3.setText(st3);

tv4 =findViewById(R.id.drg);
st4=getIntent().getStringExtra("drug");
tv4.setText(st4);


tv5 =findViewById(R.id.dos);
st5=getIntent().getStringExtra("dosages");
tv5.setText(st5);

tv6 =findViewById(R.id.per);
st6=getIntent().getStringExtra("con");
tv6.setText(st6);


tv7 =findViewById(R.id.adv);
st7=getIntent().getStringExtra("adv");
tv7.setText(st7);




}
}
Loading