LinearLayout does not appear

Why can not I see the last LinearLayout?

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:background="@drawable/bg" android:layout_height="wrap_content"
android:orientation="vertical" android:padding="2dp"
android:theme="@android:style/Theme.NoTitleBar">

    <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" .../>

    <ScrollView android:layout_width="wrap_content" android:layout_height="wrap_content">
        <TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
        // TableRows created dynamically
        </TableLayout>
    </ScrollView>

    <LinearLayout android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_gravity="bottom">
        <Button android:layout_height="wrap_content"
        android:layout_width="wrap_content" android:text="Button" android:id="@+id/button1"></Button>
    </LinearLayout>
</LinearLayout>`

Edited: android:layout_gravity="bottom"

Answers


This thing would happen because U have put the Child First Liner layout and scroll View might be contaning the more space compare to the screen so the last child of this liner layout has no more space for their View .

For the Solution u may take the Relative layout For this or put the layout_weight for all the child View as per your Requirement . i think the last option is batter for u .


I'm not nearly as comfortable with android layouts as I would like but I think it may be because of what's inside your ScrollView. You set ScrollView's parameters to wrap_content which means it will be as large as its children require. But the nested TableLayout uses fill_parent so ScrollView "inherits" that and fills up the entire screen. Once again, I make no guarantees that this is actually correct.


Because most probably the content above last linear layout is so large that there is not enough space left for the last linear layout out and it's button to appear


Need Your Help

What is the use of private static member functions?

c++ static-methods private-members

I was looking at the request parser from the boost::asio example and I was wondering why the private member functions like is_char() are static? :

I am not understanding how the given program gives that output

c++

I am compiling this program on Turbo C++ Version 4.5

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.