Android-TopScrollHelper

Overview

In the View with the function of scrolling of the code written for Android provides convenience for the user back to the top. If you double tap the top of the Android system bar The View with the ability to scroll to the top of the scroll are. Tap the system bar of iPhone features that are identical to scroll to the top.

Android developers can use this functionality with a simple code.

Analytics

   

screens

     

AutoScroll Support View

  • ScrollView
  • NestedScrollView
  • WebView
  • ListView
  • RecyclerView

     

Instructions

  • Add the following permission to use the popup window on the Android Manifest.
<uses-permission android: name = "android.permission.SYSTEM_ALERT_WINDOW" />

     

  • Add the view that the automatic scrolling feature scrolls to add to addTargetScrollView(view) method and removed removeTargetScrollView(view). Activity or Fragment of a scroll view allows calls to be fit to Create and Destory LifeCycle point.
@Override
protected void onCreate (Bundle savedInstanceState) {
   
   super.onCreate(savedInstanceState);
   ...
   
   mNestedScrollView = (NestedScrollView)findViewById(R.id.scrollView);
   TopScrollHelper.getInstance(getApplicationContext()).addTargetScrollView(mNestedScrollView);
}

 

@Override
protected void onDestroy () {

   TopScrollHelper.getInstance(getApplicationContext()).removeTargetScrollView(mNestedScrollView);
   super.onDestroy();

}
  • The Android 6.0 (Marshmallow) Starting obtain permission directly, and then obtained permission to call the addTargetScrollView(view).         

Gradle

compile 'com.kmshack.library:android-topscroll-helper:1.0.0'

Download

Sample App Download

https://play.google.com/store/apps/details?id=com.kmshack.topscrollsample

Video

https://youtu.be/dlZoVnZoIVk



안드로이드의 스크롤의 기능을 가진 View에서 최상단으로 돌아가기 위한 사용자들을 편의제공을 위해 작성된 코드이다. 안드로이드 상단 시스템바에 더블탭을 하면 스크롤의 기능을 가진 View들은 최상단으로 스크롤 하게 된다. 아이폰의 시스템바 터치시 최상단으로 스크롤 되는 기능과 동일하다.

안드로이드 개발자들은 간단한 코드를 통해 이와 같은 기능을 사용할 수 있다.

screens

자동스크롤 지원 View

  • ScrollView
  • NestedScrollView
  • WebView
  • ListView
  • RecyclerView

사용법

  • 안드로이드 Manifest에 다음과 윈도우 팝업을 사용할 수 있도록 퍼미션을 추가 한다.
<uses-permission android: name = "android.permission.SYSTEM_ALERT_WINDOW" />
  • 자동 스크롤 기능을 추가 하기위해 스크롤 되는 뷰를 addTargetScrollView(view)메소드로 추가하고 removeTargetScrollView(view)로 제거한다. Activity또는 Fragment의 스크롤뷰가 Create와 Destory되는 LifeCycle 시점에 맞게 호출 해준다.
@Override
protected void onCreate (Bundle savedInstanceState) {
   
   super.onCreate(savedInstanceState);
   ...
   
   mNestedScrollView = (NestedScrollView)findViewById(R.id.scrollView);
   TopScrollHelper.getInstance(getApplicationContext()).addTargetScrollView(mNestedScrollView);
}

 

@Override
protected void onDestroy () {

   TopScrollHelper.getInstance(getApplicationContext()).removeTargetScrollView(mNestedScrollView);
   super.onDestroy();

}
  • 안드로이드 6.0(마시멜로)부터는 직접 퍼미션을 얻어야 하며, 퍼미션을 얻은 후 addTargetScrollView(view)를 호출한다.

Sample App Download

https://play.google.com/store/apps/details?id=com.kmshack.topscrollsample

영상

https://youtu.be/dlZoVnZoIVk

You might also like...
Make your native android Dialog Fancy. A library that takes the standard Android Dialog to the next level with a variety of styling options. Style your dialog from code.
Make your native android Dialog Fancy. A library that takes the standard Android Dialog to the next level with a variety of styling options. Style your dialog from code.

FancyAlertDialog-Android Prerequisites Add this in your root build.gradle file (not your module build.gradle file): allprojects { repositories { ..

Xamarin.Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#
Xamarin.Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#

Xamarin.Android Xamarin.Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#. Build Status Platform

A Tinder-like Android library to create the swipe cards effect. You can swipe left or right to like or dislike the content.

Swipecards Travis master: A Tinder-like cards effect as of August 2014. You can swipe left or right to like or dislike the content. The library create

Bootstrap style widgets for Android, with Glyph Icons
Bootstrap style widgets for Android, with Glyph Icons

Android-Bootstrap Android Bootstrap is an Android library which provides custom views styled according to the Twitter Bootstrap Specification. This al

[] A fast PDF reader component for Android development
[] A fast PDF reader component for Android development

This project is no longer maintained. You can find a good replacement here, which is a fork relying on Pdfium instead of Vudroid/MuPDF for decoding PD

[] Define and render UI specs on top of your Android UI
[] Define and render UI specs on top of your Android UI

dspec A simple way to define and render UI specs on top of your Android UI. Usage Enclose the target UI with a DesignSpecFrameLayout, usually the root

A Material design Android pincode library. Supports Fingerprint.
A Material design Android pincode library. Supports Fingerprint.

LolliPin A Lollipop material design styled android pincode library (API 14+) To include in your project, add this to your build.gradle file: //Loll

Android Library to implement simple touch/tap/swipe gestures
Android Library to implement simple touch/tap/swipe gestures

SimpleFingerGestures An android library to implement simple 1 or 2 finger gestures easily Example Library The library is inside the libSFG folder Samp

Android layout decorators : Injecting custom attributes in layout files, Using decorators to get rid of unnecessary class explosion with custom views
Android layout decorators : Injecting custom attributes in layout files, Using decorators to get rid of unnecessary class explosion with custom views

Decor Decor is a library that applies decorators to Android layout with additional attributes without the need to extend and create a custom View for

TourGuide is an Android library that aims to provide an easy way to add pointers with animations over a desired Android View

TourGuide TourGuide is an Android library. It lets you add pointer, overlay and tooltip easily, guiding users on how to use your app. Refer to the exa

Tan Jun Rong 2.6k Jan 5, 2023
Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.

Bubbles for Android Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your

Txus Ballesteros 1.5k Jan 2, 2023
View that imitates Ripple Effect on click which was introduced in Android L (for Android 2.3+)

RippleView View that imitates Ripple Effect on click which was introduced in Android L. Usage For a working implementation, Have a look at the Sample

Muthuramakrishnan Viswanathan 1.2k Dec 30, 2022
A new canvas drawing library for Android. Aims to be the Fabric.js for Android. Supports text, images, and hand/stylus drawing input. The library has a website and API docs, check it out

FabricView - A new canvas drawing library for Android. The library was born as part of a project in SD Hacks (www.sdhacks.io) on October 3rd. It is cu

Antwan Gaggi 1k Dec 13, 2022
MarkdownView is an Android webview with the capablity of loading Markdown text or file and display it as HTML, it uses MarkdownJ and extends Android webview.

About MarkdownView (Markdown For Android) is an Android library that helps you display Markdown text or files (local/remote) as formatted HTML, and st

Feras Alnatsheh 1k Dec 20, 2022
SwipeBack for Android Activities to do pretty the same as the android "back-button" will do, but in a really intuitive way by using a swipe gesture

SwipeBack SwipeBack is for Android Activities to do pretty the same as the android "back-button" will do, but in a really intuitive way by using a swi

Hannes Dorfmann 697 Dec 14, 2022
A backport of the SwitchPreference component that was introduced on Android 4 (ICS / level 14). This port works on Android 2.1+ (Eclair MR1 / level 7).

Android Switch Preference Backport A backport of the SwitchPreference component that was introduced on Android 4 (ICS / level 14). This port works on

Benoit Lubek 498 Dec 29, 2022
Wizard Pager is a library that provides an example implementation of a Wizard UI on Android, it's based of Roman Nurik's wizard pager (https://github.com/romannurik/android-wizardpager)

Wizard Pager Wizard Pager is a library that provides an example implementation of a Wizard UI on Android, it's based of Roman Nurik's wizard pager (ht

Julián Suárez 520 Nov 11, 2022
Make your native android Toasts Fancy. A library that takes the standard Android toast to the next level with a variety of styling options. Style your toast from code.

FancyToast-Android Prerequisites Add this in your root build.gradle file (not your module build.gradle file): allprojects { repositories { ... ma

Shashank Singhal 1.2k Dec 26, 2022