android - Add imageView to coordinatorLayout -


here coordinator layout. ok, can see everything.

but can't see imageview. in code initializing imageview correctly , have object. need image view in center of screen.

if change imageview button see button in center of screen, if change other canĀ“t seen element.

please how can add imageview coordinatorlayout?

this code in coordinatorlayout.

thank you.

<android.support.design.widget.coordinatorlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/main_content" android:layout_width="match_parent" android:layout_height="match_parent" android:fitssystemwindows="true">  <imageview     android:id="@+id/status_btn"     android:layout_width="150dp"     android:layout_height="150dp"     android:layout_gravity="center"     android:background="@color/red" />  <button     android:id="@+id/delete_btn"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:text="smazat"     android:visibility="gone" />  <include     layout="@layout/panel_camera_preview"     android:layout_width="match_parent"     android:layout_height="match_parent"     app:layout_behavior="@string/appbar_scrolling_view_behavior" />  <!--height width se nastavuje dynamicky--> <linearlayout     android:id="@+id/bottom_sheet"     android:layout_width="match_parent"     android:layout_height="0dp"     android:cliptopadding="true"     app:layout_behavior="android.support.design.widget.bottomsheetbehavior">      <relativelayout         android:id="@+id/bottom_sheet_content"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:orientation="vertical">          <linearlayout             android:id="@+id/header_vg"             android:layout_width="match_parent"             android:layout_height="@dimen/vision_bottom_sheet_header_height"             android:layout_alignparenttop="true"             android:background="@color/gray_header_vision"             android:gravity="center">              <textview                 android:id="@+id/header_tv"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:gravity="center_horizontal"                 android:textcolor="@color/white"                 android:textsize="16sp" />          </linearlayout>          <android.support.v7.widget.recyclerview             android:id="@+id/vision_list"             android:layout_width="match_parent"             android:layout_height="match_parent"             android:layout_below="@+id/header_vg"             android:background="@color/white"             android:scrollbars="vertical"             android:visibility="gone" />          <include             android:id="@+id/empty_vg"             layout="@layout/panel_vision_tutorial"             android:layout_width="match_parent"             android:layout_height="@dimen/vision_bottom_sheet_item_height"             android:layout_below="@+id/header_vg" />      </relativelayout>  </linearlayout>  </android.support.design.widget.coordinatorlayout> 

here panel_camera_preview:

<my_package.camerasourcepreview android:id="@+id/camera_preview" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/darker_gray">  <my_package.graphicoverlay     android:id="@+id/face_overlay"     android:layout_width="match_parent"     android:layout_height="match_parent"/>  </my_package.camerasourcepreview> 

coordinatorlayout framelayout, last view in order overlays previous ones. imageview results not visible because covered panel_camera_preview, while button results visible, if running on lollipop or greater, cause default elevation (2dp).


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -