Exemple #1
0
 @Override
 public void onResume() {
   // TODO Auto-generated method stub
   super.onResume();
   if (list != null) {
     mHandler.sendEmptyMessage(0);
   }
 }
Exemple #2
0
  private void initView() {
    myOnClickListener = new MyOnClickListener();
    mBtnShopLeft.setOnClickListener(myOnClickListener);
    mBtnShopTop.setOnClickListener(myOnClickListener);
    mBtnShopBottom.setOnClickListener(myOnClickListener);

    myOnKeyListener = new MyOnKeyListener();
    mBtnShopLeft.setOnKeyListener(myOnKeyListener);
    mBtnShopTop.setOnKeyListener(myOnKeyListener);
    mBtnShopBottom.setOnKeyListener(myOnKeyListener);

    myOnFocusChangeListener = new MyOnFocusChangeListener();
    mBtnShopLeft.setOnFocusChangeListener(myOnFocusChangeListener);
    mBtnShopTop.setOnFocusChangeListener(myOnFocusChangeListener);
    mBtnShopBottom.setOnFocusChangeListener(myOnFocusChangeListener);

    mViewBean.setmFocusObject(myFocusView);
    myFocusView.setVisibility(View.INVISIBLE);

    PublicFragment pu = new PublicFragment();
    pu.addViewGlobalLayoutListener(mBtnShopLeft, mViewBean);
    pu.addViewGlobalLayoutListener(mBtnShopTop, mViewBean);
    pu.addViewGlobalLayoutListener(mBtnShopBottom, mViewBean);

    if (Utils.isNetworkState) {
      mBtnShopLeft.setBackground(
          HomeApplication.getInstance().getResources().getDrawable(R.drawable.shop_left));
      mBtnShopTop.setBackground(
          HomeApplication.getInstance().getResources().getDrawable(R.drawable.shop_right_up1));
      mBtnShopBottom.setBackground(
          HomeApplication.getInstance().getResources().getDrawable(R.drawable.shop_right_up2));
    } else {
      mBtnShopLeft.setBackground(
          HomeApplication.getInstance().getResources().getDrawable(R.drawable.shop_left));
      mBtnShopTop.setBackground(
          HomeApplication.getInstance().getResources().getDrawable(R.drawable.shop_right_up));
      mBtnShopBottom.setBackground(
          HomeApplication.getInstance().getResources().getDrawable(R.drawable.shop_right_up));
    }
    Log.d(TAG, "NewShopFragment---start end!!!");
  }