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

Not able to use appbar layout with recycler view #204

Open
sekharrockz opened this issue Jul 2, 2017 · 2 comments
Open

Not able to use appbar layout with recycler view #204

sekharrockz opened this issue Jul 2, 2017 · 2 comments

Comments

@sekharrockz
Copy link

sekharrockz commented Jul 2, 2017

<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/white"
    >

  <android.support.v7.widget.RecyclerView
      android:id="@+id/detail_view_container"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginBottom="60dp"
      />

  <me.henrytao.smoothappbarlayout.SmoothAppBarLayout
      android:id="@+id/appbar"
      android:layout_width="match_parent"
      android:layout_height="465dp"
      app:sabl_target_id="@id/detail_view_container"
      >

    <android.support.design.widget.CollapsingToolbarLayout
        android:id="@+id/main_collapsing"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:contentScrim="?attr/colorPrimary"
        app:layout_scrollFlags="scroll|exitUntilCollapsed"
        app:titleEnabled="true"
        >

      <FrameLayout
          android:id="@+id/details_fragment"
          android:layout_width="match_parent"
          android:layout_height="465dp"
          app:layout_collapseMode="parallax"
          />

      <android.support.v7.widget.Toolbar
          android:id="@+id/main_toolbar"
          android:layout_width="match_parent"
          android:layout_height="?attr/actionBarSize"
          app:layout_collapseMode="pin"
          app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
          />

    </android.support.design.widget.CollapsingToolbarLayout>

  </me.henrytao.smoothappbarlayout.SmoothAppBarLayout>


  <LinearLayout
      android:id="@+id/bottomBar"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_gravity="bottom"
      android:orientation="horizontal"
      android:visibility="gone"
      android:weightSum="2"
      >

    <RelativeLayout
        android:id="@+id/addToWishList"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:layout_weight="1"
        android:background="@color/grey500"
        android:clickable="true"
        android:focusable="true"
        android:foreground="@drawable/ripple"
        android:orientation="horizontal"
        >
      <LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerInParent="true"
          android:layout_centerVertical="true"
          android:orientation="horizontal"
          >
        <FrameLayout
            android:layout_width="20dp"
            android:layout_height="20dp"
            android:layout_gravity="center_vertical"
            android:layout_margin="5dp"
            >
          <ImageView
              android:id="@+id/like"
              android:layout_width="20dp"
              android:layout_height="20dp"
              android:src="@drawable/heart_selected_18dp"
              android:visibility="gone"
              />
          <ImageView
              android:id="@+id/dislike"
              android:layout_width="20dp"
              android:layout_height="20dp"
              android:src="@drawable/heart_outline_18dp"
              />
          <ProgressBar
              android:id="@+id/wishListProgress"
              android:layout_width="20dp"
              android:layout_height="20dp"
              android:visibility="gone"
              />
        </FrameLayout>
        <TextView
            android:id="@+id/addToWishListText"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:text="@string/add_to_wishlist"
            android:textColor="@color/white"
            />
      </LinearLayout>
    </RelativeLayout>
    <RelativeLayout
        android:id="@+id/visitStore"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:layout_weight="1"
        android:background="@color/com_facebook_messenger_blue"
        android:clickable="true"
        android:focusable="true"
        android:foreground="@drawable/ripple"
        android:orientation="horizontal"
        >
      <TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerInParent="true"
          android:gravity="center"
          android:text="@string/visit_store"
          android:textColor="@color/white"
          />
    </RelativeLayout>
  </LinearLayout>
</android.support.design.widget.CoordinatorLayout>
@henrytao-me
Copy link
Owner

Hi @sekharrockz

There are 2 issues in your code:

@shubhamgupta9
Copy link

HI @henrytao-me i am getting app:sabl_target_id is not found error and i am using this library version implementation 'me.henrytao:smooth-app-bar-layout:24.1.0.0'
and for app i am using this xmlns:app="http://schemas.android.com/apk/res-auto"

Please help me

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

3 participants