Heyho साथियों के साथ बदल दिया @dimens,एंड्रॉयड ConstraintLayout हार्डकोडेड मूल्यों
वर्तमान में मैं नए लेआउट नई ConstraintLayout साथ एंड्रॉयड स्टूडियो के संपादक सीख रहा हूँ।
वैसे, मुझे इससे नफरत है।
लेकिन मैं इस मुद्दे को मिला है, अगर मैं एक @dimen साथ layout_height निर्दिष्ट करना चाहते हैं, यह बजाय एक डीपी मूल्य के साथ प्रतिस्थापित हो जाता है कि।
किसी और को यह समस्या मिली है?
एंड्रॉइड स्टूडियो संस्करण 2.2.2 & 2.2.3 एक ही समस्या।
नवीनतम ग्रेडल संस्करण।
अग्रिम लोगों में धन्यवाद!
संपादित करें:
कोड उदाहरण:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView 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="wrap_content">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="wrap_content"
android:layout_height="@dimen/imageViewHeight"
app:srcCompat="@drawable/accept"
android:id="@+id/imageView"
android:layout_marginStart="16dp"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
</ScrollView>
इसके अलावा बाहर scrollview होता है।
पोस्ट एक्सएमएल यहाँ कोड –
आप वास्तव में स्पष्ट कोड लाइनों की जरूरत नहीं है इसे कहीं भी .. विशेषता के डी पी मूल्य पर – PadySo
क्लिक होता है। और dimen की जांच करें। –