-
-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added "Canteen" demo featuring Canteen's onboarding concept (https://…
…dribbble.com/shots/2767412-Canteen-Onboarding-Screens) of the awesome @JovieBrett
- Loading branch information
1 parent
32bafa3
commit a76e350
Showing
13 changed files
with
257 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
app/src/main/java/com/heinrichreimersoftware/materialintro/demo/CanteenIntroActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package com.heinrichreimersoftware.materialintro.demo; | ||
|
||
import android.os.Build; | ||
import android.os.Bundle; | ||
import android.text.SpannableString; | ||
import android.text.Spanned; | ||
import android.text.style.TypefaceSpan; | ||
|
||
import com.heinrichreimersoftware.materialintro.app.IntroActivity; | ||
import com.heinrichreimersoftware.materialintro.slide.SimpleSlide; | ||
|
||
public class CanteenIntroActivity extends IntroActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
|
||
setButtonBackVisible(false); | ||
setButtonNextVisible(false); | ||
setButtonCtaVisible(true); | ||
setButtonCtaTintMode(BUTTON_CTA_TINT_MODE_BACKGROUND); | ||
TypefaceSpan labelSpan = new TypefaceSpan(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP ? "sans-serif-medium" : "sans serif"); | ||
SpannableString label = SpannableString.valueOf(getString(R.string.label_button_cta_canteen_intro)); | ||
label.setSpan(labelSpan, 0, label.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); | ||
setButtonCtaLabel(label); | ||
|
||
addSlide(new SimpleSlide.Builder() | ||
.title(R.string.title_canteen_intro1) | ||
.description(R.string.description_canteen_intro1) | ||
.image(R.drawable.art_canteen_intro1) | ||
.background(R.color.color_canteen) | ||
.backgroundDark(R.color.color_dark_canteen) | ||
.layout(R.layout.slide_canteen) | ||
.build()); | ||
|
||
addSlide(new SimpleSlide.Builder() | ||
.title(R.string.title_canteen_intro2) | ||
.description(R.string.description_canteen_intro2) | ||
.image(R.drawable.art_canteen_intro2) | ||
.background(R.color.color_canteen) | ||
.backgroundDark(R.color.color_dark_canteen) | ||
.layout(R.layout.slide_canteen) | ||
.build()); | ||
|
||
addSlide(new SimpleSlide.Builder() | ||
.title(R.string.title_canteen_intro3) | ||
.description(R.string.description_canteen_intro3) | ||
.image(R.drawable.art_canteen_intro3) | ||
.background(R.color.color_canteen) | ||
.backgroundDark(R.color.color_dark_canteen) | ||
.layout(R.layout.slide_canteen) | ||
.build()); | ||
|
||
autoplay(2500, INFINITE); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,8 +182,6 @@ public void onPageScrollStateChanged(int state) { | |
} | ||
}); | ||
*/ | ||
|
||
autoplay(500, 2); | ||
} | ||
|
||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:baselineAligned="false" | ||
android:clipToPadding="false" | ||
android:clipChildren="false" | ||
android:fitsSystemWindows="false" | ||
android:padding="@dimen/mi_baseline"> | ||
|
||
<ImageView | ||
android:id="@id/mi_image" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1" | ||
android:layout_gravity="center" | ||
android:gravity="center" | ||
android:adjustViewBounds="true" | ||
tools:ignore="ContentDescription" | ||
tools:src="@android:drawable/sym_action_call"/> | ||
|
||
<android.support.v4.widget.Space | ||
android:layout_width="@dimen/mi_baseline" | ||
android:layout_height="wrap_content"/> | ||
|
||
<com.heinrichreimersoftware.materialintro.view.parallax.ParallaxLinearLayout | ||
android:layout_width="0dp" | ||
android:layout_height="match_parent" | ||
android:layout_weight="1" | ||
android:gravity="center" | ||
android:orientation="vertical" | ||
android:clipChildren="false" | ||
android:clipToPadding="false"> | ||
|
||
<TextView | ||
android:id="@id/mi_title" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
app:layout_parallaxFactor="0.5" | ||
android:gravity="center" | ||
android:textAppearance="@style/TextAppearance.AppCompat.Headline" | ||
android:fontFamily="sans-serif-medium" | ||
tools:ignore="UnusedAttribute" | ||
tools:text="Lorem ipsum"/> | ||
|
||
<TextView | ||
android:id="@id/mi_description" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="@dimen/mi_baseline" | ||
app:layout_parallaxFactor="0.4" | ||
android:gravity="center" | ||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" | ||
android:textSize="15sp" | ||
android:fontFamily="sans-serif-medium" | ||
tools:ignore="UnusedAttribute" | ||
tools:text="Lorem ipsum dolor sit amet, consectetur, adipisci velit, …"/> | ||
|
||
</com.heinrichreimersoftware.materialintro.view.parallax.ParallaxLinearLayout> | ||
|
||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<com.heinrichreimersoftware.materialintro.view.parallax.ParallaxLinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:clipToPadding="false" | ||
android:fitsSystemWindows="false" | ||
android:gravity="center" | ||
android:orientation="vertical" | ||
android:padding="@dimen/mi_baseline"> | ||
|
||
<ImageView | ||
android:id="@id/mi_image" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginBottom="@dimen/mi_baseline" | ||
android:paddingLeft="?actionBarSize" | ||
android:paddingRight="?actionBarSize" | ||
android:gravity="center" | ||
android:adjustViewBounds="true" | ||
tools:ignore="ContentDescription" | ||
tools:src="@android:drawable/sym_action_call"/> | ||
|
||
<TextView | ||
android:id="@id/mi_title" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="@dimen/mi_baseline" | ||
app:layout_parallaxFactor="0.5" | ||
android:gravity="center" | ||
android:textAppearance="@style/TextAppearance.AppCompat.Headline" | ||
android:fontFamily="sans-serif-medium" | ||
tools:ignore="UnusedAttribute" | ||
tools:text="Lorem ipsum"/> | ||
|
||
<TextView | ||
android:id="@id/mi_description" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="@dimen/mi_baseline" | ||
app:layout_parallaxFactor="0.4" | ||
android:gravity="center" | ||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" | ||
android:textSize="15sp" | ||
android:fontFamily="sans-serif-medium" | ||
tools:ignore="UnusedAttribute" | ||
tools:text="Lorem ipsum dolor sit amet, consectetur, adipisci velit, …"/> | ||
|
||
</com.heinrichreimersoftware.materialintro.view.parallax.ParallaxLinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters