Method 1: For using circularfillableloaders module in sample app,add the below dependency to generate hap/har. Modify entry/build.gradle as below:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
testCompile'junit:junit:4.12'
compile project(path: ':circularfillableloaders')
}
Method 2: For using circularfillableloaders in separate application using har file, generate .har package through library and add the har file to the entry/libs folder. Modify entry/build.gradle as below :
implementation fileTree (dir: 'libs', include: ['*.jar', '*.har'])
Method 3: For using circularfillableloaders in separate application using maven dependency,modify entry/build.gradle as below :
dependencies {
implementation 'io.openharmony.tpc.thirdlib:CircularFillableLoaders:1.0.2'
}
1) Add the component to your layout XML.
<com.mikhaellopez.circularfillableloaders.CircularFillableLoaders
ohos:id="$+id:cfl"
ohos:height="match_content"
ohos:width="match_content"
app:cfl_img="$media:logo"
app:cfl_progress="80"
app:cfl_wave_color="#ff3f51b5"
/>
2) CircularFillableloader component usage in java is as below
circularFillableLoaders.setProgress(progress);
circularFillableLoaders.setBorderWidth(borderWidth);
circularFillableLoaders.setAmplitudeRatio(amplitude);
circularFillableLoaders.setColor(color);
circularFillableLoaders.setPixelMap(ResourceTable.Media_logo)
circularFillableLoaders.setPixelMap(PixelMap)
public void setPixelMap(PixelMap pixelMap)
public void setPixelMap(int resId)
public void setPixelMap(Element element)
public void setColor(int color)
public void setBorderWidth(float width)
public void setAmplitudeRatio(float amplitudeRatio)
public void setProgress(int progress)
public void setProgress(int progress, int milliseconds)
name | format | description |
---|---|---|
cfl_img | element | set image icon default null |
cfl_wave_color | color | set wave color default BALCK |
cfl_wave_amplitude | float | set wave amplitude default 0.05f |
cfl_progress | int | set progress default 0 |
cfl_border | boolean | need border default ture |
cfl_border_width | dimension | set border width |
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )