I have problem in Layouts.I am designing app for phone and tablet.In phone I have to use list view and in tablet I have to use grid view. So please give me solution for this.
Asked
Active
Viewed 61 times
-4
-
possible duplicate of [Android Layout for Different Resolutions](http://stackoverflow.com/questions/12580130/android-layout-for-different-resolutions) – Pratik Butani Jan 07 '15 at 11:43
-
Please, that's the second post I see from you, and in both, you asked for a solution, it not good way manner.... Try to explain what you do, post your code, explain where you what you want, or wich errors you had... don't just say.."I have a problem, solve it" – Shudy Jan 08 '15 at 13:01
2 Answers
1
I recommend you to use fragments: http://developer.android.com/training/basics/fragments/index.html
Also, to achieve what you want you should put different layouts in different layout folders like layout-600dp, etc..
For more information please read: http://developer.android.com/guide/practices/screens_support.html

Amedeo Baragiola
- 314
- 4
- 14
-
requirement is that in phone my phone size is small that's why i use list view in phone and in tablet size is large that's why i use grid view in tablet. please give me solution. – Android Code Solution Jan 07 '15 at 13:25
-
0
Just use different layouts with the same ids in every layout Use list view in one layout and grid view in other and on the basis of their ids use their onclick in your java class.

Hanish Sharma
- 869
- 8
- 23