android-appbarlayout

Toolbar in AppBarLayout is scrollable although RecyclerView has not enough content to scroll

a 夏天 提交于 2019-12-17 21:43:24
问题 Is it really intended that the Toolbar in a AppBarLayout is scrollable although the main container with the "appbar_scrolling_view_behavior" has not enough content to really scroll? What I have tested so far: When I use a NestedScrollView (with "wrap_content" attribute) as main container and a TextView as child, the AppBarLayout works properly and does not scroll. However, when I use a RecyclerView with only a few entries and the "wrap_content" attribute (so that there is no need to scroll),

CollapsingToolbarLayout with a customised behavior

戏子无情 提交于 2019-12-13 02:57:55
问题 I am following this popular link for cordinator behaviour, following this post . I wanted a desired behavior that image should be floated to right side instead of left and for this, I modified AvatarImageBehavior.java -> maybeInitProperties() method -> as following : if (mFinalXPosition == 0) mFinalXPosition= getScreenWidth()-70; Now I wish the toolbar to be fixed at top, and only image to move and stick to it. As per my understanding, only Behavior file is responsible for this transition. I

CollapsingToolbarLayout disable draw down expansion

不打扰是莪最后的温柔 提交于 2019-12-12 16:07:57
问题 I have a CollapsingToolbar that I have conditionally disabled. When the user loads the view under that condition, it just looks like a normal ToolBar object. The only weird thing is that if they drag down, such as in a pull to refresh style action, the CollapsingToolbar expands, despite my wishes and code to the contrary! Here is what I have, and the commented out code reflects what I have also tried appBar.setExpanded(false); appBar.setActivated(false); /*CollapsingToolbarLayout.LayoutParams

Android - View hidden behind AppBarLayout

淺唱寂寞╮ 提交于 2019-12-12 14:18:22
问题 I have the problem that my RecyclerView is cut off behind the AppBarLayout Here is my XML <android.support.v4.widget.DrawerLayout 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:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".activity.MainActivity"> <android.support.design.widget.CoordinatorLayout android:id="@

CoordinatorLayout makes anchored element disappear when scrolled up

若如初见. 提交于 2019-12-12 03:45:26
问题 I have a really awkward problem that I cannot get rid of and that I absolutely do not understand. I simply want my app bar to collapse and an image to move with some placeholder element in the app bar area. I got this from this example: https://github.com/saulmm/CoordinatorBehaviorExample I use a very simple layout: <CoordinatorLayout> <AppBarLayout> <CollapsingToolbarLayout android:minHeight="96dp" app:layout_scrollFlags="exitUntilCollapsed|scroll"> <FrameLayout android:id="@+id

Transparent action bar not being fully transparent. (Leaves weirdbox)

橙三吉。 提交于 2019-12-12 02:35:58
问题 I've tried setting the action bar I custom-made for my application to be transparent. However instead of being completely transparent, it leaves a weird elevation shadow: http://puu.sh/rdYyb/04ce0147f6.jpg The XML for the bar: <android.support.design.widget.AppBarLayout android:id="@+id/appbarlayout" android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/AppTheme.AppBarOverlay"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout

The Coordinator layout doesn't Scroll up for a specific position

☆樱花仙子☆ 提交于 2019-12-11 06:19:24
问题 I am facing this issue with coordinator layout about scrolling. For a specific position it wont scroll buy, After clicking on Add new button a list element gets added below. And if we scroll that item the coordinator layout behaves normally like expand and shrink. But when we try to scroll up by touching on the layout main.xml <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout android:layout_width="match_parent" xmlns:app="http://schemas.android.com/apk

NestedWebView working properly with ScrollingViewBehavior

二次信任 提交于 2019-12-09 23:41:08
问题 I have an app with two activities extends same abstract - one with WebView , another with ViewPager with TabLayout and RecyclerView s - and on this level I've implemented "shared" showing/hiding toolbar with scroll/fling feature: app:layout_scrollFlags="scroll|snap|enterAlways" WebView is "pushing out" Toolbar just like RecyclerView under any tab in ViewPager (keeping TabLayout visible), in both cases any scroll to top brings back Toolbar . Just like on this example: Now I've to change this

(Collapsing)Toolbar title resets its position after Snackbar appearance

谁都会走 提交于 2019-12-09 18:14:01
问题 I have a layout with CollapsingToolbarLayout and CoordinatorLayout as root element. Whenever a Snackbar is shown in the activity the title of the toolbar resets its position to the default expanded title position of the CollapsingToolbar even if the toolbar is not (fully) expanded. The second picture shows that the title is fixed no matter if the toolbar expands or not. The result is the same when I call snackbar.show() in activity or fragment . My layout structure looks like this:

Change AppBarLayout theme programmatically?

给你一囗甜甜゛ 提交于 2019-12-08 03:17:08
问题 I have an AppBarLayout defined as such <android.support.design.widget.AppBarLayout android:id="@+id/appbar_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/AppTheme.AppBarOverlay"> However, sometimes I change the theme for the application and I also want to change it, and its children's. I have been partially successful by doing this: AppBarLayout appBarLayout = (AppBarLayout) findViewById(R.id.appbar_layout); appBarLayout.getContext()