source
stringlengths
14
113
code
stringlengths
10
21.3k
application-dev\ui\arkts-fixes-style-dialog.md
// xxx.ets @Entry @Component struct CalendarPickerDialogExample { private selectedDate: Date = new Date('2024-04-23') build() { Column() { Button("Show CalendarPicker Dialog") .margin(20) .onClick(() => { console.info("CalendarDialog.show") CalendarPickerDialog.show({ ...
application-dev\ui\arkts-fixes-style-dialog.md
@Entry @Component struct DatePickerDialogExample { @State selectTime: Date = new Date('2023-12-25T08:30:00'); build() { Column() { Button('showDatePickerDialog') .margin(30) .onClick(() => { this.getUIContext().showDatePickerDialog({ start: new Date("2000-1-1"), ...
application-dev\ui\arkts-fixes-style-dialog.md
@Entry @Component struct DatePickerDialogExample { @State selectTime: Date = new Date('2023-12-25T08:30:00'); build() { Column() { Button('showDatePickerDialog') .margin(30) .onClick(() => { this.getUIContext().showDatePickerDialog({ start: new Date("2000-1-1"), ...
application-dev\ui\arkts-fixes-style-dialog.md
// xxx.ets @Entry @Component struct TimePickerDialogExample { @State selectTime: Date = new Date('2023-12-25T08:30:00'); build() { Column() { Button('showTimePickerDialog') .margin(30) .onClick(() => { this.getUIContext().showTimePickerDialog({ selected: this.select...
application-dev\ui\arkts-fixes-style-dialog.md
@Entry @Component struct TextPickerDialogExample { private fruits: TextCascadePickerRangeContent[] = [ { text: 'Liaoning Province', children: [{ text: 'Shenyang', children: [{ text: 'Shenhe District' }, { text: 'Heping District' }, { text: 'Hunnan District' }] }, { text: 'Dalian', children: [{...
application-dev\ui\arkts-fixes-style-dialog.md
@Entry @Component struct showActionSheetExample { build() { Column() { Button('showActionSheet') .margin(30) .onClick(() => { this.getUIContext().showActionSheet({ title: 'ActionSheet title', message: 'Message', autoCancel: false, wid...
application-dev\ui\arkts-fixes-style-dialog.md
@Entry @Component struct showAlertDialogExample { build() { Column() { Button('showAlertDialog') .margin(30) .onClick(() => { this.getUIContext().showAlertDialog( { title: 'Title', message: 'Text', autoCancel: true, ...
application-dev\ui\arkts-geometric-shape-drawing.md
Shape(value?: PixelMap)
application-dev\ui\arkts-geometric-shape-drawing.md
Shape() { Rect().width(300).height(50) }
application-dev\ui\arkts-geometric-shape-drawing.md
Circle(value?: { width?: string | number, height?: string | number })
application-dev\ui\arkts-geometric-shape-drawing.md
Circle({ width: 150, height: 150 })
application-dev\ui\arkts-geometric-shape-drawing.md
viewPort(value: { x?: number | string, y?: number | string, width?: number | string, height?: number | string })
application-dev\ui\arkts-geometric-shape-drawing.md
class tmp{ x:number = 0 y:number = 0 width:number = 75 height:number = 75 } let viep:tmp = new tmp() class tmp1{ x:number = 0 y:number = 0 width:number = 300 height:number = 300 } let viep1:tmp1 = new tmp1() // Draw a circle whose width and height are both 75. Text('Origi...
application-dev\ui\arkts-geometric-shape-drawing.md
class tmp{ x:number = 0 y:number = 0 width:number = 300 height:number = 300 } let viep:tmp = new tmp() Shape() { Rect().width("100%").height("100%").fill("#0097D4") Circle({ width: 150, height: 150 }).fill("#E87361") } .viewPort(viep) .width(300) .height(300) .background...
application-dev\ui\arkts-geometric-shape-drawing.md
class tmp{ x:number = -150 y:number = -150 width:number = 300 height:number = 300 } let viep:tmp = new tmp() Shape() { Rect().width("100%").height("100%").fill("#0097D4") Circle({ width: 150, height: 150 }).fill("#E87361") } .viewPort(viep) .width(300) .height(300) .back...
application-dev\ui\arkts-geometric-shape-drawing.md
Path() .width(100) .height(100) .commands('M150 0 L300 300 L0 300 Z') .fill("#E87361") .strokeWidth(0)
application-dev\ui\arkts-geometric-shape-drawing.md
Path() .width(100) .height(100) .fillOpacity(0) .commands('M150 0 L300 300 L0 300 Z') .stroke(Color.Red)
application-dev\ui\arkts-geometric-shape-drawing.md
Path() .width(100) .height(100) .fillOpacity(0) .commands('M150 0 L300 300 L0 300 Z') .stroke(Color.Red) .strokeWidth(10) .strokeOpacity(0.2)
application-dev\ui\arkts-geometric-shape-drawing.md
Polyline() .width(100) .height(100) .fillOpacity(0) .stroke(Color.Red) .strokeWidth(8) .points([[20, 0], [0, 100], [100, 90]]) // Set the join style of the stroke to Round. .strokeLineJoin(LineJoinStyle.Round)
application-dev\ui\arkts-geometric-shape-drawing.md
Polyline() .width(100) .height(100) .fillOpacity(0) .stroke(Color.Red) .strokeWidth(10) .points([[20, 0], [20, 100], [100, 100]]) // Set the join style of the stroke to Miter. .strokeLineJoin(LineJoinStyle.Miter) // Set the limit on the ratio of the miter length to the value of strok...
application-dev\ui\arkts-geometric-shape-drawing.md
// Enable anti-aliasing. Circle() .width(150) .height(200) .fillOpacity(0) .strokeWidth(5) .stroke(Color.Black)
application-dev\ui\arkts-geometric-shape-drawing.md
// Disable anti-aliasing. Circle() .width(150) .height(200) .fillOpacity(0) .strokeWidth(5) .stroke(Color.Black) .antiAlias(false)
application-dev\ui\arkts-geometric-shape-drawing.md
@Entry @Component struct ShapeExample { build() { Column({ space: 10 }) { Shape() { Path().width(200).height(60).commands('M0 0 L400 0 L400 150 Z') } .viewPort({ x: -80, y: -5, width: 500, height: 300 }) .fill(0x317AF7) .stroke(Color.Red) .strokeWi...
application-dev\ui\arkts-geometric-shape-drawing.md
@Entry @Component struct CircleExample { build() { Column({ space: 10 }) { // Draw a circle whose diameter is 150. Circle({ width: 150, height: 150 }) // Draw a ring with a diameter of 150 mm and a red dotted line. Circle() .width(150) .height(200) ...
application-dev\ui\arkts-gesture-events-binding.md
.gesture(gesture: GestureType, mask?: GestureMask)
application-dev\ui\arkts-gesture-events-binding.md
// xxx.ets @Entry @Component struct Index { build() { Column() { Text('Gesture').fontSize(28) // Use the gesture API to bind the tap gesture. .gesture( TapGesture() .onAction(() => { console.info('TapGesture is onAction'); })) } .height...
application-dev\ui\arkts-gesture-events-binding.md
.priorityGesture(gesture: GestureType, mask?: GestureMask)
application-dev\ui\arkts-gesture-events-binding.md
// xxx.ets @Entry @Component struct Index { build() { Column() { Text('Gesture').fontSize(28) .gesture( TapGesture() .onAction(() => { console.info('Text TapGesture is onAction'); })) } .height(200) .width(250) // When the tap gesture i...
application-dev\ui\arkts-gesture-events-binding.md
.parallelGesture(gesture: GestureType, mask?: GestureMask)
application-dev\ui\arkts-gesture-events-binding.md
// xxx.ets @Entry @Component struct Index { build() { Column() { Text('Gesture').fontSize(28) .gesture( TapGesture() .onAction(() => { console.info('Text TapGesture is onAction'); })) } .height(200) .width(250) // When parallelGesture i...
application-dev\ui\arkts-gesture-events-combined-gestures.md
GestureGroup(mode:GestureMode, gesture:GestureType[])
application-dev\ui\arkts-gesture-events-combined-gestures.md
// xxx.ets @Entry @Component struct Index { @State offsetX: number = 0; @State offsetY: number = 0; @State count: number = 0; @State positionX: number = 0; @State positionY: number = 0; @State borderStyles: BorderStyle = BorderStyle.Solid build() { Column() { Text('sequence gesture\n' + 'LongPr...
application-dev\ui\arkts-gesture-events-combined-gestures.md
// xxx.ets @Entry @Component struct Index { @State count1: number = 0; @State count2: number = 0; build() { Column() { Text('Parallel gesture\n' + 'tapGesture count is 1:' + this.count1 + '\ntapGesture count is 2:' + this.count2 + '\n') .fontSize(28) } .height(200) .width('100%') ...
application-dev\ui\arkts-gesture-events-combined-gestures.md
// xxx.ets @Entry @Component struct Index { @State count1: number = 0; @State count2: number = 0; build() { Column() { Text('Exclusive gesture\n' + 'tapGesture count is 1:' + this.count1 + '\ntapGesture count is 2:' + this.count2 + '\n') .fontSize(28) } .height(200) .width('100%') ...
application-dev\ui\arkts-gesture-events-gesture-judge.md
Image($r('sys.media.ohos_app_icon')) .draggable(true) .onDragStart(()=>{ promptAction.showToast({ message: ""Drag the lower blue area. The Image component responds." }); }) .width('200vp').height('200vp')
application-dev\ui\arkts-gesture-events-gesture-judge.md
Stack() {} .width('200vp') .height('200vp') .hitTestBehavior(HitTestMode.Transparent) .gesture(GestureGroup(GestureMode.Parallel, LongPressGesture() .onAction((event: GestureEvent) => { promptAction.showToast({ message: "Long-press the upper red area. The red area responds...
application-dev\ui\arkts-gesture-events-gesture-judge.md
.onGestureJudgeBegin((gestureInfo: GestureInfo, event: BaseGestureEvent) => { // If it is a long press gesture, determine whether the touch position is in the upper half area. if (gestureInfo.type == GestureControl.GestureType.LONG_PRESS_GESTURE) { if (event.fingerList.length > 0 && event.fingerList[0]...
application-dev\ui\arkts-gesture-events-gesture-judge.md
import { promptAction } from '@kit.ArkUI'; @Entry @Component struct Index { scroller: Scroller = new Scroller(); build() { Scroll(this.scroller) { Column({ space: 8 }) { Text("There are two layers of components, the upper layer component bound to a long press gestur...
application-dev\ui\arkts-gesture-events-gesture-judge.md
.shouldBuiltInRecognizerParallelWith((current: GestureRecognizer, others: Array<GestureRecognizer>) => { for (let i = 0; i < others.length; i++) { let target = others[i].getEventTargetInfo(); if (target.getId() == "inner" && others[i].isBuiltIn() && others[i].getType() == GestureControl.GestureType.P...
application-dev\ui\arkts-gesture-events-gesture-judge.md
.onGestureRecognizerJudgeBegin((event: BaseGestureEvent, current: GestureRecognizer, others: Array<GestureRecognizer>) => { // When gesture recognition is about to be successful, set the recognizer's enabled state based on the current component state. let target = current.getEventTargetInfo(); if (targ...
application-dev\ui\arkts-gesture-events-gesture-judge.md
.parallelGesture ( // Bind a PanGesture as a dynamic controller. PanGesture() .onActionUpdate((event: GestureEvent)=>{ if (this.childRecognizer.getState() != GestureRecognizerState.SUCCESSFUL || this.currentRecognizer.getState() != GestureRecognizerState.SUCCESSFUL) { // If neither recognizer is in...
application-dev\ui\arkts-gesture-events-gesture-judge.md
// xxx.ets @Entry @Component struct FatherControlChild { scroller: Scroller = new Scroller(); scroller2: Scroller = new Scroller(); private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; private childRecognizer: GestureRecognizer = new GestureRecognizer(); private currentRecognizer: G...
application-dev\ui\arkts-gesture-events-multi-level-gesture.md
ComponentA() { ComponentB().onTouch(() => {}) ComponentC().onTouch(() => {}) }.onTouch(() => {})
application-dev\ui\arkts-gesture-events-multi-level-gesture.md
Stack A() { ComponentB().onTouch(() => {}) ComponentC().onTouch(() => {}) }.onTouch(() => {})
application-dev\ui\arkts-gesture-events-multi-level-gesture.md
ComponentA() { ComponentB().gesture(TapGesture({count: 1})) }.gesture(TapGesture({count: 1}))
application-dev\ui\arkts-gesture-events-multi-level-gesture.md
ComponentA() .gesture( GestureGroup( GestureMode.Exclusive, TapGesture({count: 1}), PanGesture({distance: 5}) ) )
application-dev\ui\arkts-gesture-events-multi-level-gesture.md
ComponentA() { ComponentB() .onTouch(() => {}) .gesture(TapGesture({count: 1})) .responseRegion({Rect1, Rect2, Rect3}) } .onTouch(() => {}) .gesture(TapGesture({count: 1})) .responseRegion({Rect4})
application-dev\ui\arkts-gesture-events-multi-level-gesture.md
ComponentA() { ComponentB() .onTouch(() => {}) .gesture(TapGesture({count: 1})) ComponentC() { ComponentD() .onTouch(() => {}) .gesture(TapGesture({count: 1})) } .onTouch(() => {}) .gesture(TapGesture({count: 1})) .hitTestBehavior(HitTestMode.Block) } .onTouch(()...
application-dev\ui\arkts-gesture-events-multi-level-gesture.md
Stack A() { ComponentB() .onTouch(() => {}) .gesture(TapGesture({count: 1})) ComponentC() .onTouch(() => {}) .gesture(TapGesture({count: 1})) .hitTestBehavior(HitTestMode.Transparent) } .onTouch(() => {}) .gesture(TapGesture({count: 1}))
application-dev\ui\arkts-gesture-events-multi-level-gesture.md
ComponentA() { ComponentB() .onTouch(() => {}) .gesture(TapGesture({count: 1})) } .onTouch(() => {}) .gesture(TapGesture({count: 1})) .hitTestBehavior(HitTestMode.None)
application-dev\ui\arkts-gesture-events-multi-level-gesture.md
ComponentA() { ComponentB() .gesture(TapGesture({count: 1})) } .gesture(TapGesture({count: 1}))
application-dev\ui\arkts-gesture-events-multi-level-gesture.md
ComponentA() { ComponentB() .gesture(TapGesture({count: 1})) } .priorityGesture(TapGesture({count: 1}))
application-dev\ui\arkts-gesture-events-multi-level-gesture.md
ComponentA() { ComponentB() .gesture(TapGesture({count: 1})) } .parallelGesture(TapGesture({count: 1}))
application-dev\ui\arkts-gesture-events-single-gesture.md
TapGesture(value?:{count?:number, fingers?:number})
application-dev\ui\arkts-gesture-events-single-gesture.md
// xxx.ets @Entry @Component struct Index { @State value: string = ""; build() { Column() { Text('Click twice').fontSize(28) .gesture( // Bind a tap gesture whose count value is 2. TapGesture({ count: 2 }) .onAction((event: GestureEvent|un...
application-dev\ui\arkts-gesture-events-single-gesture.md
LongPressGesture(value?:{fingers?:number, repeat?:boolean, duration?:number})
application-dev\ui\arkts-gesture-events-single-gesture.md
// xxx.ets @Entry @Component struct Index { @State count: number = 0; build() { Column() { Text('LongPress OnAction:' + this.count).fontSize(28) .gesture( // Bind a long press gesture that can be triggered repeatedly. LongPressGesture({ repeat: true }) .onAction((ev...
application-dev\ui\arkts-gesture-events-single-gesture.md
PanGesture(value?:{ fingers?:number, direction?:PanDirection, distance?:number})
application-dev\ui\arkts-gesture-events-single-gesture.md
// xxx.ets @Entry @Component struct Index { @State offsetX: number = 0; @State offsetY: number = 0; @State positionX: number = 0; @State positionY: number = 0; build() { Column() { Text('PanGesture Offset:\nX: ' + this.offsetX + '\n' + 'Y: ' + this.offsetY) .fontSize(28) .height(200...
application-dev\ui\arkts-gesture-events-single-gesture.md
PinchGesture(value?:{fingers?:number, distance?:number})
application-dev\ui\arkts-gesture-events-single-gesture.md
// xxx.ets @Entry @Component struct Index { @State scaleValue: number = 1; @State pinchValue: number = 1; @State pinchX: number = 0; @State pinchY: number = 0; build() { Column() { Column() { Text('PinchGesture scale:\n' + this.scaleValue) Text('PinchGesture center:\n(' + this.pinch...
application-dev\ui\arkts-gesture-events-single-gesture.md
RotationGesture(value?:{fingers?:number, angle?:number})
application-dev\ui\arkts-gesture-events-single-gesture.md
// xxx.ets @Entry @Component struct Index { @State angle: number = 0; @State rotateValue: number = 0; build() { Column() { Text('RotationGesture angle:' + this.angle).fontSize(28) // Bind the rotation to the component so that it is rotated by changing the rotation angle. .rotate({ angle...
application-dev\ui\arkts-gesture-events-single-gesture.md
SwipeGesture(value?:{fingers?:number, direction?:SwipeDirection, speed?:number})
application-dev\ui\arkts-gesture-events-single-gesture.md
// xxx.ets @Entry @Component struct Index { @State rotateAngle: number = 0; @State speed: number = 1; build() { Column() { Column() { Text("SwipeGesture speed\n" + this.speed) Text("SwipeGesture angle\n" + this.rotateAngle) } .border({ width: 3 }) .width(300) .he...
application-dev\ui\arkts-global-interface.md
import { promptAction } from '@kit.ArkUI' @Entry @Component struct Index { build() { Row() { Button() .onClick(() => { promptAction.showToast({ message: 'Message Info', duration: 2000 }); }) } } }
application-dev\ui\arkts-global-interface.md
import { promptAction } from '@kit.ArkUI' @Entry @Component struct Index { build() { Row() { Button() .onClick(() => { bridge.callNative("xxxx", ()=> { promptAction.showToast({ message: 'Message Info', duration: 2000 }); ...
application-dev\ui\arkts-global-interface.md
@Entry @Component struct Index { build() { Row() { Button() .onClick(() => { let uiContext = this.getUIContext(); let prompt = uiContext.getPromptAction(); bridge.callNative("xxxx", ()=> { prompt.showToast({ message: 'Message Info',...
application-dev\ui\arkts-global-interface.md
// Execute the closure of the bound instance. import { promptAction } from '@kit.ArkUI' @Entry @Component struct Index { build() { Row() { Button() .onClick(() => { let uiContext = this.getUIContext(); uiContext.runScopedTask(() => { promptAction.showToast({ ...
application-dev\ui\arkts-graphics-display.md
Image(src: PixelMap | ResourceStr | DrawableDescriptor)
application-dev\ui\arkts-graphics-display.md
Image('images/view.jpg') .width(200)
application-dev\ui\arkts-graphics-display.md
Image('https://www.example.com/example.JPG') // Replace the URL with the actual URL.
application-dev\ui\arkts-graphics-display.md
import { photoAccessHelper } from '@kit.MediaLibraryKit'; import { BusinessError } from '@kit.BasicServicesKit'; @Entry @Component struct Index { @State imgDatas: string[] = []; // Obtain the image URL set. getAllImg() { try { let PhotoSelectOptions...
application-dev\ui\arkts-graphics-display.md
Image('file://media/Photos/5') .width(200)
application-dev\ui\arkts-graphics-display.md
@State image: PixelMap | undefined = undefined;
application-dev\ui\arkts-graphics-display.md
import { http } from '@kit.NetworkKit'; import { image } from '@kit.ImageKit'; import { BusinessError } from '@kit.BasicServicesKit';
application-dev\ui\arkts-graphics-display.md
let OutData: http.HttpResponse http.createHttp().request("https://www.example.com/xxx.png", (error: BusinessError, data: http.HttpResponse) => { if (error) { console.error(`http request failed with. Code: ${error.code}, message: ${error.message}`); } else { ...
application-dev\ui\arkts-graphics-display.md
let code: http.ResponseCode | number = OutData.responseCode if (http.ResponseCode.OK === code) { let imageData: ArrayBuffer = OutData.result as ArrayBuffer; let imageSource: image.ImageSource = image.createImageSource(imageData); class tmp { height: number = 100 ...
application-dev\ui\arkts-graphics-display.md
class htp{ httpRequest: Function | undefined = undefined set(){ if(this.httpRequest){ this.httpRequest() } } } Button("Get Online Image") .onClick(() => { let sethtp = new htp() sethtp.set() }) Image(this...
application-dev\ui\arkts-graphics-display.md
import { DrawableDescriptor, PixelMapDrawableDescriptor } from '@kit.ArkUI' class htp{ httpRequest: Function | undefined = undefined set(){ if(this.httpRequest){ this.httpRequest() } } } Button("Get Online Image") .onClick(() => { ...
application-dev\ui\arkts-graphics-display.md
Image($r('app.media.cloud')) .width(50) .fillColor(Color.Blue)
application-dev\ui\arkts-graphics-display.md
@Entry @Component struct MyComponent { scroller: Scroller = new Scroller() build() { Scroll(this.scroller) { Column() { Row() { Image($r('app.media.img_2')) .width(200) .height(150) .border({ width: 1 }) // The image is scaled with its a...
application-dev\ui\arkts-graphics-display.md
@Entry @Component struct Index { build() { Column() { Row() { Image($r('app.media.grass')) .width('40%') .interpolation(ImageInterpolation.None) .borderWidth(1) .overlay("Interpolation.None", { align: Alignment.Bottom, offset: { x: 0, y: 20 } }) .mar...
application-dev\ui\arkts-graphics-display.md
@Entry @Component struct MyComponent { build() { Column({ space: 10 }) { Row({ space: 5 }) { Image($r('app.media.ic_public_favor_filled_1')) .width(110) .height(115) .border({ width: 1 }) .objectRepeat(ImageRepeat.XY) .objectFit(ImageFit.ScaleDown) ...
application-dev\ui\arkts-graphics-display.md
@Entry @Component struct MyComponent { build() { Column({ space: 10 }) { Row({ space: 50 }) { Image($r('app.media.example')) // Set the rendering mode to Original. .renderMode(ImageRenderMode.Original) .width(100) .height(100) .border({ width: 1 }) ...
application-dev\ui\arkts-graphics-display.md
@Entry @Component struct Index { build() { Column() { Row({ space: 50 }) { Image($r('app.media.example')) .sourceSize({ width: 40, height: 40 }) .objectFit(ImageFit.ScaleDown) .aspectRatio(1) .width('25%') .border({ ...
application-dev\ui\arkts-graphics-display.md
@Entry @Component struct Index { build() { Column() { Row() { Image($r('app.media.example')) .width('40%') .margin(10) Image($r('app.media.example')) .width('40%') .colorFilter( [1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,...
application-dev\ui\arkts-graphics-display.md
Image($r('app.media.icon')) .syncLoad(true)
application-dev\ui\arkts-graphics-display.md
@Entry @Component struct MyComponent { @State widthValue: number = 0 @State heightValue: number = 0 @State componentWidth: number = 0 @State componentHeight: number = 0 build() { Column() { Row() { Image($r('app.media.ic_img_2')) .width(200) .height(150) .margi...
application-dev\ui\arkts-layout-development-arcswiper.md
import { ArcSwiper, ArcSwiperAttribute, ArcDotIndicator, ArcDirection, ArcSwiperController } from '@kit.ArkUI'
application-dev\ui\arkts-layout-development-arcswiper.md
ArcSwiper() { Text('0') .width(233) .height(233) .backgroundColor(Color.Gray) .textAlign(TextAlign.Center) .fontSize(30) Text('1') .width(233) .height(233) .backgroundColor(Color.Green) .textAlign(TextAlign.Center) .fontSize(30) Text('2') ....
application-dev\ui\arkts-layout-development-arcswiper.md
ArcSwiper() { // ... } .indicator( new ArcDotIndicator() .arcDirection(ArcDirection.SIX_CLOCK_DIRECTION) // Set the dots at the 6 o'clock direction. .itemColor (Color.Red) // Set the dot color to red. .selectedItemColor (Color.Blue) // Set the selected dot color to blue. )
application-dev\ui\arkts-layout-development-arcswiper.md
// Import the ArcButton and ArcSwiper modules. import { ArcButton, ArcButtonOptions, ArcButtonStatus, ArcButtonStyleMode, ArcButtonPosition, ArcSwiper, ArcSwiperAttribute, ArcDotIndicator, ArcDirection, ArcSwiperController } from '@kit.ArkUI'; @Entry @Component struct ...
application-dev\ui\arkts-layout-development-arcswiper.md
ArcSwiper() { // ... } .focusable(true) .focusOnTouch(true) .defaultFocus(true)
application-dev\ui\arkts-layout-development-arcswiper.md
ArcSwiper() { // ... } .digitalCrownSensitivity(CrownSensitivity.MEDIUM)
application-dev\ui\arkts-layout-development-arcswiper.md
ArcSwiper() { // ... } .indicator(true) .vertical(false)
application-dev\ui\arkts-layout-development-arcswiper.md
ArcSwiper() { // ... } .indicator(new ArcDotIndicator() .arcDirection(ArcDirection.THREE_CLOCK_DIRECTION)) .vertical(true)
application-dev\ui\arkts-layout-development-arcswiper.md
import { Decimal } from '@kit.ArkTS' @Entry @Component struct SwiperCustomAnimationExample { private MIN_SCALE: number = 0.1 @State backgroundColors: Color[] = [Color.Green, Color.Blue, Color.Yellow, Color.Pink, Color.Gray, Color.Orange] @State opacityList: number[] = [] @State scaleList: number[] = [] abou...
application-dev\ui\arkts-layout-development-arcswiper.md
@Entry @Component struct SwiperCustomAnimationExample { @State backgroundColors: Color[] = [Color.Green, Color.Blue, Color.Yellow, Color.Pink, Color.Gray, Color.Orange] innerSelectedIndex: number = 0 build() { Column() { ArcSwiper() { ForEach(this.backgroundColors, (backgroundColor: Color, inde...
application-dev\ui\arkts-layout-development-create-arclist.md
ArcList() { ArcListItem() { // ... } ArcListItem() { // ... } // ... }