From wiki.ginstr.com
Jump to: navigation, search

GnScrollView

Widget XML tag
<com.ginstr.widgets.GnScrollView>
Description
ScrollView with some additional features.

XML Attributes Description

Attribute Description
android:fadeScrollbars Sets if scrollbar will dissapear after interaction with screen or stay on it
  • Valid values:
    • true
    • false , this is also default value of GnScrollView
gn:scrollBarStyle Specifies the style of scrollbar. see scrollbar style docs
  • Valid values:
    • SCROLLBARS_INSIDE_OVERLAY default value
    • SCROLLBARS_OUTSIDE_INSET
    • SCROLLBARS_OUTSIDE_OVERLAY
    • SCROLLBARS_INSIDE_INSET
gn:scrollBarColor Specifies the the color of scrollbar.
  • Valid values:
    • #00000000 any valid color hex value
gn:scrollBarWidth Specifies the width of the scrollbar.
  • Valid values:
    • 0dp any number value in expressed with "dp" suffix, i.e. 20dp

Example

<com.ginstr.widgets.GnScrollView 
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:gn="http://schemas.ginstr.com/ginstr"
    android:id="@+id/scrollView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    gn:scrollBarStyle="SCROLLBARS_INSIDE_OVERLAY"
    gn:scrollBarColor="#5546B4E7"
    gn:scrollBarWidth="20dp"
    android:fadeScrollbars="false"
    android:background="@drawable/background"/>