Вот код, который я столкнулся с проблемой, я взял 2 линейных макета в представлении прокрутки, теперь последняя кнопка во 2-м линейном макете скрыта, или я могу сказать, что не отображается должным образом.
Вот снимок экрана.
Вы можете проверить, что выбранная область является кнопкой, но не работает должным образом.
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1">
<LinearLayout
android:id="@+id/ConcernedPortionofScreen"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.25"
android:orientation="vertical">
</LinearLayout>
<LinearLayout
android:id="@+id/RestofScreen"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.75"
android:orientation="vertical"
android:padding="20dp">
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/custom_button_shape_with_bg_primary"
android:minHeight="@dimen/minimum_height_all_object"
android:layout_marginTop="@dimen/add_child_rquest_margin_top"
android:text="SELECT"
android:textColor="@color/white"
/>
</LinearLayout>
</LinearLayout>
</ScrollView>
когда я пытаюсь удалить layout_weight, мой макет становится массовым.
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical"
tools:context=".MainActivity">
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:weightSum="1">
<LinearLayout
android:id="@+id/ConcernedPortionofScreen"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.25"
android:orientation="vertical">
<!-- Parent FrameLayout 'FL' -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--Conitans Tree Childs -->
</FrameLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/RestofScreen"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.75"
android:orientation="vertical"
android:padding="20dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="1">
<!--Conitans Two Childs -->
</LinearLayout>
<EditText
style="@style/CustomEdittextTheme"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/add_child_rquest_margin_top"
android:hint="Enter Child Name"
android:minHeight="@dimen/add_child_rquest_minimum_height_all_object" />
<EditText
style="@style/CustomEdittextTheme"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/add_child_rquest_margin_top"
android:hint="Select City"
android:minHeight="@dimen/add_child_rquest_minimum_height_all_object" />
<TextView
style="@style/CustomEdittextTheme"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/add_child_rquest_margin_top"
android:hint="Select Birthdate"
android:minHeight="@dimen/add_child_rquest_minimum_height_all_object" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="1">
<!--Conitans Two Childs -->
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="1">
<!--Conitans Two Childs -->
</LinearLayout>
<EditText
style="@style/CustomEdittextTheme"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/add_child_rquest_margin_top"
android:hint="Enter Mobile Number"
android:minHeight="@dimen/add_child_rquest_minimum_height_all_object" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="1">
<!--Conitans Two Childs -->
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/add_child_rquest_margin_top"
android:fontFamily="@font/segoe_ui_bold"
android:paddingLeft="10dp"
android:text="Note / Message :"
android:textColor="@color/colorPrimaryDark"
android:textSize="18dp" />
<EditText
style="@style/CustomEdittextTheme"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/add_child_rquest_margin_top"
android:inputType="textMultiLine"
android:lines="8"
android:maxLines="8"
android:minHeight="@dimen/add_child_rquest_minimum_height_all_object"
android:minLines="8"
android:scrollbars="vertical" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/add_child_rquest_margin_top"
android:background="@drawable/custom_button_shape_with_bg_primary"
android:fontFamily="@font/segoe_ui_bold"
android:minHeight="@dimen/add_child_rquest_minimum_height_all_object"
android:text="SUBMIT"
android:textColor="@color/white" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</android.support.constraint.ConstraintLayout>