master 1132b931c166 cached
30 files
27.5 KB
7.2k tokens
18 symbols
1 requests
Download .txt
Repository: trbala0205/Android-welcome-screen
Branch: master
Commit: 1132b931c166
Files: 30
Total size: 27.5 KB

Directory structure:
gitextract_aqzjekwr/

├── .gitattributes
├── AndroidManifest.xml
├── README.md
├── bin/
│   └── WelcomeScreens.apk
├── libs/
│   ├── android-support-v4.jar
│   └── nineoldandroids-2.4.0.jar
├── res/
│   ├── drawable/
│   │   ├── bg_item_selected_drawable.xml
│   │   └── selectable_item_background_general.xml
│   ├── drawable-v21/
│   │   └── selectable_item_background_general.xml
│   ├── layout/
│   │   ├── activity_main.xml
│   │   ├── activity_splash.xml
│   │   ├── fragment_screen1.xml
│   │   ├── fragment_screen2.xml
│   │   ├── fragment_screen3.xml
│   │   ├── fragment_screen4.xml
│   │   ├── toolbar.xml
│   │   └── welcome_layout.xml
│   ├── menu/
│   │   ├── main.xml
│   │   └── menu_main.xml
│   ├── values/
│   │   ├── colors.xml
│   │   ├── dimens.xml
│   │   ├── strings.xml
│   │   └── styles.xml
│   ├── values-v11/
│   │   └── styles.xml
│   ├── values-v14/
│   │   └── styles.xml
│   ├── values-v21/
│   │   └── styles.xml
│   └── values-w820dp/
│       └── dimens.xml
└── src/
    └── com/
        └── bala/
            └── welcomescreens/
                ├── IntroScreenActivity.java
                ├── IntroScreenFragment.java
                └── SplashScreenActivity.java

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitattributes
================================================
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs     diff=csharp

# Standard to msysgit
*.doc	 diff=astextplain
*.DOC	 diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot  diff=astextplain
*.DOT  diff=astextplain
*.pdf  diff=astextplain
*.PDF	 diff=astextplain
*.rtf	 diff=astextplain
*.RTF	 diff=astextplain


================================================
FILE: AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.bala.welcomescreens"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="11"
        android:targetSdkVersion="23" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".SplashScreenActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity 
            android:name=".MainActivity" 
            android:label="@string/app_name" />
        <activity 
            android:name=".IntroScreenActivity" 
            android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
    </application>

</manifest>


================================================
FILE: README.md
================================================
# Android-welcome-screen
Activity transition Activities , Fragment and View Pager translation

Screenshots
===========

![ScreenShot](https://github.com/trbala0205/Android-welcome-screen/blob/master/screenshots/viewpager1.png?raw=true)

![ScreenShot](https://github.com/trbala0205/Android-welcome-screen/blob/master/screenshots/viewpager2.png)

![ScreenShot](https://github.com/trbala0205/Android-welcome-screen/blob/master/screenshots/viewpager3.png)


================================================
FILE: res/drawable/bg_item_selected_drawable.xml
================================================
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="#12000000" />
</shape>

================================================
FILE: res/drawable/selectable_item_background_general.xml
================================================
<selector xmlns:android="http://schemas.android.com/apk/res/android" android:exitFadeDuration="@android:integer/config_mediumAnimTime">
    <item android:drawable="@drawable/bg_item_selected_drawable" android:state_focused="true" android:state_pressed="false" />
    <item android:drawable="@drawable/bg_item_selected_drawable" android:state_pressed="true" />
    <item android:drawable="@android:color/transparent" />
</selector>

================================================
FILE: res/drawable-v21/selectable_item_background_general.xml
================================================
<selector xmlns:android="http://schemas.android.com/apk/res/android"
    android:exitFadeDuration="@android:integer/config_mediumAnimTime" >
    <item android:state_pressed="false" android:state_focused="true" android:drawable="@drawable/bg_item_selected_drawable" />
    <item android:state_pressed="true" android:drawable="@drawable/bg_item_selected_drawable" />
    <item android:drawable="@android:color/transparent" />
</selector>

================================================
FILE: res/layout/activity_main.xml
================================================
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <!--including the toobar-->
    <include layout="@layout/toolbar" />


    <Button
        android:id="@+id/button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:text="Go To Welcome Screen" />


</RelativeLayout>


================================================
FILE: res/layout/activity_splash.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/splashScreen"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/primary_dark"
    android:orientation="vertical">


    <ImageView
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:id="@+id/imageView"
        android:src="@drawable/message"
        android:layout_marginTop="100dp"
        android:layout_centerHorizontal="true" />

    <TextView
        android:id="@+id/editText"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/imageView"
        android:layout_centerHorizontal="true"
        android:text="Topping In"
        android:textColor="#A6D6F6"
        android:textSize="30sp" />

</RelativeLayout>

================================================
FILE: res/layout/fragment_screen1.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/welcome_fragment"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:clipChildren="false"
    android:background="#5C6BC0"
    android:weightSum="6"
    android:paddingTop="48dp">

    <FrameLayout
        android:id="@+id/image_container"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="4"
        android:clipChildren="false">

        <ImageView
            android:id="@+id/img"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:scaleType="centerInside"
            android:src="@drawable/ic_phone_white_48dp"
            android:paddingLeft="16dp"
            android:paddingRight="16dp"
            android:layout_gravity="center"/>

    </FrameLayout>

    <TextView
        android:id="@+id/screen_heading"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:paddingLeft="24dp"
        android:paddingRight="24dp"
        android:textSize="24sp"
        android:textColor="#ffffff"
        android:gravity="bottom|center_horizontal"
        android:text="@string/screen1_title" />

    <TextView
        android:id="@+id/screen_desc"
        android:text="@string/screen1_desc"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:paddingLeft="24dp"
        android:paddingRight="24dp"
        android:textSize="16sp"
        android:textColor="#ffffff"
        android:gravity="top|center_horizontal"
        android:minHeight="@dimen/welcome_content_min_height"/>
    <View
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:background="@android:color/transparent"/>

</LinearLayout>

================================================
FILE: res/layout/fragment_screen2.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/welcome_fragment"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clipChildren="false"
    android:background="#00AE76"
    android:orientation="vertical"
    android:layout_weight="6"
    android:paddingTop="48dp">

    <FrameLayout
        android:id="@id/image_container"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="4"
        android:clipChildren="false">

        <ImageView
            android:id="@+id/img"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:scaleType="centerInside"
            android:src="@drawable/ic_account_multiple_white_48dp"
            android:paddingLeft="18dp"
            android:paddingRight="18dp"
            android:layout_gravity="center"/>

    </FrameLayout>

    <TextView
        android:id="@id/screen_heading"
        android:text="@string/screen2_title"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:textSize="24sp"
        android:textColor="#ffffff"
        android:paddingLeft="24dp"
        android:paddingRight="24dp"
        android:gravity="bottom|center_horizontal"/>

    <TextView
        android:id="@id/screen_desc"
        android:text="@string/screen2_desc"
        android:layout_width="fill_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:paddingLeft="24dp"
        android:paddingRight="24dp"
        android:textSize="16sp"
        android:textColor="#ffffff"
        android:gravity="top|center_horizontal"
        android:minHeight="@dimen/welcome_content_min_height" />

    <View
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:background="@android:color/transparent"/>

</LinearLayout>

================================================
FILE: res/layout/fragment_screen3.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/welcome_fragment"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clipChildren="false"
    android:background="#00bcd4"
    android:orientation="vertical"
    android:layout_weight="6"
    android:paddingTop="48dp">

    <FrameLayout
        android:id="@+id/image_container"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="4"
        android:clipChildren="false">

        <ImageView
            android:id="@+id/img"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:scaleType="centerInside"
            android:src="@drawable/ic_laptop_white_36dp"
            android:paddingLeft="16dp"
            android:paddingRight="16dp"
            android:gravity="center"
            android:layout_gravity="center"/>

    </FrameLayout>

    <TextView
        android:id="@+id/screen_heading"
        android:text="@string/screen3_title"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:textSize="24sp"
        android:textColor="#ffffff"
        android:paddingLeft="24dp"
        android:paddingRight="24dp"
        android:gravity="bottom|center_horizontal" />

    <TextView
        android:id="@+id/screen_desc"
        android:text="@string/screen3_desc"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:textSize="16sp"
        android:textColor="#ffffff"
        android:paddingLeft="24dp"
        android:paddingRight="24dp"
        android:gravity="top|center_horizontal"
        android:minHeight="@dimen/welcome_content_min_height"/>

    <View
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:background="@android:color/transparent"/>

</LinearLayout>

================================================
FILE: res/layout/fragment_screen4.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@android:color/transparent" />


================================================
FILE: res/layout/toolbar.xml
================================================
<?xml version="1.0" encoding="utf-8"?>

<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/toolbar"
    android:layout_width="match_parent"
    android:layout_height="?attr/actionBarSize"
    android:background="?attr/colorPrimary"
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
    app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />

================================================
FILE: res/layout/welcome_layout.xml
================================================
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@android:color/transparent">

    <android.support.v4.view.ViewPager
        android:id="@+id/pager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/dim_foreground_disabled_material_dark"/>

    <View
        android:layout_width="fill_parent"
        android:layout_height="1dp"
        android:layout_above="@+id/button_layout"
        android:background="#33ffffff"/>

    <RelativeLayout
        android:id="@+id/button_layout"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:background="@android:color/transparent">

        <Button
            android:id="@+id/btn_skip"
            android:layout_width="80dp"
            android:layout_height="48dp"
            android:gravity="center"
            android:layout_alignParentLeft="true"
            android:text="SKIP"
            android:textSize="18sp"
            android:textColor="@color/abc_primary_text_material_dark"
            android:background="@drawable/selectable_item_background_general"/>

        <LinearLayout
            android:id="@+id/circles"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_centerInParent="true">

        </LinearLayout>

        <Button
            android:id="@+id/done"
            android:layout_width="80dp"
            android:layout_height="48dp"
            android:gravity="center"
            android:layout_alignParentRight="true"
            android:text="DONE"
            android:textSize="18sp"
            android:textColor="@color/abc_primary_text_material_dark"
            android:background="@drawable/selectable_item_background_general"
            android:visibility="gone"/>

        <ImageButton
            android:id="@+id/btn_next"
            android:layout_width="80dp"
            android:layout_height="48dp"
            android:gravity="center"
            android:paddingTop="12dp"
            android:paddingBottom="12dp"
            android:src="@drawable/ic_action_next"
            android:layout_alignParentRight="true"
            android:background="@drawable/selectable_item_background_general"
            android:scaleType="fitCenter"/>
        </RelativeLayout>

</RelativeLayout>


================================================
FILE: res/menu/main.xml
================================================
<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    tools:context="com.bala.welcomescreens.MainActivity" >

    <item
        android:id="@+id/action_settings"
        android:orderInCategory="100"
        android:title="@string/action_settings"
        app:showAsAction="never"/>

</menu>


================================================
FILE: res/menu/menu_main.xml
================================================
<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools" tools:context=".MainActivity">
    <item android:id="@+id/action_settings" android:title="@string/action_settings"
        android:orderInCategory="100" app:showAsAction="never" />
</menu>


================================================
FILE: res/values/colors.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>

    <color name="text_selected">#558</color>
    <color name="transparent_bg">#fff</color>
</resources>

================================================
FILE: res/values/dimens.xml
================================================
<resources>
    <!-- Default screen margins, per the Android Design guidelines. -->
    <dimen name="activity_horizontal_margin">16dp</dimen>
    <dimen name="activity_vertical_margin">16dp</dimen>

    <!--Welcome sliding page  -->
    <dimen name="welcome_images_size">360dp</dimen>
    <dimen name="welcome_images_margin_top">0dp</dimen>
    <dimen name="welcome_heading_margin_bottom">12dp</dimen>
    <dimen name="welcome_text_margin">48dp</dimen>
    <dimen name="welcome_heading">24sp</dimen>
    <dimen name="welcome_text_margin_bottom">12dp</dimen>
    <dimen name="welcome_content_min_height">96dp</dimen>
    <dimen name="welcome_content">16.0sp</dimen>
</resources>


================================================
FILE: res/values/strings.xml
================================================
<resources>
    <string name="app_name">WelcomeScreen</string>

    <string name="hello_world">Hello world!</string>
    <string name="action_settings">Settings</string>

    <string name="screen1_title">Unlimited Calls</string>
    <string name="screen1_desc">Call your friends, family, Relatives free of cost anytime anywhere.</string>
    <string name="screen2_title">Group Conversations</string>
    <string name="screen2_desc">Create your own group and share Snapshots, Videos etc. </string>
    <string name="screen3_title">Synchronize with your laptop</string>
    <string name="screen3_desc">Get notified with your calls and messages to your laptop</string>

</resources>


================================================
FILE: res/values/styles.xml
================================================
<resources>

    <style name="AppTheme" parent="BaseTheme"/>

    <style name="BaseTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="colorPrimary">@color/primary</item>

        <item name="colorPrimaryDark">@color/primary_dark</item>

        <item name="colorControlHighlight">@color/accent_translucent</item>

        <item name="colorAccent">@color/accent</item>
    </style>


    <color name="primary">#2196F3</color>
    <color name="primary_dark">#1976D2</color>
    <color name="accent">#03A9F4</color>
    <color name="accent_translucent">#80bebebe</color>
    <color name="accent_bright">#FFF493</color>

</resources>

================================================
FILE: res/values-v11/styles.xml
================================================
<resources>

    <!--
        Base application theme for API 11+. This theme completely replaces
        AppBaseTheme from res/values/styles.xml on API 11+ devices.
    -->
    <style name="AppBaseTheme" parent="Theme.AppCompat.Light">
        <!-- API 11 theme customizations can go here. -->
    </style>

</resources>


================================================
FILE: res/values-v14/styles.xml
================================================
<resources>

    <!--
        Base application theme for API 14+. This theme completely replaces
        AppBaseTheme from BOTH res/values/styles.xml and
        res/values-v11/styles.xml on API 14+ devices.
    -->
    <style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- API 14 theme customizations can go here. -->
    </style>

</resources>


================================================
FILE: res/values-v21/styles.xml
================================================
<?xml version="1.0" encoding="utf-8"?>

<resources>

    <style name="AppTheme" parent="BaseTheme">

    </style>

</resources>

================================================
FILE: res/values-w820dp/dimens.xml
================================================
<resources>
    <!-- Example customization of dimensions originally defined in res/values/dimens.xml
         (such as screen margins) for screens with more than 820dp of available width. This
         would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
    <dimen name="activity_horizontal_margin">64dp</dimen>
</resources>


================================================
FILE: src/com/bala/welcomescreens/IntroScreenActivity.java
================================================
package com.bala.welcomescreens;
import com.bala.welcomescreens.R;
import com.nineoldandroids.view.ViewHelper;

import android.annotation.SuppressLint;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;


@SuppressLint("InlinedApi")
public class IntroScreenActivity extends AppCompatActivity{

	static final int TOTAL_PAGES = 4;
	Button btnSkip, btnDone;
    ImageButton btnNext;
    ViewPager viewpager;
    PagerAdapter pagerAdapter;
    LinearLayout circles;
    boolean isOpaque = true;
	
	@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        Window window = getWindow();
        window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
        setContentView(R.layout.welcome_layout);
        
        btnSkip = (Button)findViewById(R.id.btn_skip);
        btnSkip.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                endIntroduction();
            }
        });
        
        btnNext = (ImageButton)findViewById(R.id.btn_next);
        btnNext.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                viewpager.setCurrentItem(viewpager.getCurrentItem() + 1, true);
            }
        });
        
        btnDone = Button.class.cast(findViewById(R.id.done));
        btnDone.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
            	endIntroduction();
            }
        });
        
        viewpager = (ViewPager) findViewById(R.id.pager);
        pagerAdapter = new ScreenSlideAdapter(getSupportFragmentManager());
        viewpager.setAdapter(pagerAdapter);
        viewpager.setPageTransformer(true, new CrossfadePageTransformer());
        viewpager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
            @Override
            public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
                if (position == TOTAL_PAGES - 2 && positionOffset > 0) {
                    if (isOpaque) {
                    	viewpager.setBackgroundColor(Color.TRANSPARENT);
                        isOpaque = false;
                    }
                } else {
                    if (!isOpaque) {
                    	viewpager.setBackgroundColor(getResources().getColor(R.color.primary_material_light));
                        isOpaque = true;
                    }
                }
            }

            @Override
            public void onPageSelected(int position) {
                setIndicator(position);
                if (position == TOTAL_PAGES - 2) {
                    btnSkip.setVisibility(View.GONE);
                    btnNext.setVisibility(View.GONE);
                    btnDone.setVisibility(View.VISIBLE);
                } else if (position < TOTAL_PAGES - 2) {
                    btnSkip.setVisibility(View.VISIBLE);
                    btnNext.setVisibility(View.VISIBLE);
                    btnDone.setVisibility(View.GONE);
                } else if (position == TOTAL_PAGES - 1) {
                	endIntroduction();
                }
            }

            @Override
            public void onPageScrollStateChanged(int state) {

            }
        });

        buildCircles();
	}
	
	 @Override
	    protected void onDestroy() {
	        super.onDestroy();
	        if (viewpager != null) {
	        	viewpager.clearOnPageChangeListeners();
	        }
	    }

	    private void buildCircles() {
	        circles = (LinearLayout)findViewById(R.id.circles);

	        float scale = getResources().getDisplayMetrics().density;
	        int padding = (int) (5 * scale + 0.5f);

	        for (int i = 0; i < TOTAL_PAGES - 1; i++) {
	            ImageView circle = new ImageView(this);
	            circle.setImageResource(R.drawable.ic_checkbox_blank_circle_white_18dp);
	            circle.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
	            circle.setAdjustViewBounds(true);
	            circle.setPadding(padding, 0, padding, 0);
	            circles.addView(circle);
	        }

	        setIndicator(0);
	    }

	    private void setIndicator(int index) {
	        if (index < TOTAL_PAGES) {
	            for (int i = 0; i < TOTAL_PAGES - 1; i++) {
	                ImageView circle = (ImageView) circles.getChildAt(i);
	                if (i == index) {
	                    circle.setColorFilter(getResources().getColor(R.color.text_selected));
	                } else {
	                    circle.setColorFilter(getResources().getColor(R.color.transparent_bg));
	                }
	            }
	        }
	    }

	    private void endIntroduction() {
	        finish();
	        overridePendingTransition(R.anim.abc_fade_in, R.anim.abc_fade_out);
	    }

	    @Override
	    public void onBackPressed() {
	        if (viewpager.getCurrentItem() == 0) {
	            super.onBackPressed();
	        } else {
	        	viewpager.setCurrentItem(viewpager.getCurrentItem() - 1);
	        }
	    }
	    
	private class ScreenSlideAdapter extends FragmentStatePagerAdapter{

		public ScreenSlideAdapter(FragmentManager fm) {
			super(fm);
		}

		@Override
		public Fragment getItem(int position) {
			IntroScreenFragment introScreenFragment = null;
			switch(position){
				case 0:
					introScreenFragment = new IntroScreenFragment().newInstance(R.layout.fragment_screen1);
					break;
				case 1:
					introScreenFragment = new IntroScreenFragment().newInstance(R.layout.fragment_screen2);
					break;
				case 2:
					introScreenFragment = new IntroScreenFragment().newInstance(R.layout.fragment_screen3);
					break;
				case 3:
					introScreenFragment = new IntroScreenFragment().newInstance(R.layout.fragment_screen4);
					break;
			}
			return introScreenFragment;
		}

		@Override
		public int getCount() {
			return TOTAL_PAGES;
		}
	}
	
	public class CrossfadePageTransformer implements ViewPager.PageTransformer {

        @Override
        public void transformPage(View page, float position) {
            int pageWidth = page.getWidth();

            View backgroundView = page.findViewById(R.id.welcome_fragment);
            View centerImg = page.findViewById(R.id.img);
            View text_head = page.findViewById(R.id.screen_heading);
            View text_content = page.findViewById(R.id.screen_desc);

            if (0 <= position && position < 1) {
                ViewHelper.setTranslationX(page, pageWidth * -position);
            }
            if (-1 < position && position < 0) {
                ViewHelper.setTranslationX(page, pageWidth * -position);
            }

            if (position <= -1.0f || position >= 1.0f) {

            } else if (position == 0.0f) {
            } else {
                if (backgroundView != null) {
                    ViewHelper.setAlpha(backgroundView, 1.0f - Math.abs(position));
                }
                
                if(centerImg != null){
                	ViewHelper.setTranslationX(centerImg, pageWidth * position);
                    ViewHelper.setAlpha(centerImg, 1.0f - Math.abs(position));
                }
                
                if (text_head != null) {
                    ViewHelper.setTranslationX(text_head, pageWidth * position);
                    ViewHelper.setAlpha(text_head, 1.0f - Math.abs(position));
                }

                if (text_content != null) {
                    ViewHelper.setTranslationX(text_content, pageWidth * position);
                    ViewHelper.setAlpha(text_content, 1.0f - Math.abs(position));
                }
            }
        }
    }
}

================================================
FILE: src/com/bala/welcomescreens/IntroScreenFragment.java
================================================
package com.bala.welcomescreens;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class IntroScreenFragment extends Fragment {
 
    final static String LAYOUT_ID = "layoutId";
 
    public static IntroScreenFragment newInstance(int layoutId) {
        IntroScreenFragment pane = new IntroScreenFragment();
        Bundle bundle = new Bundle();
        bundle.putInt(LAYOUT_ID, layoutId);
        pane.setArguments(bundle);
        return pane;
    }
 
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        ViewGroup root = (ViewGroup) inflater.inflate(getArguments().getInt(LAYOUT_ID, -1), container, false);
        return root;
    }
}

================================================
FILE: src/com/bala/welcomescreens/SplashScreenActivity.java
================================================
package com.bala.welcomescreens;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.IntRange;
import android.support.v7.app.AppCompatActivity;

public class SplashScreenActivity extends AppCompatActivity{

	@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);
        
        //thread for splash screen running
        Thread screenDisplayTimer = new Thread(){
        	public void run(){
        		try {
					sleep(2000);
				} catch (InterruptedException e) {
				}finally{
					startActivity(new Intent(SplashScreenActivity.this, IntroScreenActivity.class));
					overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
				}
        		finish();
        	}
        };
        screenDisplayTimer.start();
	}
}
Download .txt
gitextract_aqzjekwr/

├── .gitattributes
├── AndroidManifest.xml
├── README.md
├── bin/
│   └── WelcomeScreens.apk
├── libs/
│   ├── android-support-v4.jar
│   └── nineoldandroids-2.4.0.jar
├── res/
│   ├── drawable/
│   │   ├── bg_item_selected_drawable.xml
│   │   └── selectable_item_background_general.xml
│   ├── drawable-v21/
│   │   └── selectable_item_background_general.xml
│   ├── layout/
│   │   ├── activity_main.xml
│   │   ├── activity_splash.xml
│   │   ├── fragment_screen1.xml
│   │   ├── fragment_screen2.xml
│   │   ├── fragment_screen3.xml
│   │   ├── fragment_screen4.xml
│   │   ├── toolbar.xml
│   │   └── welcome_layout.xml
│   ├── menu/
│   │   ├── main.xml
│   │   └── menu_main.xml
│   ├── values/
│   │   ├── colors.xml
│   │   ├── dimens.xml
│   │   ├── strings.xml
│   │   └── styles.xml
│   ├── values-v11/
│   │   └── styles.xml
│   ├── values-v14/
│   │   └── styles.xml
│   ├── values-v21/
│   │   └── styles.xml
│   └── values-w820dp/
│       └── dimens.xml
└── src/
    └── com/
        └── bala/
            └── welcomescreens/
                ├── IntroScreenActivity.java
                ├── IntroScreenFragment.java
                └── SplashScreenActivity.java
Download .txt
SYMBOL INDEX (18 symbols across 3 files)

FILE: src/com/bala/welcomescreens/IntroScreenActivity.java
  class IntroScreenActivity (line 24) | @SuppressLint("InlinedApi")
    method onCreate (line 35) | @Override
    method onDestroy (line 112) | @Override
    method buildCircles (line 120) | private void buildCircles() {
    method setIndicator (line 138) | private void setIndicator(int index) {
    method endIntroduction (line 151) | private void endIntroduction() {
    method onBackPressed (line 156) | @Override
    class ScreenSlideAdapter (line 165) | private class ScreenSlideAdapter extends FragmentStatePagerAdapter{
      method ScreenSlideAdapter (line 167) | public ScreenSlideAdapter(FragmentManager fm) {
      method getItem (line 171) | @Override
      method getCount (line 191) | @Override
    class CrossfadePageTransformer (line 197) | public class CrossfadePageTransformer implements ViewPager.PageTransfo...
      method transformPage (line 199) | @Override

FILE: src/com/bala/welcomescreens/IntroScreenFragment.java
  class IntroScreenFragment (line 9) | public class IntroScreenFragment extends Fragment {
    method newInstance (line 13) | public static IntroScreenFragment newInstance(int layoutId) {
    method onCreateView (line 21) | @Override

FILE: src/com/bala/welcomescreens/SplashScreenActivity.java
  class SplashScreenActivity (line 8) | public class SplashScreenActivity extends AppCompatActivity{
    method onCreate (line 10) | @Override
Condensed preview — 30 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (31K chars).
[
  {
    "path": ".gitattributes",
    "chars": 378,
    "preview": "# Auto detect text files and perform LF normalization\n* text=auto\n\n# Custom for Visual Studio\n*.cs     diff=csharp\n\n# St"
  },
  {
    "path": "AndroidManifest.xml",
    "chars": 1095,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package="
  },
  {
    "path": "README.md",
    "chars": 452,
    "preview": "# Android-welcome-screen\nActivity transition Activities , Fragment and View Pager translation\n\nScreenshots\n===========\n\n"
  },
  {
    "path": "res/drawable/bg_item_selected_drawable.xml",
    "chars": 115,
    "preview": "<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",
    "chars": 430,
    "preview": "<selector xmlns:android=\"http://schemas.android.com/apk/res/android\" android:exitFadeDuration=\"@android:integer/config_m"
  },
  {
    "path": "res/drawable-v21/selectable_item_background_general.xml",
    "chars": 435,
    "preview": "<selector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:exitFadeDuration=\"@android:integer/conf"
  },
  {
    "path": "res/layout/activity_main.xml",
    "chars": 611,
    "preview": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/t"
  },
  {
    "path": "res/layout/activity_splash.xml",
    "chars": 925,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    an"
  },
  {
    "path": "res/layout/fragment_screen1.xml",
    "chars": 2034,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    andr"
  },
  {
    "path": "res/layout/fragment_screen2.xml",
    "chars": 2046,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    andr"
  },
  {
    "path": "res/layout/fragment_screen3.xml",
    "chars": 2077,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    andr"
  },
  {
    "path": "res/layout/fragment_screen4.xml",
    "chars": 245,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    andro"
  },
  {
    "path": "res/layout/toolbar.xml",
    "chars": 476,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<android.support.v7.widget.Toolbar xmlns:android=\"http://schemas.android.com/apk"
  },
  {
    "path": "res/layout/welcome_layout.xml",
    "chars": 2660,
    "preview": "<RelativeLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.c"
  },
  {
    "path": "res/menu/main.xml",
    "chars": 414,
    "preview": "<menu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\""
  },
  {
    "path": "res/menu/menu_main.xml",
    "chars": 361,
    "preview": "<menu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\""
  },
  {
    "path": "res/values/colors.xml",
    "chars": 155,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <color name=\"text_selected\">#558</color>\n    <color name=\"transp"
  },
  {
    "path": "res/values/dimens.xml",
    "chars": 678,
    "preview": "<resources>\n    <!-- Default screen margins, per the Android Design guidelines. -->\n    <dimen name=\"activity_horizontal"
  },
  {
    "path": "res/values/strings.xml",
    "chars": 680,
    "preview": "<resources>\n    <string name=\"app_name\">WelcomeScreen</string>\n\n    <string name=\"hello_world\">Hello world!</string>\n   "
  },
  {
    "path": "res/values/styles.xml",
    "chars": 649,
    "preview": "<resources>\n\n    <style name=\"AppTheme\" parent=\"BaseTheme\"/>\n\n    <style name=\"BaseTheme\" parent=\"Theme.AppCompat.Light."
  },
  {
    "path": "res/values-v11/styles.xml",
    "chars": 321,
    "preview": "<resources>\n\n    <!--\n        Base application theme for API 11+. This theme completely replaces\n        AppBaseTheme fr"
  },
  {
    "path": "res/values-v14/styles.xml",
    "chars": 378,
    "preview": "<resources>\n\n    <!--\n        Base application theme for API 14+. This theme completely replaces\n        AppBaseTheme fr"
  },
  {
    "path": "res/values-v21/styles.xml",
    "chars": 127,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<resources>\n\n    <style name=\"AppTheme\" parent=\"BaseTheme\">\n\n    </style>\n\n</res"
  },
  {
    "path": "res/values-w820dp/dimens.xml",
    "chars": 358,
    "preview": "<resources>\n    <!-- Example customization of dimensions originally defined in res/values/dimens.xml\n         (such as s"
  },
  {
    "path": "src/com/bala/welcomescreens/IntroScreenActivity.java",
    "chars": 8381,
    "preview": "package com.bala.welcomescreens;\nimport com.bala.welcomescreens.R;\nimport com.nineoldandroids.view.ViewHelper;\n\nimport a"
  },
  {
    "path": "src/com/bala/welcomescreens/IntroScreenFragment.java",
    "chars": 829,
    "preview": "package com.bala.welcomescreens;\n\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.view."
  },
  {
    "path": "src/com/bala/welcomescreens/SplashScreenActivity.java",
    "chars": 882,
    "preview": "package com.bala.welcomescreens;\n\nimport android.content.Intent;\nimport android.os.Bundle;\nimport android.support.annota"
  }
]

// ... and 3 more files (download for full content)

About this extraction

This page contains the full source code of the trbala0205/Android-welcome-screen GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 30 files (27.5 KB), approximately 7.2k tokens, and a symbol index with 18 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!