Created
March 22, 2014 09:43
-
-
Save bradley-curran/9703871 to your computer and use it in GitHub Desktop.
How to ram the contents of an adapter into a linear layout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Needless to say, don't use this with an adapter with a lot of items. | |
// Use a list view instead | |
public static void ram(ViewGroup parent, BaseAdapter adapter) { | |
for (int i = 0; i < adapter.getCount(); i++) { | |
View view = adapter.getView(i, null, parent); | |
parent.addView(view); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment