でImageViewの伸縮されていますnestedScrollView iが..巣にnestedscrollview内側のLinearLayout内部ImageViewのをしようとしている。しかしnestedscrollviewはImageViewのを伸ばしていると私は、エラーを見つけることができないようアンドロイド
レイアウトファイル:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:fitsSystemWindows="true"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/llImageview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize"
android:layout_weight="0.6"
android:orientation="horizontal">
<ImageView
android:id="@+id/ivNewProductBarcode"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:background="@drawable/no_barcode_image"
android:scaleType="centerCrop"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.45"
android:background="@color/cardview_dark_background"
android:baselineAligned="true"
android:orientation="vertical">
<LinearLayout
android:id="@+id/llRest"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/ivDateIconView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toStartOf="@+id/etProductName"
android:background="@color/card_background"
android:contentDescription="ImageView for icon: Date" />
<EditText
android:id="@+id/etProductName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:layout_marginRight="30dp"
android:layout_marginTop="30dp"
android:hint="Name" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:layout_marginRight="30dp"
android:layout_marginTop="80dp"
android:hint="Type" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<android.support.design.widget.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:clickable="true"
android:src="@drawable/ic_camera_alt_24dp"
app:layout_anchor="@id/llImageview"
app:layout_anchorGravity="bottom|right|end" />
<android.support.v7.widget.Toolbar
android:id="@+id/my_toolbar_new_product"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:elevation="4dp"
android:fitsSystemWindows="true"
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
android:title="@string/newproducttitle"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
</android.support.design.widget.CoordinatorLayout>
はちょうど私の質問を更新しましたが、それは残念ながらありませんでした私の問題を解決する..:/しかし、お試しいただきありがとうございます – Lasse
私の答えを更新@Lasseを試してください – HourGlass
まだ動作していません..それは問題であるlayout_weightようです.. – Lasse