1. Are you ready for the Galaxy S20? Here is everything we know so far!

Implement Scrollview based on screen size

Discussion in 'Android Development' started by Aayush Kumar, Aug 10, 2017.

  1. Aayush Kumar

    Aayush Kumar Lurker
    Thread Starter

    Hi All,

    I am building an android app that involves the use of scroll view and linear layout.I have implemented it and is working fine for all the screen sizes.But the thing is that if the screen size is big enough to accommodate the contents then the scroll view should not be be working.Instead the things should be displayed normally without the scrolling effect.Is there any way to achieve this effect.

    Regards,
    Aayush Kumar
     



    1. Download the Forums for Android™ app!


      Download

       
  2. AQSAANUM

    AQSAANUM Member

    You should code in XML file like this,
    Code (Text):
    1. <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    2.      android:layout_width="fill_parent"
    3.      android:layout_height="fill_parent"
    4.      android:fillViewport="true"
    5.      android:scrollbars = "vertical"
    6.      android:scrollbarStyle="insideInset"
    7.     >
    8.     <RelativeLayout
    9.         android:layout_width="fill_parent"
    10.         android:layout_height="fill_parent"
    11.         android:stretchColumns="1"
    12.         >
    13.         <!-- Add here which you want -->
    14.     </RelativeLayout>
    15.  
    16. </ScrollView>
     
Loading...
Similar Threads - Implement Scrollview based
  1. Natann99
    Replies:
    0
    Views:
    697
  2. SANJISH KUMAR
    Replies:
    0
    Views:
    873
  3. professor_of_stupidity
    Replies:
    0
    Views:
    927
  4. Kazafka
    Replies:
    4
    Views:
    842
  5. AndroidGUIIsComplicated
    Replies:
    1
    Views:
    1,292
  6. d2idan
    Replies:
    626
    Views:
    19,070
  7. Rascalsailor
    Replies:
    0
    Views:
    510
  8. dagwood90
    Replies:
    0
    Views:
    1,151
  9. kannanthayumanavan
    Replies:
    5
    Views:
    2,026
  10. nagamothu
    Replies:
    1
    Views:
    722

Share This Page

Loading...