ProgressedView


Source link: https://github.com/yayaa/ProgressedView

ProgressedView

ProgressedView provides you to show progress when user clicks to any view, and then you're done with the task reverse it back to view again. This view extends RelativeLayout, so it is easy to implement in xml or by code.

ProgressedView can host only one child. Becuase it adds another view, which contains progressbar and seekbar, just with exact layoutparams with source view.

Implementation

<com.yayandroid.progressedview.ProgressedView

android:id="@+id/progressed"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_centerInParent="true"

app:animationTime="1000"

app:animationType="swipe_top_to_bottom"

app:bringTargetFront="false"

app:interpolation="bounce"

app:defaultBackgroundColor="#0072C3"

app:progressType="just_indeterminate"

app:remainSteady="false"

app:reversingAnimationType="swipe_top_to_bottom" >

 <Button

 android:layout_width="wrap_content"

 android:layout_height="wrap_content"

 android:layout_centerInParent="true"

 android:padding="10dp"

 android:text="@string/button_text" />
  </com.yayandroid.progressedview.ProgressedView>

You can specify almost everything in xml, and because it extends from RelativeLayout you can put your view inside it as easy as it is Relative. You don't have to give any of these specifications, but otherwise library will be using default variables. All variables have setter methods, so you can modify them in code.

There are two important flags:

1- remainSteady, if you set this true then your source view will not move when progress view comes. This is pretty if you're using one of swipe animations, otherwise it doesn't even seem any different.

2- bringTargetFront, if this is set true that means whichever view will come, it will come to front. So if you set remainSteady flag true and check out one of swipe animation you will not be able to see reversing animation becuase progress view is top on your source view, setting this true solve that issue.

Animation Types

public enum AnimationType {

 SWIPE_LEFT_TO_RIGHT, SWIPE_RIGHT_TO_LEFT, SWIPE_TOP_TO_BOTTOM, SWIPE_BOTTOM_TO_TOP,

SCALE_IN, SCALE_OUT, ALPHA 
}

You can easily set animation types for changing view to progress, and reversing back to view. The animations don't have to be same, you can choose them seperately. And if you choose, only view to progress animation then library will decide what reversing animation should be.

Progress Style

And also possible to change progress style, which is more limited for now:

public enum ProgressType {

 JUST_INDETERMINATE, JUST_SEEK, SEEK_AND_INDETERMINATE 
}

You can choose whether you need to display progress with seekbar or just with indeterminated progress bar. To display seek bar, you can check out examples; for default seekbar, for custom seekbar

Interpolations

You can also specify interpolations which they are defined as attributes so you can simply implement them from xml, or you can set them from code as well. Used interpolations:

AccelerateInterpolator,  DecelerateInterpolator,  AccelerateDecelerateInterpolator,  AnticipateInterpolator,  OvershootInterpolator,  AnticipateOvershootInterpolator,  BounceInterpolator,  LinearInterpolator, // As default  CycleInterpolator // Not so effective for this library

Customization

You can customize all parts of this view, and even just from xml.

You can change background color of default progress view. Or background and progress colors of default seek bar.

If you want to show a custom progressbar, or custom seekbar, or anything else. Just create a layout and point it to progressedView. It will switch your custom view with the animations you choose.

app:progressLayout="@layout/custom_progress_layout"

Link

You can download sample project below from Google Play Store.

Inspired by 'Ladda' project

License

Copyright 2013 yayandroid  Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License. You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 

Resources

A custom imageView which implements shared element transition pattern on your desired image.
Using TransitionalImageView instead of android.ImageView you can click on any image to animate it to full screen mode.

Allocine Api for Android, made for RxJava2. It fetches movies, stars, theaters and showtimes.

Android library for handling multiple CheckBox. Don't use switch-loop, if-loop, or multiple listeners for handling CheckBoxes. Instead, group all CheckBox with CheckBoxGroup.

Library to save image locally and shows options to open and share.

This dial widget is an advanced rotation control that you can easily include into any Android project in the form of an AAR file (Androids’ equivalent of a JAR file). You can think of this Dial control as a gesture library that is just concerned with rotation; having all of the conceivable behaviour you could possibly want in a rotation control. It comes with a free demo app.

Kotlin Wrapper for Jsoup using Pojo and Delegated Properties like bindText, bindAttr, bindImage, bindLink, bindList, bindClass

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes