How To Fix An Android Phone That Says No Service: 1. Restart the Phone. Any time an issue crops up with an Android smartphone, the first and simplest step is to just start over. To do this, hold down the power button until a prompt shows up to restart the phone, then select it and wait while the device handles the rest.
I am using following code to display button at the bottom of activity.
and listview above it. when i display more data in listview this button pannel is moved down.can any one guide me how can i fix it at the bottom of activity?
any help would be appreciated.
UMARUMAR
3 Answers
The
android:layout_alignParentBottom
attribute has to be declared in an element of the RelativeLayout
not in the RelativeLayout
himself (unless there is another RelativeLayout
as a parent).You should do something like this, with the
ListView
inside the RelativeLayout
also :tbruyelletbruyelle
The answer selected as correct is faulty, the button will hide the lower part of the list view. The correct way is to declare the button first and position the list above the button.
AnimeshAnimesh
If you had, for example, all the scrollable elements in a ScrollView, you should do like the following:
Note that if you want the footer to be fixed, then you shouldn't put it in the ScrollView, where the scrollable content will be placed. Make it child of RelativeLayout and set
layout_alignParentBottom
to true. Maybe you'll need to add a padding at the bottom of the ScrollView in this case (so that the last element do not get hidden by the footer).The idea is similar for elements other than
ScrollView
Victor FerreiraVictor Ferreira