ksoichiro / Android-ObservableScrollView

Android library to observe scroll events on scrollable views.
http://ksoichiro.github.io/Android-ObservableScrollView/
Apache License 2.0
9.66k stars 2.06k forks source link

Textview disappearing when text too long #242

Open mikylucky opened 8 years ago

mikylucky commented 8 years ago

Hi, I'm experiecing this issue: I have some textviews in an observablescrollview. If the text in the textview is long, on scroll text start flashing, while if it's even longer text won't appear neither.

This is my XML

<FrameLayout` xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:fab="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <com.github.ksoichiro.android.observablescrollview.ObservableScrollView
        android:id="@+id/post_scrollView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        xmlns:tools="http://schemas.android.com/tools"
        xmlns:fab="http://schemas.android.com/apk/res-auto"
        tools:context="com.trackarena.SinglePostFragment"
        >
        <RelativeLayout
            android:layout_height="match_parent"
            android:layout_width="match_parent">
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical"
                >
                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:id="@+id/post_image"
                    android:scaleType="fitCenter"
                    android:adjustViewBounds="true"/>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:background="@color/white">

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:id="@+id/post_title"
                        android:alpha="0.87"
                        android:textColor="#000000"
                        android:textSize="24sp"
                        android:layout_margin="10dp"
                        android:gravity="center"/>

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:id="@+id/post_author"
                        android:alpha="0.87"
                        android:textColor="#000000"
                        android:textSize="14sp"
                        android:layout_margin="10dp"
                        android:gravity="left" />

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:id="@+id/post_content"
                        android:alpha="0.87"
                        android:textColor="#000000"
                        android:textColorLink="#FA4400"
                        android:textSize="16sp"
                        android:layout_margin="12dp" />

                </LinearLayout>

            </LinearLayout>
        </RelativeLayout>

    </com.github.ksoichiro.android.observablescrollview.ObservableScrollView>

    <com.github.clans.fab.FloatingActionMenu
        android:id="@+id/post_fab_menu"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|right"
        android:layout_marginBottom="16dp"
        android:layout_marginRight="16dp"
        fab:menu_colorNormal="@color/orange"
        fab:menu_colorPressed="#F47700"
        fab:menu_colorRipple="#F45500"
        fab:menu_animationDelayPerItem="50"
        fab:menu_icon="@drawable/ic_share_white_24dp"
        fab:menu_labels_textColor="#FFFFFF"
        fab:menu_labels_textSize="14sp"
        fab:menu_labels_cornerRadius="3dp"
        fab:menu_labels_colorNormal="#333333"
        fab:menu_labels_colorPressed="#444444"
        fab:menu_labels_colorRipple="#66FFFFFF">

        <com.github.clans.fab.FloatingActionButton
            android:id="@+id/post_menu_facebook_item"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/ic_facebook_white_24dp"
            fab:fab_size="mini"
            fab:fab_colorNormal="#3b5998"
            fab:fab_colorPressed="#8b9dc3"
            fab:fab_label="Condividi su Facebook"
            android:onClick="facebookShareDialog"/>

    </com.github.clans.fab.FloatingActionMenu>

</FrameLayout>