Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot work with SwipeRefreshLayout #205

Open
XinwenCheng opened this issue Oct 10, 2015 · 1 comment
Open

Cannot work with SwipeRefreshLayout #205

XinwenCheng opened this issue Oct 10, 2015 · 1 comment

Comments

@XinwenCheng
Copy link

Seems FloatingActionButton can't work with SwipeRefreshLayout, right?

<LinearLayout 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"
    android:orientation="vertical">

    <android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:id="@+id/fragment_planlist_planListSwipeRefreshLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        tools:context="com.fourthdimension.gaodingv1android.PlanListFragment">

        <ListView
            android:id="@+id/fragment_planlist_planListView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:dividerHeight="3dp" />
    </android.support.v4.widget.SwipeRefreshLayout>

    <com.melnykov.fab.FloatingActionButton
        android:id="@+id/fragment_planlist_newPlanFloatingActionButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|right"
        android:layout_margin="16dp"
        android:src="@drawable/icon_newplan_56"
        fab:fab_colorNormal="#F2F2F2"
        fab:fab_colorPressed="#EEEEEE"
        fab:fab_colorRipple="#a9b7b7"
        fab:fab_shadow="true" />
</LinearLayout>

Code as above, this button won't appear, even I've attached it to plan list view in Java code.

If I just remove SwipeRefreshLayout, it works. But I need the refresh component, would you please help to check? Thanks!

<LinearLayout 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"
    android:orientation="vertical">

    <ListView
        android:id="@+id/fragment_planlist_planListView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:dividerHeight="3dp" />

    <com.melnykov.fab.FloatingActionButton
        android:id="@+id/fragment_planlist_newPlanFloatingActionButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|right"
        android:layout_margin="16dp"
        android:src="@drawable/icon_newplan_56"
        fab:fab_colorNormal="#F2F2F2"
        fab:fab_colorPressed="#EEEEEE"
        fab:fab_colorRipple="#a9b7b7"
        fab:fab_shadow="true" />
</LinearLayout>
@vassilisimon
Copy link

#54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants