मेरे पास एक व्यूफ्लिपर है जो दिखाए जाने पर दृश्य एनीमेशन चलाता है। एनीमेशन ठीक काम करता है। लेकिन समस्या यह है कि यह 1 सेकंड से अधिक की देरी से शुरू होता है। अब यह बहुत अधिक प्रतीत नहीं होता है लेकिन यह ऐप के उपयोग में गंभीरता से देरी करता है।व्यूफ्लिपर को 'विशाल' देरी
मेरी एनिमेशन इस तरह दिखती है;
Animation inFromLeft = new TranslateAnimation(
Animation.RELATIVE_TO_PARENT, -1.0f,
Animation.RELATIVE_TO_PARENT, 0.0f,
Animation.RELATIVE_TO_PARENT, 0.0f,
Animation.RELATIVE_TO_PARENT, 0.0f);
inFromLeft.setDuration(350);
inFromLeft.setInterpolator(new LinearInterpolator());
Animation outtoRight = new TranslateAnimation(
Animation.RELATIVE_TO_PARENT, 0.0f,
Animation.RELATIVE_TO_PARENT, +1.0f,
Animation.RELATIVE_TO_PARENT, 0.0f,
Animation.RELATIVE_TO_PARENT, 0.0f);
outtoRight.setDuration(350);
outtoRight.setInterpolator(new LinearInterpolator());
मैं setInAnimation
और setOutAnimation
का उपयोग कर एनिमेशन सेट;
setInAnimation(inFromLeft);
setOutAnimation(outtoRight);
और फिर मैं सिर्फ एनीमेशन showPrevious
का उपयोग कर शुभारंभ वहाँ किसी भी कारण है कि एनिमेशन 1 से अधिक सेकंड की देरी के साथ शुरू होता, एनिमेशन के लिए STARTTIME है -1 और startOffset 0 है।
समाधान ViewPager पर स्विच कर रहा था, एनीमेशन बिल्कुल वही नहीं था जिसे मैं चाहता था, लेकिन देरी खत्म हो गई। एक्सएमएल में एनिमेशन को बदलने से कुछ भी नहीं बदला। – Thys