0

I want to make animation on my main activity.. when my app is opened i want to open with animation ..

I have posted my main activity code and i want bounce animation while opening my pager xml.

import android.app.ActionBar;
import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Window;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;
import android.app.FragmentTransaction;
import android.support.v4.app.FragmentActivity;
import android.support.v4.view.ViewPager;


public class DesignMainActivity extends FragmentActivity {

ViewPager Tab;
TabPagerAdapter TabAdapter;
ActionBar actionBar;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_design_main);


    TabAdapter = new TabPagerAdapter(getSupportFragmentManager());

    Tab = (ViewPager)findViewById(R.id.pager);
    Tab.setOnPageChangeListener(
            new ViewPager.SimpleOnPageChangeListener() {
                @Override
                public void onPageSelected(int position) {

                    actionBar = getActionBar();
                    actionBar.setSelectedNavigationItem(position); 
                    }
            });
    Tab.setAdapter(TabAdapter);

    actionBar = getActionBar();
    //Enable Tabs on Action Bar
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    ActionBar.TabListener tabListener = new ActionBar.TabListener(){

        @Override
        public void onTabReselected(android.app.ActionBar.Tab tab,
                FragmentTransaction ft) {
            // TODO Auto-generated method stub

        }

        @Override
         public void onTabSelected(ActionBar.Tab tab, FragmentTransaction ft) {

            Tab.setCurrentItem(tab.getPosition());
        }

        @Override
        public void onTabUnselected(android.app.ActionBar.Tab tab,
                FragmentTransaction ft) {
            // TODO Auto-generated method stub

        }};
        //Add New Tab
        actionBar.addTab(actionBar.newTab().setText("Login").setTabListener(tabListener));
        actionBar.addTab(actionBar.newTab().setText("Register").setTabListener(tabListener));


       }


} 

**My Questions :

1.I want bounce Animation While opening my app.

2.I want to hide title bar.**

sureshssk
  • 75
  • 1
  • 2
  • 7
  • 2) I want to hide title bar -> http://stackoverflow.com/questions/2868047/fullscreen-activity-in-android/2868052#2868052 maybe you use the search function insted of asking questions... – Martin Frank Sep 11 '14 at 06:56
  • i tried it but force close occurs – sureshssk Sep 11 '14 at 07:32
  • can you show me what is written in the console? it's hard to guess why your app has crashed ... – Martin Frank Sep 11 '14 at 07:37
  • k leave that but can u help me to get bounce animation while opening the app – sureshssk Sep 11 '14 at 07:39
  • have a look at that tutorial from http://www.androidhive.info/2013/07/how-to-implement-android-splash-screen-2/ and implement an AsyncTask ... when you have done this show me what goes wrong.... – Martin Frank Sep 11 '14 at 07:55

0 Answers0