The interface previewed by Android Studio is not exactly equal to the actual interface . The difference comes from the reproduction deviation of the actual interface effect by AS. AS is only the approximate effect drawn based on the xml you wrote.
The difference generally lies in the following two aspects: 1. There is a slight deviation between the preview effect of AS and the actual implementation of the API, and it does not even support some API features. 2. There is a difference between the preview and the actual DPI. If a large number of absolute positioning methods are used for layout, the probability of deviation will be greater.
For more specific situations, it is recommended to directly upload the code to locate the problem.
This is very likely to be different. On the simulator, px pixels can be displayed normally, but on the real machine, the layout may become unrecognizable and ugly. On the real machine, you must use dip to allow the system to automatically recognize it to achieve the desired effect. as cannot simulate the environment of a real mobile phone. At most, it can only provide some basic functions and standard interfaces, so it is best to do real-device debugging. . .
AndroidStudio layout can be browsed through the interface preview of all models. Please refer to the tool tool for filling in many layout items such as ListView, which can more clearly ensure the correctness.
Secondly, consider using the network cloud platform testing tool to review the UI, which can use many real prototypes.
Finally, there are thousands of Android models, with various resolutions and dp differences and even bugs. There are also several attributes that have different performances on different Android versions or some models. The questioner needs to have enough experience. Testing and reasonable feedback mechanism to balance various problems caused by different models.
The interface previewed by Android Studio is not exactly equal to the actual interface . The difference comes from the reproduction deviation of the actual interface effect by AS. AS is only the approximate effect drawn based on the xml you wrote.
The difference generally lies in the following two aspects:
1. There is a slight deviation between the preview effect of AS and the actual implementation of the API, and it does not even support some API features.
2. There is a difference between the preview and the actual DPI. If a large number of absolute positioning methods are used for layout, the probability of deviation will be greater.
For more specific situations, it is recommended to directly upload the code to locate the problem.
Android interface design should focus on adaptability, different mobile phones have different dpi
This is very likely to be different. On the simulator, px pixels can be displayed normally, but on the real machine, the layout may become unrecognizable and ugly. On the real machine, you must use dip to allow the system to automatically recognize it to achieve the desired effect. as cannot simulate the environment of a real mobile phone. At most, it can only provide some basic functions and standard interfaces, so it is best to do real-device debugging. . .
AndroidStudio layout can be browsed through the interface preview of all models. Please refer to the tool tool for filling in many layout items such as ListView, which can more clearly ensure the correctness.
Secondly, consider using the network cloud platform testing tool to review the UI, which can use many real prototypes.
Finally, there are thousands of Android models, with various resolutions and dp differences and even bugs. There are also several attributes that have different performances on different Android versions or some models. The questioner needs to have enough experience. Testing and reasonable feedback mechanism to balance various problems caused by different models.