Как иметь одинаковое пустое пространство вокруг представления в Android для разных устройствAndroid

Форум для тех, кто программирует под Android
Ответить
Гость
 Как иметь одинаковое пустое пространство вокруг представления в Android для разных устройств

Сообщение Гость »


I have the following seek bar in Android XML:
The problem is, that there is always white space around the view. Strangely this white space has different ratios depending on the used screen. You can see on the screenshot, that the aspect ratio for tablets is smaller compared to phones. This has fundamental negative impacts on the disgn of the UI because when using the constraint layout, the constraint will lead to different visual results depending on the used screen. This results in a layout that is not usable for multiple devices. Thus, I would like to know if there is a method to either remove the white space around a view or to at least have a white space whose aspect ratios are the same when having different screen sizes.


Изображение


Update: Here is the custom drawable seek_bar_ruler_rate.xml:
and here is the custom drawable seek_bar_slider_beer.xml:

Источник: https://stackoverflow.com/questions/781 ... nt-devices
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Android»