CollapsingToolbarLayout not scrolling

I trying to make image inside CollapsingToolbarLayout scrollable (just like in Google Play app). Then I put NestedScrollView inside CollapsingToolbarLayout. ImageView resizes itself (see picture) forcibly (image is distorted). How to make this thing work properly?

CollapsingToolbarLayout not scrolling

My layout

<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.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="200dp" 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" android:fitsSystemWindows="true" app:contentScrim="@color/pure_black75" app:expandedTitleMarginStart="48dp" app:expandedTitleMarginEnd="64dp"> <android.support.v4.widget.NestedScrollView android:layout_width="match_parent" android:background="@color/transparent" android:maxHeight="200dp" android:height="200dp" app:expandedTitleMarginStart="48dp" app:expandedTitleMarginEnd="64dp" android:layout_height="match_parent"> <ImageView android:id="@+id/backdrop" android:layout_width="match_parent" android:layout_height="wrap_content" android:scaleType="fitXY" android:src="@drawable/cat_stub" app:layout_collapseMode="parallax" /> </android.support.v4.widget.NestedScrollView> <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:queryBackground="@android:color/transparent" app:layout_collapseMode="pin" /> </android.support.design.widget.CollapsingToolbarLayout> </android.support.design.widget.AppBarLayout> <android.support.v4.widget.NestedScrollView android:layout_width="match_parent" android:background="@color/transparent" android:maxHeight="200dp" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior"> <LinearLayout android:layout_width="match_parent" android:orientation="vertical" android:layout_height="wrap_content"> <ImageView android:layout_width="wrap_content" android:layout_height="230dp" android:scaleType="fitXY" android:src="@drawable/cat_stub"/> <ImageView android:layout_width="wrap_content" android:layout_height="230dp" android:scaleType="fitXY" android:src="@drawable/cat_stub"/> <ImageView android:layout_width="wrap_content" android:layout_height="230dp" android:scaleType="fitXY" android:src="@drawable/cat_stub"/> </LinearLayout> </android.support.v4.widget.NestedScrollView> <SeekBar android:layout_marginLeft="-18dp" android:layout_marginRight="-18dp" android:id="@+id/audio_seekbar" app:layout_anchor="@id/appbar" app:layout_anchorGravity="bottom" android:thumb="@null" android:layout_width="match_parent" android:indeterminateDrawable="@drawable/apptheme_scrubber_progress_horizontal_holo_light" android:progressDrawable="@drawable/apptheme_scrubber_progress_horizontal_holo_light" android:layout_above="@id/video_play_pause" android:layout_height="wrap_content"/> <android.support.design.widget.FloatingActionButton android:layout_width="wrap_content" android:id="@+id/fab_play_pause" android:height="20dp" app:layout_anchor="@id/appbar" app:layout_anchorGravity="bottom|right|end" android:minHeight="0dp" android:scaleType="fitXY" android:src="@drawable/fab_play_pause_selector" app:layout_collapseMode="pin" android:layout_marginTop="4dp" android:padding="5dp" app:backgroundTint="@color/white" app:layout_scrollFlags="scroll|enterAlwaysCollapsed" android:layout_height="wrap_content"/>

Category:android Views:7 Time:2018-12-31

Related post

  • Get a UITableView to not scroll and grow within a UIScrollView 2009-06-10

    I need to create a screen that is similar to the one below. The only way I can come up with is to have a UIScrollView be the parent view. Then have a UIImageView and UILabels for the thumbnail and main text ("All3Sports"). For the sections like the p

  • Silverlight ScrollViewer Not Scrolling 2010-01-26

    enter code hereI have a ScrollViewer in Silverlight that is not scrolling vertically whenever I call the ScrollToVerticalOffset method from the code behind. Basically, I have my View (UserControl) that contains the ScrollViewer. I invoke an action fr

  • Panels not scrolling 2010-02-09

    I am not sure what has happened here, but I have 3 panels, and these 3 panels are nested inside one large, thus: <asp:panel id="pnlMain" runat="server" Height="60%" Width="100%"> <div id="div1"> <asp:panel id="panel1" runat="server" He

  • uiscrollview not scrolling horizontally 2010-05-01

    My UIScrollView below is not scrolling horizontally, Please help me here.. FirstView = [[UIView alloc] initWithFrame:CGRectMake(60, 0, 100, 150)]; [FirstView setBackgroundColor:[UIColor clearColor]]; SecondView = [[UIView alloc] initWithFrame:CGRectM

  • Size element so it is exactly as tall as it needs to be to not scroll 2010-06-23

    Size element so it is exactly as tall as it needs to be to not scroll I am working on a tool to allow creating small "notes" that I then turn into Ext.Draggable items. What I would like to do is to have these items be sized no taller than they need t

  • Android ListView that does not scroll? 2010-07-07

    I'm trying to make a layout that is something similar to how the android market is...where say under comments there is what appears to be a ListView but it does not scroll (the whole page scroll but not the comments). I'm not sure if its even a ListV

  • javascript / Jquery .slideToggle - page does not scroll with content 2010-09-03

    I am using .slideToggle - Jquery to create an accordion and It works so far. However, When div#slickbox goes down or up the page does not scroll with it. The page maintain scroll position. I have 2 huge images(700px x 1300px) inside div#slickbox. I w

  • Android WebView will not scroll (Loading an embedded Google Calendar) 2010-09-06

    I am working on an app for my company. One of the buttons loads a webview of a google calendar. This works pretty well and all of my other webviews scroll appropriately. However when loading this calendar it resizes to the screen size and will not sc

  • UITableView not scrolling smoothly-(iPhone SDK) ..! 2010-10-18

    UITableView not scrolling smoothly...(iPhone SDK) ..!! I have implemented UITableView DataSource and Delegate methods in an individual separate classes.(one for delegate and one for datasource) in main program i write only: //assume that all objects

  • Scroll view with an image is not scrolling 2010-11-02

    i added an image to the scroll view. but its not scrolling... pls help out what is the problem.. Thanks. boxImage = [[UIImageView alloc]initWithFrame:CGRectMake(0, 44, 320, 372)]; boxImage.image = [UIImage imageNamed:@"chapter1box.png"]; textScroll =

  • scrollview can not scroll to the bottom 2011-01-05

    i have a scrollview and a textview above it. the textview's scroll is disable. when the textview.contentSize.height over the scrollview frame, the scrollview can not scroll to the bottom. do anyone know why? --------------Solutions------------- Becau

  • Colorbox content not scrolling on mobile safari 2011-01-10

    Good Evening, I created a website using the thickbox where it displays a calendar and one of the problems that has surfaced is the content will not scroll on iPhone type browsers. I have tried to update it to the colorbox and see if that fixed the pr

  • UIPickerView is not scrolling when added to UIScrollView! 2011-01-25

    I have added UIPickerView to the UIScrollView but now UPickerView is not scrolling. When I add it to the self.view it scrolls smoothly. Here i my code monthsArray = [[NSArray alloc] initWithObjects:@"Jan",@"Feb",@"Mar",@"Apr",@"May",@"Jun",@"Jul",@"A

  • 2 textViews in a view controller, but the view controller is not scrolling? 2011-02-15

    I have 2 textViews in a viewController the 2nd textview is larger then screen, and the ViewController is not scrolling? --------------Solutions------------- You need to put these views in a UIScrollView for the viewController's content to be scrollab

  • Why do my center-aligned divs not scroll to the left? 2011-02-19

    (Note: There are no scrollbars on these divs, so there is literally no way to scroll to the left, whether it be in the body or within the divs themselves.) The problem (pictured above in FF and Opera), which exists on both the "Baroque" and "Spotligh

  • jcarousel is not scrolling through images 2011-03-27

    i have a jcarousel gallery of images but the jcarousel is not working at all it's not scrolling through images at all this is my code : <ul id="mycarousel" class="jcarousel-skin-tango"> <?php foreach ($images as $image_item) : ?> <li

  • Checkboxes are not scrolling in TListView component 2011-04-24

    I've created ListView and added checkboxes to check each row if needed. All was fine until there was a lot of items in the listview so that it needed scolling. I checked on line and then I saw that checkboxes are not scrolling with other content if I

  • fl.controls.TextArea not scrolling all the way down 2011-04-26

    I have a TextArea control, and sliding the scrollbar all the way down always doesn't show all the text. I think it has something to do with me changing the typeface, because I noticed that when I do the setStyle to change the textFormat style, the te

  • GaugeField is not Scrolling 2011-04-28

    I implemented the GaugeField, but it is not scrolling in Blackberry Storm 5.0. Can any one tell me how to make the GaugeField to scroll in storm? Provide me any sample code. Thanks for any help.

  • Web page will not scroll with keys until clicked 2011-06-27

    The website I'm working on will not scroll until somewhere on a page is clicked with the mouse or 'tabbed' through with the tab key. Is there a simple answer I am over looking? EDIT- Okay here is a simple bit of javascript I need help with. I put thi

  • Android :scrollview not scrolling 2011-07-08

    I have a xml(registerpage.xml) file and I declared that in a ScrollView so that its scrolling smoothly up and down and I deleted the parent view of this XML. When I did like this: <ScrollView xmlns:android="http://schemas.android.com/apk/res/andro

  • UITableview is not scrolling if less tableviewcell 2011-07-15

    I am trying to scroll tableview even there is no data at initial. to track - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView If there are more rows than visible area of UITableView cell, then only scrolling (vertically) is enable. but I'

  • PyQt QScrollArea not scrolling 2011-07-22

    I want to put some elements of my UI in a scroll area as there can be a lot of them. I tried the following peice of code, but the area just keeps growing as I put more elements on it. In the first part I set up a scroll area, a widget and a layout. I

  • How to make first column in UITableView not scroll horizontally in iPhone Objective-C? 2011-07-28

    I have made horizontally scrollable UITableView by adding a table view to a UISrollView and setting the scroll View frame to be what i want to display and making its content size large enough to hold the table inside it. It works perfectly fine. Now

  • scrollview will not scroll when android:softinputmode="adjustpan" enabled 2011-07-28

    The situation: I have an activity which at the moment has 5 "screens" wrapped in a ViewFlipper; below the ViewFLipper I have a blue bar which acts as a navigation bar showing what screen you are on. The Problem: When the soft keyboard appears, that b

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.109 (s). 12 q(s)