Home

Awesome

Phone tutorial logo

Phone tutorial

<a href="https://play.google.com/store/apps/details?id=com.gc.demophonetutorial"> <img alt="Android app on Google Play" src="https://developer.android.com/images/brand/en_app_rgb_wo_45.png" /> </a>

Phone tutorial giff

How to use

If you want use this library, you only have to download PhoneTutorial project, import it into your workspace and add the project as a library in your android project settings.

If you prefer it, you can use the gradle dependency, you have to add these lines in your build.gradle file:

repositories {
    jcenter()
}

dependencies {
    compile 'com.github.navasmdc:PhoneTutorial:1.+@aar'
}

This library support Android 2.2

You have to add this lines in the AndroidManifest.xml file too:

<activity
        android:name="com.gc.phonetutorial.activities.TutorialActivity"
        android:screenOrientation="portrait">
</activity>

Configuration

You can configure some elements of this Activity:

For more information see MainActivity of DemoTutorialProyect.

Launch activity

For launch this activity you must add this line in your code:

	startActivityForResult(tutorialIntent, TUTORIALACTIVITY);

Configure next button

For configure next button you have to override onActivityResult function, for example:

	final int TUTORIALACTIVITY = 0;
	
	@Override
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
		
		if(requestCode == TUTORIALACTIVITY){
			if(resultCode == Activity.RESULT_OK){
				// CLick in next button
				Toast.makeText(this, "Next", Toast.LENGTH_SHORT).show();
			}
		}
		
	}