Você pode ler em português (https://github.com/welbert6/MaterialStoryView/edit/grasp/ReadmePT.md)
Screenshots
Introduction
MaterialStoryView is an Android library for implementing a narrative carousel, just like these discovered on social networks like Instagram and Fb. This library makes it simple so as to add a narrative viewing part to your Android software, permitting for fast and easy integration.
✅ Saves story as seen in SharedPreferences: Ensures customers don’t repeatedly see the identical story, enhancing consumer expertise.
✅ Motion button on story: Permits for direct interactions, similar to visiting a hyperlink or performing a particular motion, proper from the story.
✅ Navigation between tales by tapping on the appropriate and left aspect of the display screen: Makes navigating via tales simple, letting customers advance or return with a easy faucet.
✅ Helps RTL and LTR: Accommodates customers of languages which might be learn from proper to left (RTL) and left to proper (LTR), guaranteeing a world and inclusive consumer expertise.
✅ Helps tales with and with out titles: Presents flexibility to show tales each with titles for context and with out titles for a cleaner design.
✅ 100% Customization: Permits full customization of the story look, together with period, indicator shade, picture radius dimension, textual content shade, and so on., to completely match your software’s visible id.
Setup
1. Add the gradle dependency
Add JitPack repository to your root construct.gradle on the finish of repositories:
repositories {
…
maven { url ‘https://jitpack.io’ }
}
}
Add the dependency:
implementation ‘com.github.welbert6:MaterialStoryView:1.0.0’
}
2. Utilization
Add CarouselStoryView to your XML structure:
android:id=“@+id/carouselStoryView“
android:layout_width=“match_parent“
android:layout_height=“wrap_content“
android:orientation=“horizontal“
android:layout_margin=“10dp“
app:miniStoryTextColor=“#000“
app:miniStoryImageRadius=“36dp“
app:miniStorySpaceBetweenImageAndIndicator=“2dp“
app:miniStoryItemIndicatorWidth=“3dp“
app:storyDuration=“6000“ />
Initialize and configure CarouselStoryView in your Exercise:
//Guarantee to name init With Exercise to init lib
carrosselStoryView.initWithActivity(this)
// You possibly can addStory or addStories in case you have an inventory of tales
carrosselStoryView.addStory(getCopasaStories())
carrosselStoryView.addStory(getCemigStories())
carrosselStoryView.addStory(getCminStories())
carrosselStoryView.addStories(getModelStorys())
Customization
MaterialStoryView presents numerous customization choices via XML attributes, permitting for modifications of:
Colours of visited and pending story indicators
Story picture radius
Story merchandise indicator width
Story period
For extra particulars on customization choices, check with the out there choices within the declare-styleable XML attributes part.
miniStoryTextSize (Mini Story Textual content Dimension): Units the textual content dimension of mini story captions, permitting customization of textual content scale for higher readability. miniStoryTextColor (Mini Story Textual content Coloration): Specifies the textual content shade for mini story captions, providing the flexibility to match the textual content shade with the app theme. miniStoryTextFont (Mini Story Textual content Font): Permits setting the textual content font for mini tales via a reference, enabling typography customization to align with the visible id. miniStoryVisitedIndicatorColor (Mini Story Visited Indicator Coloration): Defines the indicator shade for tales which were considered by the consumer, serving to distinguish between new and reviewed content material. miniStoryPendingIndicatorColor (Mini Story Pending Indicator Coloration): Specifies the indicator shade for tales that haven’t but been considered, facilitating the identification of recent content material. miniStoryImageRadius (Mini Story Picture Radius): Determines the radius of pictures in mini tales, permitting the corners of pictures to be rounded for a softer look. miniStorySpaceBetweenImageAndIndicator (House Between Mini Story Picture and Indicator): Units the house
Credit score
shts/StoriesProgressView: This Library was used to show the progress of the tales
Developed By
Welbert Moreira
Be at liberty to contribute enhancements, bug fixes, or new options. Your contribution is welcome!
License
Copyright (c) 2024 Welbert Moreira
Permission is hereby granted, freed from cost, to any individual acquiring a replica
of this software program and related documentation recordsdata (the “Software program”), to deal
within the Software program with out restriction, together with with out limitation the rights
to make use of, copy, modify, merge, publish, distribute, sublicense, and/or promote
copies of the Software program, and to allow individuals to whom the Software program is
furnished to take action, topic to the next circumstances:
The above copyright discover and this permission discover shall be included in all
copies or substantial parts of the Software program.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.