applibgroup / HarmonyOS-Knowledgebase

This repository contains code samples of HarmonyOS Training
Apache License 2.0
17 stars 6 forks source link

What is the alternative in Harmony OS for shadow in TextView (Android)? #24

Open SubhamKarmakar24 opened 3 years ago

SubhamKarmakar24 commented 3 years ago

Describe the query

I am writing a custom component that displays text on the screen using JAVA SDK. I want to set a shadow on the text that this component renders like setting shadowRadius, shadowColor, shadowDx, shadowDy and also get these values that have been set.

In Android, we have setShadowLayer(float, float, float, int), [getShadowColor()](https://developer.android.com/reference/android/widget/TextView#getShadowColor()), [getShadowDx()](https://developer.android.com/reference/android/widget/TextView#getShadowDx()), [getShadowDy()](https://developer.android.com/reference/android/widget/TextView#getShadowDy()) and [getShadowRadius()](https://developer.android.com/reference/android/widget/TextView#getShadowRadius()) method in TextView which does that for us.

What is the alternative for the above in Harmony OS?

Create the query with harmonyos tag in stackoverflow and share the link here:

https://stackoverflow.com/questions/68569973/what-is-the-alternative-in-harmony-os-for-shadow-in-textview-android

Additional information

Developer Platform: Windows DevEco Studio version: 2.1.0.303 SDK API version: 5 SDK version: 2.1.1.21 Device: Not Required Device OS version: Not Required

Regards, Subham

kanaksony commented 3 years ago

@sharathks84 Can you please confirm if this is supported or the team is working on it?

sharathks84 commented 3 years ago

as of today TextShaders are not present. I will get more info on this soon.