Saturday, 10 October 2020

Adding scrollview to a layout section when it is taking too much height from another section

I have this Layout:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    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"
    android:animateLayoutChanges="true"
    android:padding="@dimen/ParentLayoutPadding"
    android:background="@color/BackgroundColor"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:showIn="@layout/Layout_Main">
    <LinearLayout
        android:id="@+id/SearchNumbersLinearLayout"
        android:elevation="@dimen/ParentLayoutElevation"
        android:background="@drawable/ResourceOptionsBorderWithoutTopPadding"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center_vertical"       
        android:orientation="vertical"
        android:visibility="visible">
        <RelativeLayout
            android:animateLayoutChanges="true"
            android:id="@+id/SearchNumbersTitleRelativeLayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" >
            <TextView
                style="@style/MyCategoryTitleTextStyle"
                android:text="@string/Menu_DrawSearch"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/PaidDescriptionTextView"
                android:layout_centerInParent="true" />
            <ImageButton
                android:id="@+id/ShowInstructionsImageButton"
                android:layout_alignParentRight="true"
                android:layout_width="@dimen/IconButtonSize"
                android:layout_height="@dimen/IconButtonSize"
                android:layout_marginTop="@dimen/IconButtonMargin"
                android:layout_marginLeft="@dimen/IconButtonMargin"
                android:layout_marginRight="@dimen/IconButtonMargin"        
                android:layout_marginBottom="@dimen/IconButtonMargin"
                android:backgroundTint="@color/normalTextColorPrimaryDark"
                android:background="@drawable/ic_info_bitmap"
                android:layout_centerVertical="true"
                android:contentDescription="@string/Common_InformationIconContentDescription" />
        </RelativeLayout>
        <View
            android:layout_width="match_parent"
            android:layout_height="@dimen/CategoryLineHeight"
            android:background="@android:color/darker_gray"/>
           <include
            android:animateLayoutChanges="true"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        layout="@layout/SelectDateRange"/>
        <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:animateLayoutChanges="true">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:orientation="vertical"
            android:layout_gravity="center">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:orientation="horizontal"
            android:layout_gravity="center">
            <TextView
                style="@style/MyTextStyle"
                android:padding="@dimen/CategoryTitlePadding"
                android:gravity="left"
                android:text="@string/NumbersSearch_NumbersTitle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/ListNameTextView" />
            <TextView
                style="@style/MyTextStyle"
                android:inputType="textMultiLine"
                android:layout_width="0dp"
                android:layout_weight="1"
                android:layout_height="wrap_content"
                android:id="@+id/ListTextView"
                android:layout_marginRight="@dimen/CategoryTitlePadding"
                android:layout_alignBottom="@+id/ListNameTextView"
                android:layout_alignBaseline="@+id/ListNameTextView"
                android:hint="@string/NumbersSearch_NumbersHint"
                android:gravity="left"
                android:ellipsize="end"
                android:minLines="1"
                android:maxLines="2" />
            <com.google.android.material.button.MaterialButton
                style="@style/AppTheme.GrayButtonStyle"                 
                android:text="@string/NumbersSearch_NumberSelectionButtonTitle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/OptionsTextView"
                android:id="@+id/SelectNumbersButton"
                android:layout_centerHorizontal="true" />
        </LinearLayout>
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="left"
            android:orientation="vertical"
            android:layout_gravity="left">
            <CheckBox
                style="@style/MyTextStyle"
                android:text="@string/NumbersSearch_SearchPerNumber"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/CheckboxMarginTopBottom"
                android:layout_marginBottom="@dimen/CheckboxMarginTopBottom"
                android:id="@+id/SeperateCheckBox"
                android:buttonTint="@color/buttonColorPrimary"
                android:paddingRight="@dimen/CheckBoxPadding" />
            <CheckBox
                style="@style/MyTextStyle"
                android:text="@string/NumbersSearch_IncludeDrawTime"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/CheckboxMarginTopBottom"
                android:layout_marginBottom="@dimen/CheckboxMarginTopBottom"
                android:id="@+id/ShowListsCheckBox"
                android:buttonTint="@color/buttonColorPrimary"
                android:paddingRight="@dimen/CheckBoxPadding" />
            <LinearLayout
            android:id="@+id/SearchTypeLinearLayout"
            android:layout_below="@+id/SelectDate"
            android:paddingLeft="@dimen/CategoryTitlePadding"
            android:paddingRight="@dimen/CategoryTitlePadding"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:orientation="horizontal"
            android:layout_gravity="center">
            <TextView
                android:layout_weight="1"
                style="@style/MyTextStyle"
                android:text="@string/NumbersSearch_ShowResultsTitle"
                android:inputType="textMultiLine"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"                
                android:id="@+id/ShowResultsTitleTextView"
                android:minLines="1"
                android:maxLines="2"
                android:gravity="left" />
            <Spinner
                android:id="@+id/ShowResultsSpinner"
                android:layout_toRightOf="@+id/ShowResultsTitleTextView"
                android:layout_below="@+id/SelectDate"
                android:ellipsize = "none"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textAlignment="center"
                android:foregroundGravity="center_vertical"
                android:layout_alignBottom="@+id/ShowResultsTitleTextView"
                android:layout_marginLeft="@dimen/SpinnerPaddingStartEnd"
                android:layout_marginBottom="@dimen/SpinnerPaddingTopBottom"
                android:layout_marginTop="@dimen/SpinnerPaddingTopBottom"
                android:layout_alignTop="@+id/ShowResultsTitleTextView" />
        </LinearLayout>
        </LinearLayout>
        </LinearLayout>
         </ScrollView>
        <com.google.android.material.button.MaterialButton
            style="@style/AppTheme.ButtonStyle"
            android:elevation="@dimen/ButtonElevation"
            android:text="@string/NumbersSearch_ButtonSearch"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/OptionsTextView"
            android:id="@+id/SearchButton"
            android:gravity="center"
            android:layout_gravity="center_horizontal"
            android:layout_centerHorizontal="true" />
    </LinearLayout>
    <include
        android:layout_width="match_parent"
        android:layout_height="match_parent"
            android:layout_below="@+id/SearchNumbersLinearLayout"
        layout="@layout/HistoryLinearLayout"/>
</RelativeLayout>

HistoryLinearLayout:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:minHeight="@dimen/MinimumHistoryLayoutHeight"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <LinearLayout
        android:id="@+id/HistoryLinearLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="@dimen/HistoryPadding"
        android:gravity="center"
        android:orientation="horizontal"
        android:layout_gravity="center">
        <TextView
            android:id="@+id/HistoryTitleTextView"
            style="@style/MyTextStyle"
            android:text="@string/Common_HistoryWithColon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:padding="@dimen/ParentLayoutPadding"
            android:gravity="center"
            android:layout_centerHorizontal="true" />
        <com.google.android.material.button.MaterialButton
            style="@style/AppTheme.GrayButtonStyle"
            android:text="@string/NumbersSearch_Clear"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/OptionsTextView"
            android:id="@+id/ClearHistoryButton"
            android:layout_centerHorizontal="true" />
    </LinearLayout>
    <ListView
            android:id="@+id/HistoryListView"
            android:background="@drawable/ListViewBackground"
            android:layout_below="@id/HistoryLinearLayout"
            android:clipToPadding="false"
            android:clipChildren="false"
            android:divider="@color/BackgroundColor"
            android:dividerHeight="8dp"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
</LinearLayout>

Dimens.xml

<resources>
    <!-- Default screen margins, per the Android Design guidelines. -->
    <dimen name="activity_horizontal_margin">16dp</dimen>
    <dimen name="activity_vertical_margin">16dp</dimen>
    <dimen name="nav_header_vertical_spacing">8dp</dimen>
    <dimen name="nav_header_height">176dp</dimen>
    <dimen name="fab_margin">16dp</dimen>

  <!-- common dimens -->
  <dimen name="small_50">4dp</dimen>
  <dimen name="small_100">8dp</dimen>
  <!-- 50% of normal = 8dp -->

  <dimen name="normal_100">16dp</dimen>
  <!-- 100% of normal = 16dp -->
  <dimen name="normal_125">20dp</dimen>
  <!-- 125% of normal = 16dp + 4dp = 20dp -->
  <dimen name="normal_150">24dp</dimen>
  <dimen name="normal_175">28dp</dimen>

  <dimen name="normal_200">32dp</dimen>
  <!-- normal_200 = 2 x normal_100 -->
  <dimen name="normal_225">36dp</dimen>
  <dimen name="normal_250">40dp</dimen>
  <dimen name="normal_275">44dp</dimen>

  <dimen name="normal_300">48dp</dimen>
  <!-- normal_300 = 3 x normal_100 -->
  <dimen name="normal_325">52dp</dimen>
  <dimen name="normal_350">56dp</dimen>
  <dimen name="normal_375">60dp</dimen>

  <dimen name="large_100">32dp</dimen>
  <!-- large_100 = 2 x normal_100 -->
  <dimen name="large_125">40dp</dimen>
  <dimen name="large_150">48dp</dimen>
  <dimen name="large_175">56dp</dimen>
  <dimen name="large_200">64dp</dimen>

  <!-- ResourceLayout -->
  <dimen name="ImageViewResourceLayout">60dp</dimen>
  <dimen name="ImageViewResourceLayoutPadding">7dp</dimen>
  <dimen name="ResourceOptionsMarginInsideCards">4dp</dimen>
  <dimen name="ResourceOptionsMarginBetweenCards">12dp</dimen>
  <dimen name="ResourceOptionsButtonOrSwitchMargin">5dp</dimen>
  <dimen name="ResourceOptionsMarginBetweenLinearLayouts">10dp</dimen>
  <dimen name="ResourceOptionsMarginFromScreen">12dp</dimen>
  <dimen name="ResourceOptionsTextSize">14dp</dimen>
  <dimen name="LineHeight">2dp</dimen>
  <dimen name="CategoryLineHeight">1dp</dimen>
  <dimen name="LineMarginTopBottom">10dp</dimen>
  <!-- OptionsLayout -->
  <dimen name="OptionsSwitchPadding">11dp</dimen>
  <dimen name="RestorePurchasePadding">11dp</dimen>
  <dimen name="AutoCloseEditextWidth">60dp</dimen>
  <dimen name="CurrentColorSize">36dp</dimen>
  <dimen name="ResourceOptionsLineMarginForCategory">60dp</dimen>
  <dimen name="TemplatesSpinnerHeight">112dp</dimen>
  <!-- SearchScreenLayout -->
  <dimen name="ImageButtonMargin">10dp</dimen>
  <dimen name="StatisticsHeight">60dp</dimen>
  <dimen name="ElementPaddingTopBottom">10dp</dimen>
  <dimen name="ElementPaddingParentBottom">15dp</dimen>
  <dimen name="SwitchPadding">11dp</dimen>
  <dimen name="SearchMargin">11dp</dimen>
  <dimen name="NumbersFrequencySpinnerPadding">5dp</dimen>
  <dimen name="NumberSelectionPaddingTop">10dp</dimen>
  <dimen name="NumberSelectionPaddingPadding">1dp</dimen>
  <dimen name="NumberSelectionSize">30dp</dimen>
  <dimen name="NumberSelectionCornerRadius">15dp</dimen>
  <dimen name="NumberSelectionPaddingRight">4dp</dimen>
  <!-- OptionsLayout -->
  <dimen name="PortMargin">8dp</dimen>
  <!-- StatisticsLayout -->
  <dimen name="OptionsSpinnerWidth">170dp</dimen>
  <dimen name="EditTextMargin">4dp</dimen>
  <dimen name="PasswordEditTextMargin">8dp</dimen>
  <!-- StatisticsLayout PerformanceTrend-->
  <dimen name="PerformanceScoreSize">160dp</dimen>
  <dimen name="PerformanceTrendHeight">200dp</dimen>
  <item format="float" name="LabelTextSize" type="dimen">40</item>
  <item format="float" name="LineSize" type="dimen">10</item>
  <item format="float" name="MaxValue" type="dimen">100</item>
  <!-- Common -->
  <dimen name="SpinnerHeight">40dp</dimen>
  <dimen name="MinimumHistoryLayoutHeight">150dp</dimen>
  <dimen name="HistoryPadding">4dp</dimen>
  <dimen name="IconSize">24dp</dimen>
  <dimen name="ButtonIconSize">20dp</dimen>
  <dimen name="ParentLayoutPadding">10dp</dimen>
  <dimen name="AlertDialogPadding">12dp</dimen>
  <dimen name="SpinnerPaddingStartEnd">8dp</dimen>
  <dimen name="SpinnerPaddingTopBottom">8dp</dimen>
  <dimen name="CategoryTitlePadding">5dp</dimen>
  <dimen name="CheckboxMarginTopBottom">3dp</dimen>
  <dimen name="CategoryMarginTop">2dp</dimen>
    <dimen name="CategoryMarginBottom">5dp</dimen>
      <dimen name="CategoryMarginTopBottom">5dp</dimen>
  <dimen name="CategorySeperatorMarginTopBottom">12dp</dimen>
  <dimen name="SelectDateMarginRight">5dp</dimen>
  <dimen name="ParentLayoutElevation">1dp</dimen>
  <dimen name="ButtonMargin">5dp</dimen>
  <dimen name="ButtonElevation">2dp</dimen>
  <dimen name="TwoLineText">2</dimen>
  <dimen name="UnlockDateRangeMargin">12dp</dimen>
  <dimen name="IconButtonSize">24dp</dimen>
  <dimen name="IconButtonMargin">14dp</dimen>
  <!-- OddEvenDelays -->
  <dimen name="CheckBoxPadding">8dp</dimen>
  <dimen name="BetPerRawWidth">50dp</dimen>
  <!-- Info -->
  <dimen name="ProbabilityMargin">5dp</dimen>
  <dimen name="PercentageTopMargin">10dp</dimen>
  <dimen name="SpinnerWidth">130dp</dimen>
</resources>

ListViewBackground.xml

<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
    <corners android:radius="3dp"/>
    <stroke android:width="1dp" android:color="@color/lightBackgroundColor" />

ResourceOptionsBorderWithoutTopPadding.xml

<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
    <corners android:radius="3dp"/>
    <padding android:left="8dp" android:right="8dp" android:bottom="8dp"/>
    <stroke android:width="1dp" android:color="@color/lightBackgroundColor" />
    <solid android:color="@color/lightBackgroundColor" />
</shape>
    <solid android:color="@color/lightBackgroundColor" />
</shape>

styles.xml

<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>

  <style name="AppTheme.NumberPicker" parent="Theme.AppCompat.Light.NoActionBar" >
    <item name="android:editTextColor">@android:color/white</item>
    <item name="colorPrimary">@android:color/white</item>
    <item name="colorPrimaryDark">@android:color/white</item>
    <item name="colorAccent">@android:color/white</item>
  </style>

<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:spinnerItemStyle">@style/spinnerItemStyle</item>
<item name="android:spinnerDropDownItemStyle">@style/spinnerDropDownItemStyle</item>
</style>

  <style name="DatePickerDialogTheme" parent="ThemeOverlay.AppCompat.Dialog">
    <item name="colorAccent">@color/colorPrimary</item>    <!--header background-->
    <item name="android:windowBackground">@color/lightBackgroundColor</item>    <!--calendar background-->
    <item name="android:colorControlActivated">@color/colorPrimary</item>    <!--selected day-->
    <item name="android:textColorPrimary">@color/colorPrimary</item>    <!--days of the month-->
    <item name="android:textColorSecondary">@color/colorPrimary</item>    <!--days of the week-->
  </style>
  <style name="AppTheme.ButtonStyle" parent ="Widget.AppCompat.Button.Colored">
    <!-- Widget.AppCompat.Button.Colored -->
    <item name="android:textColor">@android:color/white</item>
    <item name="android:backgroundTint">@color/buttonColorPrimary</item>
    <item name="cornerRadius">3dp</item>
  </style>
<style name="AppTheme.OutlinedButtonStyle" parent ="Widget.MaterialComponents.Button.OutlinedButton">
<!-- Widget.AppCompat.Button.Colored -->
  <item name="iconPadding">0dp</item>
  <item name="android:insetTop">0dp</item>
  <item name="android:insetBottom">0dp</item>
  <item name="android:paddingLeft">12dp</item>
  <item name="android:paddingRight">12dp</item>
  <item name="android:minWidth">48dp</item>
  <item name="android:minHeight">48dp</item>
  <item name="android:textColor">@drawable/WhiteTextColorSelector</item>
  <item name="backgroundTint">@android:color/transparent</item>
  <!-- <item name="cornerRadius">3dp</item> -->
</style>
  <style name="AppTheme.GrayButtonStyle" parent ="Widget.AppCompat.Button.Borderless">
    <!-- Widget.AppCompat.Button.Borderless -->
    <item name="android:textColor">@drawable/BasicTextColorSelector</item>
    <item name="backgroundTint">@android:color/transparent</item>
    <item name="cornerRadius">3dp</item>
    <item name="rippleColor">@color/buttonColorPrimaryLight</item>
    <item name="strokeColor">@color/buttonColorPrimaryLight</item>
    <item name="strokeWidth">2dp</item>
  </style>
  <style name="AppTheme.WhiteButtonStyle" parent ="Widget.AppCompat.Button.Borderless">
    <!-- Widget.AppCompat.Button.Borderless -->
    <item name="android:textColor">@drawable/WhiteTextColorSelector</item>
    <item name="backgroundTint">@android:color/transparent</item>
    <item name="cornerRadius">3dp</item>
    <item name="rippleColor">@android:color/white</item>
    <item name="strokeColor">@android:color/white</item>
    <item name="strokeWidth">2dp</item>
  </style>
  <style name="AppTheme.IconButtonStyle" parent ="Widget.AppCompat.Button.Borderless">
    <!-- Widget.AppCompat.Button.Borderless -->
    <item name="android:textColor">@color/buttonColorPrimary</item>
    <item name="backgroundTint">@android:color/transparent</item>
    <item name="cornerRadius">3dp</item>
    <item name="rippleColor">@color/buttonColorPrimaryLight</item>
    <item name="strokeColor">@color/buttonColorPrimaryLight</item>
    <item name="strokeWidth">2dp</item>
  </style>
  <style name="NumberSelectionAlertDialog" parent="Theme.AppCompat.Dialog.Alert">
    <item name="android:windowMinWidthMajor">100%</item>
    <item name="android:windowMinWidthMinor">100%</item>
    <item name="android:colorAccent">@android:color/white</item>
    <item name="android:windowBackground">@color/buttonColorPrimaryLight</item>
  </style>
  <style name="CommonAlertDialog" parent="Theme.AppCompat.Dialog.Alert">
    <item name="android:textColorPrimary">@android:color/white</item>
    <item name="android:textColor">@android:color/white</item>
    <item name="android:colorAccent">@android:color/white</item>
    <item name="android:windowBackground">@color/buttonColorPrimaryLight</item>
  </style>
  <style name="CommonAlertDialogSpinner" parent="Widget.AppCompat.Light.DropDownItem.Spinner">
    <item name="android:paddingStart">10dp</item>
    <item name="android:paddingEnd">10dp</item>
    <item name="android:textColor">@android:color/white</item>
    <item name="android:textColorPrimary">@android:color/white</item>
    <item name="android:spinnerItemStyle">@style/spinnerCommonAlertDialogItemStyle</item>
  </style>
<style name="MyTextStyle" parent="@android:style/TextAppearance.Small">
<item name="android:textColor">@drawable/BasicTextColorSelector</item>
  <item name="android:buttonTint">@color/normalTextColorPrimaryDark</item>
  <item name="android:textColorHint">@color/buttonColorPrimary</item>
</style>
  <style name="MyCategoryTitleTextStyle" parent="MyTextStyle">
    <item name="android:textStyle">bold</item>
  </style>
  <style name="CommonAlertDialogTextStyle" parent="@android:style/TextAppearance.Small">
    <item name="android:textColor">@android:color/white</item>
  </style>

  <!-- Spinner style -->
  <style name="spinnerCommonAlertDialogItemStyle">
    <item name="android:textColor">@android:color/white</item>
    <item name="android:textColorPrimary">@android:color/white</item>
  </style>
  <!-- Spinner style drop down style-->
  <style name="spinnerCommonAlertDialogDropDownItemStyle">
    <item name="android:textColor">@android:color/white</item>
  </style>
  <!-- Spinner style -->
  <style name="spinnerItemStyle">
    <item name="android:textColor">@color/colorPrimaryDark</item>
    <!-- <item name="android:gravity">left</item>-->
     <!-- <item name="android:textAlignment">left</item>-->
  </style>

  <!-- Spinner style drop down style-->
  <style name="spinnerDropDownItemStyle">
    <item name="android:paddingStart">@dimen/SpinnerPaddingStartEnd</item>
    <item name="android:paddingEnd">@dimen/SpinnerPaddingStartEnd</item>
    <item name="android:textColor">@color/colorPrimaryDark</item>
    <item name="android:gravity">center</item>
    <item name="android:textAlignment">center</item>
  </style>
  
  <style name="CategoryTitleTextStyle" parent="@android:style/TextAppearance.Medium" >
    <item name="android:textStyle">normal</item>
  </style>
  
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />

<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Dark" />

</resources>

colors.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="colorPrimary">#1C315C</color>
    <color name="colorPrimaryDark">#102655</color>
    <color name="colorAccent">#414e82</color>
<!--Background color-->
  <color name="lightBackgroundColor">#E8E8E8</color>
  <color name="BackgroundColor">#d4d4d4</color>
  <color name="lineBackgroundColor">#868686</color>
  <color name="buttonColorPrimary">#414e82</color>
  <color name="buttonColorPrimaryLight">#6f7ab2</color>
  <color name="buttonColorPrimaryDark">#102655</color>
  <color name="darkBackgroundColor">#1C315C</color>
  <color name="altlightBackgroundColor">#464e7d</color>
  <color name="normalTextColorPrimaryDark">#102655</color>
  <color name="normalTextColorPrimaryDarkDisabled">#5C102554</color>
</resources>

which looks like this in phones with 1080p resolution: Layout

My problem is this: the blue box from the image (HistoryLinearLayout) is smaller screens appears too small, i would like to have a minimum height of 150sp ( i have try to add minHeight in the HistoryLinearLayout but it doesnt do anything) and the yellow section from the image to be scrollable when that happen, so if the yellow section doesnt fit and at the same time the HistoryLinearLayout to be at least 150sp, the yellow section to appear with scrollbar.

Right now it doesnt work, the scroll bar doesnt do anything and the minHeight is not being respected.

So in other words what i want is this: if blue section (HistoryLinearLayout) is less than 150sp, make it 150sp and make the yellow section (ScrollView) scrollable. i dont mind if this can be happen by code also.



from Adding scrollview to a layout section when it is taking too much height from another section

No comments:

Post a Comment