├── .gitignore
├── LICENSE
├── README.md
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── images
├── QuickReturn_feature_graphic.png
├── en_generic_rgb_wo_60.png
├── facebook.png
├── google_plus.png
├── twitter.png
└── web_hi_res_512.png
├── library
├── .gitignore
├── build.gradle
├── gradle.properties
├── maven-push.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── etiennelawlor
│ │ └── quickreturn
│ │ └── library
│ │ └── ApplicationTest.java
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── etiennelawlor
│ │ └── quickreturn
│ │ └── library
│ │ ├── enums
│ │ ├── QuickReturnAnimationType.java
│ │ └── QuickReturnViewType.java
│ │ ├── listeners
│ │ ├── QuickReturnListViewOnScrollListener.java
│ │ ├── QuickReturnRecyclerViewOnScrollListener.java
│ │ ├── QuickReturnScrollViewOnScrollChangedListener.java
│ │ ├── QuickReturnWebViewOnScrollChangedListener.java
│ │ ├── SpeedyQuickReturnListViewOnScrollListener.java
│ │ ├── SpeedyQuickReturnRecyclerViewOnScrollListener.java
│ │ ├── SpeedyQuickReturnScrollViewOnScrollChangedListener.java
│ │ └── SpeedyQuickReturnWebViewOnScrollChangedListener.java
│ │ ├── utils
│ │ └── QuickReturnUtils.java
│ │ └── views
│ │ ├── NotifyingListView.java
│ │ ├── NotifyingScrollView.java
│ │ └── NotifyingWebView.java
│ └── res
│ ├── anim
│ ├── anticipate_slide_footer_down.xml
│ ├── anticipate_slide_header_up.xml
│ ├── overshoot_slide_footer_up.xml
│ └── overshoot_slide_header_down.xml
│ └── values
│ └── tags.xml
├── sample
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── aidl
│ └── com
│ │ └── android
│ │ └── vending
│ │ └── billing
│ │ └── IInAppBillingService.aidl
│ ├── assets
│ ├── fonts
│ │ ├── GothamNarrow-Light.ttf
│ │ ├── Roboto-Black.ttf
│ │ ├── Roboto-BlackItalic.ttf
│ │ ├── Roboto-Bold.ttf
│ │ ├── Roboto-BoldCondensed.ttf
│ │ ├── Roboto-BoldCondensedItalic.ttf
│ │ ├── Roboto-BoldItalic.ttf
│ │ ├── Roboto-Condensed.ttf
│ │ ├── Roboto-CondensedItalic.ttf
│ │ ├── Roboto-Italic.ttf
│ │ ├── Roboto-Light.ttf
│ │ ├── Roboto-LightItalic.ttf
│ │ ├── Roboto-Medium.ttf
│ │ ├── Roboto-MediumItalic.ttf
│ │ ├── Roboto-Regular.ttf
│ │ ├── Roboto-Thin.ttf
│ │ └── Roboto-ThinItalic.ttf
│ └── lipsum.html
│ ├── java
│ └── com
│ │ └── etiennelawlor
│ │ └── quickreturn
│ │ ├── QuickReturnApplication.java
│ │ ├── activities
│ │ ├── QuickReturnActivity.java
│ │ ├── QuickReturnBaseActivity.java
│ │ ├── QuickReturnFacebookActivity.java
│ │ ├── QuickReturnGooglePlusActivity.java
│ │ ├── QuickReturnListViewActivity.java
│ │ ├── QuickReturnRecyclerViewActivity.java
│ │ ├── QuickReturnScrollViewActivity.java
│ │ ├── QuickReturnTwitterActivity.java
│ │ └── QuickReturnWebViewActivity.java
│ │ ├── adapters
│ │ ├── CountriesGridLayoutAdapter.java
│ │ ├── CountriesLinearLayoutAdapter.java
│ │ ├── FacebookAdapter.java
│ │ ├── GooglePlusAdapter.java
│ │ └── TwitterAdapter.java
│ │ ├── drawables
│ │ └── RoundedDrawable.java
│ │ ├── enums
│ │ └── Typefaces.java
│ │ ├── fragments
│ │ ├── QuickReturnFacebookFragment.java
│ │ ├── QuickReturnFooterListViewFragment.java
│ │ ├── QuickReturnFooterRecyclerViewFragment.java
│ │ ├── QuickReturnFragment.java
│ │ ├── QuickReturnGooglePlusFragment.java
│ │ ├── QuickReturnHeaderListViewFragment.java
│ │ ├── QuickReturnHeaderRecyclerViewFragment.java
│ │ ├── QuickReturnTwitterFragment.java
│ │ ├── QuickReturnWebViewFragment.java
│ │ ├── QuickReturnWithExtraOnScrollListenerFragment.java
│ │ ├── SpeedyQuickReturnFragment.java
│ │ └── SpeedyQuickReturnWebViewFragment.java
│ │ ├── interfaces
│ │ └── QuickReturnInterface.java
│ │ ├── itemdecorations
│ │ ├── DividerItemDecoration.java
│ │ ├── GridSpacesItemDecoration.java
│ │ └── SpacesItemDecoration.java
│ │ ├── models
│ │ ├── FacebookPost.java
│ │ ├── GooglePlusPost.java
│ │ └── Tweet.java
│ │ ├── utils
│ │ └── TypefaceUtil.java
│ │ └── views
│ │ ├── CustomFontTextView.java
│ │ └── RoundedImageView.java
│ └── res
│ ├── anim
│ ├── crouton_in.xml
│ ├── crouton_in_delayed.xml
│ ├── crouton_out.xml
│ ├── down_from_top.xml
│ ├── slide_footer_down.xml
│ ├── slide_footer_up.xml
│ ├── slide_header_down.xml
│ ├── slide_header_up.xml
│ └── up_from_bottom.xml
│ ├── drawable-hdpi
│ ├── ic_action_add_person.png
│ ├── ic_action_camera.png
│ ├── ic_action_donate.png
│ ├── ic_action_edit.png
│ ├── ic_action_edit_red.png
│ ├── ic_action_gallery.png
│ ├── ic_action_github.png
│ ├── ic_action_google_plus_comment.png
│ ├── ic_action_important.png
│ ├── ic_action_marker.png
│ ├── ic_action_messages.png
│ ├── ic_action_messages_highlighted.png
│ ├── ic_action_more.png
│ ├── ic_action_more_highlighted.png
│ ├── ic_action_news.png
│ ├── ic_action_news_highlighted.png
│ ├── ic_action_notifications.png
│ ├── ic_action_notifications_highlighted.png
│ ├── ic_action_reply.png
│ ├── ic_action_share.png
│ ├── ic_action_twitter_camera.png
│ ├── ic_action_up.png
│ ├── ic_action_users.png
│ ├── ic_action_users_highlighted.png
│ └── ic_retweet.png
│ ├── drawable-mdpi
│ ├── ic_action_add_person.png
│ ├── ic_action_camera.png
│ ├── ic_action_donate.png
│ ├── ic_action_edit.png
│ ├── ic_action_edit_red.png
│ ├── ic_action_gallery.png
│ ├── ic_action_github.png
│ ├── ic_action_google_plus_comment.png
│ ├── ic_action_important.png
│ ├── ic_action_marker.png
│ ├── ic_action_messages.png
│ ├── ic_action_messages_highlighted.png
│ ├── ic_action_more.png
│ ├── ic_action_more_highlighted.png
│ ├── ic_action_news.png
│ ├── ic_action_news_highlighted.png
│ ├── ic_action_notifications.png
│ ├── ic_action_notifications_highlighted.png
│ ├── ic_action_reply.png
│ ├── ic_action_share.png
│ ├── ic_action_twitter_camera.png
│ ├── ic_action_up.png
│ ├── ic_action_users.png
│ ├── ic_action_users_highlighted.png
│ └── ic_retweet.png
│ ├── drawable-xhdpi
│ ├── ic_action_add_person.png
│ ├── ic_action_camera.png
│ ├── ic_action_donate.png
│ ├── ic_action_edit.png
│ ├── ic_action_edit_red.png
│ ├── ic_action_gallery.png
│ ├── ic_action_github.png
│ ├── ic_action_google_plus_comment.png
│ ├── ic_action_important.png
│ ├── ic_action_marker.png
│ ├── ic_action_messages.png
│ ├── ic_action_messages_highlighted.png
│ ├── ic_action_more.png
│ ├── ic_action_more_highlighted.png
│ ├── ic_action_news.png
│ ├── ic_action_news_highlighted.png
│ ├── ic_action_notifications.png
│ ├── ic_action_notifications_highlighted.png
│ ├── ic_action_reply.png
│ ├── ic_action_share.png
│ ├── ic_action_twitter_camera.png
│ ├── ic_action_up.png
│ ├── ic_action_users.png
│ ├── ic_action_users_highlighted.png
│ ├── ic_retweet.png
│ └── tabs_pattern.png
│ ├── drawable-xxhdpi
│ ├── ic_action_add_person.png
│ ├── ic_action_camera.png
│ ├── ic_action_donate.png
│ ├── ic_action_edit.png
│ ├── ic_action_edit_red.png
│ ├── ic_action_gallery.png
│ ├── ic_action_github.png
│ ├── ic_action_google_plus_comment.png
│ ├── ic_action_important.png
│ ├── ic_action_marker.png
│ ├── ic_action_messages.png
│ ├── ic_action_messages_highlighted.png
│ ├── ic_action_more.png
│ ├── ic_action_more_highlighted.png
│ ├── ic_action_news.png
│ ├── ic_action_news_highlighted.png
│ ├── ic_action_notifications.png
│ ├── ic_action_notifications_highlighted.png
│ ├── ic_action_reply.png
│ ├── ic_action_share.png
│ ├── ic_action_twitter_camera.png
│ ├── ic_action_up.png
│ ├── ic_action_users.png
│ ├── ic_action_users_highlighted.png
│ └── ic_retweet.png
│ ├── drawable
│ ├── background_tabs.xml
│ ├── card_default.xml
│ ├── card_highlighted.xml
│ ├── selector_bg_card.xml
│ ├── selector_bg_tab.xml
│ ├── shape_circle_white_dropshadow.xml
│ ├── shape_google_avatar.xml
│ ├── shape_gray1_semi_rounded_rectangle.xml
│ ├── shape_rounded_rectangle.xml
│ ├── shape_rounded_rectangle_cornflower_blue.xml
│ ├── shape_rounded_rectangle_facebook_primary.xml
│ ├── shape_rounded_rectangle_transparent_black.xml
│ └── shape_whitesmoke_semi_rounded_rectangle.xml
│ ├── layout
│ ├── activity_quick_return.xml
│ ├── activity_quick_return_facebook.xml
│ ├── activity_quick_return_google_plus.xml
│ ├── activity_quick_return_listview.xml
│ ├── activity_quick_return_recyclerview.xml
│ ├── activity_quick_return_scrollview.xml
│ ├── activity_quick_return_twitter.xml
│ ├── appbarlayout_with_tablayout.xml
│ ├── country_grid_item.xml
│ ├── country_row.xml
│ ├── facebook_row.xml
│ ├── fragment_listview_quick_return_footer.xml
│ ├── fragment_listview_quick_return_header.xml
│ ├── fragment_quick_return.xml
│ ├── fragment_quick_return_facebook.xml
│ ├── fragment_quick_return_google_plus.xml
│ ├── fragment_quick_return_twitter.xml
│ ├── fragment_quick_return_webview.xml
│ ├── fragment_recyclerview_quick_return_footer.xml
│ ├── fragment_recyclerview_quick_return_header.xml
│ ├── google_plus_row.xml
│ ├── list_item.xml
│ ├── scrollview_content.xml
│ ├── twitter_row.xml
│ └── view_header_placeholder.xml
│ ├── menu
│ └── quick_return.xml
│ ├── mipmap-hdpi
│ └── ic_launcher.png
│ ├── mipmap-mdpi
│ └── ic_launcher.png
│ ├── mipmap-xhdpi
│ └── ic_launcher.png
│ ├── mipmap-xxhdpi
│ └── ic_launcher.png
│ ├── mipmap-xxxhdpi
│ └── ic_launcher.png
│ ├── values-v21
│ └── styles.xml
│ ├── values-w820dp
│ └── dimens.xml
│ └── values
│ ├── arrays.xml
│ ├── attrs.xml
│ ├── colors.xml
│ ├── dimens.xml
│ ├── material_design_colors.xml
│ ├── plurals.xml
│ ├── strings.xml
│ ├── styles.xml
│ ├── tags.xml
│ └── themes.xml
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | # [Android] ========================
2 | # Built application files
3 | *.apk
4 | *.ap_
5 |
6 | # Files for the Dalvik VM
7 | *.dex
8 |
9 | # Java class files
10 | *.class
11 |
12 | # Generated files
13 | bin/
14 | gen/
15 |
16 | # Gradle files
17 | .gradle/
18 | build/
19 |
20 | # Local configuration file (sdk path, etc)
21 | local.properties
22 |
23 | # Proguard folder generated by Eclipse
24 | proguard/
25 |
26 | # Log Files
27 | *.log
28 |
29 |
30 | ## Directory-based project format:
31 | .idea/
32 |
33 | ## File-based project format:
34 | *.ipr
35 | *.iws
36 |
37 | ## Plugin-specific files:
38 |
39 | # IntelliJ
40 | out/
41 |
42 | # mpeltonen/sbt-idea plugin
43 | .idea_modules/
44 |
45 | # JIRA plugin
46 | atlassian-ide-plugin.xml
47 |
48 | # Crashlytics plugin (for Android Studio and IntelliJ)
49 | com_crashlytics_export_strings.xml
50 |
51 |
52 | # [Maven] ========================
53 | target/
54 | pom.xml.tag
55 | pom.xml.releaseBackup
56 | pom.xml.versionsBackup
57 | pom.xml.next
58 | release.properties
59 |
60 |
61 | # [Gradle-Android] ========================
62 |
63 | # Ignore Gradle GUI config
64 | gradle-app.setting
65 |
66 | # Gradle Signing
67 | signing.properties
68 | quickreturn.keystore
69 |
70 | # Mobile Tools for Java (J2ME)
71 | .mtj.tmp/
72 |
73 | # Package Files #
74 | *.jar
75 | *.war
76 | *.ear
77 |
78 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
79 | hs_err_pid*
80 |
81 | # Misc
82 | /.idea/workspace.xml
83 | .DS_Store
84 | /captures
85 | **/*.iml
86 | *.class
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## DEPRECATED
2 |
3 | **QuickReturn** is deprecated. No more development will be taking place. At the time of creating this library CoordinatorLayout did not exist. Please check out CoordinatorLayout as you should be able to implement all the similar functionality that is in this library with the help of Behaviors.
4 |
5 | Thanks for all your support!
6 |
7 | ***
8 |
9 |
10 |
11 | **QuickReturn** is a library which showcases the **QuickReturn UI Pattern**.
12 |
13 | The **QuickReturn UI Pattern** reveals or hides a header or footer as content is scrolled up or down.
14 |
15 | This library has support for **RecyclerView**, **ListView**, and **ScrollView**.
16 |
17 | The samples in the project include examples of the **QuickReturn UI Pattern** as seen in **Google+**, **Facebook**, and **Twitter**.
18 |
19 | [](https://android-arsenal.com/details/3/698)
20 |
21 | ## Setup
22 |
23 | #### Gradle
24 |
25 | `compile 'com.github.lawloretienne:quickreturn:0.0.3'`
26 |
27 | #### Maven
28 | ```
29 |
30 | com.github.lawloretienne
31 | quickreturn
32 | 0.0.3
33 |
34 | ```
35 |
36 | ## Sample Usage
37 |
38 | [Wiki Examples](https://github.com/lawloretienne/QuickReturn/wiki)
39 |
40 | ### Download Link
41 |
42 | https://www.dropbox.com/s/2vf3pzqme9r2gu1/app-release.apk?dl=0
43 |
44 | ### QuickReturn Demo
45 |
46 | [](https://www.youtube.com/watch?v=SxcvZ1qIyZ4)
47 |
48 |
49 | ## Developed By
50 |
51 | * Etienne Lawlor
52 |
53 | **Email** - lawloretienne@gmail.com
54 |
55 | **Website** - https://medium.com/@etiennelawlor
56 |
57 | ## Projects/Apps using QuickReturn
58 |
59 | - TradeHero
60 | - RadPad
61 |
62 | Feel free to contact me to add yours to this list.
63 |
64 |
65 | ## License
66 |
67 | ```
68 | Copyright 2014 Etienne Lawlor
69 |
70 | Licensed under the Apache License, Version 2.0 (the "License");
71 | you may not use this file except in compliance with the License.
72 | You may obtain a copy of the License at
73 |
74 | http://www.apache.org/licenses/LICENSE-2.0
75 |
76 | Unless required by applicable law or agreed to in writing, software
77 | distributed under the License is distributed on an "AS IS" BASIS,
78 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
79 | See the License for the specific language governing permissions and
80 | limitations under the License.
81 | ```
82 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | mavenCentral()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.5.0'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | mavenCentral()
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | VERSION_NAME=0.0.3
21 | VERSION_CODE=3
22 | GROUP=com.github.lawloretienne
23 |
24 | POM_DESCRIPTION=Showcases QuickReturn UI Pattern as either a header, footer, or both header and footer
25 | POM_URL=https://github.com/lawloretienne/QuickReturn
26 | POM_SCM_URL=https://github.com/lawloretienne/QuickReturn
27 | POM_SCM_CONNECTION=scm:git@github.com:lawloretienne/QuickReturn.git
28 | POM_SCM_DEV_CONNECTION=scm:git@github.com:lawloretienne/QuickReturn.git
29 | POM_LICENCE_NAME=The Apache Software License, Version 2.0
30 | POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
31 | POM_LICENCE_DIST=repo
32 | POM_DEVELOPER_ID=lawloretienne
33 | POM_DEVELOPER_NAME=Etienne Lawlor
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Jan 20 00:06:32 PST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/images/QuickReturn_feature_graphic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/images/QuickReturn_feature_graphic.png
--------------------------------------------------------------------------------
/images/en_generic_rgb_wo_60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/images/en_generic_rgb_wo_60.png
--------------------------------------------------------------------------------
/images/facebook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/images/facebook.png
--------------------------------------------------------------------------------
/images/google_plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/images/google_plus.png
--------------------------------------------------------------------------------
/images/twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/images/twitter.png
--------------------------------------------------------------------------------
/images/web_hi_res_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/images/web_hi_res_512.png
--------------------------------------------------------------------------------
/library/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/library/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply from: 'maven-push.gradle'
3 |
4 | android {
5 | compileSdkVersion 23
6 | buildToolsVersion "23.0.2"
7 |
8 | defaultConfig {
9 | minSdkVersion 14
10 | targetSdkVersion 22
11 | versionCode 3
12 | versionName "0.0.3"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile 'com.android.support:recyclerview-v7:23.1.1'
24 | compile fileTree(dir: 'libs', include: ['*.jar'])
25 | }
26 |
--------------------------------------------------------------------------------
/library/gradle.properties:
--------------------------------------------------------------------------------
1 | POM_NAME=QuickReturn
2 | POM_ARTIFACT_ID=quickreturn
3 | POM_PACKAGING=aar
--------------------------------------------------------------------------------
/library/maven-push.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Chris Banes
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | apply plugin: 'maven'
18 | apply plugin: 'signing'
19 |
20 | def isReleaseBuild() {
21 | return VERSION_NAME.contains("SNAPSHOT") == false
22 | }
23 |
24 | def getReleaseRepositoryUrl() {
25 | return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
26 | : "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
27 | }
28 |
29 | def getSnapshotRepositoryUrl() {
30 | return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL
31 | : "https://oss.sonatype.org/content/repositories/snapshots/"
32 | }
33 |
34 | def getRepositoryUsername() {
35 | return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : ""
36 | }
37 |
38 | def getRepositoryPassword() {
39 | return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : ""
40 | }
41 |
42 | afterEvaluate { project ->
43 | uploadArchives {
44 | repositories {
45 | mavenDeployer {
46 | beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
47 |
48 | pom.groupId = GROUP
49 | pom.artifactId = POM_ARTIFACT_ID
50 | pom.version = VERSION_NAME
51 |
52 | repository(url: getReleaseRepositoryUrl()) {
53 | authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
54 | }
55 | snapshotRepository(url: getSnapshotRepositoryUrl()) {
56 | authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
57 | }
58 |
59 | pom.project {
60 | name POM_NAME
61 | packaging POM_PACKAGING
62 | description POM_DESCRIPTION
63 | url POM_URL
64 |
65 | scm {
66 | url POM_SCM_URL
67 | connection POM_SCM_CONNECTION
68 | developerConnection POM_SCM_DEV_CONNECTION
69 | }
70 |
71 | licenses {
72 | license {
73 | name POM_LICENCE_NAME
74 | url POM_LICENCE_URL
75 | distribution POM_LICENCE_DIST
76 | }
77 | }
78 |
79 | developers {
80 | developer {
81 | id POM_DEVELOPER_ID
82 | name POM_DEVELOPER_NAME
83 | }
84 | }
85 | }
86 | }
87 | }
88 | }
89 |
90 | signing {
91 | required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
92 | sign configurations.archives
93 | }
94 |
95 | //task androidJavadocs(type: Javadoc) {
96 | //source = android.sourceSets.main.allJava
97 | //}
98 |
99 | //task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
100 | //classifier = 'javadoc'
101 | //from androidJavadocs.destinationDir
102 | //}
103 |
104 | task androidSourcesJar(type: Jar) {
105 | classifier = 'sources'
106 | from android.sourceSets.main.java.sourceFiles
107 | }
108 |
109 | artifacts {
110 | archives androidSourcesJar
111 | }
112 | }
--------------------------------------------------------------------------------
/library/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Applications/Android Studio.app/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/library/src/androidTest/java/com/etiennelawlor/quickreturn/library/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.library;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/library/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/library/src/main/java/com/etiennelawlor/quickreturn/library/enums/QuickReturnAnimationType.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.library.enums;
2 |
3 | /**
4 | * Created by etiennelawlor on 7/10/14.
5 | */
6 | public enum QuickReturnAnimationType {
7 | TRANSLATION_SIMPLE,
8 | TRANSLATION_SNAP,
9 | TRANSLATION_ANTICIPATE_OVERSHOOT
10 | }
--------------------------------------------------------------------------------
/library/src/main/java/com/etiennelawlor/quickreturn/library/enums/QuickReturnViewType.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.library.enums;
2 |
3 | /**
4 | * Created by etiennelawlor on 7/10/14.
5 | */
6 | public enum QuickReturnViewType {
7 | HEADER,
8 | FOOTER,
9 | BOTH,
10 | GOOGLE_PLUS,
11 | TWITTER
12 | }
--------------------------------------------------------------------------------
/library/src/main/java/com/etiennelawlor/quickreturn/library/listeners/QuickReturnScrollViewOnScrollChangedListener.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.library.listeners;
2 |
3 | import android.view.View;
4 | import android.widget.ScrollView;
5 |
6 | import com.etiennelawlor.quickreturn.library.enums.QuickReturnViewType;
7 | import com.etiennelawlor.quickreturn.library.views.NotifyingScrollView;
8 |
9 | /**
10 | * Created by etiennelawlor on 7/11/14.
11 | */
12 | public class QuickReturnScrollViewOnScrollChangedListener implements NotifyingScrollView.OnScrollChangedListener {
13 |
14 | // region Member Variables
15 | private final QuickReturnViewType mQuickReturnViewType;
16 | private final View mHeader;
17 | private final int mMinHeaderTranslation;
18 | private final View mFooter;
19 | private final int mMinFooterTranslation;
20 |
21 | private int mHeaderDiffTotal = 0;
22 | private int mFooterDiffTotal = 0;
23 | // endregion
24 |
25 | // region Constructors
26 | private QuickReturnScrollViewOnScrollChangedListener(Builder builder) {
27 | mQuickReturnViewType = builder.mQuickReturnViewType;
28 | mHeader = builder.mHeader;
29 | mMinHeaderTranslation = builder.mMinHeaderTranslation;
30 | mFooter = builder.mFooter;
31 | mMinFooterTranslation = builder.mMinFooterTranslation;
32 | }
33 | // endregion
34 |
35 | @Override
36 | public void onScrollChanged(ScrollView who, int l, int t, int oldl, int oldt) {
37 | int diff = oldt - t;
38 |
39 | switch (mQuickReturnViewType) {
40 | case HEADER:
41 | if (diff <= 0) { // scrolling down
42 | mHeaderDiffTotal = Math.max(mHeaderDiffTotal + diff, mMinHeaderTranslation);
43 | } else { // scrolling up
44 | mHeaderDiffTotal = Math.min(Math.max(mHeaderDiffTotal + diff, mMinHeaderTranslation), 0);
45 | }
46 |
47 | mHeader.setTranslationY(mHeaderDiffTotal);
48 | break;
49 | case FOOTER:
50 | if (diff <= 0) { // scrolling down
51 | mFooterDiffTotal = Math.max(mFooterDiffTotal + diff, -mMinFooterTranslation);
52 | } else { // scrolling up
53 | mFooterDiffTotal = Math.min(Math.max(mFooterDiffTotal + diff, -mMinFooterTranslation), 0);
54 | }
55 |
56 | mFooter.setTranslationY(-mFooterDiffTotal);
57 | break;
58 | case BOTH:
59 | if (diff <= 0) { // scrolling down
60 | mHeaderDiffTotal = Math.max(mHeaderDiffTotal + diff, mMinHeaderTranslation);
61 | mFooterDiffTotal = Math.max(mFooterDiffTotal + diff, -mMinFooterTranslation);
62 | } else { // scrolling up
63 | mHeaderDiffTotal = Math.min(Math.max(mHeaderDiffTotal + diff, mMinHeaderTranslation), 0);
64 | mFooterDiffTotal = Math.min(Math.max(mFooterDiffTotal + diff, -mMinFooterTranslation), 0);
65 | }
66 |
67 | mHeader.setTranslationY(mHeaderDiffTotal);
68 | mFooter.setTranslationY(-mFooterDiffTotal);
69 | break;
70 | }
71 | }
72 |
73 | // region Inner Classes
74 |
75 | public static class Builder {
76 | // Required parameters
77 | private final QuickReturnViewType mQuickReturnViewType;
78 |
79 | // Optional parameters - initialized to default values
80 | private View mHeader = null;
81 | private int mMinHeaderTranslation = 0;
82 | private View mFooter = null;
83 | private int mMinFooterTranslation = 0;
84 |
85 | public Builder(QuickReturnViewType quickReturnViewType) {
86 | mQuickReturnViewType = quickReturnViewType;
87 | }
88 |
89 | public Builder header(View header) {
90 | mHeader = header;
91 | return this;
92 | }
93 |
94 | public Builder minHeaderTranslation(int minHeaderTranslation) {
95 | mMinHeaderTranslation = minHeaderTranslation;
96 | return this;
97 | }
98 |
99 | public Builder footer(View footer) {
100 | mFooter = footer;
101 | return this;
102 | }
103 |
104 | public Builder minFooterTranslation(int minFooterTranslation) {
105 | mMinFooterTranslation = minFooterTranslation;
106 | return this;
107 | }
108 |
109 | public QuickReturnScrollViewOnScrollChangedListener build() {
110 | return new QuickReturnScrollViewOnScrollChangedListener(this);
111 | }
112 | }
113 |
114 | // endregion
115 | }
116 |
--------------------------------------------------------------------------------
/library/src/main/java/com/etiennelawlor/quickreturn/library/listeners/QuickReturnWebViewOnScrollChangedListener.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.library.listeners;
2 |
3 | import android.view.View;
4 | import android.webkit.WebView;
5 |
6 | import com.etiennelawlor.quickreturn.library.enums.QuickReturnViewType;
7 | import com.etiennelawlor.quickreturn.library.views.NotifyingWebView;
8 |
9 | /**
10 | * Created by etiennelawlor on 7/11/14.
11 | */
12 | public class QuickReturnWebViewOnScrollChangedListener implements NotifyingWebView.OnScrollChangedListener {
13 |
14 | // region Member Variables
15 | private final QuickReturnViewType mQuickReturnViewType;
16 | private final View mHeader;
17 | private final int mMinHeaderTranslation;
18 | private final View mFooter;
19 | private final int mMinFooterTranslation;
20 |
21 | private int mHeaderDiffTotal = 0;
22 | private int mFooterDiffTotal = 0;
23 | // endregion
24 |
25 | // region Constructors
26 | private QuickReturnWebViewOnScrollChangedListener(Builder builder) {
27 | mQuickReturnViewType = builder.mQuickReturnViewType;
28 | mHeader = builder.mHeader;
29 | mMinHeaderTranslation = builder.mMinHeaderTranslation;
30 | mFooter = builder.mFooter;
31 | mMinFooterTranslation = builder.mMinFooterTranslation;
32 | }
33 | // endregion
34 |
35 | @Override
36 | public void onScrollChanged(WebView who, int l, int t, int oldl, int oldt) {
37 | int diff = oldt - t;
38 |
39 | switch (mQuickReturnViewType) {
40 | case HEADER:
41 | if (diff <= 0) { // scrolling down
42 | mHeaderDiffTotal = Math.max(mHeaderDiffTotal + diff, mMinHeaderTranslation);
43 | } else { // scrolling up
44 | mHeaderDiffTotal = Math.min(Math.max(mHeaderDiffTotal + diff, mMinHeaderTranslation), 0);
45 | }
46 |
47 | mHeader.setTranslationY(mHeaderDiffTotal);
48 | break;
49 | case FOOTER:
50 | if (diff <= 0) { // scrolling down
51 | mFooterDiffTotal = Math.max(mFooterDiffTotal + diff, -mMinFooterTranslation);
52 | } else { // scrolling up
53 | mFooterDiffTotal = Math.min(Math.max(mFooterDiffTotal + diff, -mMinFooterTranslation), 0);
54 | }
55 |
56 | mFooter.setTranslationY(-mFooterDiffTotal);
57 | break;
58 | case BOTH:
59 | if (diff <= 0) { // scrolling down
60 | mHeaderDiffTotal = Math.max(mHeaderDiffTotal + diff, mMinHeaderTranslation);
61 | mFooterDiffTotal = Math.max(mFooterDiffTotal + diff, -mMinFooterTranslation);
62 | } else { // scrolling up
63 | mHeaderDiffTotal = Math.min(Math.max(mHeaderDiffTotal + diff, mMinHeaderTranslation), 0);
64 | mFooterDiffTotal = Math.min(Math.max(mFooterDiffTotal + diff, -mMinFooterTranslation), 0);
65 | }
66 |
67 | mHeader.setTranslationY(mHeaderDiffTotal);
68 | mFooter.setTranslationY(-mFooterDiffTotal);
69 | break;
70 | }
71 | }
72 |
73 | // region Inner Classes
74 |
75 | public static class Builder {
76 | // Required parameters
77 | private final QuickReturnViewType mQuickReturnViewType;
78 |
79 | // Optional parameters - initialized to default values
80 | private View mHeader = null;
81 | private int mMinHeaderTranslation = 0;
82 | private View mFooter = null;
83 | private int mMinFooterTranslation = 0;
84 |
85 | public Builder(QuickReturnViewType quickReturnViewType) {
86 | mQuickReturnViewType = quickReturnViewType;
87 | }
88 |
89 | public Builder header(View header) {
90 | mHeader = header;
91 | return this;
92 | }
93 |
94 | public Builder minHeaderTranslation(int minHeaderTranslation) {
95 | mMinHeaderTranslation = minHeaderTranslation;
96 | return this;
97 | }
98 |
99 | public Builder footer(View footer) {
100 | mFooter = footer;
101 | return this;
102 | }
103 |
104 | public Builder minFooterTranslation(int minFooterTranslation) {
105 | mMinFooterTranslation = minFooterTranslation;
106 | return this;
107 | }
108 |
109 | public QuickReturnWebViewOnScrollChangedListener build() {
110 | return new QuickReturnWebViewOnScrollChangedListener(this);
111 | }
112 | }
113 |
114 | // endregion
115 | }
116 |
--------------------------------------------------------------------------------
/library/src/main/java/com/etiennelawlor/quickreturn/library/utils/QuickReturnUtils.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.library.utils;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.LinearLayoutManager;
5 | import android.support.v7.widget.RecyclerView;
6 | import android.util.DisplayMetrics;
7 | import android.util.Log;
8 | import android.util.TypedValue;
9 | import android.view.Display;
10 | import android.view.View;
11 | import android.view.WindowManager;
12 | import android.widget.AbsListView;
13 | import android.widget.ListView;
14 |
15 | import java.util.Dictionary;
16 | import java.util.Hashtable;
17 |
18 | /**
19 | * Created by etiennelawlor on 6/28/14.
20 | */
21 | public class QuickReturnUtils {
22 |
23 | private static TypedValue sTypedValue = new TypedValue();
24 | private static int sActionBarHeight;
25 | private static Dictionary sListViewItemHeights = new Hashtable();
26 | private static Dictionary sRecyclerViewItemHeights = new Hashtable();
27 |
28 | public static int dp2px(Context context, int dp) {
29 | WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
30 | Display display = wm.getDefaultDisplay();
31 |
32 | DisplayMetrics displaymetrics = new DisplayMetrics();
33 | display.getMetrics(displaymetrics);
34 |
35 | return (int) (dp * displaymetrics.density + 0.5f);
36 | }
37 |
38 | public static int px2dp(Context context, int px) {
39 | WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
40 | Display display = wm.getDefaultDisplay();
41 |
42 | DisplayMetrics displaymetrics = new DisplayMetrics();
43 | display.getMetrics(displaymetrics);
44 |
45 | return (int) (px / displaymetrics.density + 0.5f);
46 | }
47 |
48 | public static int getScrollY(ListView lv) {
49 | View c = lv.getChildAt(0);
50 | if (c == null) {
51 | return 0;
52 | }
53 |
54 | int firstVisiblePosition = lv.getFirstVisiblePosition();
55 | int top = c.getTop();
56 |
57 | int scrollY = -top + firstVisiblePosition * c.getHeight();
58 | return scrollY;
59 | }
60 |
61 | public static int getScrollY(AbsListView lv) {
62 | View c = lv.getChildAt(0);
63 | if (c == null) {
64 | return 0;
65 | }
66 |
67 | int firstVisiblePosition = lv.getFirstVisiblePosition();
68 | int scrollY = -(c.getTop());
69 | // int scrollY = 0;
70 |
71 |
72 | sListViewItemHeights.put(lv.getFirstVisiblePosition(), c.getHeight());
73 |
74 | // if(scrollY>0)
75 | // Log.d("QuickReturnUtils", "getScrollY() : -(c.getTop()) - "+ -(c.getTop()));
76 | // else
77 | // Log.i("QuickReturnUtils", "getScrollY() : -(c.getTop()) - "+ -(c.getTop()));
78 |
79 | if (scrollY < 0)
80 | scrollY = 0;
81 |
82 | for (int i = 0; i < firstVisiblePosition; ++i) {
83 | // Log.d("QuickReturnUtils", "getScrollY() : i - "+i);
84 |
85 | // Log.d("QuickReturnUtils", "getScrollY() : sListViewItemHeights.get(i) - "+sListViewItemHeights.get(i));
86 |
87 | if (sListViewItemHeights.get(i) != null) // (this is a sanity check)
88 | scrollY += sListViewItemHeights.get(i); //add all heights of the views that are gone
89 |
90 | }
91 |
92 | // Log.d("QuickReturnUtils", "getScrollY() : scrollY - "+scrollY);
93 |
94 | return scrollY;
95 | }
96 |
97 | public static int getScrollY(RecyclerView rv, int columnCount) {
98 | View c = rv.getChildAt(0);
99 | if (c == null) {
100 | return 0;
101 | }
102 |
103 | LinearLayoutManager layoutManager = (LinearLayoutManager) rv.getLayoutManager();
104 | int firstVisiblePosition = layoutManager.findFirstVisibleItemPosition();
105 |
106 | // Log.d("", "getScrollY() : firstVisiblePosition - " + firstVisiblePosition);
107 |
108 | int scrollY = -(c.getTop());
109 |
110 | // Log.d("", "getScrollY() : scrollY - " + scrollY);
111 |
112 | if (columnCount > 1) {
113 | sRecyclerViewItemHeights.put(firstVisiblePosition, c.getHeight() + QuickReturnUtils.dp2px(rv.getContext(), 8) / columnCount);
114 | } else {
115 | sRecyclerViewItemHeights.put(firstVisiblePosition, c.getHeight());
116 | }
117 |
118 | if (scrollY < 0)
119 | scrollY = 0;
120 |
121 | for (int i = 0; i < firstVisiblePosition; ++i) {
122 | if (sRecyclerViewItemHeights.get(i) != null) // (this is a sanity check)
123 | scrollY += sRecyclerViewItemHeights.get(i); //add all heights of the views that are gone
124 | }
125 |
126 | return scrollY;
127 | }
128 |
129 | public static int getActionBarHeight(Context context) {
130 | if (sActionBarHeight != 0) {
131 | return sActionBarHeight;
132 | }
133 |
134 | context.getTheme().resolveAttribute(android.R.attr.actionBarSize, sTypedValue, true);
135 | sActionBarHeight = TypedValue.complexToDimensionPixelSize(sTypedValue.data, context.getResources().getDisplayMetrics());
136 | return sActionBarHeight;
137 | }
138 | }
139 |
--------------------------------------------------------------------------------
/library/src/main/java/com/etiennelawlor/quickreturn/library/views/NotifyingListView.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.library.views;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.widget.ListView;
6 |
7 |
8 | /**
9 | * Created by etiennelawlor on 6/23/14.
10 | */
11 | public class NotifyingListView extends ListView {
12 |
13 | // region Member Variables
14 | private boolean mIsOverScrollEnabled = true;
15 | private OnScrollChangedListener mOnScrollChangedListener;
16 | // endregion
17 |
18 | // region Interfaces
19 | public interface OnScrollChangedListener {
20 | void onScrollChanged(ListView who, int l, int t, int oldl, int oldt);
21 | }
22 | // endregion
23 |
24 | // region Constructors
25 | public NotifyingListView(Context context) {
26 | super(context);
27 | }
28 |
29 | public NotifyingListView(Context context, AttributeSet attrs) {
30 | super(context, attrs);
31 | }
32 |
33 | public NotifyingListView(Context context, AttributeSet attrs, int defStyle) {
34 | super(context, attrs, defStyle);
35 | }
36 | // endregion
37 |
38 | @Override
39 | protected void onScrollChanged(int l, int t, int oldl, int oldt) {
40 | super.onScrollChanged(l, t, oldl, oldt);
41 | if (mOnScrollChangedListener != null) {
42 | mOnScrollChangedListener.onScrollChanged(this, l, t, oldl, oldt);
43 | }
44 | }
45 |
46 | @Override
47 | protected boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX, int scrollRangeY,
48 | int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) {
49 | return super.overScrollBy(
50 | deltaX,
51 | deltaY,
52 | scrollX,
53 | scrollY,
54 | scrollRangeX,
55 | scrollRangeY,
56 | mIsOverScrollEnabled ? maxOverScrollX : 0,
57 | mIsOverScrollEnabled ? maxOverScrollY : 0,
58 | isTouchEvent);
59 | }
60 |
61 | // region Helper Methods
62 | public void setOnScrollChangedListener(OnScrollChangedListener listener) {
63 | mOnScrollChangedListener = listener;
64 | }
65 |
66 | public void setOverScrollEnabled(boolean enabled) {
67 | mIsOverScrollEnabled = enabled;
68 | }
69 |
70 | public boolean isOverScrollEnabled() {
71 | return mIsOverScrollEnabled;
72 | }
73 | // endregion
74 |
75 | }
--------------------------------------------------------------------------------
/library/src/main/java/com/etiennelawlor/quickreturn/library/views/NotifyingScrollView.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.library.views;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.widget.ScrollView;
6 |
7 | /**
8 | * @author Cyril Mottier
9 | */
10 | public class NotifyingScrollView extends ScrollView {
11 |
12 | // region Member Variables
13 | private boolean mIsOverScrollEnabled = true;
14 | private OnScrollChangedListener mOnScrollChangedListener;
15 | // endregion
16 |
17 | // region Interfaces
18 | public interface OnScrollChangedListener {
19 | void onScrollChanged(ScrollView who, int l, int t, int oldl, int oldt);
20 | }
21 | // endregion
22 |
23 | // region Constructors
24 | public NotifyingScrollView(Context context) {
25 | super(context);
26 | }
27 |
28 | public NotifyingScrollView(Context context, AttributeSet attrs) {
29 | super(context, attrs);
30 | }
31 |
32 | public NotifyingScrollView(Context context, AttributeSet attrs, int defStyle) {
33 | super(context, attrs, defStyle);
34 | }
35 | // endregion
36 |
37 | @Override
38 | protected void onScrollChanged(int l, int t, int oldl, int oldt) {
39 | super.onScrollChanged(l, t, oldl, oldt);
40 | if (mOnScrollChangedListener != null) {
41 | mOnScrollChangedListener.onScrollChanged(this, l, t, oldl, oldt);
42 | }
43 | }
44 |
45 | @Override
46 | protected boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX, int scrollRangeY,
47 | int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) {
48 | return super.overScrollBy(
49 | deltaX,
50 | deltaY,
51 | scrollX,
52 | scrollY,
53 | scrollRangeX,
54 | scrollRangeY,
55 | mIsOverScrollEnabled ? maxOverScrollX : 0,
56 | mIsOverScrollEnabled ? maxOverScrollY : 0,
57 | isTouchEvent);
58 | }
59 |
60 | // region Helper Methods
61 | public void setOnScrollChangedListener(OnScrollChangedListener listener) {
62 | mOnScrollChangedListener = listener;
63 | }
64 |
65 | public void setOverScrollEnabled(boolean enabled) {
66 | mIsOverScrollEnabled = enabled;
67 | }
68 |
69 | public boolean isOverScrollEnabled() {
70 | return mIsOverScrollEnabled;
71 | }
72 | // endregion
73 |
74 | }
--------------------------------------------------------------------------------
/library/src/main/java/com/etiennelawlor/quickreturn/library/views/NotifyingWebView.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.library.views;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.webkit.WebView;
6 |
7 | /**
8 | * @author Cyril Mottier
9 | */
10 | public class NotifyingWebView extends WebView {
11 |
12 | // region Member Variables
13 | private boolean mIsOverScrollEnabled = true;
14 | private OnScrollChangedListener mOnScrollChangedListener;
15 | // endregion
16 |
17 | // region Interfaces
18 | public interface OnScrollChangedListener {
19 | void onScrollChanged(WebView who, int l, int t, int oldl, int oldt);
20 | }
21 | // endregion
22 |
23 | // region Constructors
24 | public NotifyingWebView(Context context) {
25 | super(context);
26 | }
27 |
28 | public NotifyingWebView(Context context, AttributeSet attrs) {
29 | super(context, attrs);
30 | }
31 |
32 | public NotifyingWebView(Context context, AttributeSet attrs, int defStyle) {
33 | super(context, attrs, defStyle);
34 | }
35 | // endregion
36 |
37 | @Override
38 | protected void onScrollChanged(int l, int t, int oldl, int oldt) {
39 | super.onScrollChanged(l, t, oldl, oldt);
40 | if (mOnScrollChangedListener != null) {
41 | mOnScrollChangedListener.onScrollChanged(this, l, t, oldl, oldt);
42 | }
43 | }
44 |
45 | @Override
46 | protected boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX, int scrollRangeY,
47 | int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) {
48 | return super.overScrollBy(
49 | deltaX,
50 | deltaY,
51 | scrollX,
52 | scrollY,
53 | scrollRangeX,
54 | scrollRangeY,
55 | mIsOverScrollEnabled ? maxOverScrollX : 0,
56 | mIsOverScrollEnabled ? maxOverScrollY : 0,
57 | isTouchEvent);
58 | }
59 |
60 | // region Helper Methods
61 | public void setOnScrollChangedListener(OnScrollChangedListener listener) {
62 | mOnScrollChangedListener = listener;
63 | }
64 |
65 | public void setOverScrollEnabled(boolean enabled) {
66 | mIsOverScrollEnabled = enabled;
67 | }
68 |
69 | public boolean isOverScrollEnabled() {
70 | return mIsOverScrollEnabled;
71 | }
72 | // endregion
73 |
74 | }
--------------------------------------------------------------------------------
/library/src/main/res/anim/anticipate_slide_footer_down.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
11 |
--------------------------------------------------------------------------------
/library/src/main/res/anim/anticipate_slide_header_up.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
11 |
--------------------------------------------------------------------------------
/library/src/main/res/anim/overshoot_slide_footer_up.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
11 |
--------------------------------------------------------------------------------
/library/src/main/res/anim/overshoot_slide_header_down.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
11 |
--------------------------------------------------------------------------------
/library/src/main/res/values/tags.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/sample/.gitignore:
--------------------------------------------------------------------------------
1 | **/*.iml
2 |
3 | # [Android] ========================
4 | # Built application files
5 | *.apk
6 | *.ap_
7 |
8 | # Files for the Dalvik VM
9 | *.dex
10 |
11 | # Java class files
12 | *.class
13 |
14 | # Generated files
15 | bin/
16 | gen/
17 |
18 | # Gradle files
19 | .gradle/
20 | build/
21 |
22 | # Local configuration file (sdk path, etc)
23 | local.properties
24 |
25 | # Proguard folder generated by Eclipse
26 | proguard/
27 |
28 | # Log Files
29 | *.log
30 |
31 |
32 | ## Directory-based project format:
33 | .idea/
34 |
35 | ## File-based project format:
36 | *.ipr
37 | *.iws
38 |
39 | ## Plugin-specific files:
40 |
41 | # IntelliJ
42 | out/
43 |
44 | # mpeltonen/sbt-idea plugin
45 | .idea_modules/
46 |
47 | # JIRA plugin
48 | atlassian-ide-plugin.xml
49 |
50 | # Crashlytics plugin (for Android Studio and IntelliJ)
51 | com_crashlytics_export_strings.xml
52 | app/src/main/assets/crashlytics-build.properties
53 | app/src/main/res/values/com_crashlytics_export_strings.xml
54 | crashlytics.properties
55 |
56 |
57 | # [Maven] ========================
58 | target/
59 | pom.xml.tag
60 | pom.xml.releaseBackup
61 | pom.xml.versionsBackup
62 | pom.xml.next
63 | release.properties
64 |
65 |
66 | # [Gradle-Android] ========================
67 |
68 | # Ignore Gradle GUI config
69 | gradle-app.setting
70 |
71 | # Gradle Signing
72 | signing.properties
73 | interapptiv3.keystore
74 |
--------------------------------------------------------------------------------
/sample/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion '23.0.2'
6 |
7 | defaultConfig {
8 | applicationId 'com.etiennelawlor.quickreturn'
9 | minSdkVersion 14
10 | targetSdkVersion 23
11 | versionCode 3
12 | versionName '0.0.3'
13 | }
14 | signingConfigs {
15 | release {
16 | }
17 | }
18 | buildTypes {
19 | release {
20 | signingConfig signingConfigs.release
21 | minifyEnabled false
22 | debuggable false
23 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
24 | }
25 | debug {
26 | minifyEnabled false
27 | debuggable true
28 | }
29 | }
30 | lintOptions {
31 | checkReleaseBuilds true
32 | abortOnError false
33 | disable 'InvalidPackage'
34 | }
35 | productFlavors {
36 | }
37 | }
38 |
39 | dependencies {
40 | compile fileTree(dir: 'libs', include: ['*.jar'])
41 |
42 | compile 'com.android.support:design:23.1.1'
43 | compile 'com.android.support:support-v13:23.1.1'
44 | compile 'com.android.support:recyclerview-v7:23.1.1'
45 | compile 'com.android.support:palette-v7:23.1.1'
46 | compile 'com.android.support:appcompat-v7:23.1.1'
47 | compile 'com.android.support:cardview-v7:23.1.1'
48 |
49 | compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
50 |
51 | compile 'com.jakewharton:butterknife:7.0.1'
52 |
53 | compile 'com.squareup.picasso:picasso:2.5.2'
54 |
55 | compile 'com.google.guava:guava:19.0-rc2'
56 |
57 | compile 'com.makeramen:roundedimageview:2.2.1'
58 |
59 | compile 'com.nineoldandroids:library:2.4.0'
60 |
61 | compile 'com.daimajia.easing:library:1.0.2'
62 | compile 'com.daimajia.androidanimations:library:1.1.3@aar'
63 |
64 | compile('de.keyboardsurfer.android.widget:crouton:1.8.5@aar') {
65 | exclude group: 'com.google.android', module: 'support-v4'
66 | }
67 | compile project(':library')
68 | }
69 |
70 | // Extract signing info into a properties file
71 | def props = new Properties()
72 | props.load(new FileInputStream(project.file("signing.properties")))
73 |
74 | android.signingConfigs.release.storeFile project.file(props.keyStore)
75 | android.signingConfigs.release.storePassword props.keyStorePassword
76 | android.signingConfigs.release.keyAlias props.keyAlias
77 | android.signingConfigs.release.keyPassword props.keyAliasPassword
78 |
--------------------------------------------------------------------------------
/sample/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/etiennelawlor/Downloads/adt-bundle-mac-x86_64-20130729/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/sample/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
16 |
17 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
32 |
33 |
36 |
37 |
42 |
43 |
46 |
47 |
52 |
53 |
56 |
57 |
61 |
62 |
65 |
66 |
70 |
71 |
74 |
75 |
79 |
80 |
83 |
84 |
88 |
89 |
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/sample/src/main/assets/fonts/GothamNarrow-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/assets/fonts/GothamNarrow-Light.ttf
--------------------------------------------------------------------------------
/sample/src/main/assets/fonts/Roboto-Black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/assets/fonts/Roboto-Black.ttf
--------------------------------------------------------------------------------
/sample/src/main/assets/fonts/Roboto-BlackItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/assets/fonts/Roboto-BlackItalic.ttf
--------------------------------------------------------------------------------
/sample/src/main/assets/fonts/Roboto-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/assets/fonts/Roboto-Bold.ttf
--------------------------------------------------------------------------------
/sample/src/main/assets/fonts/Roboto-BoldCondensed.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/assets/fonts/Roboto-BoldCondensed.ttf
--------------------------------------------------------------------------------
/sample/src/main/assets/fonts/Roboto-BoldCondensedItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/assets/fonts/Roboto-BoldCondensedItalic.ttf
--------------------------------------------------------------------------------
/sample/src/main/assets/fonts/Roboto-BoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/assets/fonts/Roboto-BoldItalic.ttf
--------------------------------------------------------------------------------
/sample/src/main/assets/fonts/Roboto-Condensed.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/assets/fonts/Roboto-Condensed.ttf
--------------------------------------------------------------------------------
/sample/src/main/assets/fonts/Roboto-CondensedItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/assets/fonts/Roboto-CondensedItalic.ttf
--------------------------------------------------------------------------------
/sample/src/main/assets/fonts/Roboto-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/assets/fonts/Roboto-Italic.ttf
--------------------------------------------------------------------------------
/sample/src/main/assets/fonts/Roboto-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/assets/fonts/Roboto-Light.ttf
--------------------------------------------------------------------------------
/sample/src/main/assets/fonts/Roboto-LightItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/assets/fonts/Roboto-LightItalic.ttf
--------------------------------------------------------------------------------
/sample/src/main/assets/fonts/Roboto-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/assets/fonts/Roboto-Medium.ttf
--------------------------------------------------------------------------------
/sample/src/main/assets/fonts/Roboto-MediumItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/assets/fonts/Roboto-MediumItalic.ttf
--------------------------------------------------------------------------------
/sample/src/main/assets/fonts/Roboto-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/assets/fonts/Roboto-Regular.ttf
--------------------------------------------------------------------------------
/sample/src/main/assets/fonts/Roboto-Thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/assets/fonts/Roboto-Thin.ttf
--------------------------------------------------------------------------------
/sample/src/main/assets/fonts/Roboto-ThinItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/assets/fonts/Roboto-ThinItalic.ttf
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/QuickReturnApplication.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn;
2 |
3 | import android.app.Application;
4 |
5 | /**
6 | * Created by etiennelawlor on 1/20/15.
7 | */
8 | public class QuickReturnApplication extends Application {
9 |
10 | // region Static Variables
11 | private static QuickReturnApplication sCurrentApplication = null;
12 | // endregion
13 |
14 | @Override
15 | public void onCreate() {
16 | super.onCreate();
17 |
18 | sCurrentApplication = this;
19 | }
20 |
21 | // region Getters
22 | public static QuickReturnApplication getInstance() {
23 | return sCurrentApplication;
24 | }
25 | // endregion
26 | }
27 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/activities/QuickReturnActivity.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.activities;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 |
6 | import com.etiennelawlor.quickreturn.R;
7 |
8 | import butterknife.ButterKnife;
9 | import butterknife.OnClick;
10 |
11 |
12 | public class QuickReturnActivity extends QuickReturnBaseActivity {
13 |
14 | // region Listeners
15 | @OnClick(R.id.twitter_cv)
16 | public void onTwitterClicked() {
17 | startActivity(new Intent(QuickReturnActivity.this, QuickReturnTwitterActivity.class));
18 | }
19 |
20 | @OnClick(R.id.facebook_cv)
21 | public void onFacebookClicked() {
22 | startActivity(new Intent(QuickReturnActivity.this, QuickReturnFacebookActivity.class));
23 | }
24 |
25 | @OnClick(R.id.google_plus_cv)
26 | public void onGooglePlusClicked() {
27 | startActivity(new Intent(QuickReturnActivity.this, QuickReturnGooglePlusActivity.class));
28 | }
29 |
30 | @OnClick(R.id.recyclerview_linearlayout_cv)
31 | public void onRecyclerViewLinearLayoutClicked() {
32 | startActivity(new Intent(QuickReturnActivity.this, QuickReturnRecyclerViewActivity.class).putExtra("layout_manager", "linear"));
33 | }
34 |
35 | @OnClick(R.id.recyclerview_gridlayout_cv)
36 | public void onRecyclerViewGridLayoutClicked() {
37 | startActivity(new Intent(QuickReturnActivity.this, QuickReturnRecyclerViewActivity.class).putExtra("layout_manager", "grid"));
38 | }
39 |
40 | @OnClick(R.id.listview_cv)
41 | public void onListViewClicked() {
42 | startActivity(new Intent(QuickReturnActivity.this, QuickReturnListViewActivity.class));
43 | }
44 |
45 | @OnClick(R.id.scrollview_cv)
46 | public void onScrollViewClicked() {
47 | startActivity(new Intent(QuickReturnActivity.this, QuickReturnScrollViewActivity.class));
48 | }
49 |
50 | @OnClick(R.id.webview_cv)
51 | public void onWebViewClicked() {
52 | startActivity(new Intent(QuickReturnActivity.this, QuickReturnWebViewActivity.class));
53 | }
54 | // endregion
55 |
56 | // region Lifecycle Methods
57 | @Override
58 | protected void onCreate(Bundle savedInstanceState) {
59 | super.onCreate(savedInstanceState);
60 | setContentView(R.layout.activity_quick_return);
61 | ButterKnife.bind(this);
62 | }
63 | // endregion
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/activities/QuickReturnGooglePlusActivity.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.activities;
2 |
3 | import android.os.Bundle;
4 |
5 | import com.etiennelawlor.quickreturn.R;
6 | import com.etiennelawlor.quickreturn.fragments.QuickReturnGooglePlusFragment;
7 |
8 | import butterknife.ButterKnife;
9 |
10 |
11 | public class QuickReturnGooglePlusActivity extends QuickReturnBaseActivity {
12 |
13 | // region Lifecycle Methods
14 | @Override
15 | protected void onCreate(Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 | setContentView(R.layout.activity_quick_return_google_plus);
18 | ButterKnife.bind(this);
19 |
20 | if (savedInstanceState == null) {
21 | getFragmentManager().beginTransaction()
22 | .add(R.id.container, new QuickReturnGooglePlusFragment())
23 | .commit();
24 | }
25 | }
26 | // endregion
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/activities/QuickReturnScrollViewActivity.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.activities;
2 |
3 | import android.app.Fragment;
4 | import android.app.FragmentManager;
5 | import android.os.Bundle;
6 | import android.support.design.widget.TabLayout;
7 | import android.support.v13.app.FragmentPagerAdapter;
8 | import android.support.v4.view.ViewPager;
9 |
10 | import com.etiennelawlor.quickreturn.R;
11 | import com.etiennelawlor.quickreturn.fragments.QuickReturnFragment;
12 | import com.etiennelawlor.quickreturn.fragments.SpeedyQuickReturnFragment;
13 | import com.etiennelawlor.quickreturn.library.enums.QuickReturnViewType;
14 |
15 | import butterknife.Bind;
16 | import butterknife.ButterKnife;
17 |
18 |
19 | public class QuickReturnScrollViewActivity extends QuickReturnBaseActivity {
20 |
21 | // region Member Variables
22 | private SectionsPagerAdapter mSectionsPagerAdapter;
23 |
24 | @Bind(R.id.tabs)
25 | TabLayout mTabLayout;
26 | @Bind(R.id.pager)
27 | ViewPager mViewPager;
28 | // endregion
29 |
30 | // region Lifecycle Methods
31 | @Override
32 | protected void onCreate(Bundle savedInstanceState) {
33 | super.onCreate(savedInstanceState);
34 | setContentView(R.layout.activity_quick_return_scrollview);
35 | ButterKnife.bind(this);
36 |
37 | mSectionsPagerAdapter = new SectionsPagerAdapter(getFragmentManager());
38 |
39 | // Set up the ViewPager with the sections adapter.
40 | mViewPager.setAdapter(mSectionsPagerAdapter);
41 |
42 | mTabLayout.setupWithViewPager(mViewPager);
43 | mTabLayout.setTabMode(TabLayout.MODE_SCROLLABLE);
44 | }
45 | // endregion
46 |
47 | // region Inner Classes
48 |
49 | /**
50 | * A {@link android.support.v13.app.FragmentPagerAdapter} that returns a fragment corresponding to
51 | * one of the sections/tabs/pages.
52 | */
53 | public static class SectionsPagerAdapter extends FragmentPagerAdapter {
54 |
55 | // region Constructors
56 | public SectionsPagerAdapter(FragmentManager fm) {
57 | super(fm);
58 | }
59 | // endregion
60 |
61 | @Override
62 | public Fragment getItem(int position) {
63 | Bundle bundle = new Bundle();
64 | switch (position) {
65 | case 0:
66 | bundle.putString("quick_return_view_type",
67 | QuickReturnViewType.HEADER.name());
68 | return QuickReturnFragment.newInstance(bundle);
69 | case 1:
70 | bundle.putString("quick_return_view_type",
71 | QuickReturnViewType.HEADER.name());
72 | return SpeedyQuickReturnFragment.newInstance(bundle);
73 | case 2:
74 | bundle.putString("quick_return_view_type",
75 | QuickReturnViewType.FOOTER.name());
76 | return QuickReturnFragment.newInstance(bundle);
77 | case 3:
78 | bundle.putString("quick_return_view_type",
79 | QuickReturnViewType.FOOTER.name());
80 | return SpeedyQuickReturnFragment.newInstance(bundle);
81 | case 4:
82 | bundle.putString("quick_return_view_type",
83 | QuickReturnViewType.BOTH.name());
84 | return QuickReturnFragment.newInstance(bundle);
85 | case 5:
86 | bundle.putString("quick_return_view_type",
87 | QuickReturnViewType.BOTH.name());
88 | return SpeedyQuickReturnFragment.newInstance(bundle);
89 | default:
90 | bundle.putString("quick_return_view_type",
91 | QuickReturnViewType.HEADER.name());
92 | return SpeedyQuickReturnFragment.newInstance(bundle);
93 | }
94 | }
95 |
96 | @Override
97 | public int getCount() {
98 | return 6;
99 | }
100 |
101 | @Override
102 | public CharSequence getPageTitle(int position) {
103 | switch (position) {
104 | case 0:
105 | return "QRHeader";
106 | case 1:
107 | return "SpeedyQRHeader";
108 | case 2:
109 | return "QRFooter";
110 | case 3:
111 | return "SpeedyQRFooter";
112 | case 4:
113 | return "QRBoth";
114 | case 5:
115 | return "SpeedyQRBoth";
116 |
117 | }
118 | return null;
119 | }
120 | }
121 |
122 | // endregion
123 | }
124 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/activities/QuickReturnWebViewActivity.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.activities;
2 |
3 | import android.app.Fragment;
4 | import android.app.FragmentManager;
5 | import android.os.Bundle;
6 | import android.support.design.widget.TabLayout;
7 | import android.support.v13.app.FragmentPagerAdapter;
8 | import android.support.v4.view.ViewPager;
9 |
10 | import com.etiennelawlor.quickreturn.R;
11 | import com.etiennelawlor.quickreturn.fragments.QuickReturnWebViewFragment;
12 | import com.etiennelawlor.quickreturn.fragments.SpeedyQuickReturnWebViewFragment;
13 | import com.etiennelawlor.quickreturn.library.enums.QuickReturnViewType;
14 |
15 | import butterknife.Bind;
16 | import butterknife.ButterKnife;
17 |
18 | public class QuickReturnWebViewActivity extends QuickReturnBaseActivity
19 | {
20 |
21 | // region Member Variables
22 | private SectionsPagerAdapter mSectionsPagerAdapter;
23 |
24 | @Bind(R.id.tabs)
25 | TabLayout mTabLayout;
26 | @Bind(R.id.pager)
27 | ViewPager mViewPager;
28 | // endregion
29 |
30 | // region Lifecycle Methods
31 | @Override
32 | protected void onCreate(Bundle savedInstanceState) {
33 | super.onCreate(savedInstanceState);
34 | setContentView(R.layout.activity_quick_return_scrollview);
35 | ButterKnife.bind(this);
36 |
37 | mSectionsPagerAdapter = new SectionsPagerAdapter(getFragmentManager());
38 |
39 | // Set up the ViewPager with the sections adapter.
40 | mViewPager.setAdapter(mSectionsPagerAdapter);
41 |
42 | mTabLayout.setupWithViewPager(mViewPager);
43 | mTabLayout.setTabMode(TabLayout.MODE_SCROLLABLE);
44 | }
45 | // endregion
46 |
47 | // region Inner Classes
48 |
49 | /**
50 | * A {@link android.support.v13.app.FragmentPagerAdapter} that returns a fragment corresponding to
51 | * one of the sections/tabs/pages.
52 | */
53 | public static class SectionsPagerAdapter extends FragmentPagerAdapter {
54 |
55 | // region Constructors
56 | public SectionsPagerAdapter(FragmentManager fm) {
57 | super(fm);
58 | }
59 | // endregion
60 |
61 | @Override
62 | public Fragment getItem(int position) {
63 | Bundle bundle = new Bundle();
64 | switch (position) {
65 | case 0:
66 | bundle.putString("quick_return_view_type",
67 | QuickReturnViewType.HEADER.name());
68 | return QuickReturnWebViewFragment.newInstance(bundle);
69 | case 1:
70 | bundle.putString("quick_return_view_type",
71 | QuickReturnViewType.HEADER.name());
72 | return SpeedyQuickReturnWebViewFragment.newInstance(bundle);
73 | case 2:
74 | bundle.putString("quick_return_view_type",
75 | QuickReturnViewType.FOOTER.name());
76 | return QuickReturnWebViewFragment.newInstance(bundle);
77 | case 3:
78 | bundle.putString("quick_return_view_type",
79 | QuickReturnViewType.FOOTER.name());
80 | return SpeedyQuickReturnWebViewFragment.newInstance(bundle);
81 | case 4:
82 | bundle.putString("quick_return_view_type",
83 | QuickReturnViewType.BOTH.name());
84 | return QuickReturnWebViewFragment.newInstance(bundle);
85 | case 5:
86 | bundle.putString("quick_return_view_type",
87 | QuickReturnViewType.BOTH.name());
88 | return SpeedyQuickReturnWebViewFragment.newInstance(bundle);
89 | default:
90 | bundle.putString("quick_return_view_type",
91 | QuickReturnViewType.HEADER.name());
92 | return SpeedyQuickReturnWebViewFragment.newInstance(bundle);
93 | }
94 | }
95 |
96 | @Override
97 | public int getCount() {
98 | return 6;
99 | }
100 |
101 | @Override
102 | public CharSequence getPageTitle(int position) {
103 | switch (position) {
104 | case 0:
105 | return "QRHeader";
106 | case 1:
107 | return "SpeedyQRHeader";
108 | case 2:
109 | return "QRFooter";
110 | case 3:
111 | return "SpeedyQRFooter";
112 | case 4:
113 | return "QRBoth";
114 | case 5:
115 | return "SpeedyQRBoth";
116 |
117 | }
118 | return null;
119 | }
120 | }
121 |
122 | // endregion
123 | }
124 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/adapters/CountriesGridLayoutAdapter.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.adapters;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.text.TextUtils;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.TextView;
10 |
11 | import com.etiennelawlor.quickreturn.R;
12 |
13 | import java.util.List;
14 |
15 | import butterknife.Bind;
16 | import butterknife.ButterKnife;
17 |
18 | /**
19 | * Created by etiennelawlor on 7/17/14.
20 | */
21 | public class CountriesGridLayoutAdapter extends RecyclerView.Adapter {
22 |
23 | // region Member Variables
24 | private List mCountries;
25 | // endregion
26 |
27 | // region Constructors
28 | public CountriesGridLayoutAdapter(List countries) {
29 | mCountries = countries;
30 | }
31 | // endregion
32 |
33 | @Override
34 | public CountriesGridLayoutAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
35 | View v = LayoutInflater.from(parent.getContext())
36 | .inflate(R.layout.country_grid_item, parent, false);
37 | ViewHolder vh = new ViewHolder(v);
38 | return vh;
39 | }
40 |
41 | @Override
42 | public void onBindViewHolder(ViewHolder holder, int position) {
43 | String country = mCountries.get(position);
44 |
45 | setUpCountry(holder.mCountryTextView, country);
46 | }
47 |
48 | @Override
49 | public int getItemCount() {
50 | return mCountries.size();
51 | }
52 |
53 | // region Helper Methods
54 | private void setUpCountry(TextView tv, String country){
55 | if (!TextUtils.isEmpty(country)) {
56 | tv.setText(country);
57 | }
58 | }
59 | // endregion
60 |
61 | // region Inner Classes
62 |
63 | public static class ViewHolder extends RecyclerView.ViewHolder {
64 | @Bind(R.id.country_tv)
65 | TextView mCountryTextView;
66 |
67 | public ViewHolder(View view) {
68 | super(view);
69 | ButterKnife.bind(this, view);
70 | }
71 | }
72 |
73 | // endregion
74 | }
75 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/adapters/CountriesLinearLayoutAdapter.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.adapters;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.text.TextUtils;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.TextView;
10 |
11 | import com.etiennelawlor.quickreturn.R;
12 |
13 | import java.util.List;
14 |
15 | import butterknife.Bind;
16 | import butterknife.ButterKnife;
17 |
18 | /**
19 | * Created by etiennelawlor on 7/17/14.
20 | */
21 | public class CountriesLinearLayoutAdapter extends RecyclerView.Adapter {
22 |
23 | // region Member Variables
24 | private Context mContext;
25 | private List mCountries;
26 | // endregion
27 |
28 | // region Constructors
29 | public CountriesLinearLayoutAdapter(List countries) {
30 | mCountries = countries;
31 | }
32 | // endregion
33 |
34 | @Override
35 | public CountriesLinearLayoutAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
36 | View v = LayoutInflater.from(parent.getContext())
37 | .inflate(R.layout.country_row, parent, false);
38 | ViewHolder vh = new ViewHolder(v);
39 | return vh;
40 | }
41 |
42 | @Override
43 | public void onBindViewHolder(ViewHolder holder, int position) {
44 | String country = mCountries.get(position);
45 |
46 | setUpCountry(holder.mCountryTextView, country);
47 | }
48 |
49 | @Override
50 | public int getItemCount() {
51 | return mCountries.size();
52 | }
53 |
54 | // region Helper Methods
55 | private void setUpCountry(TextView tv, String country){
56 | if (!TextUtils.isEmpty(country)) {
57 | tv.setText(country);
58 | }
59 | }
60 | // endregion
61 |
62 | // region Inner Classes
63 |
64 | public static class ViewHolder extends RecyclerView.ViewHolder {
65 | @Bind(R.id.country_tv)
66 | TextView mCountryTextView;
67 |
68 | public ViewHolder(View view) {
69 | super(view);
70 | ButterKnife.bind(this, view);
71 | }
72 | }
73 |
74 | // endregion
75 | }
76 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/enums/Typefaces.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.enums;
2 |
3 | import android.graphics.Typeface;
4 |
5 | import com.etiennelawlor.quickreturn.utils.TypefaceUtil;
6 |
7 | /**
8 | * Created by etiennelawlor on 1/20/15.
9 | */
10 | public enum Typefaces implements TypefaceUtil.TypefaceId {
11 | ROBOTO_BLACK("Roboto-Black.ttf"),
12 | ROBOTO_BLACK_ITALIC("Roboto-BlackItalic.ttf"),
13 | ROBOTO_BOLD("Roboto-Bold.ttf"),
14 | ROBOTO_BOLD_ITALIC("Roboto-BoldItalic.ttf"),
15 | ROBOTO_ITALIC("Roboto-Italic.ttf"),
16 | ROBOTO_LIGHT("Roboto-Light.ttf"),
17 | ROBOTO_LIGHT_ITALIC("Roboto_LightItalic.ttf"),
18 | ROBOTO_MEDIUM("Roboto-Medium.ttf"),
19 | ROBOTO_MEDIUM_ITALIC("Roboto-MediumItalic.ttf"),
20 | ROBOTO_REGULAR("Roboto-Regular.ttf"),
21 | ROBOTO_THIN("Roboto-Thin.ttf"),
22 | ROBOTO_THIN_ITALIC("Roboto-ThinItalic.ttf"),
23 | ROBOTO_CONDENSED_BOLD("RobotoCondensed-Bold.ttf"),
24 | ROBOTO_CONDENSED_BOLD_ITALIC("RobotoCondensed-BoldItalic.ttf"),
25 | ROBOTO_CONDENSED_ITALIC("RobotoCondensed-Italic.ttf"),
26 | ROBOTO_CONDENSED_LIGHT("RobotoCondensed-Light.ttf"),
27 | ROBOTO_CONDENSED_LIGHT_ITALIC("RobotoCondensed-LightItalic.ttf"),
28 | ROBOTO_CONDENSED_REGULAR("RobotoCondensed-Regular.ttf");
29 |
30 |
31 | public static final String BASE_PATH = "fonts/";
32 |
33 | private String filename;
34 |
35 | private Typefaces(String filename) {
36 | this.filename = filename;
37 | }
38 |
39 | public static Typefaces from(int index) {
40 | switch (index) {
41 | case 0 :
42 | return ROBOTO_BLACK;
43 | case 1 :
44 | return ROBOTO_BLACK_ITALIC;
45 | case 2 :
46 | return ROBOTO_BOLD;
47 | case 3 :
48 | return ROBOTO_BOLD_ITALIC;
49 | case 4 :
50 | return ROBOTO_ITALIC;
51 | case 5 :
52 | return ROBOTO_LIGHT;
53 | case 6 :
54 | return ROBOTO_LIGHT_ITALIC;
55 | case 7 :
56 | return ROBOTO_MEDIUM;
57 | case 8 :
58 | return ROBOTO_MEDIUM_ITALIC;
59 | case 9 :
60 | return ROBOTO_REGULAR;
61 | case 10 :
62 | return ROBOTO_THIN;
63 | case 11 :
64 | return ROBOTO_THIN_ITALIC;
65 | case 12 :
66 | return ROBOTO_CONDENSED_BOLD;
67 | case 13 :
68 | return ROBOTO_CONDENSED_BOLD_ITALIC;
69 | case 14 :
70 | return ROBOTO_CONDENSED_ITALIC;
71 | case 15 :
72 | return ROBOTO_CONDENSED_LIGHT;
73 | case 16 :
74 | return ROBOTO_CONDENSED_LIGHT_ITALIC;
75 | case 17 :
76 | return ROBOTO_CONDENSED_REGULAR;
77 | default:
78 | return ROBOTO_REGULAR;
79 | }
80 | }
81 |
82 | @Override public Typeface get() {
83 | return TypefaceUtil.getTypeface(this);
84 | }
85 |
86 | @Override public String getFilePath() {
87 | return BASE_PATH + filename;
88 | }
89 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/fragments/QuickReturnFooterListViewFragment.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.fragments;
2 |
3 | import android.app.ListFragment;
4 | import android.os.Bundle;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.ArrayAdapter;
9 | import android.widget.ListView;
10 | import android.widget.TextView;
11 |
12 | import com.etiennelawlor.quickreturn.R;
13 | import com.etiennelawlor.quickreturn.library.enums.QuickReturnAnimationType;
14 | import com.etiennelawlor.quickreturn.library.enums.QuickReturnViewType;
15 | import com.etiennelawlor.quickreturn.library.listeners.QuickReturnListViewOnScrollListener;
16 | import com.etiennelawlor.quickreturn.library.listeners.SpeedyQuickReturnListViewOnScrollListener;
17 |
18 | import butterknife.Bind;
19 | import butterknife.ButterKnife;
20 |
21 | /**
22 | * Created by etiennelawlor on 6/23/14.
23 | */
24 | public class QuickReturnFooterListViewFragment extends ListFragment {
25 |
26 | // region Member Variables
27 | private String[] mValues;
28 | private QuickReturnAnimationType mQuickReturnAnimationType;
29 |
30 | @Bind(android.R.id.list)
31 | ListView mListView;
32 | @Bind(R.id.quick_return_tv)
33 | TextView mQuickReturnTextView;
34 | // endregion
35 |
36 | // region Constructors
37 | public QuickReturnFooterListViewFragment() {
38 | }
39 | // endregion
40 |
41 | // region Factory Methods
42 | public static QuickReturnFooterListViewFragment newInstance(Bundle extras) {
43 | QuickReturnFooterListViewFragment fragment = new QuickReturnFooterListViewFragment();
44 | fragment.setRetainInstance(true);
45 | fragment.setArguments(extras);
46 | return fragment;
47 | }
48 |
49 | public static QuickReturnFooterListViewFragment newInstance() {
50 | QuickReturnFooterListViewFragment fragment = new QuickReturnFooterListViewFragment();
51 | Bundle args = new Bundle();
52 | fragment.setArguments(args);
53 | return fragment;
54 | }
55 | // endregion
56 |
57 | // region Lifecycle Methods
58 | @Override
59 | public void onCreate(Bundle savedInstanceState) {
60 | super.onCreate(savedInstanceState);
61 |
62 | if (getArguments() != null) {
63 | mQuickReturnAnimationType = QuickReturnAnimationType.valueOf(getArguments().getString("quick_return_animation_type"));
64 | }
65 | }
66 |
67 | @Override
68 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
69 | Bundle savedInstanceState) {
70 | View view = inflater.inflate(R.layout.fragment_listview_quick_return_footer, container, false);
71 | ButterKnife.bind(this, view);
72 | return view;
73 | }
74 |
75 | @Override
76 | public void onViewCreated(View view, Bundle savedInstanceState) {
77 | super.onViewCreated(view, savedInstanceState);
78 |
79 | mValues = getResources().getStringArray(R.array.countries);
80 |
81 | ArrayAdapter adapter = new ArrayAdapter<>(getActivity(),
82 | R.layout.list_item, R.id.item_tv, mValues);
83 |
84 | mListView.setAdapter(adapter);
85 |
86 | int footerHeight = getActivity().getResources().getDimensionPixelSize(R.dimen.footer_height);
87 |
88 | QuickReturnListViewOnScrollListener scrollListener;
89 | SpeedyQuickReturnListViewOnScrollListener scrollListener2;
90 |
91 | switch (mQuickReturnAnimationType) {
92 | case TRANSLATION_SIMPLE:
93 | scrollListener = new QuickReturnListViewOnScrollListener.Builder(QuickReturnViewType.FOOTER)
94 | .footer(mQuickReturnTextView)
95 | .minFooterTranslation(footerHeight)
96 | .build();
97 | mListView.setOnScrollListener(scrollListener);
98 | break;
99 | case TRANSLATION_SNAP:
100 | scrollListener = new QuickReturnListViewOnScrollListener.Builder(QuickReturnViewType.FOOTER)
101 | .footer(mQuickReturnTextView)
102 | .minFooterTranslation(footerHeight)
103 | .isSnappable(true)
104 | .build();
105 | mListView.setOnScrollListener(scrollListener);
106 | break;
107 | case TRANSLATION_ANTICIPATE_OVERSHOOT:
108 | scrollListener2 = new SpeedyQuickReturnListViewOnScrollListener.Builder(getActivity(), QuickReturnViewType.FOOTER)
109 | .footer(mQuickReturnTextView)
110 | .build();
111 | mListView.setOnScrollListener(scrollListener2);
112 | break;
113 | default:
114 | scrollListener = new QuickReturnListViewOnScrollListener.Builder(QuickReturnViewType.FOOTER)
115 | .footer(mQuickReturnTextView)
116 | .minFooterTranslation(footerHeight)
117 | .build();
118 | mListView.setOnScrollListener(scrollListener);
119 | break;
120 | }
121 | }
122 |
123 | @Override
124 | public void onDestroyView() {
125 | super.onDestroyView();
126 | ButterKnife.unbind(this);
127 | }
128 | // endregion
129 |
130 | }
131 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/fragments/QuickReturnFragment.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.fragments;
2 |
3 | import android.app.Fragment;
4 | import android.os.Bundle;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.TextView;
9 |
10 | import com.etiennelawlor.quickreturn.R;
11 | import com.etiennelawlor.quickreturn.library.enums.QuickReturnViewType;
12 | import com.etiennelawlor.quickreturn.library.listeners.QuickReturnScrollViewOnScrollChangedListener;
13 | import com.etiennelawlor.quickreturn.library.views.NotifyingScrollView;
14 |
15 | import butterknife.Bind;
16 | import butterknife.ButterKnife;
17 |
18 | /**
19 | * Created by etiennelawlor on 6/23/14.
20 | */
21 | public class QuickReturnFragment extends Fragment {
22 |
23 | // region Member Variables
24 | private QuickReturnViewType mQuickReturnViewType;
25 |
26 | @Bind(R.id.scroll_view)
27 | NotifyingScrollView mNotifyingScrollView;
28 | @Bind(R.id.quick_return_header_tv)
29 | TextView mQuickReturnHeaderTextView;
30 | @Bind(R.id.quick_return_footer_tv)
31 | TextView mQuickReturnFooterTextView;
32 | // endregion
33 |
34 | // region Constructors
35 | public QuickReturnFragment() {
36 | }
37 | // endregion
38 |
39 | // region Factory Methods
40 | public static QuickReturnFragment newInstance(Bundle extras) {
41 | QuickReturnFragment fragment = new QuickReturnFragment();
42 | fragment.setRetainInstance(true);
43 | fragment.setArguments(extras);
44 | return fragment;
45 | }
46 | // endregion
47 |
48 | // region Lifecycle Methods
49 |
50 | @Override
51 | public void onCreate(Bundle savedInstanceState) {
52 | super.onCreate(savedInstanceState);
53 |
54 | if (getArguments() != null) {
55 | mQuickReturnViewType = QuickReturnViewType.valueOf(getArguments().getString("quick_return_view_type"));
56 | }
57 | }
58 |
59 | @Override
60 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
61 | Bundle savedInstanceState) {
62 | View view = inflater.inflate(R.layout.fragment_quick_return, container, false);
63 | ButterKnife.bind(this, view);
64 | return view;
65 | }
66 |
67 | @Override
68 | public void onViewCreated(View view, Bundle savedInstanceState) {
69 | super.onViewCreated(view, savedInstanceState);
70 |
71 | int headerHeight = getResources().getDimensionPixelSize(R.dimen.header_height2);
72 | int headerTranslation = -(headerHeight);
73 |
74 | int footerTranslation = getResources().getDimensionPixelSize(R.dimen.footer_height);
75 |
76 | QuickReturnScrollViewOnScrollChangedListener scrollListener;
77 |
78 | switch (mQuickReturnViewType) {
79 | case HEADER:
80 | mQuickReturnHeaderTextView.setVisibility(View.VISIBLE);
81 | scrollListener = new QuickReturnScrollViewOnScrollChangedListener.Builder(QuickReturnViewType.HEADER)
82 | .header(mQuickReturnHeaderTextView)
83 | .minHeaderTranslation(headerTranslation)
84 | .build();
85 | mNotifyingScrollView.setOnScrollChangedListener(scrollListener);
86 | break;
87 | case FOOTER:
88 | mQuickReturnFooterTextView.setVisibility(View.VISIBLE);
89 | scrollListener = new QuickReturnScrollViewOnScrollChangedListener.Builder(QuickReturnViewType.FOOTER)
90 | .footer(mQuickReturnFooterTextView)
91 | .minFooterTranslation(footerTranslation)
92 | .build();
93 | mNotifyingScrollView.setOnScrollChangedListener(scrollListener);
94 | break;
95 | case BOTH:
96 | mQuickReturnHeaderTextView.setVisibility(View.VISIBLE);
97 | mQuickReturnFooterTextView.setVisibility(View.VISIBLE);
98 | scrollListener = new QuickReturnScrollViewOnScrollChangedListener.Builder(QuickReturnViewType.BOTH)
99 | .header(mQuickReturnHeaderTextView)
100 | .minHeaderTranslation(headerTranslation)
101 | .footer(mQuickReturnFooterTextView)
102 | .minFooterTranslation(footerTranslation)
103 | .build();
104 | mNotifyingScrollView.setOnScrollChangedListener(scrollListener);
105 | break;
106 | }
107 |
108 | mNotifyingScrollView.setOverScrollEnabled(false);
109 | }
110 |
111 | @Override
112 | public void onDestroyView() {
113 | super.onDestroyView();
114 | ButterKnife.unbind(this);
115 | }
116 | // endregion
117 | }
118 |
119 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/fragments/QuickReturnWebViewFragment.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.fragments;
2 |
3 | import android.app.Fragment;
4 | import android.os.Bundle;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.TextView;
9 |
10 | import com.etiennelawlor.quickreturn.R;
11 | import com.etiennelawlor.quickreturn.library.enums.QuickReturnViewType;
12 | import com.etiennelawlor.quickreturn.library.listeners.QuickReturnScrollViewOnScrollChangedListener;
13 | import com.etiennelawlor.quickreturn.library.listeners.QuickReturnWebViewOnScrollChangedListener;
14 | import com.etiennelawlor.quickreturn.library.views.NotifyingScrollView;
15 | import com.etiennelawlor.quickreturn.library.views.NotifyingWebView;
16 |
17 | import butterknife.Bind;
18 | import butterknife.ButterKnife;
19 |
20 | /**
21 | * Created by etiennelawlor on 6/23/14.
22 | */
23 | public class QuickReturnWebViewFragment extends Fragment {
24 |
25 | // region Member Variables
26 | private QuickReturnViewType mQuickReturnViewType;
27 |
28 | @Bind(R.id.web_view)
29 | NotifyingWebView mNotifyingWebView;
30 | @Bind(R.id.quick_return_header_tv)
31 | TextView mQuickReturnHeaderTextView;
32 | @Bind(R.id.quick_return_footer_tv)
33 | TextView mQuickReturnFooterTextView;
34 | // endregion
35 |
36 | // region Constructors
37 | public QuickReturnWebViewFragment() {
38 | }
39 | // endregion
40 |
41 | // region Factory Methods
42 | public static QuickReturnWebViewFragment newInstance(Bundle extras) {
43 | QuickReturnWebViewFragment fragment = new QuickReturnWebViewFragment();
44 | fragment.setRetainInstance(true);
45 | fragment.setArguments(extras);
46 | return fragment;
47 | }
48 | // endregion
49 |
50 | // region Lifecycle Methods
51 |
52 | @Override
53 | public void onCreate(Bundle savedInstanceState) {
54 | super.onCreate(savedInstanceState);
55 |
56 | if (getArguments() != null) {
57 | mQuickReturnViewType = QuickReturnViewType.valueOf(getArguments().getString("quick_return_view_type"));
58 | }
59 | }
60 |
61 | @Override
62 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
63 | Bundle savedInstanceState) {
64 | View view = inflater.inflate(R.layout.fragment_quick_return_webview, container, false);
65 | ButterKnife.bind(this, view);
66 | return view;
67 | }
68 |
69 | @Override
70 | public void onViewCreated(View view, Bundle savedInstanceState) {
71 | super.onViewCreated(view, savedInstanceState);
72 |
73 | mNotifyingWebView.loadUrl("file:///android_asset/lipsum.html");
74 | int headerHeight = getResources().getDimensionPixelSize(R.dimen.header_height2);
75 | int headerTranslation = -(headerHeight);
76 |
77 | int footerTranslation = getResources().getDimensionPixelSize(R.dimen.footer_height);
78 |
79 | QuickReturnWebViewOnScrollChangedListener scrollListener;
80 |
81 | switch (mQuickReturnViewType) {
82 | case HEADER:
83 | mQuickReturnHeaderTextView.setVisibility(View.VISIBLE);
84 | scrollListener = new QuickReturnWebViewOnScrollChangedListener.Builder(QuickReturnViewType.HEADER)
85 | .header(mQuickReturnHeaderTextView)
86 | .minHeaderTranslation(headerTranslation)
87 | .build();
88 | mNotifyingWebView.setOnScrollChangedListener(scrollListener);
89 | break;
90 | case FOOTER:
91 | mQuickReturnFooterTextView.setVisibility(View.VISIBLE);
92 | scrollListener = new QuickReturnWebViewOnScrollChangedListener.Builder(QuickReturnViewType.FOOTER)
93 | .footer(mQuickReturnFooterTextView)
94 | .minFooterTranslation(footerTranslation)
95 | .build();
96 | mNotifyingWebView.setOnScrollChangedListener(scrollListener);
97 | break;
98 | case BOTH:
99 | mQuickReturnHeaderTextView.setVisibility(View.VISIBLE);
100 | mQuickReturnFooterTextView.setVisibility(View.VISIBLE);
101 | scrollListener = new QuickReturnWebViewOnScrollChangedListener.Builder(QuickReturnViewType.BOTH)
102 | .header(mQuickReturnHeaderTextView)
103 | .minHeaderTranslation(headerTranslation)
104 | .footer(mQuickReturnFooterTextView)
105 | .minFooterTranslation(footerTranslation)
106 | .build();
107 | mNotifyingWebView.setOnScrollChangedListener(scrollListener);
108 | break;
109 | }
110 |
111 | mNotifyingWebView.setOverScrollEnabled(false);
112 | }
113 |
114 | @Override
115 | public void onDestroyView() {
116 | super.onDestroyView();
117 | ButterKnife.unbind(this);
118 | }
119 | // endregion
120 | }
121 |
122 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/fragments/QuickReturnWithExtraOnScrollListenerFragment.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.fragments;
2 |
3 | import android.os.Bundle;
4 | import android.view.ViewGroup;
5 | import android.widget.AbsListView;
6 | import android.widget.ProgressBar;
7 |
8 | /**
9 | * Quick return effect with extra scroll-to-bottom {@link android.widget.AbsListView.OnScrollListener}
10 | *
11 | * @author longkai
12 | */
13 | public class QuickReturnWithExtraOnScrollListenerFragment extends QuickReturnHeaderListViewFragment implements AbsListView.OnScrollListener {
14 |
15 | // region Constants
16 | public static final String TAG = QuickReturnWithExtraOnScrollListenerFragment.class.getSimpleName();
17 | // endregion
18 |
19 | // region Constructors
20 | public QuickReturnWithExtraOnScrollListenerFragment() {
21 | }
22 | // endregion
23 |
24 | // region Factory Methods
25 | public static QuickReturnWithExtraOnScrollListenerFragment newInstance(Bundle extras) {
26 | QuickReturnWithExtraOnScrollListenerFragment fragment = new QuickReturnWithExtraOnScrollListenerFragment();
27 | fragment.setRetainInstance(true);
28 | fragment.setArguments(extras);
29 | return fragment;
30 | }
31 |
32 | public static QuickReturnWithExtraOnScrollListenerFragment newInstance() {
33 | QuickReturnWithExtraOnScrollListenerFragment fragment = new QuickReturnWithExtraOnScrollListenerFragment();
34 | fragment.setArguments(new Bundle());
35 | return fragment;
36 | }
37 | // endregion
38 |
39 | // region Lifecycle Methods
40 | @Override
41 | public void onActivityCreated(Bundle savedInstanceState) {
42 | super.onActivityCreated(savedInstanceState);
43 | // now append our scroll to bottom load-more listener with the quick return effect
44 | mScrollListener.registerExtraOnScrollListener(this);
45 | }
46 | // endregion
47 |
48 | // region AbsListView.OnScrollListener Methods
49 | @Override
50 | public void onScrollStateChanged(AbsListView view, int scrollState) {
51 | // no-op
52 | }
53 |
54 | @Override
55 | public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
56 | if (firstVisibleItem + visibleItemCount == totalItemCount && getListView().getFooterViewsCount() == 0) {
57 | ProgressBar progressBar = new ProgressBar(getActivity());
58 | progressBar.setLayoutParams(new AbsListView.LayoutParams(
59 | ViewGroup.LayoutParams.MATCH_PARENT,
60 | ViewGroup.LayoutParams.WRAP_CONTENT
61 | ));
62 | progressBar.setPadding(8, 8, 8, 8);
63 | getListView().addFooterView(progressBar);
64 | }
65 | }
66 | // endregion
67 | }
68 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/fragments/SpeedyQuickReturnFragment.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.fragments;
2 |
3 | import android.app.Fragment;
4 | import android.os.Bundle;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.TextView;
9 |
10 | import com.etiennelawlor.quickreturn.R;
11 | import com.etiennelawlor.quickreturn.library.enums.QuickReturnViewType;
12 | import com.etiennelawlor.quickreturn.library.listeners.SpeedyQuickReturnListViewOnScrollListener;
13 | import com.etiennelawlor.quickreturn.library.listeners.SpeedyQuickReturnScrollViewOnScrollChangedListener;
14 | import com.etiennelawlor.quickreturn.library.views.NotifyingScrollView;
15 |
16 | import butterknife.Bind;
17 | import butterknife.ButterKnife;
18 |
19 | /**
20 | * Created by etiennelawlor on 6/23/14.
21 | */
22 | public class SpeedyQuickReturnFragment extends Fragment {
23 |
24 | // region Member Variables
25 | private QuickReturnViewType mQuickReturnViewType;
26 |
27 | @Bind(R.id.scroll_view)
28 | NotifyingScrollView mNotifyingScrollView;
29 | @Bind(R.id.quick_return_header_tv)
30 | TextView mQuickReturnHeaderTextView;
31 | @Bind(R.id.quick_return_footer_tv)
32 | TextView mQuickReturnFooterTextView;
33 | // endregion
34 |
35 | // region Constructors
36 | public SpeedyQuickReturnFragment() {
37 | }
38 | // endregion
39 |
40 | // region Factory Methods
41 | public static SpeedyQuickReturnFragment newInstance(Bundle extras) {
42 | SpeedyQuickReturnFragment fragment = new SpeedyQuickReturnFragment();
43 | fragment.setRetainInstance(true);
44 | fragment.setArguments(extras);
45 | return fragment;
46 | }
47 | // endregion
48 |
49 | // region Lifecycle Methods
50 |
51 | @Override
52 | public void onCreate(Bundle savedInstanceState) {
53 | super.onCreate(savedInstanceState);
54 |
55 | if (getArguments() != null) {
56 | mQuickReturnViewType = QuickReturnViewType.valueOf(getArguments().getString("quick_return_view_type"));
57 | }
58 | }
59 |
60 | @Override
61 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
62 | Bundle savedInstanceState) {
63 | View view = inflater.inflate(R.layout.fragment_quick_return, container, false);
64 | ButterKnife.bind(this, view);
65 | return view;
66 | }
67 |
68 | @Override
69 | public void onViewCreated(View view, Bundle savedInstanceState) {
70 | super.onViewCreated(view, savedInstanceState);
71 |
72 | SpeedyQuickReturnScrollViewOnScrollChangedListener scrollListener;
73 |
74 | switch (mQuickReturnViewType) {
75 | case HEADER:
76 | mQuickReturnHeaderTextView.setVisibility(View.VISIBLE);
77 | scrollListener = new SpeedyQuickReturnScrollViewOnScrollChangedListener.Builder(getActivity(), QuickReturnViewType.HEADER)
78 | .header(mQuickReturnHeaderTextView)
79 | .build();
80 | mNotifyingScrollView.setOnScrollChangedListener(scrollListener);
81 | break;
82 | case FOOTER:
83 | mQuickReturnFooterTextView.setVisibility(View.VISIBLE);
84 | scrollListener = new SpeedyQuickReturnScrollViewOnScrollChangedListener.Builder(getActivity(), QuickReturnViewType.FOOTER)
85 | .footer(mQuickReturnFooterTextView)
86 | .build();
87 | mNotifyingScrollView.setOnScrollChangedListener(scrollListener);
88 | break;
89 | case BOTH:
90 | mQuickReturnHeaderTextView.setVisibility(View.VISIBLE);
91 | mQuickReturnFooterTextView.setVisibility(View.VISIBLE);
92 | scrollListener = new SpeedyQuickReturnScrollViewOnScrollChangedListener.Builder(getActivity(), QuickReturnViewType.BOTH)
93 | .header(mQuickReturnHeaderTextView)
94 | .footer(mQuickReturnFooterTextView)
95 | .build();
96 | mNotifyingScrollView.setOnScrollChangedListener(scrollListener);
97 | break;
98 | }
99 |
100 | mNotifyingScrollView.setOverScrollEnabled(false);
101 | }
102 |
103 | @Override
104 | public void onDestroyView() {
105 | super.onDestroyView();
106 | ButterKnife.unbind(this);
107 | }
108 | // endregion
109 | }
110 |
111 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/fragments/SpeedyQuickReturnWebViewFragment.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.fragments;
2 |
3 | import android.app.Fragment;
4 | import android.os.Bundle;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.TextView;
9 |
10 | import com.etiennelawlor.quickreturn.R;
11 | import com.etiennelawlor.quickreturn.library.enums.QuickReturnViewType;
12 | import com.etiennelawlor.quickreturn.library.listeners.SpeedyQuickReturnScrollViewOnScrollChangedListener;
13 | import com.etiennelawlor.quickreturn.library.listeners.SpeedyQuickReturnWebViewOnScrollChangedListener;
14 | import com.etiennelawlor.quickreturn.library.views.NotifyingWebView;
15 |
16 | import butterknife.Bind;
17 | import butterknife.ButterKnife;
18 |
19 | /**
20 | * Created by etiennelawlor on 6/23/14.
21 | */
22 | public class SpeedyQuickReturnWebViewFragment extends Fragment {
23 |
24 | // region Member Variables
25 | private QuickReturnViewType mQuickReturnViewType;
26 |
27 | @Bind(R.id.web_view)
28 | NotifyingWebView mNotifyingWebView;
29 | @Bind(R.id.quick_return_header_tv)
30 | TextView mQuickReturnHeaderTextView;
31 | @Bind(R.id.quick_return_footer_tv)
32 | TextView mQuickReturnFooterTextView;
33 | // endregion
34 |
35 | // region Constructors
36 | public SpeedyQuickReturnWebViewFragment() {
37 | }
38 | // endregion
39 |
40 | // region Factory Methods
41 | public static SpeedyQuickReturnWebViewFragment newInstance(Bundle extras) {
42 | SpeedyQuickReturnWebViewFragment fragment = new SpeedyQuickReturnWebViewFragment();
43 | fragment.setRetainInstance(true);
44 | fragment.setArguments(extras);
45 | return fragment;
46 | }
47 | // endregion
48 |
49 | // region Lifecycle Methods
50 |
51 | @Override
52 | public void onCreate(Bundle savedInstanceState) {
53 | super.onCreate(savedInstanceState);
54 |
55 | if (getArguments() != null) {
56 | mQuickReturnViewType = QuickReturnViewType.valueOf(getArguments().getString("quick_return_view_type"));
57 | }
58 | }
59 |
60 | @Override
61 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
62 | Bundle savedInstanceState) {
63 | View view = inflater.inflate(R.layout.fragment_quick_return_webview, container, false);
64 | ButterKnife.bind(this, view);
65 | return view;
66 | }
67 |
68 | @Override
69 | public void onViewCreated(View view, Bundle savedInstanceState) {
70 | super.onViewCreated(view, savedInstanceState);
71 |
72 | mNotifyingWebView.loadUrl("file:///android_asset/lipsum.html");
73 | SpeedyQuickReturnWebViewOnScrollChangedListener scrollListener;
74 |
75 | switch (mQuickReturnViewType) {
76 | case HEADER:
77 | mQuickReturnHeaderTextView.setVisibility(View.VISIBLE);
78 | scrollListener = new SpeedyQuickReturnWebViewOnScrollChangedListener.Builder(getActivity(), QuickReturnViewType.HEADER)
79 | .header(mQuickReturnHeaderTextView)
80 | .build();
81 | mNotifyingWebView.setOnScrollChangedListener(scrollListener);
82 | break;
83 | case FOOTER:
84 | mQuickReturnFooterTextView.setVisibility(View.VISIBLE);
85 | scrollListener = new SpeedyQuickReturnWebViewOnScrollChangedListener.Builder(getActivity(), QuickReturnViewType.FOOTER)
86 | .footer(mQuickReturnFooterTextView)
87 | .build();
88 | mNotifyingWebView.setOnScrollChangedListener(scrollListener);
89 | break;
90 | case BOTH:
91 | mQuickReturnHeaderTextView.setVisibility(View.VISIBLE);
92 | mQuickReturnFooterTextView.setVisibility(View.VISIBLE);
93 | scrollListener = new SpeedyQuickReturnWebViewOnScrollChangedListener.Builder(getActivity(), QuickReturnViewType.BOTH)
94 | .header(mQuickReturnHeaderTextView)
95 | .footer(mQuickReturnFooterTextView)
96 | .build();
97 | mNotifyingWebView.setOnScrollChangedListener(scrollListener);
98 | break;
99 | }
100 |
101 | mNotifyingWebView.setOverScrollEnabled(false);
102 | }
103 |
104 | @Override
105 | public void onDestroyView() {
106 | super.onDestroyView();
107 | ButterKnife.unbind(this);
108 | }
109 | // endregion
110 | }
111 |
112 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/interfaces/QuickReturnInterface.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.interfaces;
2 |
3 | import com.astuetz.PagerSlidingTabStrip;
4 |
5 | /**
6 | * Created by etiennelawlor on 6/29/14.
7 | */
8 | public interface QuickReturnInterface {
9 | PagerSlidingTabStrip getTabs();
10 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/itemdecorations/DividerItemDecoration.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.itemdecorations;
2 |
3 | import android.content.Context;
4 | import android.content.res.TypedArray;
5 | import android.graphics.Canvas;
6 | import android.graphics.Rect;
7 | import android.graphics.drawable.Drawable;
8 | import android.support.v7.widget.LinearLayoutManager;
9 | import android.support.v7.widget.RecyclerView;
10 | import android.util.AttributeSet;
11 | import android.view.View;
12 |
13 | /**
14 | * Created by etiennelawlor on 1/25/15.
15 | */
16 | public class DividerItemDecoration extends RecyclerView.ItemDecoration {
17 |
18 | // region Member Variables
19 | private Drawable mDivider;
20 | private boolean mShowFirstDivider = false;
21 | private boolean mShowLastDivider = false;
22 | // endregion
23 |
24 | // region Constructors
25 | public DividerItemDecoration(Context context, AttributeSet attrs) {
26 | final TypedArray a = context
27 | .obtainStyledAttributes(attrs, new int[]{android.R.attr.listDivider});
28 | mDivider = a.getDrawable(0);
29 | a.recycle();
30 | }
31 |
32 | public DividerItemDecoration(Context context, AttributeSet attrs, boolean showFirstDivider,
33 | boolean showLastDivider) {
34 | this(context, attrs);
35 | mShowFirstDivider = showFirstDivider;
36 | mShowLastDivider = showLastDivider;
37 | }
38 |
39 | public DividerItemDecoration(Drawable divider) {
40 | mDivider = divider;
41 | }
42 |
43 | public DividerItemDecoration(Drawable divider, boolean showFirstDivider,
44 | boolean showLastDivider) {
45 | this(divider);
46 | mShowFirstDivider = showFirstDivider;
47 | mShowLastDivider = showLastDivider;
48 | }
49 | // endregion
50 |
51 | @Override
52 | public void getItemOffsets(Rect outRect, View view, RecyclerView parent,
53 | RecyclerView.State state) {
54 | super.getItemOffsets(outRect, view, parent, state);
55 | if (mDivider == null) {
56 | return;
57 | }
58 | if (parent.getChildPosition(view) < 1) {
59 | return;
60 | }
61 |
62 | if (getOrientation(parent) == LinearLayoutManager.VERTICAL) {
63 | outRect.top = mDivider.getIntrinsicHeight();
64 | } else {
65 | outRect.left = mDivider.getIntrinsicWidth();
66 | }
67 | }
68 |
69 | @Override
70 | public void onDrawOver(Canvas c, RecyclerView parent, RecyclerView.State state) {
71 | if (mDivider == null) {
72 | super.onDrawOver(c, parent, state);
73 | return;
74 | }
75 |
76 | // Initialization needed to avoid compiler warning
77 | int left = 0, right = 0, top = 0, bottom = 0, size;
78 | int orientation = getOrientation(parent);
79 | int childCount = parent.getChildCount();
80 |
81 | if (orientation == LinearLayoutManager.VERTICAL) {
82 | size = mDivider.getIntrinsicHeight();
83 | left = parent.getPaddingLeft();
84 | right = parent.getWidth() - parent.getPaddingRight();
85 | } else { //horizontal
86 | size = mDivider.getIntrinsicWidth();
87 | top = parent.getPaddingTop();
88 | bottom = parent.getHeight() - parent.getPaddingBottom();
89 | }
90 |
91 | for (int i = mShowFirstDivider ? 0 : 1; i < childCount; i++) {
92 | View child = parent.getChildAt(i);
93 | RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child.getLayoutParams();
94 |
95 | if (orientation == LinearLayoutManager.VERTICAL) {
96 | top = child.getTop() - params.topMargin;
97 | bottom = top + size;
98 | } else { //horizontal
99 | left = child.getLeft() - params.leftMargin;
100 | right = left + size;
101 | }
102 | mDivider.setBounds(left, top, right, bottom);
103 | mDivider.draw(c);
104 | }
105 |
106 | // show last divider
107 | if (mShowLastDivider && childCount > 0) {
108 | View child = parent.getChildAt(childCount - 1);
109 | RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child.getLayoutParams();
110 | if (orientation == LinearLayoutManager.VERTICAL) {
111 | top = child.getBottom() + params.bottomMargin;
112 | bottom = top + size;
113 | } else { // horizontal
114 | left = child.getRight() + params.rightMargin;
115 | right = left + size;
116 | }
117 | mDivider.setBounds(left, top, right, bottom);
118 | mDivider.draw(c);
119 | }
120 | }
121 |
122 | // region Helper Methods
123 | private int getOrientation(RecyclerView parent) {
124 | if (parent.getLayoutManager() instanceof LinearLayoutManager) {
125 | LinearLayoutManager layoutManager = (LinearLayoutManager) parent.getLayoutManager();
126 | return layoutManager.getOrientation();
127 | } else {
128 | throw new IllegalStateException(
129 | "DividerItemDecoration can only be used with a LinearLayoutManager.");
130 | }
131 | }
132 | // endregion
133 | }
134 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/itemdecorations/GridSpacesItemDecoration.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.itemdecorations;
2 |
3 | import android.graphics.Rect;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.view.View;
6 |
7 | /**
8 | * Created by etiennelawlor on 1/31/15.
9 | */
10 | public class GridSpacesItemDecoration extends RecyclerView.ItemDecoration {
11 |
12 | // region Member Variables
13 | private int mSpace;
14 | // endregion
15 |
16 | // region Constructors
17 | public GridSpacesItemDecoration(int space) {
18 | this.mSpace = space;
19 | }
20 | // endregion
21 |
22 | @Override
23 | public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
24 |
25 | int childPosition = parent.getChildAdapterPosition(view);
26 | if (childPosition == 0 || childPosition == 1) {
27 | outRect.top = mSpace;
28 | }
29 |
30 | if (childPosition % 2 == 0) {
31 | outRect.left = mSpace;
32 | outRect.right = mSpace / 2;
33 | } else {
34 | outRect.left = mSpace / 2;
35 | outRect.right = mSpace;
36 | }
37 |
38 | outRect.bottom = mSpace;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/itemdecorations/SpacesItemDecoration.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.itemdecorations;
2 |
3 | import android.graphics.Rect;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.util.Log;
6 | import android.view.View;
7 |
8 | /**
9 | * Created by etiennelawlor on 1/24/15.
10 | */
11 | public class SpacesItemDecoration extends RecyclerView.ItemDecoration {
12 |
13 | // region Member Variables
14 | private int mSpace;
15 | // endregion
16 |
17 | // region Constructors
18 | public SpacesItemDecoration(int space) {
19 | this.mSpace = space;
20 | }
21 | // endregion
22 |
23 | @Override
24 | public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
25 |
26 | int childPosition = parent.getChildAdapterPosition(view);
27 | if (childPosition == 0) {
28 | outRect.left = mSpace;
29 | outRect.right = mSpace;
30 | outRect.top = mSpace;
31 | outRect.bottom = mSpace / 2;
32 | } else if (childPosition == parent.getLayoutManager().getItemCount() - 1) {
33 | outRect.left = mSpace;
34 | outRect.right = mSpace;
35 | outRect.top = mSpace / 2;
36 | outRect.bottom = mSpace;
37 | } else {
38 | outRect.left = mSpace;
39 | outRect.right = mSpace;
40 | outRect.top = mSpace / 2;
41 | outRect.bottom = mSpace / 2;
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/models/FacebookPost.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.models;
2 |
3 | /**
4 | * Created by etiennelawlor on 7/17/14.
5 | */
6 | public class FacebookPost {
7 |
8 | // region Fields
9 | private String mAvatarUrl;
10 | private String mPostImageUrl;
11 | private String mDisplayName;
12 | private String mMessage;
13 | private String mTimestamp;
14 | private int mCommentCount;
15 | private int mLikeCount;
16 | // endregion
17 |
18 | // region Constructors
19 | public FacebookPost(){
20 | }
21 | // endregion
22 |
23 | // region Getters
24 | public String getAvatarUrl(){
25 | return mAvatarUrl;
26 | }
27 |
28 | public String getPostImageUrl() { return mPostImageUrl; }
29 |
30 | public String getDisplayName(){
31 | return mDisplayName;
32 | }
33 |
34 | public String getMessage(){
35 | return mMessage;
36 | }
37 |
38 | public String getTimestamp(){
39 | return mTimestamp;
40 | }
41 |
42 | public int getCommentCount() {
43 | return mCommentCount;
44 | }
45 |
46 | public int getLikeCount() {
47 | return mLikeCount;
48 | }
49 | // endregion
50 |
51 | // region Setters
52 | public void setAvatarUrl(String avatarUrl){
53 | mAvatarUrl = avatarUrl;
54 | }
55 |
56 | public void setPostImageUrl(String postImageUrl){
57 | mPostImageUrl = postImageUrl;
58 | }
59 |
60 | public void setDisplayName(String displayName){
61 | mDisplayName = displayName;
62 | }
63 |
64 | public void setMessage(String message){
65 | mMessage = message;
66 | }
67 |
68 | public void setTimestamp(String timestamp){
69 | mTimestamp = timestamp;
70 | }
71 |
72 | public void setCommentCount(int commentCount) { mCommentCount = commentCount; }
73 |
74 | public void setLikeCount(int likeCount) { mLikeCount = likeCount; }
75 | // endregion
76 | }
77 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/models/GooglePlusPost.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.models;
2 |
3 | /**
4 | * Created by etiennelawlor on 7/17/14.
5 | */
6 | public class GooglePlusPost {
7 |
8 | // region Fields
9 | private String mAvatarUrl;
10 | private String mPostImageUrl;
11 | private String mCommenterOneAvatarUrl;
12 | private String mCommenterTwoAvatarUrl;
13 | private String mCommenterThreeAvatarUrl;
14 | private String mCommenterOneDisplayName;
15 | private String mCommenterTwoDisplayName;
16 | private String mCommenterThreeDisplayName;
17 | private String mComment;
18 | private String mDisplayName;
19 | private String mMessage;
20 | private String mTimestamp;
21 | private int mCommentCount;
22 | private int mPlusOneCount;
23 | // endregion
24 |
25 | // region Constructors
26 | public GooglePlusPost(){
27 | }
28 | // endregion
29 |
30 | // region Getters
31 | public String getAvatarUrl(){
32 | return mAvatarUrl;
33 | }
34 |
35 | public String getPostImageUrl() { return mPostImageUrl; }
36 |
37 | public String getCommenterOneAvatarUrl() { return mCommenterOneAvatarUrl; }
38 |
39 | public String getCommenterTwoAvatarUrl() { return mCommenterTwoAvatarUrl; }
40 |
41 | public String getCommenterThreeAvatarUrl() { return mCommenterThreeAvatarUrl; }
42 |
43 | public String getCommenterOneDisplayName() { return mCommenterOneDisplayName; }
44 |
45 | public String getCommenterTwoDisplayName() { return mCommenterTwoDisplayName; }
46 |
47 | public String getCommenterThreeDisplayName() { return mCommenterThreeDisplayName; }
48 |
49 | public String getComment() { return mComment; }
50 |
51 | public String getDisplayName(){
52 | return mDisplayName;
53 | }
54 |
55 | public String getMessage(){
56 | return mMessage;
57 | }
58 |
59 | public String getTimestamp(){
60 | return mTimestamp;
61 | }
62 |
63 | public int getCommentCount() {
64 | return mCommentCount;
65 | }
66 |
67 | public int getPlusOneCount() {
68 | return mPlusOneCount;
69 | }
70 | // endregion
71 |
72 | // region Setters
73 | public void setAvatarUrl(String avatarUrl){
74 | mAvatarUrl = avatarUrl;
75 | }
76 |
77 | public void setPostImageUrl(String postImageUrl){
78 | mPostImageUrl = postImageUrl;
79 | }
80 |
81 | public void setCommenterOneAvatarUrl(String avatarUrl){
82 | mCommenterOneAvatarUrl = avatarUrl;
83 | }
84 |
85 | public void setCommenterTwoAvatarUrl(String avatarUrl){
86 | mCommenterTwoAvatarUrl = avatarUrl;
87 | }
88 |
89 | public void setCommenterThreeAvatarUrl(String avatarUrl){
90 | mCommenterThreeAvatarUrl = avatarUrl;
91 | }
92 |
93 | public void setCommenterOneDisplayName(String displayName){
94 | mCommenterOneDisplayName = displayName;
95 | }
96 |
97 | public void setCommenterTwoDisplayName(String displayName){
98 | mCommenterTwoDisplayName = displayName;
99 | }
100 |
101 | public void setCommenterThreeDisplayName(String displayName){
102 | mCommenterThreeDisplayName = displayName;
103 | }
104 |
105 | public void setComment(String comment) { mComment = comment; }
106 |
107 | public void setDisplayName(String displayName){
108 | mDisplayName = displayName;
109 | }
110 |
111 | public void setMessage(String message){
112 | mMessage = message;
113 | }
114 |
115 | public void setTimestamp(String timestamp){
116 | mTimestamp = timestamp;
117 | }
118 |
119 | public void setCommentCount(int commentCount) { mCommentCount = commentCount; }
120 |
121 | public void setPlusOneCount(int plusOneCount) { mPlusOneCount = plusOneCount; }
122 | // endregion
123 | }
124 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/models/Tweet.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.models;
2 |
3 | /**
4 | * Created by etiennelawlor on 7/17/14.
5 | */
6 | public class Tweet {
7 |
8 | // region Fields
9 | private String mAvatarUrl;
10 | private String mDisplayName;
11 | private String mUsername;
12 | private String mMessage;
13 | private String mTimestamp;
14 | private int mRetweetCount;
15 | private int mStarCount;
16 | // endregion
17 |
18 | // region Constructors
19 | public Tweet(){
20 | }
21 | // endregion
22 |
23 | // region Getters
24 | public String getAvatarUrl(){
25 | return mAvatarUrl;
26 | }
27 |
28 | public String getDisplayName(){
29 | return mDisplayName;
30 | }
31 |
32 | public String getUsername(){
33 | return mUsername;
34 | }
35 |
36 | public String getMessage(){
37 | return mMessage;
38 | }
39 |
40 | public String getTimestamp(){
41 | return mTimestamp;
42 | }
43 |
44 | public int getRetweetCount(){
45 | return mRetweetCount;
46 | }
47 |
48 | public int getStarCount(){
49 | return mStarCount;
50 | }
51 | // endregion
52 |
53 | // region Setters
54 | public void setAvatarUrl(String avatarUrl){
55 | mAvatarUrl = avatarUrl;
56 | }
57 |
58 | public void setDisplayName(String displayName){
59 | mDisplayName = displayName;
60 | }
61 |
62 | public void setUsername(String username){
63 | mUsername = username;
64 | }
65 |
66 | public void setMessage(String message){
67 | mMessage = message;
68 | }
69 |
70 | public void setTimestamp(String timestamp){
71 | mTimestamp = timestamp;
72 | }
73 |
74 | public void setRetweetCount(int retweetCount){
75 | mRetweetCount = retweetCount;
76 | }
77 |
78 | public void setStarCount(int starCount){
79 | mStarCount = starCount;
80 | }
81 | // endregion
82 | }
83 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/utils/TypefaceUtil.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.utils;
2 |
3 | import android.graphics.Typeface;
4 | import android.widget.TextView;
5 |
6 | import com.etiennelawlor.quickreturn.QuickReturnApplication;
7 | import com.google.common.collect.Maps;
8 |
9 | import java.util.HashMap;
10 |
11 | /**
12 | * Created by etiennelawlor on 1/20/15.
13 | */
14 | public class TypefaceUtil {
15 |
16 | // region Static Variables
17 | private static HashMap sTypefaceCache = Maps.newHashMap();
18 | // endregion
19 |
20 | public static void apply(TypefaceId id, TextView tv) {
21 | if (tv == null || tv.isInEditMode()) {
22 | return;
23 | }
24 | tv.setTypeface(getTypeface(id));
25 | }
26 |
27 | public static Typeface getTypeface(TypefaceId id) {
28 | Typeface typeface = sTypefaceCache.get(id);
29 | if (typeface == null) {
30 | typeface = Typeface.createFromAsset(QuickReturnApplication.getInstance().getAssets(), id.getFilePath());
31 | sTypefaceCache.put(id, typeface);
32 | }
33 | return typeface;
34 | }
35 |
36 | // region Interfaces
37 | public static interface TypefaceId {
38 | public Typeface get();
39 |
40 | public String getFilePath();
41 | }
42 | // endregion
43 | }
44 |
45 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/etiennelawlor/quickreturn/views/CustomFontTextView.java:
--------------------------------------------------------------------------------
1 | package com.etiennelawlor.quickreturn.views;
2 |
3 | import android.content.Context;
4 | import android.content.res.TypedArray;
5 | import android.util.AttributeSet;
6 | import android.widget.TextView;
7 |
8 | import com.etiennelawlor.quickreturn.R;
9 | import com.etiennelawlor.quickreturn.enums.Typefaces;
10 | import com.etiennelawlor.quickreturn.utils.TypefaceUtil;
11 |
12 | /**
13 | * Created by etiennelawlor on 6/24/14.
14 | */
15 | public class CustomFontTextView extends TextView {
16 |
17 | // region Constructors
18 | public CustomFontTextView(Context context) {
19 | super(context);
20 | init(null);
21 | }
22 |
23 | public CustomFontTextView(Context context, AttributeSet attrs) {
24 | super(context, attrs);
25 | init(attrs);
26 | }
27 |
28 | public CustomFontTextView(Context context, AttributeSet attrs, int defStyleAttr) {
29 | super(context, attrs, defStyleAttr);
30 | init(attrs);
31 | }
32 | // endregion
33 |
34 | // region Helper Methods
35 | private void init(AttributeSet attrs) {
36 | if (isInEditMode()) {
37 | return;
38 | }
39 |
40 | if (attrs != null) {
41 | TypedArray a = getContext().getTheme().obtainStyledAttributes(attrs, R.styleable.CustomFontTextView, 0, 0);
42 | try {
43 | Integer position = a.getInteger(R.styleable.CustomFontTextView_textFont, 10);
44 | setTypeface(TypefaceUtil.getTypeface(Typefaces.from(position)));
45 | } finally {
46 | a.recycle();
47 | }
48 | } else {
49 | setTypeface(TypefaceUtil.getTypeface(Typefaces.ROBOTO_REGULAR));
50 | }
51 | }
52 | // endregion
53 | }
54 |
--------------------------------------------------------------------------------
/sample/src/main/res/anim/crouton_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/sample/src/main/res/anim/crouton_in_delayed.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
--------------------------------------------------------------------------------
/sample/src/main/res/anim/crouton_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/sample/src/main/res/anim/down_from_top.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
8 |
--------------------------------------------------------------------------------
/sample/src/main/res/anim/slide_footer_down.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
11 |
--------------------------------------------------------------------------------
/sample/src/main/res/anim/slide_footer_up.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
11 |
--------------------------------------------------------------------------------
/sample/src/main/res/anim/slide_header_down.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
--------------------------------------------------------------------------------
/sample/src/main/res/anim/slide_header_up.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
--------------------------------------------------------------------------------
/sample/src/main/res/anim/up_from_bottom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
15 |
16 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_add_person.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_add_person.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_camera.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_donate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_donate.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_edit.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_edit_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_edit_red.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_gallery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_gallery.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_github.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_google_plus_comment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_google_plus_comment.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_important.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_important.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_marker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_marker.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_messages.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_messages.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_messages_highlighted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_messages_highlighted.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_more.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_more_highlighted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_more_highlighted.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_news.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_news.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_news_highlighted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_news_highlighted.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_notifications.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_notifications.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_notifications_highlighted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_notifications_highlighted.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_reply.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_reply.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_share.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_twitter_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_twitter_camera.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_up.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_users.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_users.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_action_users_highlighted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_action_users_highlighted.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_retweet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-hdpi/ic_retweet.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_add_person.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_add_person.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_camera.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_donate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_donate.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_edit.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_edit_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_edit_red.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_gallery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_gallery.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_github.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_google_plus_comment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_google_plus_comment.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_important.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_important.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_marker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_marker.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_messages.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_messages.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_messages_highlighted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_messages_highlighted.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_more.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_more_highlighted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_more_highlighted.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_news.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_news.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_news_highlighted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_news_highlighted.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_notifications.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_notifications.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_notifications_highlighted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_notifications_highlighted.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_reply.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_reply.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_share.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_twitter_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_twitter_camera.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_up.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_users.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_users.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_action_users_highlighted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_action_users_highlighted.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_retweet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-mdpi/ic_retweet.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_add_person.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_add_person.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_camera.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_donate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_donate.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_edit.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_edit_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_edit_red.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_gallery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_gallery.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_github.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_google_plus_comment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_google_plus_comment.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_important.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_important.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_marker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_marker.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_messages.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_messages.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_messages_highlighted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_messages_highlighted.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_more.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_more_highlighted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_more_highlighted.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_news.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_news.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_news_highlighted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_news_highlighted.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_notifications.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_notifications.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_notifications_highlighted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_notifications_highlighted.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_reply.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_reply.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_share.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_twitter_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_twitter_camera.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_up.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_users.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_users.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_action_users_highlighted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_action_users_highlighted.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_retweet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/ic_retweet.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/tabs_pattern.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xhdpi/tabs_pattern.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_add_person.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_add_person.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_camera.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_donate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_donate.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_edit.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_edit_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_edit_red.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_gallery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_gallery.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_github.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_google_plus_comment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_google_plus_comment.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_important.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_important.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_marker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_marker.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_messages.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_messages.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_messages_highlighted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_messages_highlighted.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_more.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_more_highlighted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_more_highlighted.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_news.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_news.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_news_highlighted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_news_highlighted.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_notifications.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_notifications.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_notifications_highlighted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_notifications_highlighted.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_reply.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_reply.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_share.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_twitter_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_twitter_camera.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_up.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_users.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_users.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_action_users_highlighted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_action_users_highlighted.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_retweet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/drawable-xxhdpi/ic_retweet.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable/background_tabs.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable/card_default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable/card_highlighted.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable/selector_bg_card.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
9 |
11 |
13 |
14 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable/selector_bg_tab.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable/shape_circle_white_dropshadow.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | -
6 |
7 |
12 |
13 |
14 |
15 | -
16 |
17 |
22 |
23 |
24 |
25 | -
26 |
27 |
32 |
33 |
34 |
35 | -
36 |
37 |
42 |
43 |
44 |
45 | -
46 |
47 |
52 |
53 |
54 |
55 |
56 |
57 | -
58 |
59 |
60 |
61 |
64 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable/shape_google_avatar.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable/shape_gray1_semi_rounded_rectangle.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable/shape_rounded_rectangle.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable/shape_rounded_rectangle_cornflower_blue.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable/shape_rounded_rectangle_facebook_primary.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable/shape_rounded_rectangle_transparent_black.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable/shape_whitesmoke_semi_rounded_rectangle.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_quick_return_facebook.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
12 |
13 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_quick_return_google_plus.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_quick_return_listview.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_quick_return_recyclerview.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_quick_return_scrollview.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_quick_return_twitter.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
12 |
13 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/appbarlayout_with_tablayout.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
20 |
21 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/country_grid_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
22 |
23 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/country_row.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
17 |
18 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/fragment_listview_quick_return_footer.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
10 |
11 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/fragment_listview_quick_return_header.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
10 |
11 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/fragment_quick_return.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
10 |
11 |
12 |
13 |
14 |
15 |
26 |
27 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/fragment_quick_return_facebook.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
12 |
13 |
31 |
32 |
40 |
41 |
46 |
47 |
57 |
58 |
59 |
65 |
66 |
71 |
72 |
82 |
83 |
84 |
90 |
91 |
96 |
97 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/fragment_quick_return_google_plus.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
12 |
13 |
29 |
30 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/fragment_quick_return_twitter.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
11 |
12 |
19 |
20 |
24 |
25 |
30 |
31 |
41 |
42 |
49 |
50 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/fragment_quick_return_webview.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
10 |
11 |
12 |
23 |
24 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/fragment_recyclerview_quick_return_footer.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
11 |
12 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/fragment_recyclerview_quick_return_header.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
11 |
12 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/list_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/scrollview_content.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/view_header_placeholder.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/sample/src/main/res/menu/quick_return.xml:
--------------------------------------------------------------------------------
1 |
30 |
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lawloretienne/QuickReturn/69dd36ee5d76051567cc7c0df5d08a3b91efde36/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/sample/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | #0Dffffff
6 | #1Affffff
7 | #33ffffff
8 | #4Dffffff
9 | #80ffffff
10 | #99ffffff
11 | #CCffffff
12 | #E6ffffff
13 | #F2ffffff
14 |
15 | #0D000000
16 | #1A000000
17 | #33000000
18 | #4D000000
19 | #66000000
20 | #80000000
21 | #99000000
22 | #CC000000
23 | #E6000000
24 | #F2000000
25 |
26 | #80ededed
27 | #f5f5f5
28 | #598deb
29 | #4771BC
30 |
31 |
32 | #4688f1
33 |
34 | #386DC1
35 | #386DC1
36 |
37 |
38 | #55acee
39 |
40 | #1c6399
41 | #1c6399
42 | #bbddf5
43 |
44 |
45 | #3b5988
46 |
47 | #293E5F
48 | @color/green_500
49 | #dcdee3
50 | #3c5896
51 | #E63c5896
52 | #5b93fc
53 | #6ca8fc
54 |
55 |
56 | #db4437
57 |
58 | #c53929
59 | @color/green_500
60 | #e5e5e5
61 |
62 |
63 | #f1f2f1
64 | #F2F2F2
65 | #ededed
66 | #ebeceb
67 | #EAEAEA
68 | #e4e4e4
69 | #d5d5d5
70 | #D2D2D2 //
71 | #cecece
72 | #C2C2C2
73 | #C9C9C9 //
74 | #c8c8c8 //
75 | #BEBEBE
76 | #BDBDBD
77 | #A4A4A4
78 | #818181
79 | #7A7A7A //
80 | #767676 //
81 | #666666 //
82 | #656565 //
83 | #464646 //
84 |
85 |
86 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 7dp
4 | 7dp
5 |
6 | 96dp
7 |
8 | 48dp
9 | 48dp
10 |
11 | 48dp
12 | 80dp
13 | 80dp
14 |
15 | 50dp
16 | 50dp
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/plurals.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - Cheers!!! Thanks for the beer.
5 | - Cheers!!! Thanks for the beers.
6 |
7 |
8 |
9 | - 1 like
10 | - %d likes
11 |
12 |
13 |
14 | - 1 comment
15 | - %d comments
16 |
17 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
15 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/tags.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
16 |
17 |
28 |
29 |
40 |
41 |
52 |
53 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':sample', ':library'
2 |
--------------------------------------------------------------------------------