I have an app in which a hidden linear layout is supposed to open to show a text view with user information. The button to open/close the linear layout is at the bottom of the phone screen. When I press the button, the button is forced down, out of view, to allow for the hidden layout. What I want the UI to do is when I press the button, the hidden layout will slide the UI contents up leaving the button where it is on the screen. And when I click the button again, the layout will close (slide down) bringing the UI back to it's original position.
I tried many of the other suggestions that have been presented on other Stackoverflow links and, in all cases, 1) the hidden layouts are coming up from the footer or header of the phone screen, 2) the button that activates the hidden layout is far enough removed from the hidden section that there is no need to fit the hidden section within two views/widgets, or 3) I just can't get the hidden layout to fully disappear (i.e. View.GONE doesn't remove the top section of the layout). Can anyone direct me to a solution that will help me slide up and down the UI in this way? The code below is for the hidden layout (see image for visual) and I have the XML files to slide up/down if there is a need to look at them. Let me know if there is a need for any additional information.
I appreciate the help!
[Image of hidden layer when layout slides open][1] [1]: https://i.sstatic.net/le1Bc.png
<LinearLayout
android:id="@+id/transition_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/hidden_textView_button_results"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/daily_bread_result"
android:layout_marginStart="35dp"
android:layout_marginEnd="35dp"
android:gravity="center"
android:paddingTop="100dp"
android:paddingBottom="100dp"
android:textAlignment="center"
android:textSize="32sp"
android:textStyle="bold"
android:text="Do ya see me?!?"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cardView_editTexts"
app:layout_constraintBottom_toTopOf="@+id/cardView_CalculateDailyBread"/>
</LinearLayout>
Everything is contained within a ScrollView, yes? So it sounds like you want to make the hidden layout visible and then immediately add the height of the hidden layout to the scroll position of the ScrollView.
Or you could just ditch the button entirely and simply show the value as soon as all the EditTexts are filled out. And if they're not filled out, show a message saying that info is missing.