public LvSuggestAdapter(Context context, List<ReviewItem> reviewList, String patientId) { this.context = context; if (reviewList != null) this.reviewList = reviewList; else this.reviewList = new ArrayList<>(); this.patientId = patientId; mInflater = LayoutInflater.from(context); mImageLoader = ImageLoader.getInstance(context); myProgressDialog = new MyProgressDialog(context); }
@Override protected void initData(View view) { baseContext = view.getContext(); cacheUtil = new CacheUtil(baseContext); imageLoader = ImageLoader.getInstance(baseContext); myProgressDialog = new MyProgressDialog(baseContext); btn_add_medicine = (Button) view.findViewById(R.id.btn_add_medicine); lv_medicine = (ListViewForScrollView) view.findViewById(R.id.lv_medicine); sv_medicine = (ScrollView) view.findViewById(R.id.sv_medicine); sv_medicine.smoothScrollTo(0, 0); }