[
  {
    "path": ".gitattributes",
    "content": "# Auto detect text files and perform LF normalization\n* text=auto\n\n# Custom for Visual Studio\n*.cs     diff=csharp\n\n# Standard to msysgit\n*.doc\t diff=astextplain\n*.DOC\t diff=astextplain\n*.docx diff=astextplain\n*.DOCX diff=astextplain\n*.dot  diff=astextplain\n*.DOT  diff=astextplain\n*.pdf  diff=astextplain\n*.PDF\t diff=astextplain\n*.rtf\t diff=astextplain\n*.RTF\t diff=astextplain\n"
  },
  {
    "path": "AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.bala.welcomescreens\"\n    android:versionCode=\"1\"\n    android:versionName=\"1.0\" >\n\n    <uses-sdk\n        android:minSdkVersion=\"11\"\n        android:targetSdkVersion=\"23\" />\n\n    <application\n        android:allowBackup=\"true\"\n        android:icon=\"@drawable/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:theme=\"@style/AppTheme\" >\n        <activity\n            android:name=\".SplashScreenActivity\"\n            android:label=\"@string/app_name\" >\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n        <activity \n            android:name=\".MainActivity\" \n            android:label=\"@string/app_name\" />\n        <activity \n            android:name=\".IntroScreenActivity\" \n            android:theme=\"@style/Theme.AppCompat.Light.NoActionBar\"/>\n    </application>\n\n</manifest>\n"
  },
  {
    "path": "README.md",
    "content": "# Android-welcome-screen\nActivity transition Activities , Fragment and View Pager translation\n\nScreenshots\n===========\n\n![ScreenShot](https://github.com/trbala0205/Android-welcome-screen/blob/master/screenshots/viewpager1.png?raw=true)\n\n![ScreenShot](https://github.com/trbala0205/Android-welcome-screen/blob/master/screenshots/viewpager2.png)\n\n![ScreenShot](https://github.com/trbala0205/Android-welcome-screen/blob/master/screenshots/viewpager3.png)\n"
  },
  {
    "path": "res/drawable/bg_item_selected_drawable.xml",
    "content": "<shape xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <solid android:color=\"#12000000\" />\n</shape>"
  },
  {
    "path": "res/drawable/selectable_item_background_general.xml",
    "content": "<selector xmlns:android=\"http://schemas.android.com/apk/res/android\" android:exitFadeDuration=\"@android:integer/config_mediumAnimTime\">\n    <item android:drawable=\"@drawable/bg_item_selected_drawable\" android:state_focused=\"true\" android:state_pressed=\"false\" />\n    <item android:drawable=\"@drawable/bg_item_selected_drawable\" android:state_pressed=\"true\" />\n    <item android:drawable=\"@android:color/transparent\" />\n</selector>"
  },
  {
    "path": "res/drawable-v21/selectable_item_background_general.xml",
    "content": "<selector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:exitFadeDuration=\"@android:integer/config_mediumAnimTime\" >\n    <item android:state_pressed=\"false\" android:state_focused=\"true\" android:drawable=\"@drawable/bg_item_selected_drawable\" />\n    <item android:state_pressed=\"true\" android:drawable=\"@drawable/bg_item_selected_drawable\" />\n    <item android:drawable=\"@android:color/transparent\" />\n</selector>"
  },
  {
    "path": "res/layout/activity_main.xml",
    "content": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    tools:context=\".MainActivity\">\n\n    <!--including the toobar-->\n    <include layout=\"@layout/toolbar\" />\n\n\n    <Button\n        android:id=\"@+id/button\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_centerHorizontal=\"true\"\n        android:layout_centerVertical=\"true\"\n        android:text=\"Go To Welcome Screen\" />\n\n\n</RelativeLayout>\n"
  },
  {
    "path": "res/layout/activity_splash.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/splashScreen\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"@color/primary_dark\"\n    android:orientation=\"vertical\">\n\n\n    <ImageView\n        android:layout_width=\"100dp\"\n        android:layout_height=\"100dp\"\n        android:id=\"@+id/imageView\"\n        android:src=\"@drawable/message\"\n        android:layout_marginTop=\"100dp\"\n        android:layout_centerHorizontal=\"true\" />\n\n    <TextView\n        android:id=\"@+id/editText\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_below=\"@+id/imageView\"\n        android:layout_centerHorizontal=\"true\"\n        android:text=\"Topping In\"\n        android:textColor=\"#A6D6F6\"\n        android:textSize=\"30sp\" />\n\n</RelativeLayout>"
  },
  {
    "path": "res/layout/fragment_screen1.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/welcome_fragment\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\"\n    android:clipChildren=\"false\"\n    android:background=\"#5C6BC0\"\n    android:weightSum=\"6\"\n    android:paddingTop=\"48dp\">\n\n    <FrameLayout\n        android:id=\"@+id/image_container\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"0dp\"\n        android:layout_weight=\"4\"\n        android:clipChildren=\"false\">\n\n        <ImageView\n            android:id=\"@+id/img\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:scaleType=\"centerInside\"\n            android:src=\"@drawable/ic_phone_white_48dp\"\n            android:paddingLeft=\"16dp\"\n            android:paddingRight=\"16dp\"\n            android:layout_gravity=\"center\"/>\n\n    </FrameLayout>\n\n    <TextView\n        android:id=\"@+id/screen_heading\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"0dp\"\n        android:layout_weight=\"1\"\n        android:paddingLeft=\"24dp\"\n        android:paddingRight=\"24dp\"\n        android:textSize=\"24sp\"\n        android:textColor=\"#ffffff\"\n        android:gravity=\"bottom|center_horizontal\"\n        android:text=\"@string/screen1_title\" />\n\n    <TextView\n        android:id=\"@+id/screen_desc\"\n        android:text=\"@string/screen1_desc\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"0dp\"\n        android:layout_weight=\"1\"\n        android:paddingLeft=\"24dp\"\n        android:paddingRight=\"24dp\"\n        android:textSize=\"16sp\"\n        android:textColor=\"#ffffff\"\n        android:gravity=\"top|center_horizontal\"\n        android:minHeight=\"@dimen/welcome_content_min_height\"/>\n    <View\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"48dp\"\n        android:background=\"@android:color/transparent\"/>\n\n</LinearLayout>"
  },
  {
    "path": "res/layout/fragment_screen2.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/welcome_fragment\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:clipChildren=\"false\"\n    android:background=\"#00AE76\"\n    android:orientation=\"vertical\"\n    android:layout_weight=\"6\"\n    android:paddingTop=\"48dp\">\n\n    <FrameLayout\n        android:id=\"@id/image_container\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"0dp\"\n        android:layout_weight=\"4\"\n        android:clipChildren=\"false\">\n\n        <ImageView\n            android:id=\"@+id/img\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:scaleType=\"centerInside\"\n            android:src=\"@drawable/ic_account_multiple_white_48dp\"\n            android:paddingLeft=\"18dp\"\n            android:paddingRight=\"18dp\"\n            android:layout_gravity=\"center\"/>\n\n    </FrameLayout>\n\n    <TextView\n        android:id=\"@id/screen_heading\"\n        android:text=\"@string/screen2_title\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"0dp\"\n        android:layout_weight=\"1\"\n        android:textSize=\"24sp\"\n        android:textColor=\"#ffffff\"\n        android:paddingLeft=\"24dp\"\n        android:paddingRight=\"24dp\"\n        android:gravity=\"bottom|center_horizontal\"/>\n\n    <TextView\n        android:id=\"@id/screen_desc\"\n        android:text=\"@string/screen2_desc\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"0dp\"\n        android:layout_weight=\"1\"\n        android:paddingLeft=\"24dp\"\n        android:paddingRight=\"24dp\"\n        android:textSize=\"16sp\"\n        android:textColor=\"#ffffff\"\n        android:gravity=\"top|center_horizontal\"\n        android:minHeight=\"@dimen/welcome_content_min_height\" />\n\n    <View\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"48dp\"\n        android:background=\"@android:color/transparent\"/>\n\n</LinearLayout>"
  },
  {
    "path": "res/layout/fragment_screen3.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/welcome_fragment\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:clipChildren=\"false\"\n    android:background=\"#00bcd4\"\n    android:orientation=\"vertical\"\n    android:layout_weight=\"6\"\n    android:paddingTop=\"48dp\">\n\n    <FrameLayout\n        android:id=\"@+id/image_container\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"0dp\"\n        android:layout_weight=\"4\"\n        android:clipChildren=\"false\">\n\n        <ImageView\n            android:id=\"@+id/img\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:scaleType=\"centerInside\"\n            android:src=\"@drawable/ic_laptop_white_36dp\"\n            android:paddingLeft=\"16dp\"\n            android:paddingRight=\"16dp\"\n            android:gravity=\"center\"\n            android:layout_gravity=\"center\"/>\n\n    </FrameLayout>\n\n    <TextView\n        android:id=\"@+id/screen_heading\"\n        android:text=\"@string/screen3_title\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"0dp\"\n        android:layout_weight=\"1\"\n        android:textSize=\"24sp\"\n        android:textColor=\"#ffffff\"\n        android:paddingLeft=\"24dp\"\n        android:paddingRight=\"24dp\"\n        android:gravity=\"bottom|center_horizontal\" />\n\n    <TextView\n        android:id=\"@+id/screen_desc\"\n        android:text=\"@string/screen3_desc\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"0dp\"\n        android:layout_weight=\"1\"\n        android:textSize=\"16sp\"\n        android:textColor=\"#ffffff\"\n        android:paddingLeft=\"24dp\"\n        android:paddingRight=\"24dp\"\n        android:gravity=\"top|center_horizontal\"\n        android:minHeight=\"@dimen/welcome_content_min_height\"/>\n\n    <View\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"48dp\"\n        android:background=\"@android:color/transparent\"/>\n\n</LinearLayout>"
  },
  {
    "path": "res/layout/fragment_screen4.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"fill_parent\"\n    android:background=\"@android:color/transparent\" />\n"
  },
  {
    "path": "res/layout/toolbar.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<android.support.v7.widget.Toolbar xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:id=\"@+id/toolbar\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"?attr/actionBarSize\"\n    android:background=\"?attr/colorPrimary\"\n    android:theme=\"@style/ThemeOverlay.AppCompat.Dark.ActionBar\"\n    app:popupTheme=\"@style/ThemeOverlay.AppCompat.Light\" />"
  },
  {
    "path": "res/layout/welcome_layout.xml",
    "content": "<RelativeLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"@android:color/transparent\">\n\n    <android.support.v4.view.ViewPager\n        android:id=\"@+id/pager\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:background=\"@color/dim_foreground_disabled_material_dark\"/>\n\n    <View\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"1dp\"\n        android:layout_above=\"@+id/button_layout\"\n        android:background=\"#33ffffff\"/>\n\n    <RelativeLayout\n        android:id=\"@+id/button_layout\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:background=\"@android:color/transparent\">\n\n        <Button\n            android:id=\"@+id/btn_skip\"\n            android:layout_width=\"80dp\"\n            android:layout_height=\"48dp\"\n            android:gravity=\"center\"\n            android:layout_alignParentLeft=\"true\"\n            android:text=\"SKIP\"\n            android:textSize=\"18sp\"\n            android:textColor=\"@color/abc_primary_text_material_dark\"\n            android:background=\"@drawable/selectable_item_background_general\"/>\n\n        <LinearLayout\n            android:id=\"@+id/circles\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"horizontal\"\n            android:layout_centerInParent=\"true\">\n\n        </LinearLayout>\n\n        <Button\n            android:id=\"@+id/done\"\n            android:layout_width=\"80dp\"\n            android:layout_height=\"48dp\"\n            android:gravity=\"center\"\n            android:layout_alignParentRight=\"true\"\n            android:text=\"DONE\"\n            android:textSize=\"18sp\"\n            android:textColor=\"@color/abc_primary_text_material_dark\"\n            android:background=\"@drawable/selectable_item_background_general\"\n            android:visibility=\"gone\"/>\n\n        <ImageButton\n            android:id=\"@+id/btn_next\"\n            android:layout_width=\"80dp\"\n            android:layout_height=\"48dp\"\n            android:gravity=\"center\"\n            android:paddingTop=\"12dp\"\n            android:paddingBottom=\"12dp\"\n            android:src=\"@drawable/ic_action_next\"\n            android:layout_alignParentRight=\"true\"\n            android:background=\"@drawable/selectable_item_background_general\"\n            android:scaleType=\"fitCenter\"/>\n        </RelativeLayout>\n\n</RelativeLayout>\n"
  },
  {
    "path": "res/menu/main.xml",
    "content": "<menu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    tools:context=\"com.bala.welcomescreens.MainActivity\" >\n\n    <item\n        android:id=\"@+id/action_settings\"\n        android:orderInCategory=\"100\"\n        android:title=\"@string/action_settings\"\n        app:showAsAction=\"never\"/>\n\n</menu>\n"
  },
  {
    "path": "res/menu/menu_main.xml",
    "content": "<menu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\" tools:context=\".MainActivity\">\n    <item android:id=\"@+id/action_settings\" android:title=\"@string/action_settings\"\n        android:orderInCategory=\"100\" app:showAsAction=\"never\" />\n</menu>\n"
  },
  {
    "path": "res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <color name=\"text_selected\">#558</color>\n    <color name=\"transparent_bg\">#fff</color>\n</resources>"
  },
  {
    "path": "res/values/dimens.xml",
    "content": "<resources>\n    <!-- Default screen margins, per the Android Design guidelines. -->\n    <dimen name=\"activity_horizontal_margin\">16dp</dimen>\n    <dimen name=\"activity_vertical_margin\">16dp</dimen>\n\n    <!--Welcome sliding page  -->\n    <dimen name=\"welcome_images_size\">360dp</dimen>\n    <dimen name=\"welcome_images_margin_top\">0dp</dimen>\n    <dimen name=\"welcome_heading_margin_bottom\">12dp</dimen>\n    <dimen name=\"welcome_text_margin\">48dp</dimen>\n    <dimen name=\"welcome_heading\">24sp</dimen>\n    <dimen name=\"welcome_text_margin_bottom\">12dp</dimen>\n    <dimen name=\"welcome_content_min_height\">96dp</dimen>\n    <dimen name=\"welcome_content\">16.0sp</dimen>\n</resources>\n"
  },
  {
    "path": "res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">WelcomeScreen</string>\n\n    <string name=\"hello_world\">Hello world!</string>\n    <string name=\"action_settings\">Settings</string>\n\n    <string name=\"screen1_title\">Unlimited Calls</string>\n    <string name=\"screen1_desc\">Call your friends, family, Relatives free of cost anytime anywhere.</string>\n    <string name=\"screen2_title\">Group Conversations</string>\n    <string name=\"screen2_desc\">Create your own group and share Snapshots, Videos etc. </string>\n    <string name=\"screen3_title\">Synchronize with your laptop</string>\n    <string name=\"screen3_desc\">Get notified with your calls and messages to your laptop</string>\n\n</resources>\n"
  },
  {
    "path": "res/values/styles.xml",
    "content": "<resources>\n\n    <style name=\"AppTheme\" parent=\"BaseTheme\"/>\n\n    <style name=\"BaseTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n        <item name=\"colorPrimary\">@color/primary</item> \n        <item name=\"colorPrimaryDark\">@color/primary_dark</item> \n        <item name=\"colorControlHighlight\">@color/accent_translucent</item> \n        <item name=\"colorAccent\">@color/accent</item>\n    </style>\n\n\n    <color name=\"primary\">#2196F3</color>\n    <color name=\"primary_dark\">#1976D2</color>\n    <color name=\"accent\">#03A9F4</color>\n    <color name=\"accent_translucent\">#80bebebe</color>\n    <color name=\"accent_bright\">#FFF493</color>\n\n</resources>"
  },
  {
    "path": "res/values-v11/styles.xml",
    "content": "<resources>\n\n    <!--\n        Base application theme for API 11+. This theme completely replaces\n        AppBaseTheme from res/values/styles.xml on API 11+ devices.\n    -->\n    <style name=\"AppBaseTheme\" parent=\"Theme.AppCompat.Light\">\n        <!-- API 11 theme customizations can go here. -->\n    </style>\n\n</resources>\n"
  },
  {
    "path": "res/values-v14/styles.xml",
    "content": "<resources>\n\n    <!--\n        Base application theme for API 14+. This theme completely replaces\n        AppBaseTheme from BOTH res/values/styles.xml and\n        res/values-v11/styles.xml on API 14+ devices.\n    -->\n    <style name=\"AppBaseTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar\">\n        <!-- API 14 theme customizations can go here. -->\n    </style>\n\n</resources>\n"
  },
  {
    "path": "res/values-v21/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<resources>\n\n    <style name=\"AppTheme\" parent=\"BaseTheme\">\n\n    </style>\n\n</resources>"
  },
  {
    "path": "res/values-w820dp/dimens.xml",
    "content": "<resources>\n    <!-- Example customization of dimensions originally defined in res/values/dimens.xml\n         (such as screen margins) for screens with more than 820dp of available width. This\n         would include 7\" and 10\" devices in landscape (~960dp and ~1280dp respectively). -->\n    <dimen name=\"activity_horizontal_margin\">64dp</dimen>\n</resources>\n"
  },
  {
    "path": "src/com/bala/welcomescreens/IntroScreenActivity.java",
    "content": "package com.bala.welcomescreens;\nimport com.bala.welcomescreens.R;\nimport com.nineoldandroids.view.ViewHelper;\n\nimport android.annotation.SuppressLint;\nimport android.graphics.Color;\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.support.v4.app.FragmentManager;\nimport android.support.v4.app.FragmentStatePagerAdapter;\nimport android.support.v4.view.PagerAdapter;\nimport android.support.v4.view.ViewPager;\nimport android.support.v7.app.AppCompatActivity;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.view.Window;\nimport android.view.WindowManager;\nimport android.widget.Button;\nimport android.widget.ImageButton;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\n\n\n@SuppressLint(\"InlinedApi\")\npublic class IntroScreenActivity extends AppCompatActivity{\n\n\tstatic final int TOTAL_PAGES = 4;\n\tButton btnSkip, btnDone;\n    ImageButton btnNext;\n    ViewPager viewpager;\n    PagerAdapter pagerAdapter;\n    LinearLayout circles;\n    boolean isOpaque = true;\n\t\n\t@Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        \n        Window window = getWindow();\n        window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);\n        setContentView(R.layout.welcome_layout);\n        \n        btnSkip = (Button)findViewById(R.id.btn_skip);\n        btnSkip.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                endIntroduction();\n            }\n        });\n        \n        btnNext = (ImageButton)findViewById(R.id.btn_next);\n        btnNext.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                viewpager.setCurrentItem(viewpager.getCurrentItem() + 1, true);\n            }\n        });\n        \n        btnDone = Button.class.cast(findViewById(R.id.done));\n        btnDone.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n            \tendIntroduction();\n            }\n        });\n        \n        viewpager = (ViewPager) findViewById(R.id.pager);\n        pagerAdapter = new ScreenSlideAdapter(getSupportFragmentManager());\n        viewpager.setAdapter(pagerAdapter);\n        viewpager.setPageTransformer(true, new CrossfadePageTransformer());\n        viewpager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {\n            @Override\n            public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n                if (position == TOTAL_PAGES - 2 && positionOffset > 0) {\n                    if (isOpaque) {\n                    \tviewpager.setBackgroundColor(Color.TRANSPARENT);\n                        isOpaque = false;\n                    }\n                } else {\n                    if (!isOpaque) {\n                    \tviewpager.setBackgroundColor(getResources().getColor(R.color.primary_material_light));\n                        isOpaque = true;\n                    }\n                }\n            }\n\n            @Override\n            public void onPageSelected(int position) {\n                setIndicator(position);\n                if (position == TOTAL_PAGES - 2) {\n                    btnSkip.setVisibility(View.GONE);\n                    btnNext.setVisibility(View.GONE);\n                    btnDone.setVisibility(View.VISIBLE);\n                } else if (position < TOTAL_PAGES - 2) {\n                    btnSkip.setVisibility(View.VISIBLE);\n                    btnNext.setVisibility(View.VISIBLE);\n                    btnDone.setVisibility(View.GONE);\n                } else if (position == TOTAL_PAGES - 1) {\n                \tendIntroduction();\n                }\n            }\n\n            @Override\n            public void onPageScrollStateChanged(int state) {\n\n            }\n        });\n\n        buildCircles();\n\t}\n\t\n\t @Override\n\t    protected void onDestroy() {\n\t        super.onDestroy();\n\t        if (viewpager != null) {\n\t        \tviewpager.clearOnPageChangeListeners();\n\t        }\n\t    }\n\n\t    private void buildCircles() {\n\t        circles = (LinearLayout)findViewById(R.id.circles);\n\n\t        float scale = getResources().getDisplayMetrics().density;\n\t        int padding = (int) (5 * scale + 0.5f);\n\n\t        for (int i = 0; i < TOTAL_PAGES - 1; i++) {\n\t            ImageView circle = new ImageView(this);\n\t            circle.setImageResource(R.drawable.ic_checkbox_blank_circle_white_18dp);\n\t            circle.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));\n\t            circle.setAdjustViewBounds(true);\n\t            circle.setPadding(padding, 0, padding, 0);\n\t            circles.addView(circle);\n\t        }\n\n\t        setIndicator(0);\n\t    }\n\n\t    private void setIndicator(int index) {\n\t        if (index < TOTAL_PAGES) {\n\t            for (int i = 0; i < TOTAL_PAGES - 1; i++) {\n\t                ImageView circle = (ImageView) circles.getChildAt(i);\n\t                if (i == index) {\n\t                    circle.setColorFilter(getResources().getColor(R.color.text_selected));\n\t                } else {\n\t                    circle.setColorFilter(getResources().getColor(R.color.transparent_bg));\n\t                }\n\t            }\n\t        }\n\t    }\n\n\t    private void endIntroduction() {\n\t        finish();\n\t        overridePendingTransition(R.anim.abc_fade_in, R.anim.abc_fade_out);\n\t    }\n\n\t    @Override\n\t    public void onBackPressed() {\n\t        if (viewpager.getCurrentItem() == 0) {\n\t            super.onBackPressed();\n\t        } else {\n\t        \tviewpager.setCurrentItem(viewpager.getCurrentItem() - 1);\n\t        }\n\t    }\n\t    \n\tprivate class ScreenSlideAdapter extends FragmentStatePagerAdapter{\n\n\t\tpublic ScreenSlideAdapter(FragmentManager fm) {\n\t\t\tsuper(fm);\n\t\t}\n\n\t\t@Override\n\t\tpublic Fragment getItem(int position) {\n\t\t\tIntroScreenFragment introScreenFragment = null;\n\t\t\tswitch(position){\n\t\t\t\tcase 0:\n\t\t\t\t\tintroScreenFragment = new IntroScreenFragment().newInstance(R.layout.fragment_screen1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tintroScreenFragment = new IntroScreenFragment().newInstance(R.layout.fragment_screen2);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tintroScreenFragment = new IntroScreenFragment().newInstance(R.layout.fragment_screen3);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tintroScreenFragment = new IntroScreenFragment().newInstance(R.layout.fragment_screen4);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn introScreenFragment;\n\t\t}\n\n\t\t@Override\n\t\tpublic int getCount() {\n\t\t\treturn TOTAL_PAGES;\n\t\t}\n\t}\n\t\n\tpublic class CrossfadePageTransformer implements ViewPager.PageTransformer {\n\n        @Override\n        public void transformPage(View page, float position) {\n            int pageWidth = page.getWidth();\n\n            View backgroundView = page.findViewById(R.id.welcome_fragment);\n            View centerImg = page.findViewById(R.id.img);\n            View text_head = page.findViewById(R.id.screen_heading);\n            View text_content = page.findViewById(R.id.screen_desc);\n\n            if (0 <= position && position < 1) {\n                ViewHelper.setTranslationX(page, pageWidth * -position);\n            }\n            if (-1 < position && position < 0) {\n                ViewHelper.setTranslationX(page, pageWidth * -position);\n            }\n\n            if (position <= -1.0f || position >= 1.0f) {\n\n            } else if (position == 0.0f) {\n            } else {\n                if (backgroundView != null) {\n                    ViewHelper.setAlpha(backgroundView, 1.0f - Math.abs(position));\n                }\n                \n                if(centerImg != null){\n                \tViewHelper.setTranslationX(centerImg, pageWidth * position);\n                    ViewHelper.setAlpha(centerImg, 1.0f - Math.abs(position));\n                }\n                \n                if (text_head != null) {\n                    ViewHelper.setTranslationX(text_head, pageWidth * position);\n                    ViewHelper.setAlpha(text_head, 1.0f - Math.abs(position));\n                }\n\n                if (text_content != null) {\n                    ViewHelper.setTranslationX(text_content, pageWidth * position);\n                    ViewHelper.setAlpha(text_content, 1.0f - Math.abs(position));\n                }\n            }\n        }\n    }\n}"
  },
  {
    "path": "src/com/bala/welcomescreens/IntroScreenFragment.java",
    "content": "package com.bala.welcomescreens;\n\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\n\npublic class IntroScreenFragment extends Fragment {\n \n    final static String LAYOUT_ID = \"layoutId\";\n \n    public static IntroScreenFragment newInstance(int layoutId) {\n        IntroScreenFragment pane = new IntroScreenFragment();\n        Bundle bundle = new Bundle();\n        bundle.putInt(LAYOUT_ID, layoutId);\n        pane.setArguments(bundle);\n        return pane;\n    }\n \n    @Override\n    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n        ViewGroup root = (ViewGroup) inflater.inflate(getArguments().getInt(LAYOUT_ID, -1), container, false);\n        return root;\n    }\n}"
  },
  {
    "path": "src/com/bala/welcomescreens/SplashScreenActivity.java",
    "content": "package com.bala.welcomescreens;\n\nimport android.content.Intent;\nimport android.os.Bundle;\nimport android.support.annotation.IntRange;\nimport android.support.v7.app.AppCompatActivity;\n\npublic class SplashScreenActivity extends AppCompatActivity{\n\n\t@Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_splash);\n        \n        //thread for splash screen running\n        Thread screenDisplayTimer = new Thread(){\n        \tpublic void run(){\n        \t\ttry {\n\t\t\t\t\tsleep(2000);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t}finally{\n\t\t\t\t\tstartActivity(new Intent(SplashScreenActivity.this, IntroScreenActivity.class));\n\t\t\t\t\toverridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);\n\t\t\t\t}\n        \t\tfinish();\n        \t}\n        };\n        screenDisplayTimer.start();\n\t}\n}\n"
  }
]