Android?л??????ViewPager
???????????? ???????[ 2015/5/12 13:30:45 ] ?????????????????
???????????????ViewHelper????????????????????????????????3.0??????????????????????????????????к????3.0????汾???????Ч?????????????????????ViewPager???????????????????ж??
????if (Build.VERSION.SDK_INT >= 11) //Android?汾?ж?
??????????????????????????汾????3.0???????????Ч??????????ò?????У??????????????????????????????д???????????setPageTransformer?????????汾?ж???????????
public void setPageTransformer(boolean reverseDrawingOrder?? ViewPager.PageTransformer transformer) {
//if (Build.VERSION.SDK_INT >= 11) //Android?汾?ж?
{
final boolean hasTransformer = transformer != null;
final boolean needsPopulate = hasTransformer != (mPageTransformer != null);
mPageTransformer = transformer;
setChildrenDrawingOrderEnabledCompat(hasTransformer);
if (hasTransformer) {
mDrawingOrder = reverseDrawingOrder ? DRAW_ORDER_REVERSE : DRAW_ORDER_FORWARD;
} else {
mDrawingOrder = DRAW_ORDER_DEFAULT;
}
if (needsPopulate) populate();
}
}
??????????????????????????????????????
????<com.example.android_viewpager.ViewPagerCompate
????android:id="@+id/viewPager"
????android:layout_width="match_parent"
????android:layout_height="match_parent">
????</com.example.android_viewpager.ViewPagerCompate>
????????MainActivity?????Щ?????
????mViewPager = (ViewPagerCompate) findViewById(R.id.viewPager);//?????????
??????????????????Ч????????3.0????汾???????????????о??????檔????????????????Ч????
public class RotateDownPagetransformer implements ViewPager.PageTransformer {
private static final float MAX_ROTATE = 20F;
private static float ROTATE = 0F;
/*
* Ч????????
* ?????????????A>B
* A??position:0.0 >> -1.0
* B??position:1.0 >> 0.0
* (non-Javadoc)
* @see android.support.v4.view.ViewPager.PageTransformer#
* transformPage(android.view.View?? float)
*/
@Override
public void transformPage(View view?? float position) {
int pageWidth = view.getWidth();
if (position < -1) { // [-Infinity??-1)
ViewHelper.setAlpha(view?? 0);//?????????
} else if (position <= 0) { // A?position:0.0 >> 1.0
//??????????
ROTATE = MAX_ROTATE * position;
//???????????
ViewHelper.setPivotX(view?? pageWidth/2);
ViewHelper.setPivotY(view?? view.getMeasuredHeight());
//?????????
ViewHelper.setRotation(view?? ROTATE);
} else if (position <= 1) { // B?position:1.0 >> 0.0
//??????????
ROTATE = MAX_ROTATE * position;
//???????????
ViewHelper.setPivotX(view?? pageWidth/2);
ViewHelper.setPivotY(view?? view.getMeasuredHeight());
//?????????
ViewHelper.setRotation(view?? ROTATE);
} else { // (1??+Infinity]
ViewHelper.setAlpha(view?? 0);
}
}
}
????????????????????ε??л?Ч???????????ViewPager???л????????????????????????????????????????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Android???????????????Щ???????????Android????????????????????????Щ??Android ??????????????????????????APP?????android???????????????Android App ?????????Android Unit Test ?????Android?????????Robolectric3.0????(?)Android??????????????Android Studio???????????Android????MySQL????????????????Android MVP???????Android ?????????ActiveAndroid??дAndroid??????????????????????Android????????Java??????????Android????????Java8Java / Android ????????????????Щ??
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????