besplash
besplash

Reputation: 366

Scrolling a Linearlayout (Android App programming)

I already read a lot about scrolling a Linearlayout, but nothing helped yet. It says you can simply put it in a ScrollView, but whenever i do that, my app crashes when i try to start it. Thats my Sourcecode of the xml :

<?xml version="1.0" encoding="utf-8"?>
<Scrollview xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/scrollout"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">

    <LinearLayout 
         android:id="@+id/lout"
         android:orientation="vertical"
         android:background="@drawable/bg"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:padding="5dp" >
    </LinearLayout>

</Scrollview>

I always get an error which says that the app failed to inflate the class ScrollView. If i knew what that exactly mean, i may be able to solve the problem on my own.

Upvotes: 0

Views: 143

Answers (1)

codeMagic
codeMagic

Reputation: 44571

You have

<Scrollview 

small "v". Change that to

<ScrollView 

You will also need to change the end tag

</ScrollView>

Error inflating class means just what it says. It can't find a class with that name here it is because the capitalization is wrong.

Upvotes: 2

Related Questions