In my layout I have a Card View Layout containing HashTagView and then followed by recycler view. Using my existing code I am able to scroll through the recycler view. But I also want to be able to scroll the HashTagView itself.
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:id="@+id/activity_main_id"
tools:context="mymainactivity.MainActivity">
<android.support.design.widget.AppBarLayout
android:id="@+id/app_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:contentScrim="?attr/colorPrimary"
app:expandedTitleMarginStart="48dp"
app:expandedTitleMarginEnd="64dp"
android:fitsSystemWindows="true">
<android.support.v7.widget.CardView style="@style/Card">
<LinearLayout style="@style/CardContainer"
android:isScrollContainer="true">
<com.greenfrvr.hashtagview.HashtagView
android:id="@+id/hashtags6"
style="@style/HashtagView"
app:rowGravity="center"
app:rowMode="stretch"
app:selectionMode="true"
app:tagBackground="@drawable/item_bg_1"
app:tagForeground="@drawable/flat_button_light"
app:tagPaddingBottom="@dimen/padding_vertical"
app:tagPaddingLeft="@dimen/padding_horizontal"
app:tagPaddingRight="@dimen/padding_horizontal"
app:tagPaddingTop="@dimen/padding_vertical"
app:tagTextColor="#E5E5E5" />
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:layout_collapseMode="pin" />
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</android.support.design.widget.CoordinatorLayout>
I want to acheive this kind of layout:-
Aucun commentaire:
Enregistrer un commentaire