diff --git a/app/build.gradle b/app/build.gradle
index bf05958f030710cc77762ca8c9d41e194c66fbc6..fdfed3216ec2e4b2ab17864ec33621097d7193a9 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,7 +1,7 @@
apply plugin: 'com.huawei.ohos.hap'
apply plugin: 'com.huawei.ohos.decctest'
ohos {
- compileSdkVersion 6
+ compileSdkVersion 5
defaultConfig {
compatibleSdkVersion 5
}
diff --git a/app/src/main/java/com/example/rwidgethelper/component/ShadowAbilty.java b/app/src/main/java/com/example/rwidgethelper/component/ShadowAbilty.java
index 878720249f952a21249acc160a2a96920b83d8b8..e474a873fc102b0145991ed2f76f9b5b2b727c8a 100644
--- a/app/src/main/java/com/example/rwidgethelper/component/ShadowAbilty.java
+++ b/app/src/main/java/com/example/rwidgethelper/component/ShadowAbilty.java
@@ -3,9 +3,11 @@ package com.example.rwidgethelper.component;
import com.example.rwidgethelper.ResourceTable;
import com.ruffian.library.widget.component.RDependentLayout;
import com.ruffian.library.widget.component.RDirectionLayout;
+import com.ruffian.library.widget.component.RText;
import com.ruffian.library.widget.utils.ShadowDrawable;
import ohos.aafwk.ability.Ability;
import ohos.aafwk.content.Intent;
+import ohos.agp.components.DirectionalLayout;
import ohos.agp.utils.Color;
import ohos.agp.window.service.DisplayManager;
@@ -20,6 +22,9 @@ public class ShadowAbilty extends Ability {
RDirectionLayout mRDirectionLayout = (RDirectionLayout) findComponentById(ResourceTable.Id_linear_shadow);
ShadowDrawable.setShadowDrawable(mRDirectionLayout, Color.getIntColor("#ffffff"), dpToPx(8),
Color.getIntColor("#DF23DF"), dpToPx(10), 15, 15);
+ DirectionalLayout rText = (DirectionalLayout) findComponentById(ResourceTable.Id_text_directional);
+ ShadowDrawable.setShadowDrawable(rText, Color.getIntColor("#ffffff"), dpToPx(6),
+ Color.getIntColor("#666666"), dpToPx(10), 15, 15);
}
private int dpToPx(int dp) {
diff --git a/app/src/main/resources/base/layout/ability_shadow_abilty.xml b/app/src/main/resources/base/layout/ability_shadow_abilty.xml
index e8b77b5dbf34f1041c3bb197acedee55ec7a87a4..248875bc834fcb1ed8fd777f5a7053ffac4a47e7 100644
--- a/app/src/main/resources/base/layout/ability_shadow_abilty.xml
+++ b/app/src/main/resources/base/layout/ability_shadow_abilty.xml
@@ -41,21 +41,30 @@
/>
-
+ ohos:margin="15vp">
+
+