| | |
| | | import android.support.v7.widget.LinearLayoutManager;
|
| | | import android.view.LayoutInflater;
|
| | | import android.view.View;
|
| | | import android.widget.ImageView;
|
| | | import android.widget.LinearLayout;
|
| | | import android.widget.RadioGroup;
|
| | | import android.widget.TextView;
|
| | | import android.widget.Toast;
|
| | |
|
| | | import com.bsk.zhangbo.demoforbsk.R;
|
| | | import com.bsk.zhangbo.demoforbsk.adapter.VisitorRecyclerViewAdapter;
|
| | |
| | | private List mList;
|
| | |
|
| | | private static VisitorRegisterFragment instance = new VisitorRegisterFragment();
|
| | | private TextView companyNameTv;
|
| | | private TextView identity;
|
| | | private ImageView visitorPhoto;
|
| | | private TextView fromPhone;
|
| | | private TextView mDepartmentTv;
|
| | | private TextView mDutyTv;
|
| | | private TextView mPhoneTv;
|
| | | private TextView mTelTv;
|
| | |
|
| | | public static VisitorRegisterFragment getInstance() {
|
| | | return instance;
|
| | |
| | | public View addRightLayout() {
|
| | | mViewRight = LayoutInflater.from(getActivity()).inflate(R.layout.visitor_register_right,null);
|
| | | mVisitorFrom = (VisitorView) mViewRight.findViewById(R.id.visitor_from);
|
| | | companyNameTv = (TextView)mVisitorFrom.findViewById(R.id.visitor_view_from_company_name);
|
| | |
|
| | | identity = (TextView)mVisitorFrom.findViewById(R.id.visitor_view_from_identity);
|
| | | fromPhone = (TextView)mVisitorFrom.findViewById(R.id.visitor_view_from_phone);
|
| | | visitorPhoto = (ImageView)mVisitorFrom.findViewById(R.id.visitor_view_from_photo);
|
| | |
|
| | |
|
| | | mVisitorTo = (VisitorView) mViewRight.findViewById(R.id.visitor_to);
|
| | |
|
| | | mDepartmentTv = (TextView)mVisitorTo.findViewById(R.id.view_visitor_to_deptartment);
|
| | | mDutyTv = (TextView)mVisitorTo.findViewById(R.id.view_visitor_to_duty);
|
| | |
|
| | | mPhoneTv = (TextView)mVisitorTo.findViewById(R.id.visitor_to_phone);
|
| | | mTelTv = (TextView)mVisitorTo.findViewById(R.id.visitor_to_tel);
|
| | |
|
| | | mVisitorFrom.setType(Constant.VISITOR_FROM);
|
| | | mVisitorTo.setType(Constant.VISITOR_TO);
|
| | | mVisitorFrom.setTitle("dasfasdfasdf");
|
| | |
| | | mAdapter.notifyDataSetChanged();
|
| | | }
|
| | |
|
| | | public void setVisitorInfo(VisitorQueryItem item) {
|
| | | mVisitorFrom.setTitle(item.getName());
|
| | | companyNameTv.setText(item.getCompanyName());
|
| | | identity.setText(item.getIdentify());
|
| | | fromPhone.setText(item.getPhone());
|
| | | }
|
| | |
|
| | | public void setIntervieweeInfo(VisitorQueryItem item) {
|
| | | mVisitorTo.setTitle(item.getName());
|
| | | mDepartmentTv.setText("部门");
|
| | | mDutyTv.setText("财务");
|
| | | mPhoneTv.setOnClickListener(new View.OnClickListener(){
|
| | | @Override
|
| | | public void onClick(View view) {
|
| | | Toast.makeText(MainActivity.getInstance(), "正在呼叫手机", Toast.LENGTH_SHORT).show();
|
| | | }
|
| | | });
|
| | | mTelTv.setOnClickListener(new View.OnClickListener(){
|
| | | @Override
|
| | | public void onClick(View view) {
|
| | | Toast.makeText(MainActivity.getInstance(), "正在呼叫座机", Toast.LENGTH_SHORT).show();
|
| | | }
|
| | | });
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | | }
|