| | |
| | | |
| | | import com.bsk.zhangbo.demoforbsk.R; |
| | | import cn.com.basic.face.base.MainActivity; |
| | | import cn.com.basic.face.discern.query.item.SupervisoryQueryItem; |
| | | import cn.com.basic.face.fragment.CheckInFragment; |
| | | import cn.com.basic.face.fragment.RegisterFragment; |
| | | import cn.com.basic.face.util.AppApi; |
| | |
| | | private int TYPE_1 = 0,TYPE_2 = 1; |
| | | private int type; |
| | | private Context context; |
| | | private List list; |
| | | public SupervisoryBottomListViewAdapter(Context context) { |
| | | this.context = context; |
| | | } |
| | |
| | | |
| | | @Override |
| | | public int getRecycleViewItemType(int position) { |
| | | |
| | | type = position%2; |
| | | switch (type){ |
| | | SupervisoryQueryItem item = (SupervisoryQueryItem)getList().get(position); |
| | | //type = position%2; |
| | | switch (item.getType()){ |
| | | case 0: |
| | | return TYPE_1; |
| | | case 1: |
| | |
| | | ImageView fragment_home_bottom_register_cell_photo = holder.findViewById(R.id.fragment_home_bottom_register_cell_photo); |
| | | TextView fragment_home_bottom_register_cell_to_register = holder.findViewById(R.id.fragment_home_bottom_register_cell_to_register); |
| | | |
| | | if (data instanceof CheckInQueryItem) { |
| | | final CheckInQueryItem item = (CheckInQueryItem)data; |
| | | if (data instanceof SupervisoryQueryItem) { |
| | | final SupervisoryQueryItem item = (SupervisoryQueryItem)data; |
| | | fragment_home_bottom_register_cell_photo.setImageURI(Uri.parse(AppApi.IMAGEURL_BASE +item.getImagePath())); |
| | | fragment_home_bottom_register_cell_to_register.setOnClickListener(new View.OnClickListener(){ |
| | | @Override |
| | | public void onClick(View view) { |
| | | MainActivity.selectPage(1); |
| | | RegisterFragment.getInstance().setRegisterInfo(item); |
| | | //RegisterFragment.getInstance().setRegisterInfo(item); |
| | | } |
| | | }); |
| | | } |
| | |
| | | } |
| | | |
| | | fragment_home_bottom_visitor_cell_name.setText(""); |
| | | if (data instanceof CheckInQueryItem) { |
| | | final CheckInQueryItem item = (CheckInQueryItem)data; |
| | | if (data instanceof SupervisoryQueryItem) { |
| | | final SupervisoryQueryItem item = (SupervisoryQueryItem)data; |
| | | fragment_home_bottom_visitor_cell_name.setText(item.getName()); |
| | | fragment_home_bottom_visitor_cell_photo.setImageURI(Uri.parse(AppApi.IMAGEURL_BASE +item.getImagePath())); |
| | | if (1==1) { |
| | |
| | | @Override |
| | | public void onClick(View view) { |
| | | MainActivity.selectPage(2); |
| | | CheckInFragment.getInstance().checkInFromHomePage(item); |
| | | CheckInFragment.getInstance().getFragment_check_in_right_visitor_cell().setVisitorInfo(item); |
| | | //CheckInFragment.getInstance().checkInFromHomePage(item); |
| | | //CheckInFragment.getInstance().getFragment_check_in_right_visitor_cell().setVisitorInfo(item); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | public void setRowType(int i) { |
| | | |