2

In android studio while creating a layout,we can select Qualifiers like for different screen size devices we select Ratio for large screen,small screen,etc., and according to screen size, android will take care of it to use these layouts.

Now, my question is, can we make layout according to country. Means if the screen is opened in different countries,it looks different. Can we do like this while making a layout ?

Any help will be preferable..

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Ranjan
  • 1,326
  • 18
  • 38
  • unfortunately, there are no resource modifiers for *country*, but maybe you can achieve what you are looking for with *locale* modifiers. They look like `en-rUS`, where `en` is a language - English, `rUS` is a country, where the language is used. – Vladyslav Matviienko Jan 19 '17 at 09:30

1 Answers1

1

add a "layout-de" folder in your res directory for a german layout. For more information, have a look at this: https://developer.android.com/guide/topics/resources/localization.html

Prexx
  • 2,959
  • 5
  • 31
  • 48
  • that is not a solution since german language is used not only in Germany, and not every country has it's own language. For example how to localize Britain, USA, Australia, Canada, etc. the way you suggested? – Vladyslav Matviienko Jan 19 '17 at 09:31
  • Well, you're right. If the layout should change depending on the CURRENT users country, it should only be possible with a network / GPS search first and load the depending layout resource afterwards. My solution is depending on the device system language. – Prexx Jan 19 '17 at 09:35