Simple Sliding Intro View
SlidingIntoView
Simple Sliding Intro View.
How to use
Import dependency using Gradle or Maven:
repositories {
maven {
url "https://jitpack.io"
}
}
dependencies {
compile 'com.github.ihsanbal:SlidingIntoView:1.0.1'
}
or Maven:
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<dependency>
<groupId>com.github.ihsanbal</groupId>
<artifactId>SlidingIntoView</artifactId>
<version>1.0.1</version>
</dependency>
Example implementation:
<com.ihsanbal.introview.IntroView
android:id="@+id/intro.view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:paddingTextLeft="14dp"
app:paddingTextRight="14dp"
app:paddingTitleLeft="14dp"
app:paddingTitleRight="14dp"
app:paddingTitleTop="30dp"
app:scaleType="center"
app:scrollDelay="5000"
app:scrollDuration="5"
app:textColor="#fc2f2f"
app:textSize="7sp"
app:titleTextColor="#ffffff"
app:titleTextSize="13sp" />
mIntroView.init(getSupportFragmentManager(),
getResources().getStringArray(R.array.titles),
getResources().getStringArray(R.array.texts),
R.drawable.istanbul_wp, R.drawable.rize_wp, R.drawable.diyarbekir_wp, R.drawable.izmir_wp,...);
Parameters:
You can control these parameters via XML:
<attr name="scrollDuration" format="integer" />
<attr name="scrollDelay" format="integer" />
<attr name="paddingTitleTop" format="dimension" />
<attr name="paddingTitleBottom" format="dimension" />
<attr name="paddingTitleLeft" format="dimension" />
<attr name="paddingTitleRight" format="dimension" />
<attr name="paddingTextTop" format="dimension" />
<attr name="paddingTextBottom" format="dimension" />
<attr name="paddingTextLeft" format="dimension" />
<attr name="paddingTextRight" format="dimension" />
<attr name="titleTextColor" format="color" />
<attr name="textColor" format="color" />
<attr name="titleTextSize" format="dimension" />
<attr name="textSize" format="dimension" />
<attr name="scaleType" format="enum">
<enum name="center" value="0" />
<enum name="centerCrop" value="1" />
<enum name="centerInside" value="2" />
<enum name="fitCenter" value="3" />
<enum name="fitEnd" value="4" />
<enum name="fitStart" value="5" />
<enum name="fitXY" value="6" />
<enum name="matrix" value="7" />
</attr>