Ejemplo n.º 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();
  }
Ejemplo n.º 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;
  }
Ejemplo n.º 3
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.subject);
   Bundle bundle = getIntent().getExtras();
   url = bundle.getString("url");
   itemITeye = new NewItemITeye();
   subjectAdapter = new SubjectAdapter(this);
   mXlistView = (XListView) findViewById(R.id.id_xlistView);
   mXlistView.setPullRefreshEnable(this);
   mXlistView.setPullLoadEnable(this);
   mXlistView.setRefreshTime(AppUtil.getRefreashTime(this, Constant.NEWS_TYPE_SUBJECTS));
   mXlistView.setOnItemClickListener(
       new AdapterView.OnItemClickListener() {
         @Override
         public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
           NewsItem newsItem = newsItems.get(position - 1);
           String url = newsItem.getLink();
           Intent intent = new Intent(SubjectsActivity.this, NewsContentActivity.class);
           intent.putExtra("url", url);
           intent.putExtra("select", 5);
           startActivity(intent);
         }
       });
   if (isFirstIn) {
     /** 进来时直接刷新 */
     mXlistView.startRefresh();
     isFirstIn = false;
   } else {
     mXlistView.NotRefreshAtBegin();
   }
   mXlistView.setAdapter(subjectAdapter);
 }
Ejemplo n.º 4
0
  @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;
  }