Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9190495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:28:31+00:00 2026-06-17T20:28:31+00:00

Hi I am new to android and I am doing one simple application. My

  • 0

Hi I am new to android and I am doing one simple application. My application contain one simple activity in witch it contains view pager. my view pager having no of screens 3. SO my view pager working fine. my first and second screen contains one button when i click on that button it will goes to third screen setCurrentItem(2);.

now what i want is when i go third screen it will render one view and few sec only like after completely rendering that view do some animation like flip animation.

what happen in reality when i click on buttons it directly go to that screen but not rendering that default view. it directly starts animation…

My code looks like

public class HelpActivity extends Activity {

    private final int NUM_SCREENS = 3;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.help);
        mInflater = LayoutInflater.from(this);

        vp = (ViewPager) findViewById(R.id.pager);
        PagerAdapter pagerAdapter = new MyPagerAdapter();
        vp.setAdapter(pagerAdapter);

        }

    private OnClickListener signin = new OnClickListener() {

        @Override
        public void onClick(View arg0) {

                vp.setCurrentItem(2);
                // ******* do some animation on view 3 in pager views ....          
        }

    };

    private class MyPagerAdapter extends PagerAdapter {

        @Override
        public int getCount() {
            return NUM_SCREENS;
        }

        @Override
        public Object instantiateItem(View collection, int position) {

            View view = null;
            Typeface tf = Typeface.createFromAsset(getAssets(),
                    "fonts/sf_cartoonist_hand_bold.ttf");
            if (position == 0) {
                // display view1
                // on button click call sign in

            } else if (position == 1) {
                //display view 2
                //on button click call sign in
            } else if (position == 2) {

                //display view 3

            }

            ((ViewPager) collection).addView(view, 0);

            return view;
        }
    }


}

what i need after clicking on button it skips to view3 display for few sec and after that do animation… how to do that?
need help…..
thank you …..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T20:28:32+00:00Added an answer on June 17, 2026 at 8:28 pm

    Using Runnable you can hold your animation until your view is not load it properly, you have to measure that in how much seconds your view get load, so you can pass delay as per your view get load time, something like below:

    Runnable runnableimage = new Runnable() {
                public void run() {
                //HERE YOUR ANIMATION
                    image.startAnimation(animFast);
    
                }
            };
    

    It start your animation after 2000 MilliSec

    handler.postDelayed(runnableimage, 2000);

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple (?) Android application that begins with an Activity (First Activity)
I am working on Android application that has several threads - one of them
I am creating an android application in which there are two activites. One activity
I am doing one android application, for that I used com.android.internal API's. They are
I am new to android development. Currently i am working on an application which
i am creating a new android application.i am using the table layout. I have
I'm very new to Android (started yesterday) and so far so good, but one
I'm doing Major Project on my final year and I'm very new to Android
I'm doing Major Project on my final year and I'm very new to Android
Possible Duplicate: launch facebook app from other app I am doing one android project,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.