Vertical scrollbar is not visible on Android

6 posts, 0 answers
  1. Marc
    Marc avatar
    39 posts
    Member since:
    Oct 2013

    Posted 09 Nov Link to this post

    Hello,

    I'm windering how to enable the vertical scrollbar on RadListView in Android. It is visible in the defult ListView widget on Android and iOS and in the RadListView on iOS, but I am not able to show it on Android.

     

    I am working with

    • NativeScript version 2.3.0
    • Telerik UI for NativeScript 1.4.1

     

    I tried to enable the scrollbars with myRadListView.android.setScrollbarFadingEnabled(true), but that also does not bring any changed.

    Is there another way to achieve this?

     

    Best regards

  2. Nikolay Iliev
    Admin
    Nikolay Iliev avatar
    92 posts

    Posted 10 Nov Link to this post

    Hello Mark,

    The RadListView is a complex component which allows you to implement many functionalities 
    but showing the scroll bar for Android is not supported at this very moment.
    The difference withing the basic list view and the RadlistView is that you can construct complex layouts
    (linear, grid and staggered layout) and use a lot of build in features like

    However, some of the native properties for the android implementation are not accessible

    If however, you can use the core list view, you can do the following to show the scroll bar.
    var lv = page.getViewById("myListView");   
    lv.android.setFastScrollAlwaysVisible(true);
    Regards,
    Nikolay Iliev
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Marc
    Marc avatar
    39 posts
    Member since:
    Oct 2013

    Posted 10 Nov in reply to Nikolay Iliev Link to this post

    Hello Nikolay,

    thanks for your response.

    I know the features of the RadListView and we already make use of them in different scenarios. Thats why we use the default ListView only in a few pages where we do not need more complex functionalities.

    But in some situations it might be difficult for the user to see, that some content is scrollable, if there is no scrollbar in the list at all.

    So it would be great to be able to show a vertical (and/or horizontal) scrollbar in an Android RadListView in the future, like it is already done in iOS.

     

    Best regards

  4. Nikolay Iliev
    Admin
    Nikolay Iliev avatar
    92 posts

    Posted 10 Nov Link to this post

    Hi Marc,


    Thank you for your feature request - it is indeed a nice one to have for RadListView.
    The thing is that behind the Android implementation for RadListView we are using RecyclerView.
    As discussed in this thread it is quite a hard or impossible task to enable scrollbars for RecyclerView in native Android (programatically as it is not yet possible to apply via XML in NativeScript) which is why this functionality is not implemented yet. Still, we have discussed this issue with our team and will research different approaches if that option can be made for Android.

    Regards,
    Nikolay Iliev
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  5. Marc
    Marc avatar
    39 posts
    Member since:
    Oct 2013

    Posted 10 Nov in reply to Nikolay Iliev Link to this post

    Hello Nikolay,

    I just have seen in the code definition, that RadListView for Android uses RecyclerView... I was looking for an overview about the native components behind the Telerik UI for NativeScript components in the docs, like it is done for the basic widgets, but I couldn't find something like that, so I thought that RadListView would be some extension for the basic Android ListView widget.

    Ok, that explains why it is more complicated to implement this for Android. So I will look forward to see, if this gets implemented anytime in the future.

     

    Best regards

  6. Nikolay Iliev
    Admin
    Nikolay Iliev avatar
    92 posts

    Posted 11 Nov Link to this post

    Hello Marc,

    Indeed the implementation for RadListView is a lot more complicated than the core ListView component.
    If you are interested in the code that lies behind you can see it in your application.
    For example to see the implementation for RadListView for Android you can navigate to these files:

    node_modules/nativescript-telerik-ui/listview/listview-android-map.d.ts
    node_modules/nativescript-telerik-ui/listview/listview.android.js

    As for the feature for visible scrollbar - we will update the release notes once it is implemented

    Regards,
    Nikolay Iliev
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top