इसलिए हाल ही में, एंड्रॉइड स्टूडियो 2.2 के साथ एक नया कांस्ट्रेलेनटाउट है जो डिजाइनिंग को बहुत आसान बनाता है, लेकिन इसके विपरीत RelativeLayoutऔर Linearlayout, मैं इसे ScrollViewघेरने के लिए उपयोग नहीं कर सकता ConstraintLayot। क्या यह संभव है? यदि हां, तो कैसे?
अर्थात
<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="match_parent"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="0dp">
<android.support.constraint.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="0dp">
<!-- Have whatever children you want inside -->
</android.support.constraint.ConstraintLayout>
</ScrollView>
layout_height="wrap_content", तो ऐप एक रिक्त स्क्रीन दिखाता है, लेकिन यदि मैं उपयोग करता हूं layout_height="match_parent", तो ऐप स्क्रॉल नहीं करेगा।