-1
我是pharmD學生,剛剛在android開發中。我創建了一個應用程序,通過具體計算來計算患者的劑量。現在PharmD會輸入數據然後計算..等 我需要讓用戶可以在內部sd保存病人的病例然後在任何時候他需要看到它可以回去吧 所以首先;如何存儲我的文字如何在android項目中存儲和讀取文本?
EditText r11;
r11 = (EditText) findViewById(R.id.Result);
r11.setText(
"\n------------------" +
"\nInputs" +
"\n------------------" +
"\n\nPatient Name:" + i1 +
"\nGender:" + i4 +
"\nRace:" + i5 +
"\nRoom:" + i2 +
"\nDate:" + i3 +
"\nAge (years):" + n4 +
"\nHeight (cm):" + n5 +
"\nWeight (Kg):" + n6 +
"\nSCR (mg/dl):" + n7 +
"\nTau (hrs):" + n8 +
"\nCss Avg (mg/L):" + n9 +
"\n\n\n------------------" +
"\nAnalysis:" +
"\n------------------" +
"\n\nIdeal Body Weight:" + r8.getText().toString() + " Kg" +
"\nAdjusted body weight:" + r9.getText().toString() + " Kg" +
"\nBody Surface Area:" + Html.fromHtml(r10.getText().toString() + " m<sup><small>2</small></sup>") +
"\nBody Mass Index:" + Html.fromHtml(r12.getText().toString() + " Kg/m<sup><small>2</small></sup>") +
"\n\n\n------------------" +
"\nDigoxin TDM :" +
"\n------------------" +
"\n\nVolume of Distribution:" + r4.getText().toString() + " L" +
"\nCockcroft & Gault:" + r1.getText().toString() + " ml/min" +
"\nCockcroft & Gault(adjusted for BSA):" + Html.fromHtml(r2.getText().toString() + " ml/min/1.73m<sup><small>2</small></sup>")+
"\nDigoxin (CrCl):" + r3.getText().toString() + " L/day"+
"\nElimination Rate Constant: " + r5.getText().toString() + " h<sup><small>-1</small></sup>"+
"\nHalf Life:" + r6.getText().toString() + " hr"
);
其次;我想重新加載或閱讀它,所以用戶可以找到它!
我知道這是基本的Android開發,但我尊重任何的回答能幫助我在(代碼)
感謝提前:)
謝謝你:) – Ali