android


Android ScrollView height is too short


I'm new to Android have this problem making a scrollview that is supposed to scroll over a ListView of 10+ items.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="#dimen/activity_vertical_margin"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
app:layout_behavior="#string/appbar_scrolling_view_behavior"
tools:context="com.naqishop.naqi.MainActivity"
tools:showIn="#layout/activity_main">
<ScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/scrollView">
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="#+id/listView"
android:entries="#array/options" />
</ScrollView>
</LinearLayout>
The problem is that I can not extend scroll views to show more that one item at a time. I tried to tamper with layout_height of the scrollview (like assigning the value to 500dp)
Also I tried adding
android:fillViewport="true"
as suggestd here
but it did not change the height. So appreciate your hints.
This is because you've set android:layout_height="wrap_content". Replace that with
android:layout_height="match_parent" and it'll take up the whole height.

Related Links

onTouch return an InvalidCastException
How to receive email from gmail android
Handling multiple tables in SQLite on Android - why so complicated?
How to get the name of the application in android?
How to install an apk on my Emulator if I get: Snapshot storage already in use?
app is slow with images in android
keystore file exists but its empty in android key store
Android Weather Forecast -Error
Android pathshape to draw a dynamic line
Problem With Updating Database in Android app
Run web sockets from Android web server?
Is it possible to set the wallpaper just like it's done with the app that comes with Android?
Android OpenGL 1.0 different texture for each face of the cube with texture atlas
How to add EditText in ListView multiple choice type
How to use public static final String SET_ACTIVITY_WATCHER permission in android?
Android: Get Position from SimpleCursorAdapter

Categories

HOME
embedded
fabricjs
3d
socket.io
sublimetext
can
soa
pyqt4
missing-data
nfs
discrete-mathematics
bing-maps
google-chrome-app
ibeacon-android
project-intu
jxl
libc
selenium-ide
eip
powershell-v5.0
digital-signature
production
enterprise-miner
windows-xp
articulate-storyline
inno-download-plugin
imageresizer
exploit
resourcebundle
dynamically-generated
beautifier
motion-detection
mql
realm-mobile-platform
custom-controls
scrollview
weather
vue-chartjs
engine.io
sim-toolkit
modernizr
recurrent-neural-network
cin
jvmti
datacachefactory
branching-and-merging
congestion-control
berkeley-db-je
flask-login
nanoc
openrasta
chai-as-promised
user-defined-fields
facebook-pixel
identification
insight
lightning
singleinstance
spring-data-couchbase
skin
type-theory
google-photos
rmongo
parfor
xcode-server
flex4.6
signalr.client
appscale
data-protection
httpruntime.cache
toast
user-management
rate-limiting
fail2ban
android-broadcast
umlgraph
at-job
uncaught-typeerror
viewer
android-vibration
sonarqube-5.0
punycode
universal-image-loader
trdion2011
kissfft
buffering
vbe
multitasking
spring-3
ora-06550
eclipse-kepler
jammer
model-driven-development
observium
cnf
pclzip
video-codecs
insert-id
swfobject
role
catransform3d
clrstoredprocedure
zen
duplex
soappy
leader

Resources

Encrypt Message