|
|
@ -69,6 +69,8 @@ public class SearchEntryActivity extends AppCompatActivity implements CardStackV
|
|
|
|
public void onItemExpend(boolean expend) {
|
|
|
|
public void onItemExpend(boolean expend) {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void init(Bundle bundle)
|
|
|
|
void init(Bundle bundle)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
@ -78,6 +80,7 @@ public class SearchEntryActivity extends AppCompatActivity implements CardStackV
|
|
|
|
|
|
|
|
|
|
|
|
//获取response后,将这个json数据解析
|
|
|
|
//获取response后,将这个json数据解析
|
|
|
|
ReturnData response = (ReturnData) bundle.getSerializable("msg");
|
|
|
|
ReturnData response = (ReturnData) bundle.getSerializable("msg");
|
|
|
|
|
|
|
|
System.out.println("code=!!!!!!!!1"+response.getCode());
|
|
|
|
Log.i("response+++++",response+"返回值");
|
|
|
|
Log.i("response+++++",response+"返回值");
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
@ -93,6 +96,7 @@ public class SearchEntryActivity extends AppCompatActivity implements CardStackV
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
List<ContentData> list = new LinkedList<>();
|
|
|
|
List<ContentData> list = new LinkedList<>();
|
|
|
|
list.add(new ContentData((String)response.getData()));
|
|
|
|
list.add(new ContentData((String)response.getData()));
|
|
|
|
|
|
|
|
Log.i("response.getData",(String)response.getData());
|
|
|
|
lists.add(list);
|
|
|
|
lists.add(list);
|
|
|
|
new_color=new Integer[1];
|
|
|
|
new_color=new Integer[1];
|
|
|
|
}else if(code==DiseaseToMedicines){
|
|
|
|
}else if(code==DiseaseToMedicines){
|
|
|
@ -126,7 +130,8 @@ public class SearchEntryActivity extends AppCompatActivity implements CardStackV
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
List<ContentData> list = new LinkedList<>();
|
|
|
|
List<ContentData> list = new LinkedList<>();
|
|
|
|
JSONObject jo=(JSONObject)response.getData();
|
|
|
|
String data=(String)response.getData();
|
|
|
|
|
|
|
|
JSONObject jo=new JSONObject(data);
|
|
|
|
String medicine_symptom=jo.getString("symptom");
|
|
|
|
String medicine_symptom=jo.getString("symptom");
|
|
|
|
list.add(new ContentData(medicine_symptom));
|
|
|
|
list.add(new ContentData(medicine_symptom));
|
|
|
|
lists.add(list);
|
|
|
|
lists.add(list);
|
|
|
@ -149,10 +154,6 @@ public class SearchEntryActivity extends AppCompatActivity implements CardStackV
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(int i=0;i<new_color.length;i++){
|
|
|
|
|
|
|
|
new_color[i]=color[i];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CardStackView mCardStack = (CardStackView)findViewById(R.id.cardStackView);
|
|
|
|
CardStackView mCardStack = (CardStackView)findViewById(R.id.cardStackView);
|
|
|
|
CMKGStackAdapter adapter = new CMKGStackAdapter(this,response);
|
|
|
|
CMKGStackAdapter adapter = new CMKGStackAdapter(this,response);
|
|
|
|
mCardStack.setAdapter(adapter);
|
|
|
|
mCardStack.setAdapter(adapter);
|
|
|
@ -200,7 +201,7 @@ public class SearchEntryActivity extends AppCompatActivity implements CardStackV
|
|
|
|
index[i] = r.nextInt(9) + 1;
|
|
|
|
index[i] = r.nextInt(9) + 1;
|
|
|
|
texts[i]=content.get(index[i])+"能治什么病症";
|
|
|
|
texts[i]=content.get(index[i])+"能治什么病症";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
model_Text=Model_Medicines;
|
|
|
|
model_Text=Model_Function;
|
|
|
|
}else if(response.getCode()==MedicineToOperation){
|
|
|
|
}else if(response.getCode()==MedicineToOperation){
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 药——操作方法
|
|
|
|
* 药——操作方法
|
|
|
|