I am new to Android development. I would like to make LinearLayout
scrollable but after implementing the accepted solution here, the default dark blue ActionBar
at the top of my app disappeared. I am using Empty Activity
.
Below is my activity_main.xml
:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
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"
tools:context="com.example.android.MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin">
<!-- blah blah blah -->
</LinearLayout>
</ScrollView>
There were no errors when I used this code.
Any help would be appreciated!