A
A
Andrey Zhidenko2016-02-19 19:19:14
Android
Andrey Zhidenko, 2016-02-19 19:19:14

How to make ImageView scalable based on screen dimensions?

I have a RelativeLayout with a View object inside which I have placed an ImageView(lignParentRight and lignParentBottom). Tell me how to make a scalable ImageView so that on a tablet the general appearance and location is like in the first image.
54a32c2019cf488a8ccbf0b56d762294.jpg
Here's what happens when you test on a tablet
ebbab7b2f0a64c85860f52d62401671b.jpg

Answer the question

In order to leave comments, you need to log in

3 answer(s)
L
lomikman, 2016-02-20
@lomikman

there is a special library from google that allows you to set sizes in percentages
www.androidauthority.com/using-the-android-percent...
inthecheesefactory.com/blog/know-percent-support-l...

I
IceJOKER, 2016-02-19
@IceJOKER

  • Set size in dp
  • Different layout for smart and tablet

D
Dekker8, 2016-02-20
@Dekker8

You can programmatically set the size of the image, count the percentage of the current screen size on which the application is running and set the resulting sizes in your ImageView

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question