###前提・実現したいこと
ここに質問したいことを詳細に書いてください
AndroidStudioの練習中です。
ImageButtomを使って画像を用意し、縦横の幅を100dpにすると横幅にエラーが起こります。
どう解決すればいいのかわかりません。よろしくお願いします。
###発生している問題・エラーメッセージ
Render problem Dimension "100" in attribute "layout_width" i![イメージ説明](3aecae45bc6c8402097f158ca70eff9c.png)ing unit!
###該当のソースコード
<?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout 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" tools:context="com.example.kadokichi.janken.MainActivity"> <ImageButton android:id="@+id/choki" android:layout_width="100" android:layout_height="100" android:layout_marginBottom="8dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:scaleType="fitCenter" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:srcCompat="@drawable/c" /> </android.support.constraint.ConstraintLayout>
###補足情報(言語/FW/ツール等のバージョンなど)
AndroidStudio3.0.1
API16
Android4.1
Nexus4
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/01/05 09:38