Android Question (SOLVED) How to set Transparent Pressed Color in xCustomListView

incendio

Well-Known Member
Licensed User
Longtime User
Hi guys,

I am using xCustomListView 1.53, XUI 1.6, & B4A8.

I just want Transparent Pressed Color in CustomListView so set it on a Designer, but when app run & CustomListView pressed, the pressed color became white not transparent.

Am I missing something here?
 

LucaMs

Expert
Licensed User
Longtime User
What do you want to see setting the pressed color to transparent? What is under the xCLV? If so, you should set to transparent the ScrollView wich is the main component of a xCLV and its internal panel.

B4X:
clv.AsView.Color = Colors.Transparent
Dim sv As ScrollView
sv = clv.AsView.GetView(0)
sv.Panel.Color = Colors.Transparent
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
If so, you should set to transparent the ScrollView wich is the main component of a xCLV and its internal panel.
This is not needed.

To make a transparent list:
1. Set the divider color to transparent:
SS-2018-05-15_08.52.51.png


2. Set the Alpha level of Base Background to 0:
SS-2018-05-15_08.53.13.png


In B4J you also need to load a CSS file with:
B4X:
.scroll-pane{
   -fx-background-color:transparent;
}
.scroll-pane .viewport {
       -fx-background-color: transparent;
}

If you also set the Pressed Color to transparent then the highlight effect will not appear at all.
 
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
This is not needed.

To make a transparent list:
1. Set the divider color to transparent:
SS-2018-05-15_08.52.51.png


2. Set the Alpha level of Base Background to 0:
SS-2018-05-15_08.53.13.png


In B4J you also need to load a CSS file with:
B4X:
.scroll-pane{
   -fx-background-color:transparent;
}
.scroll-pane .viewport {
       -fx-background-color: transparent;
}

If you also set the Pressed Color to transparent then the highlight effect will not appear at all.
Thanks, that worked OK.
What do you want to see setting the pressed color to transparent? What is under the xCLV? If so, you should set to transparent the ScrollView wich is the main component of a xCLV and its internal panel.

B4X:
clv.AsView.Color = Colors.Transparent
Dim sv As ScrollView
sv = clv.AsView.GetView(0)
sv.Panel.Color = Colors.Transparent

I just want to display a lots of string.
If use EditText, whenever user click on the view, Virtual Keyboard shows, which I don't want to. If set EditText to Disable, it can scroll, so I use xCustomList view instead.
 
Upvote 0
Top