Can anyone tell px:fp ratio or code to convert fp to px.
I am building a HarmonyOS application and I want to set the width of a component to 20fp but setWidth(int width)
takes width in px.
Button button = new Button(getContext());
button.setWidth(width);