Closed chiragbhatt3 closed 3 years ago
I am working on a HarmonyOS library where I have to inflate a layout with a given layout resource id: int layoutRes and context: Context context.
In android, the same thing is done using
LayoutInflater.from(context).inflate(layoutRes, this, true);
What is the alternative for HarmonyOS?
https://stackoverflow.com/questions/68575080/how-to-inflate-a-layout-in-harmonyos-with-given-context-and-layout-resource-id
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, Chirag
LayoutScatter.getInstance(context).parse(layoutRes, this, true);
Query description
I am working on a HarmonyOS library where I have to inflate a layout with a given layout resource id: int layoutRes and context: Context context.
In android, the same thing is done using
LayoutInflater.from(context).inflate(layoutRes, this, true);
What is the alternative for HarmonyOS?
Stackoverflow link :
https://stackoverflow.com/questions/68575080/how-to-inflate-a-layout-in-harmonyos-with-given-context-and-layout-resource-id
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, Chirag