Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

scrollview is not working

Tags:

android

list

I got a list in my main but problem is that when I scan the barcodes for more than 15 barcodes, then it didn't show the"scan" button already and I tried to use the scroll view for that but it is not working : Any helps?

     <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_weight="1"
        android:fillViewport="true">
<LinearLayout 
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >


    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/hello" />
          <ListView 
  android:id="@android:id/list"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content" 


/>
<TextView 
  android:id="@android:id/empty"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content" 
  android:text="no notes"
   />
<Button
        android:id="@+id/button"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:padding="20dp"
        android:text="scan"/>




</LinearLayout>
</ScrollView>

Any suggestions?

like image 345
Thet Mon Aye Avatar asked Feb 08 '26 02:02

Thet Mon Aye


1 Answers

Generally it is a bad idea to place a listview inside of the scrollview. It doesn't work as expected. See the following post: https://groups.google.com/forum/?fromgroups#!topic/android-beginners/LRpLgGOy2Pc

like image 68
Kevin Westwood Avatar answered Feb 09 '26 17:02

Kevin Westwood