0

I have layout, see below. When I unlock the phone after some time of locking, sometimes(!) Toolbar disappears. Doesn't matter what exactly fragment added to the layout.

There is no mechanics for show/hide Toolbar in app at all. Doesn't matter what exactly fragment added to the layout.

Is there any ideas what is it?

<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <data>

        <variable
            name="view"
            type="com.example.ChecklistsListActivity" />
    </data>

    <android.support.design.widget.CoordinatorLayout

        android:id="@+id/mainContent"
        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="wrap_content"
            >

            <android.support.v7.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                android:background="?attr/colorPrimary"
                app:theme="@style/MyActionBarStyle"
                android:visibility="visible" />

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

        <FrameLayout
            android:id="@+id/nest"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_behavior="@string/appbar_scrolling_view_behavior" />

        <android.support.design.widget.FloatingActionButton
            android:id="@+id/fab"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="end|bottom"
            android:layout_marginBottom="@dimen/fab_margin_bottom"
            android:layout_marginRight="@dimen/fab_margin_right"
            android:onClick="@{view.fabOnClick}"
            android:src="@drawable/ic_add_white_24dp"
            android:visibility="invisible" />

    </android.support.design.widget.CoordinatorLayout>
</layout>
tse
  • 5,769
  • 6
  • 38
  • 58
  • this is not make sens. when this happen in your app? is there any repeat or schedule? – Ashkan Sep 07 '15 at 13:05
  • maybe you should try updating to support library 23.0.1, seems some bug related to AppBarLayout has been fixed. Not sure if it is related though – Derek Fung Sep 07 '15 at 13:50
  • @DerekFung thanks, i thought about that and already upgraded to 23.0.1. there is the same strange behaviour. – tse Sep 07 '15 at 15:48
  • @Ashkan no schedule. It happens after unlock and, I assume, after hardware sleep. – tse Sep 07 '15 at 16:07
  • You may want to upload a sample project with this problem to github. – Derek Fung Sep 08 '15 at 02:49
  • i think it may because of some happen in your **onResume**, in fact I have no idea about this problem – Ashkan Sep 08 '15 at 03:44

0 Answers0