|
|
@ -46,10 +46,12 @@ public class DoctorActivity extends BaseActivity { |
|
|
|
private EditText et_search; |
|
|
|
private EditText et_search; |
|
|
|
private Handler handler = new Handler(); |
|
|
|
private Handler handler = new Handler(); |
|
|
|
List<GetNearDoctorApi.DoctorInfo.MemberBean> list = new ArrayList<>(); |
|
|
|
List<GetNearDoctorApi.DoctorInfo.MemberBean> list = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
public static void StartActivity(Context context) { |
|
|
|
public static void StartActivity(Context context) { |
|
|
|
Intent intent = new Intent(context, DoctorActivity.class); |
|
|
|
Intent intent = new Intent(context, DoctorActivity.class); |
|
|
|
context.startActivity(intent); |
|
|
|
context.startActivity(intent); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected void onCreate(@Nullable Bundle savedInstanceState) { |
|
|
|
protected void onCreate(@Nullable Bundle savedInstanceState) { |
|
|
|
super.onCreate(savedInstanceState); |
|
|
|
super.onCreate(savedInstanceState); |
|
|
@ -106,6 +108,7 @@ public class DoctorActivity extends BaseActivity { |
|
|
|
recyclerView.setAdapter(doctorAdapter); |
|
|
|
recyclerView.setAdapter(doctorAdapter); |
|
|
|
recyclerView.addItemDecoration(new LinearSpacingItemDecoration(DoctorActivity.this, 14)); |
|
|
|
recyclerView.addItemDecoration(new LinearSpacingItemDecoration(DoctorActivity.this, 14)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private Runnable searchRunnable = new Runnable() { |
|
|
|
private Runnable searchRunnable = new Runnable() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
public void run() { |
|
|
@ -129,7 +132,8 @@ public class DoctorActivity extends BaseActivity { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void onSucceed(HttpData<ApiResponse<GetNearDoctorApi.DoctorInfo>> stringHttpData) { |
|
|
|
public void onSucceed(HttpData<ApiResponse<GetNearDoctorApi.DoctorInfo>> stringHttpData) { |
|
|
|
LogUtils.e("成功:" + stringHttpData); |
|
|
|
LogUtils.e("成功:" + stringHttpData); |
|
|
|
if (stringHttpData.getData().getCode() == 200) { |
|
|
|
if (stringHttpData.isRequestSucceed()) { |
|
|
|
|
|
|
|
if (stringHttpData.getData().isInnerRequestSucceed()) { |
|
|
|
List<GetNearDoctorApi.DoctorInfo.MemberBean> doctorInfo = stringHttpData.getData().getData().getMember(); |
|
|
|
List<GetNearDoctorApi.DoctorInfo.MemberBean> doctorInfo = stringHttpData.getData().getData().getMember(); |
|
|
|
if (doctorInfo == null) { |
|
|
|
if (doctorInfo == null) { |
|
|
|
return; |
|
|
|
return; |
|
|
@ -146,7 +150,6 @@ public class DoctorActivity extends BaseActivity { |
|
|
|
|
|
|
|
|
|
|
|
doctorAdapter.notifyDataSetChanged(); |
|
|
|
doctorAdapter.notifyDataSetChanged(); |
|
|
|
if (type == 0) { |
|
|
|
if (type == 0) { |
|
|
|
recyclerView.requestFocus(); |
|
|
|
|
|
|
|
recyclerView.post(new Runnable() { |
|
|
|
recyclerView.post(new Runnable() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
public void run() { |
|
|
@ -155,7 +158,6 @@ public class DoctorActivity extends BaseActivity { |
|
|
|
} |
|
|
|
} |
|
|
|
View view = recyclerView.getLayoutManager().findViewByPosition(selectPostion); |
|
|
|
View view = recyclerView.getLayoutManager().findViewByPosition(selectPostion); |
|
|
|
if (view != null) { |
|
|
|
if (view != null) { |
|
|
|
recyclerView.requestFocus(); |
|
|
|
|
|
|
|
view.requestFocus(); |
|
|
|
view.requestFocus(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -163,6 +165,8 @@ public class DoctorActivity extends BaseActivity { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|