android-coordinatorlayout

CoordinatorLayout / RelativeLayout issue within a ViewSwitcher

荒凉一梦 提交于 2019-12-13 02:14:57
问题 This is a follow up question of this one: Coordinator Layout and Relative Layout issue I have an issue when you have a CoordinatorLayout with a RelativeLayout within a ViewSwitcher like the following example: <?xml version="1.0" encoding="utf-8"?> <ViewSwitcher xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/switcher"> <!--First switcher view / Splash Screen--> <RelativeLayout android:layout

Can the tab selection indicator of TabLayout be pinned to the top of the screen while scrolling?

我的未来我决定 提交于 2019-12-13 01:53:44
问题 I am investigating the way to pin the tab indicator of TabLayout in CoordinatorLayout while scrolling down. If I add scroll|enterAlwaysCollapsed flag to the TabLayout , then the tablayout itself is dissappeared while scrolling down. I want tab indicator bar be pinned to the top of the screen. Is there a way to implement this? 回答1: I think you should just have no flags at all. Your layout should be something like: <CoordinatorLayout> <AppBarLayout> <Toolbar app:layout_scrollFlags="scroll

Toolbar behind status bar in one fragment but not the other

主宰稳场 提交于 2019-12-12 13:43:26
问题 So I've one activity and two fragments. I am adding fragment 1 and the toolbar appears as expected However, the toolbar in the fragment2 appears behind the toolbar. Edit So there are two ways of displaying Fragment 2, the first is by displaying by click in Fragment 1 and the other is when the host activity is launched displaying Fragment 2. Regardless, the same method is called each time. However when launching Fragment2 directly from the activity, the toolbar displays as expected but if

Cannot resolve symbol '@style/Widget.Design.CoordinatorLayout'

孤者浪人 提交于 2019-12-12 13:20:24
问题 I'm using the latest version of Android Studio (3.1.3) with build tools 28. The layout does not get rendered in the design tab when I'm using coordinator layout. Many have pointed out that to get around this problem is to add the following lines in the style.xml : <style name="AppTheme.NoActionBar"> <item name="coordinatorLayoutStyle">@style/Widget.Design.CoordinatorLayout</item> </style> However adding the lines produces the following error: Cannot resolve symbol '@style/Widget.Design

CoordinatorLayout NullPointerException in onTouchEvent

烈酒焚心 提交于 2019-12-12 08:39:33
问题 I am getting NullPointerException in onTouchEvent of CoordinatorLayout . I am using DrawerLayout with CollapsingToolbarLayout of android support AppCompat v23.0.0 library. My observation is crash happen randomly while scrolling CollapsingToolbarLayout or click on drawer items. Is there anyone facing this issue? any work around to avoid this exception? Logcat: 08-22 15:16:34.657: E/AndroidRuntime(27596): java.lang.NullPointerException: Attempt to invoke virtual method 'float android.view

Coordinator layout TextInput below FloatingActionButton

烈酒焚心 提交于 2019-12-12 05:40:09
问题 Halloo guys I have problem here with coordinator layout. I have TextInputLayout and inside it I have editText. What I want is to show it on click on FAB on the left side and hide on click on FAB. But I have always problem with edit text going below FAB: Only way I was able to somehow do it is with using marginRight , see xml below. But is there any way to do it without that I think there must be better way. <android.support.design.widget.FloatingActionButton android:id="@+id/fab" android

coordinatorlayout not scrolling with swipeRefreshlayout

痞子三分冷 提交于 2019-12-12 05:16:45
问题 I have added coordinatorlayout+viewpager+TabLayout and have added three tabs with viewpager but scrolling only works with first tab(recent) not working with two tabs 1. contact,2.setting see all codes only xml code posted here as only needed homeactivity xml(where three fragment get attached) <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

android studio CoordinatorLayout & RecyclerView blank?

妖精的绣舞 提交于 2019-12-12 05:08:36
问题 Runing my app i get a blank activity, for the time being i only have a list which should be projecting images, by reading these images addresses from JSON, and from the logcat i could see the the addresses being passed to the app, and logged, but not sure why the layout is not getting structured and i get a blank white screen. Using Genymotion - android s6 - android studio 2.1.1 MyActivity; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Map

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

Coordinator Behavior ImageView

梦想的初衷 提交于 2019-12-12 01:36:45
问题 I'm having some trouble with my CoordinatorLayout. When I scroll up I want the imageview to disappear completely. This is an example of view and after i scroll up http://imgur.com/KI8kouG planet_main.xml <android.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?colorPrimary" android:fitsSystemWindows="true" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" > <android.support