コード例 #1
0
  @Override
  public void initWidget() {
    setContentView(R.layout.activity_my_gz);
    xlv_my_company = (XListView) findViewById(R.id.xlv_my_company);
    xlv_my_position = (XListView) findViewById(R.id.xlv_my_position);
    xlv_my_company.setXListViewListener(this);
    xlv_my_company.setPullLoadEnable(true);
    xlv_my_position.setXListViewListener(this);
    xlv_my_position.setPullLoadEnable(true);
    myAttentionCompanyAdapter = new MyAttentionCompanyAdapter();
    myAttentionIndividualAdapter = new MyAttentionIndividualAdapter();

    attentionCompanyHandler = new Handler();
    individualAttentionHandler = new Handler();

    vip_sel_loca_ll = (LinearLayout) findViewById(R.id.vip_sel_loca_ll);
    vip_sel_job_ll = (LinearLayout) findViewById(R.id.vip_sel_job_ll);
    line_bule_l = (View) findViewById(R.id.line_bule_l);
    line_bule_r = (View) findViewById(R.id.line_bule_r);

    xlv_my_company.setOnItemClickListener(new ListViewItemAttentionClickListener());
    xlv_my_position.setOnItemClickListener(new ListViewItemClickListener());

    vip_sel_loca_ll.setOnClickListener(this);
    vip_sel_job_ll.setOnClickListener(this);

    loadData();
  }
コード例 #2
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_job, container, false);

    loca = Globals.LOCACODE;
    llSelJob = (LinearLayout) view.findViewById(R.id.job_sel_job_ll); // 选择职位
    llSelloca = (LinearLayout) view.findViewById(R.id.job_sel_loca_ll); // 选择地区
    llSelJob.setOnClickListener(this);
    llSelloca.setOnClickListener(this);
    xList = (XListView) view.findViewById(R.id.job_xlist);
    xList.setXListViewListener(this);
    xList.setOnItemClickListener(new ListViewItemClickListener());
    xList.setPullLoadEnable(true);

    ja = new JobListAdapter();
    mHandler = new Handler();

    String jt = HomeActivity.jobType;
    if (!jt.equals("")) {
      jobType = jt;
    }

    loadData();

    return view;
  }
コード例 #3
0
ファイル: NearFragment.java プロジェクト: Mozhuowen/BianCity
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    if (mainview == null) {
      mainview = inflater.inflate(R.layout.fragment_near, container, false);
      this.mMainLayout = (LinearLayout) mainview.findViewById(R.id.fragment_near_mainlayout);
      this.mTexthint = (TextView) mainview.findViewById(R.id.fragment_near_texthint);
      this.mTexthint.setOnClickListener(this);
      this.mTexthint.setClickable(false);
      mXList = (XListView) mainview.findViewById(R.id.fragment_near_listv);
      mXList.setPullLoadEnable(true);
      mXList.setPullRefreshEnable(true);
      mXList.setXListViewListener(this);

      this.mMainAdapter = new MyListAdapter(this.getActivity(), this.towndata);
      mXList.setOnScrollListener(mMainAdapter);
      this.mXList.setAdapter(mMainAdapter);

      initLocation();
    }
    return mainview;
  }