Skip to content

Commit

Permalink
Indicator显示问题
Browse files Browse the repository at this point in the history
  • Loading branch information
loonggg committed Apr 14, 2017
1 parent ff78190 commit ff1b324
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import android.support.v7.widget.LinearSnapHelper;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.util.Log;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.MotionEvent;
Expand Down Expand Up @@ -242,6 +241,7 @@ public void setRvBannerData(List data) {
* 使用AppCompatImageView的好处是在Fragment中也使用Compat相关属性
*/
private void createIndicators() {
mLinearLayout.removeAllViews();
for (int i = 0; i < mData.size(); i++) {
AppCompatImageView img = new AppCompatImageView(getContext());
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
Expand Down Expand Up @@ -305,7 +305,6 @@ protected void onDetachedFromWindow() {

@Override
protected void onWindowVisibilityChanged(int visibility) {
Log.i("test", "onWindowVisibilityChanged");
if (visibility == GONE || visibility == INVISIBLE) {
// 停止轮播
setPlaying(false);
Expand Down

0 comments on commit ff1b324

Please sign in to comment.