|
|
@ -20,9 +20,17 @@ public class SearchEntryActivity extends AppCompatActivity implements CardStackV
|
|
|
|
Integer[] color = {
|
|
|
|
Integer[] color = {
|
|
|
|
R.color.holo_blue_bright,
|
|
|
|
R.color.holo_blue_bright,
|
|
|
|
R.color.holo_orange_light,
|
|
|
|
R.color.holo_orange_light,
|
|
|
|
// R.color.holo_purple,
|
|
|
|
R.color.holo_purple,
|
|
|
|
// R.color.holo_red_light
|
|
|
|
R.color.holo_red_light,
|
|
|
|
|
|
|
|
// R.color.holo_blue_dark,
|
|
|
|
|
|
|
|
// R.color.holo_orange_dark,
|
|
|
|
|
|
|
|
// R.color.holo_blue_dark,
|
|
|
|
|
|
|
|
// R.color.holo_gray_bright,
|
|
|
|
|
|
|
|
// R.color.holo_orange_light,
|
|
|
|
|
|
|
|
// R.color.holo_red_dark
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
String[] name = {"数据结构","计算机网络","编译原理","C语言","算法设计","FPGA编程"};
|
|
|
|
String[] name = {"数据结构","计算机网络","编译原理","C语言","算法设计","FPGA编程"};
|
|
|
|
String[] scores = {"77","87","65","98","74","80"};
|
|
|
|
String[] scores = {"77","87","65","98","74","80"};
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -54,18 +62,21 @@ public class SearchEntryActivity extends AppCompatActivity implements CardStackV
|
|
|
|
* 每种不同的情况对应不同的状态码,用接口实现状态码
|
|
|
|
* 每种不同的情况对应不同的状态码,用接口实现状态码
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
List<List<ContentData>> lists=new LinkedList<>();
|
|
|
|
List<List<ContentData>> lists=new LinkedList<>();
|
|
|
|
|
|
|
|
Integer[] new_color;
|
|
|
|
|
|
|
|
|
|
|
|
if(SearchServiceGet.code==DiseaseToSymptom){
|
|
|
|
if(SearchServiceGet.code==DiseaseToSymptom){
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* //返回的是病症
|
|
|
|
* //返回的是病症
|
|
|
|
* 标题就是病的名字,内容就是病症。lists就是病名,list就是病症
|
|
|
|
* 标题就是病的名字,内容就是病症。lists就是病名,list就是病症
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
System.out.println("size="+SearchServiceGet.content.size());
|
|
|
|
for(int i=0;i<SearchServiceGet.content.size();i++){
|
|
|
|
for(int i=0;i<SearchServiceGet.content.size();i++){
|
|
|
|
|
|
|
|
System.out.println("content="+SearchServiceGet.content.get(i));
|
|
|
|
List<ContentData> list=new LinkedList<>();
|
|
|
|
List<ContentData> list=new LinkedList<>();
|
|
|
|
list.add(new ContentData(SearchServiceGet.content.get(i)));
|
|
|
|
list.add(new ContentData(SearchServiceGet.content.get(i)));
|
|
|
|
lists.add(list);
|
|
|
|
lists.add(list);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
new_color=new Integer[1];
|
|
|
|
}else if(SearchServiceGet.code==DiseaseToMedicines){
|
|
|
|
}else if(SearchServiceGet.code==DiseaseToMedicines){
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* //返回的是结解决的多种药品方法
|
|
|
|
* //返回的是结解决的多种药品方法
|
|
|
@ -73,10 +84,10 @@ public class SearchEntryActivity extends AppCompatActivity implements CardStackV
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
List<ContentData> list=new LinkedList<>();
|
|
|
|
List<ContentData> list=new LinkedList<>();
|
|
|
|
for(int i=0;i<SearchServiceGet.content.size();i++){
|
|
|
|
for(int i=0;i<SearchServiceGet.content.size();i++){
|
|
|
|
list.add(new ContentData("我是您的用法哦~请您看看我嘞"));
|
|
|
|
list.add(new ContentData("我是您的用法哦~请您看看我嘞\n我无比的期待您的光临嘞\n我们没有连数据呢,马上就有嘞!"));
|
|
|
|
lists.add(list);
|
|
|
|
lists.add(list);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
new_color=new Integer[SearchServiceGet.content.size()];
|
|
|
|
}else if(SearchServiceGet.code==MedicineToOperation) {
|
|
|
|
}else if(SearchServiceGet.code==MedicineToOperation) {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* //返回的是药的用法
|
|
|
|
* //返回的是药的用法
|
|
|
@ -87,7 +98,7 @@ public class SearchEntryActivity extends AppCompatActivity implements CardStackV
|
|
|
|
list.add(new ContentData(SearchServiceGet.content.get(i)));
|
|
|
|
list.add(new ContentData(SearchServiceGet.content.get(i)));
|
|
|
|
lists.add(list);
|
|
|
|
lists.add(list);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
new_color=new Integer[1];
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* //返回的是药的主治症状
|
|
|
|
* //返回的是药的主治症状
|
|
|
@ -98,10 +109,14 @@ public class SearchEntryActivity extends AppCompatActivity implements CardStackV
|
|
|
|
list.add(new ContentData(SearchServiceGet.content.get(i)));
|
|
|
|
list.add(new ContentData(SearchServiceGet.content.get(i)));
|
|
|
|
lists.add(list);
|
|
|
|
lists.add(list);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
new_color=new Integer[1];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(int i=0;i<new_color.length;i++){
|
|
|
|
|
|
|
|
new_color[i]=color[i];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// adapter.updateData(Arrays.asList(new_color),lists);
|
|
|
|
adapter.updateData(Arrays.asList(color),lists);
|
|
|
|
adapter.updateData(Arrays.asList(color),lists);
|
|
|
|
mCardStack.setAnimatorAdapter(new AllMoveDownAnimatorAdapter(mCardStack));
|
|
|
|
mCardStack.setAnimatorAdapter(new AllMoveDownAnimatorAdapter(mCardStack));
|
|
|
|
mCardStack.setAnimatorAdapter(new UpDownAnimatorAdapter(mCardStack));
|
|
|
|
mCardStack.setAnimatorAdapter(new UpDownAnimatorAdapter(mCardStack));
|
|
|
|