GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - knowingman/ShrinkingImageLayout: Android layout with an header image sensible to scroll and touch events.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

10 Commits
10 Commits

Folders and files

NameName
Last commit message
Last commit date
.idea
.idea
 
 
gradle/wrapper
gradle/wrapper
 
 
pics
pics
 
 
sample
sample
 
 
shrinkingimagelayout
shrinkingimagelayout
 
 
.gitignore
.gitignore
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

ShrinkingImageLayout

Android layout with an header image sensible to scroll and touch events. Original code taken from Plaid and made into a backward compatible layout, sensible to RecyclerView scrolls.

Download the sample app here

Apps using this library: Shuffly

Download

Add this to you project-level build.gradle:

allprojects {
  repositories {
    ...
    maven { url "https://jitpack.io" }
  }
}

Add this to your module-level build.gradle:

dependencies {
  compile 'com.github.PierfrancescoSoffritti:ShrinkingImageLayout:0.4'
}

Usage

ShrinkingImageLayout is a simple FrameLayout with some extra functionalities.

Add the ViewGroup to your layout file:

<com.pierfrancescosoffritti.shrinkingimagelayout.ShrinkingImageLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/shrinking_image_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

Then set it up by calling this method:

shrinkingImageLayout.setupRecyclerView(new RecyclerView(this), new LinearLayoutManager(this), new Adapter(getData()));

the adapter must implement HeaderRecyclerViewAdapter

Extra

To add an header to the RecyclerView call this method:

shrinkingImageLayout.addCustomHeader(header);

Where header can be any View object.


Call this method to get a reference to the ImageView

shrinkingImageLayout.getImageView();

On API 21+ the ImageView automatically handles its Z animation when scrolled and touched.

About

Android layout with an header image sensible to scroll and touch events.

Resources

Readme
Apache-2.0 license
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.