# Conflicts:
#	cmkg/pom.xml
#	cmkg/src/main/java/com/cmkg/cmkg/CmkgApplication.java
#	cmkg/src/main/java/com/cmkg/cmkg/Controller/QuestionController.java
#	cmkg/src/main/java/com/cmkg/cmkg/database/ReturnData.java
#	cmkg/src/main/java/com/cmkg/cmkg/node/medicine.java
#	cmkg/src/main/java/com/cmkg/cmkg/process/ModelProcess.java
#	cmkg/src/main/java/com/cmkg/cmkg/repository/MedicineRespository.java
#	cmkg/src/main/java/com/cmkg/cmkg/repository/QuestionRespository.java
#	cmkg/src/main/java/com/cmkg/cmkg/server/QuestionService.java
#	cmkg/src/main/java/com/cmkg/cmkg/server/impl/QuestionServiceImpl.java
#	cmkg/src/main/resources/application.properties
master
hanxueqing 5 years ago
parent 35b1e60173
commit cd21fbca9b

@ -81,7 +81,6 @@ public class SearchEntryActivity extends AppCompatActivity implements CardStackV
Log.i("response+++++",response+"返回值"); Log.i("response+++++",response+"返回值");
try { try {
int code = response.getCode(); int code = response.getCode();
Log.i("code:",""+code); Log.i("code:",""+code);
String message = response.getMsg(); String message = response.getMsg();
@ -189,9 +188,7 @@ public class SearchEntryActivity extends AppCompatActivity implements CardStackV
/** /**
* nm * nm
*/ */
TextView textView=findViewById(R.id.asscoiate_entry); texts[0]=response.getMsg()+"应该吃什么药";
textView.setText(response.getMsg()+"应该吃什么药");
texts[0]=(String)textView.getText();
model_Text=Model_Symptom; model_Text=Model_Symptom;
}else if(response.getCode()==DiseaseToMedicines){ }else if(response.getCode()==DiseaseToMedicines){
/** /**
@ -200,10 +197,8 @@ public class SearchEntryActivity extends AppCompatActivity implements CardStackV
*/ */
Random r=new Random(); Random r=new Random();
for(int i=0;i<3;i++) { for(int i=0;i<3;i++) {
TextView textView = findViewById(R.id.asscoiate_entry);
index[i] = r.nextInt(9) + 1; index[i] = r.nextInt(9) + 1;
textView.setText(content.get(index[i]) + "能治什么病症"); texts[i]=content.get(index[i])+"能治什么病症";
texts[i]=(String)textView.getText();
} }
model_Text=Model_Medicines; model_Text=Model_Medicines;
}else if(response.getCode()==MedicineToOperation){ }else if(response.getCode()==MedicineToOperation){
@ -211,21 +206,18 @@ public class SearchEntryActivity extends AppCompatActivity implements CardStackV
* *
* nhm * nhm
*/ */
TextView textView_1=findViewById(R.id.asscoiate_entry); texts[0]=response.getMsg()+"能治什么病";
textView_1.setText(response.getMsg()+"能治什么病");
texts[0]=(String)textView_1.getText();
model_Text=Model_Function; model_Text=Model_Function;
}else { }else {
/** /**
* *
* nhm * nhm
*/ */
TextView textView=findViewById(R.id.asscoiate_entry); texts[0]=response.getMsg()+"的用法";
textView.setText(response.getMsg()+"的用法");
texts[0]=(String)textView.getText();
model_Text=Model_Operation; model_Text=Model_Operation;
} }
ArrayAdapter<String> view_adapter = new ArrayAdapter<String>(SearchEntryActivity.this,android.R.layout.simple_list_item_1, texts);
ArrayAdapter<String> view_adapter = new ArrayAdapter<String>(SearchEntryActivity.this,R.layout.list_view, texts);
ListView listView=findViewById(R.id.listview_group); ListView listView=findViewById(R.id.listview_group);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override @Override

@ -19,25 +19,28 @@
android:textSize="24sp" android:textSize="24sp"
android:text="你可能感兴趣" android:text="你可能感兴趣"
android:textStyle="bold" android:textStyle="bold"
android:paddingLeft="50dp" android:paddingLeft="100dp"
android:paddingTop="100dp" android:paddingTop="150dp"
android:id="@+id/asscoiate_text" android:id="@+id/asscoiate_text"
/> />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="14sp" android:paddingLeft="20dp"
android:paddingLeft="50dp"
android:paddingTop="30dp"
android:background="@color/holo_blue_light"
android:id="@+id/asscoiate_entry" android:id="@+id/asscoiate_entry"
/> />
<ListView <ListView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingLeft="50dp" android:paddingTop="40dp"
android:paddingTop="50dp" android:paddingLeft="20dp"
android:background="@color/holo_blue_light" android:divider="@null"
android:id="@+id/listview_group"/> android:id="@+id/listview_group"
android:textSize="16sp"
android:textColor="#ff000000"
android:shadowDx="4"
android:shadowDy="4"
android:shadowRadius="2"
/>
</LinearLayout> </LinearLayout>

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/TextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:padding="10dp"
android:textColor="#FF4500"
android:shadowDx="4"
android:shadowDy="4"
android:shadowRadius="2"
/>

@ -33,4 +33,8 @@
<!-- A really bright Holo shade of gray --> <!-- A really bright Holo shade of gray -->
<color name="holo_gray_bright">#33CCCCCC</color> <color name="holo_gray_bright">#33CCCCCC</color>
<color name="my_color_dark_pink">#FF1493</color>
<color name="my_color_green_light">#3CB371</color>
<color name="my_color_dark_yellow">#FFD700</color>
</resources> </resources>
Loading…
Cancel
Save