最新回答 / 雪舞丶風(fēng)華
你可以在MainActivity中調(diào)用setOnPageChangeListener寫一個新的監(jiān)聽器,也可以在ViewPagerIndicator.setViewPager中擴充原有的監(jiān)聽器,兩者的效果是一樣的
2016-07-10
最新回答 / 浮沉
親,記得查看安卓源碼,里面有解釋。Return the height of your viewhe height of your view, in pixels.意思是調(diào)用這個方法可以返回view的高度,單位是像素,在老師的程序中,就是設(shè)置三角形向下偏移了2個像素(getHeight()+2)
2016-07-08
老師,你在scroll()方法里的,當(dāng)容器移動到tab最后一個的時候,那個if條件在加一個判斷條件就更完美了:如下:if (postion!=(titles.size() - 2)&&postion >= (mTabVisibleCont - 2) && offset > 0&& getChildCount() > mTabVisibleCont)。多加入的是:postion!=(titles.size() - 2),這樣滑動到最后一個的時候,后面的那部分不會多余出來。
2016-06-22