Android5.1真機.用Android Studio寫這個程序,如果把圖片放在drawable文件下會非常的卡,而且把所有圖片滑動一遍后還繼續(xù)滑會直接閃退,放到mipmap文件夾就沒有這種情況
2016-06-23
本來是內(nèi)存溢出java.lang.OutOfMemoryError: Failed to allocate a 33177612 byte allocation with 16777120 free bytes and 22MB until OOM
然后我把圖片放到mipmap-hdpi文件夾就沒事了. 啟動應(yīng)用的速度也快了
然后我把圖片放到mipmap-hdpi文件夾就沒事了. 啟動應(yīng)用的速度也快了
2016-04-24
樓上是不是腦殘啊,來這關(guān)注聲音好不好聽,你可真逗,就這素質(zhì),你能當(dāng)程序員?
2016-04-18
以下是來自nineoldandroid的消息
DEPRECATED
NineOldAndroids is deprecated. No new development will be taking place. Existing versions will (of course) continue to function. New applications should use minSdkVersion="14" or higher which has access to the platform animation APIs.
Thanks for all your support!
DEPRECATED
NineOldAndroids is deprecated. No new development will be taking place. Existing versions will (of course) continue to function. New applications should use minSdkVersion="14" or higher which has access to the platform animation APIs.
Thanks for all your support!
2016-04-16
第三個View出現(xiàn)的情況主要是我們滑動到第三個,然后往回切成第二個的時候,第三個View設(shè)置的TranslationX 就是-getWidth()-getPageMargin()+0;(也就是offsetPixels=0 原因不懂的話,再仔細看一遍視頻),那么這個View的大小也會變成MIN_SCALE 所以,當(dāng)我們從第二個再滑動回第一個的時候。 就會出現(xiàn)那種情況,我們做測試,當(dāng)我們不滑動到第三個,只滑動到第二個再滑動回第一個的時候,就不會出現(xiàn)第三個。
2016-03-30
所以驗證了我們的猜想是正確的。然后因為他的位置被我們強制設(shè)置在了屏幕中央(mRight.setTranslationX(MIN_SCALE + (1 - MIN_SCALE) * offset)),大小也被變成原來的0.6倍mRight.setScaleY(MIN_SCALE + (1 - MIN_SCALE) * 0)。 所以我們只需要在setPagerTeansformer中做出判斷。 判斷,只要offset=0那么馬上讓 mScale = 0;mTran = 0;
也就是讓我們的View進行一個(回位的操作).就能很好的避開老師視頻中出現(xiàn)的bug
也就是讓我們的View進行一個(回位的操作).就能很好的避開老師視頻中出現(xiàn)的bug
2016-03-30