tidev / titanium-sdk

🚀 Native iOS and Android Apps with JavaScript
https://titaniumsdk.com/
Other
2.76k stars 1.21k forks source link

Android : Slider does not set leftTrackImage in latest ti sdk 11.0.0.GA #13519

Open mitulbhalia opened 2 years ago

mitulbhalia commented 2 years ago

I have searched and made sure there are no existing issues for the issue I am filing

Description

Setting 2 different images in slider using leftTrackImage & rightTrackImage properties but it only sets rightTrackImage. Also it sets unwanted blue tint color on leftTrackImage.

Expected Behavior

Slider should set leftTrackImage without tinting color in android.

Actual behavior

Slider does not set different leftTrackImage than rightTrackImage. It also shows unwanted blue tint color.

Reproducible sample

index.xml

<Alloy>
    <Window>
    <Slider id='sld' ></Slider>
    </Window>   
</Alloy>

index.tss

'#sld' :{
    value: 50,
    max: 100,
    min: 0,
    maxRange: 100,
    minRange: 0 ,
    width: "80%",
    height: 40,     
    leftTrackImage: "/images/line-left.png",
    rightTrackImage: "/images/line-right.png"
}

index.js $.index.open();

Steps to reproduce

Just run above code using below images line-left.png line-right.png

Platform

Android

SDK version you are using

11.0.0.GA

Alloy version you are using

2.0.1

m1ga commented 2 years ago

As discussed in Slack: it will only use the ClipPath of the leftTrackImage, its not supposed to use it as a normal image. Added https://github.com/tidev/titanium_mobile/pull/13521 to make use of drawables for both fields.