I have created a custom dialog which is inflating a layout file in which I can add the components according to my need. I was wondering if I can also customize the dialog title. Like, I want to add some images along with the title. How can I do that?
Asked
Active
Viewed 38 times
1

zhangxaochen
- 32,744
- 15
- 77
- 108

anshulgoel72
- 61
- 1
-
hi, may i ask what kind of Dialog do you use? And what effect would you like to set the custom dialog title? You may can post your code and the custom dialog box title effect diagram to help us locate and analyze the problem. – zhangxaochen Aug 02 '21 at 08:52
1 Answers
0
If you are using the CommonDialog in HarmonyOS for customization of the dialog, Harmony OS provides an API where you can pass the custom layout for the title component i.e :
setTitleCustomComponent​(DirectionalLayout component)
You may check this documentation for additional information

Samuel
- 36
- 3