Demo I Enableprivate boolean isSliderAnimation = false;inMainActivity.javato apply this background pager transformation animation with Image translation effect..
Demo II Enableprivate boolean isSliderAnimation = true;inMainActivity.javato apply this background pager transformation animation without Image translation effect..
</blockquote>
如何使用
STEP 1:
Download the code and openarrays.xml.
<?xml version="1.0" encoding="utf-8"?>
<array name="landing_bg">
<item>@color/light_green</item>
<item>@color/light_purple</item>
<item>@color/light_orange</item>
<item>@color/light_cyan</item>
</array>
<array name="icons">
<item>@drawable/email</item>
<item>@drawable/calendar</item>
<item>@drawable/shopping</item>
<item>@drawable/socialnetwork</item>
</array>
<string-array name="titles" >
<item>@string/email</item>
<item>@string/calender</item>
<item>@string/shopping</item>
<item>@string/social_network</item>
</string-array>
<string-array name="hints" >
<item>@string/email_hint</item>
<item>@string/calender_hint</item>
<item>@string/shopping_hint</item>
<item>@string/social_network_hint</item>
</string-array></pre>
Here I have added 4 slides with images, titles and title hints. You can update your png's, text content in above arrays.xml as per your project need and requirement.
Note: The array count of images, titles and title hints should be of same count to avoid IndexBoundException.
</blockquote>
STEP 2:
Drop all your images that are to be used for making AppIntro's into drawable folders. To get exact output for multiple resolution and sizes, add scaled images seperately for drawable-xxxhdpi, drawable-xxhdpi, drawable-xhdpi, drawable-hdpi, drawable-mdpi etc., and fix the height and width of ImageView inviewpager_item.xml
定制
To customize pager attributes like indicator stroke size, stroke color, solid color, solid size, solid color, selected color and unselected color, please openvpi_defaults.xmland customize according to your wish.
Following are the attributes that I have used in my project demo, you can also customize your own.
<resources>
<bool name="default_circle_indicator_centered">true</bool>
<color name="default_circle_indicator_fill_color">#FFFFFFFF</color> <!--change fill color-->
<color name="default_circle_indicator_page_color">#40FFFFFF</color> <!--change indicator un selected fill color-->
<integer name="default_circle_indicator_orientation">0</integer>
<dimen name="default_circle_indicator_radius">3dp</dimen> <!--change radius of the circle-->
<bool name="default_circle_indicator_snap">false</bool>
<color name="default_circle_indicator_stroke_color">#40FFFFFF</color> <!--change stroke color-->
<dimen name="default_circle_indicator_stroke_width">1dp</dimen> <!--change stroke width-->
</resources>
項目主頁:http://www.baiduhome.net/lib/view/home/1438932879504
</span>
本文由用戶
jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!
sesese色