private void initIndicators(){
  if (mIndicators.getChildCount() != mHeroes.size() && mHeroes.size() > 1) {
    mIndicators.removeAllViews();
    Resources res=mIndicators.getResources();
    int size=res.getDimensionPixelOffset(R.dimen.indicator_size);
    int margin=res.getDimensionPixelOffset(R.dimen.indicator_margin);
    for (int i=0; i < getPagerCount(); i++) {
      ImageView indicator=new ImageView(mIndicators.getContext());
      indicator.setAlpha(180);
      LinearLayout.LayoutParams lp=new LinearLayout.LayoutParams(size,size);
      lp.setMargins(margin,0,0,0);
      lp.gravity=Gravity.CENTER;
      indicator.setLayoutParams(lp);
      Drawable drawable=res.getDrawable(R.drawable.selector_indicator);
      indicator.setImageDrawable(drawable);
      mIndicators.addView(indicator);
    }
  }
}

private void initIndicators ( ) { if ( mIndicators . getChildCount ( ) != mHeroes . size ( ) && mHeroes . size ( ) > 1 ) { mIndicators . removeAllViews ( ) ; Resources res = mIndicators . getResources ( ) ; int size = res . getDimensionPixelOffset ( R . dimen . indicator_size ) ; int margin = res . getDimensionPixelOffset ( R . dimen . indicator_margin ) ; for ( int i = 0 ; i < getPagerCount ( ) ; i ++ ) { ImageView indicator = new ImageView ( mIndicators . getContext ( ) ) ; indicator . setAlpha ( 180 ) ; LinearLayout . LayoutParams lp = new LinearLayout . LayoutParams ( size , size ) ; lp . setMargins ( margin , 0 , 0 , 0 ) ; lp . gravity = Gravity . CENTER ; indicator . setLayoutParams ( lp ) ; Drawable drawable = res . getDrawable ( R . drawable . selector_indicator ) ; indicator . setImageDrawable ( drawable ) ; mIndicators . addView ( indicator ) ; } } }
oh shit ! an indicator view is badly needed ! this shit have no animation at all .
