This is a migrated thread and some comments may be shown as answers.

Vertical scrollbar is not visible on Android

5 Answers 1233 Views
ListView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Marc
Top achievements
Rank 1
Marc asked on 09 Nov 2016, 05:34 PM

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

5 Answers, 1 is accepted

Sort by
0
Nick Iliev
Telerik team
answered on 10 Nov 2016, 08:36 AM
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
0
Marc
Top achievements
Rank 1
answered on 10 Nov 2016, 12:25 PM

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

0
Nick Iliev
Telerik team
answered on 10 Nov 2016, 01:51 PM
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
0
Marc
Top achievements
Rank 1
answered on 10 Nov 2016, 04:29 PM

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

0
Nick Iliev
Telerik team
answered on 11 Nov 2016, 07:49 AM
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--/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
Tags
ListView
Asked by
Marc
Top achievements
Rank 1
Answers by
Nick Iliev
Telerik team
Marc
Top achievements
Rank 1
Share this question
or