Exemplo n.º 1
0
 /**
  * 移除表情组
  *
  * @param position
  */
 public void removeEmojiconGroup(int position) {
   if (position > groupEntities.size() - 1) {
     return;
   }
   if (pagerAdapter != null) {
     pagerAdapter.notifyDataSetChanged();
   }
 }
 @Override
 public void notifyDataSetChanged() {
   mLogger.d("notifyDataSetChanged");
   super.notifyDataSetChanged();
   for (ViewHolder viewHolder : getAttachedViewHolders()) {
     onNotifyItemChanged(viewHolder);
   }
 }
Exemplo n.º 3
0
  private void updateDataDetail(Integer index) {
    Log.i("StoreMainActivity - updateData", "Start");
    List<Fragment> fragments = this.getProductDetailFragments();
    // Instantiate a ViewPager and a PagerAdapter.
    mPager = (ViewPager) findViewById(R.id.storeDetailPager);
    mPagerAdapter = new CustomPagerAdapter(getSupportFragmentManager(), fragments);
    mPager.setAdapter(mPagerAdapter);
    mPagerAdapter.notifyDataSetChanged();
    mPager.setCurrentItem(index);
    mPager.setOnPageChangeListener(
        new OnPageChangeListener() {

          @Override
          public void onPageSelected(int arg0) {}

          @Override
          public void onPageScrolled(int arg0, float arg1, int arg2) {}

          @Override
          public void onPageScrollStateChanged(int arg0) {

            Log.i("StoreMainActivity - onPageScrollStateChanged", "Start");
            TextView tvPage = (TextView) findViewById(R.id.tvStoreDetailPage);
            if (listProduct.size() > 0) {
              String pageDisplay = mPager.getCurrentItem() + 1 + "/" + mPagerAdapter.getCount();
              tvPage.setText(pageDisplay);
            }

            ImageView btnPagePrevious = (ImageView) findViewById(R.id.btnStoreDetailPagePrevious);
            ImageView btnPageNext = (ImageView) findViewById(R.id.btnStoreDetailPageNext);

            if (mPagerAdapter.getCount() > 1) {
              if (mPager.getCurrentItem() == 0) {
                btnPagePrevious.setImageAlpha(70);
                btnPageNext.setImageAlpha(255);
              } else if (mPager.getCurrentItem() == (mPagerAdapter.getCount() - 1)) {
                btnPageNext.setImageAlpha(70);
                btnPagePrevious.setImageAlpha(255);
              } else {
                btnPagePrevious.setImageAlpha(255);
              }
            } else {
              btnPageNext.setImageAlpha(70);
              btnPagePrevious.setImageAlpha(70);
            }

            ProductInfo product = listProduct.get(mPager.getCurrentItem());
            if (productTransactionDetailInfo == null) {
              productTransactionDetailInfo = new TransactionDetailInfo();
            }
            productTransactionDetailInfo.setCategoryId(product.getCategoryId());
            productTransactionDetailInfo.setProductId(product.getProductId());
            productTransactionDetailInfo.setProductName(product.getName());
            productTransactionDetailInfo.setUnitPrice(product.getUnitPrice());
          }
        });
    this.updatePageNumView();
  }
Exemplo n.º 4
0
 private void insertOnePage(String cityName, int index) {
   LayoutInflater lf = getLayoutInflater().from(this);
   View view = lf.inflate(R.layout.activity_refresh, null);
   viewList.add(index, view);
   pagerAdapter.notifyDataSetChanged();
   citiesList.add(index, cityName);
   conntOfCities += 1;
   initOneLayout();
 }
Exemplo n.º 5
0
 @Override
 public void notifyDataSetChanged() {
   super.notifyDataSetChanged();
   View indicatorView = (View) QuickLaunchView.this.mIndicator;
   if (getCount() == 1) {
     indicatorView.setVisibility(8);
   } else {
     indicatorView.setVisibility(0);
   }
   this.smsPackageName = QuickLaunchView.this.appManager.getSMSAppPackageName();
 }
  @Override
  protected void onStreamDropped(Stream stream) {
    MySubscriber p = mSubscriberStream.get(stream);
    if (p != null) {
      mSubscribers.remove(p);
      mSubscriberStream.remove(stream);
      mSubscriberConnection.remove(stream.getConnection().getConnectionId());
      mPagerAdapter.notifyDataSetChanged();

      presentText("\n" + p.getName() + " has left the chat");
    }
  }
Exemplo n.º 7
0
 /**
  * 添加表情组
  *
  * @param groupEntity
  */
 public void addEmojiconGroup(EaseEmojiconGroupEntity groupEntity, boolean notifyDataChange) {
   int pageSize = getPageSize(groupEntity);
   if (pageSize > maxPageCount) {
     maxPageCount = pageSize;
     if (pagerViewListener != null && pagerAdapter != null) {
       pagerViewListener.onGroupMaxPageSizeChanged(maxPageCount);
     }
   }
   viewpages.addAll(getGroupGridViews(groupEntity));
   if (pagerAdapter != null && notifyDataChange) {
     pagerAdapter.notifyDataSetChanged();
   }
 }
 @Override
 public void parseJson(int code, JSONObject respanse, String tag, int pos, Object data)
     throws JSONException {
   if (mTweetAdTag.equals(tag)) {
     JSONArray dataArr = respanse.optJSONArray("data");
     if (dataArr != null) {
       Subject.SubjectDescObject tweetDescObject = null;
       mHotTweetDescObjects.clear();
       for (int i = 0; i < dataArr.length(); i++) {
         tweetDescObject = new Subject.SubjectDescObject(dataArr.optJSONObject(i));
         mHotTweetDescObjects.add(tweetDescObject);
       }
       initLooperViewPager();
       mAdPagerAdapter.notifyDataSetChanged();
     }
     return;
   }
 }
  @Override
  protected void onStreamReceived(Stream stream) {
    MySubscriber p = new MySubscriber(mContext, stream);

    // we can use connection data to obtain each user id
    p.setUserId(stream.getConnection().getData());

    // Subscribe audio only if we have more than one player
    if (mSubscribers.size() != 0) {
      p.setSubscribeToVideo(false);
    }

    // Subscribe to this player
    this.subscribe(p);

    mSubscribers.add(p);
    mSubscriberStream.put(stream, p);
    mSubscriberConnection.put(stream.getConnection().getConnectionId(), p);
    mPagerAdapter.notifyDataSetChanged();

    presentText("\n" + p.getName() + " has joined the chat");
  }
Exemplo n.º 10
0
 @Override
 public void notifyDataSetChanged() {
   // TODO Auto-generated method stub
   super.notifyDataSetChanged();
 }
Exemplo n.º 11
0
 public void notifyDataSetChanged() {
   if (pagerAdapter != null) {
     pagerAdapter.notifyDataSetChanged();
   }
 }
 @Override
 public void notifyDataSetChanged() {
   mChildCount = getCount();
   super.notifyDataSetChanged();
 }
Exemplo n.º 13
0
 public void notifyDataSetChanged() {
   super.notifyDataSetChanged();
 }
  @Override
  public void notifyDataSetChanged() {
    checkForIdChanges();

    super.notifyDataSetChanged();
  }
 // public methods
 public void setPlayersViewContainer(ViewPager container) {
   this.mSubscribersViewContainer = container;
   this.mSubscribersViewContainer.setAdapter(mPagerAdapter);
   mPagerAdapter.notifyDataSetChanged();
 }
  @Override
  public void notifyDataSetChanged() {
    super.notifyDataSetChanged();

    setOrder();
  }
Exemplo n.º 17
0
 @Override
 public void notifyDataSetChanged() {
   recycleBin.scrapActiveViews();
   super.notifyDataSetChanged();
 }
 @Override
 public void notifyDataSetChanged() {
   mToDestroy = new SparseArray<ToDestroy>();
   super.notifyDataSetChanged();
 }