改变nativescript滑块的方向

时间:2017-05-29 07:50:57

标签: slider nativescript right-to-left nativescript-angular

有没有办法让本机脚本滑块RTL?

我希望它像这张照片一样从右向左移动 enter image description here

1 个答案:

答案 0 :(得分:0)

对于您的情况,您可以使用Slider <StackLayout class="p-20"> <Slider rotate="180" loaded="slloaded" minValue="0" maxValue="100" value="" /> </StackLayout> 属性。例如:

export class Hero {

  constructor(
    public id: number,
    public name: string,
    public type: string,
    public photos: string[]
    ) { }
}

let HEROES = [
  new Hero(
    11,
    'Mr. Nice',
    'Fire',
    ('link to a photo', 'link to another photo')
  ),
  new Hero(
    12,
    'Narco',
    'Earth',
    ('link to a photo', 'link to another photo', 'another one')
  )
];