android - Why ImageView of screen is not drawn: -


i need create bounce animation on layout contains recylerview , imageview. simplify explanation here illustration of current layout:

enter image description here

the recyclerview (red) take screen size, , under position imageview (green) not seen @ beginning. 2 view contained linearlayout (blue) vertical orientations.

what want move linearlayout 50dp , drop bounce animation image view visible during animation.

the problem when raise linearlayout code:

mlayout.postdelayed(new runnable() {         @override         public void run() {             mlayout.animate().y(-500f);         }     }, 1000); 

the imageview not shown, more on when use ddms , snapshot of xml layout after move animation looks image not part of layout.

update: xml layout:

<?xml version="1.0" encoding="utf-8"?> <relativelayout 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:background="@color/white"             android:orientation="vertical"              android:animatelayoutchanges="true"             android:theme="@style/apptheme.mytopics.theme"             tools:mcontext=".ui.fragments.mytopicsfragment">  <include     android:id="@+id/toolbar_container"     layout="@layout/toolbar_timeline_container"     android:layout_width="match_parent"     android:layout_height="wrap_content"/>      <linearlayout     android:id="@+id/layout"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:orientation="vertical"     android:layout_below="@id/toolbar_container">      <android.support.v4.widget.swiperefreshlayout         android:id="@+id/swipe_refresh"         android:layout_width="match_parent"         android:layout_height="match_parent">          <com.lsjwzh.widget.recyclerviewpager.recyclerviewpager             android:id="@+id/vertical_recycler_view"             style="@style/nooverscrollstyle"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:background="@color/white"             app:rvp_singlepagefling="true"/>      </android.support.v4.widget.swiperefreshlayout>      <imageview         android:id="@+id/first_time_image"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:scaletype="centercrop"         android:layout_below="@+id/swipe_refresh"         android:background="@android:color/holo_green_dark"         android:src="@drawable/drawable_image_tutorial_background"/>  </linearlayout>   <com.shellanoo.newsbot.ui.views.generalerrorview     android:id="@+id/no_data_errors_view"     android:layout_width="match_parent"     android:layout_height="match_parent"     app:gev_no_data_view_layout="@layout/view_no_data_timeline"/>  <com.shellanoo.newsbot.ui.views.progresswheel     android:id="@+id/loading_pb"     style="@style/apptheme.progressbar.large"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_centerinparent="true"     android:visibility="gone"/>  <imageview     android:id="@+id/my_topics_btn"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_alignparentbottom="true"     android:layout_alignparentleft="true"     android:layout_gravity="bottom|left"     android:paddingbottom="20dp"     android:paddingleft="24dp"     android:paddingright="30dp"     android:paddingtop="20dp"     android:visibility="gone"     app:srccompat="@drawable/profile_main"     tools:visibility="visible"/>  <imageview     android:id="@+id/add_topics_btn"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_alignparentbottom="true"     android:layout_alignparentright="true"     android:layout_gravity="bottom|right"     android:paddingbottom="20dp"     android:paddingleft="30dp"     android:paddingright="24dp"     android:paddingtop="20dp"     android:visibility="gone"     app:srccompat="@drawable/plus_main"     tools:visibility="visible"/>  <com.shellanoo.newsbot.ui.views.newstoriesindicatorview     android:id="@+id/new_items_tip"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_centerhorizontal="true"     android:padding="8dp"     app:layout_collapsemode="parallax"     app:layout_collapseparallaxmultiplier="0.7"     tools:text="5 new items"/>  </relativelayout> 

does know why, , how can fixed?

thanks in advance.

try this

 <relativelayout          android:id="@+id/layout"          android:layout_width="wrap_content"          android:layout_height="wrap_content">   <android.support.v4.widget.swiperefreshlayout     android:id="@+id/swipe_refresh"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:minheight="200dp">       <com.lsjwzh.widget.recyclerviewpager.recyclerviewpager         android:id="@+id/vertical_recycler_view"         style="@style/nooverscrollstyle"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:background="@color/white"         app:rvp_singlepagefling="true"         android:minheight="200dp"/>          </android.support.v4.widget.swiperefreshlayout>       <imageview          android:id="@+id/first_time_image"          android:layout_width="match_parent"          android:layout_height="wrap_content"          android:scaletype="centercrop"          android:layout_below="@+id/swipe_refresh"          android:background="@android:color/holo_green_dark"          android:src="@drawable/drawable_image_tutorial_background"/>   </relativelayout> 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -