-2

i am suffering from last few days but i am not getting any perfect answer for that android developer website i

and apart from that i am also study lot of website but most of the website say's use dimen and used it for small normal large and x-large but it is not giving me the perfect solution because most of the device which i am testing they all target normal dime such like that device start from 3.7 to 5 inch and because of that my card get moved up according to device i want the perfect appearance on each device there is a image attached to it t is basically card view

actually i want the perfect apperance on each device i found one method which is work fine to make a dimens xml according to the dimension of screen but it is not reliable i have to make more then 25 xml and if another device will come i have to make for these also this is image Url t is basically card view

Android
  • 535
  • 5
  • 16
  • what are you trying to ask ? – Coas Mckey Nov 26 '15 at 10:59
  • @CoasMckey actually please look my image i want the perfect appearance for all normal device buy my card it move up within the normal device range start from 9.7-5 they all target the normal dimens.xml and because of that appearance is not good i am using hard code height of card accroding to device to device – user3251696 Nov 26 '15 at 11:29
  • Are you asking for a complete android layout tutorial? PS: Use LinearLayout – Harikrishnan Nov 26 '15 at 12:39
  • No i am just asking that it is any way to make the compatibility for all those device using screen size or anything else i cant do that because card view is moving around the activity and if i use linear layout instead of frame layout then when i scroll the card it will scroll blow the two button not above the button – user3251696 Nov 26 '15 at 12:52
  • in simple how to make the device compatible for all device when multiple device screen target the normal dimens.xml – user3251696 Nov 26 '15 at 12:55
  • @user3251696 you need to make the one xml file and give margins according to screen size in different values folder , You need to make the folder according to screen sizes – Coas Mckey Nov 26 '15 at 13:53
  • Let me post the answer – Coas Mckey Nov 26 '15 at 13:54

1 Answers1

0

If you want to support all devices then I think under my opinion You need make a check up on several points. These points are given below:

  1. first you should make it sure that you are using right sizes in all drawable bucket. I am saying this because I think You are looking it perfect in some device but not looking good in other devices.
  2. Do not make multiple xmls it is deprecated.
  3. TO give margins for all devices you need to make different values folder or Dimens folder for different devices.
  4. This is new way of supporting multiple devices , multiple xml is deprecated.

Here I am posting 2 links , this and this , check them out. I think that this is good for you to learn , just give it a try. And Up vote if this helps.

Community
  • 1
  • 1
Coas Mckey
  • 701
  • 1
  • 13
  • 39