Fixed Downloading of items, and two-plane layout for large devices

Signed-off-by: Ricky Barrette <rickbarrette@gmail.com>
This commit is contained in:
2012-08-30 11:31:34 -04:00
parent 35bd7d729e
commit 1b5b54d5d9
4 changed files with 18 additions and 13 deletions

View File

@@ -65,18 +65,21 @@ public class ForumListFragment extends ListFragment {
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
new Thread(new Runnable() {
@Override
public void run() {
ForumContent.getForum(getActivity());
getActivity().runOnUiThread(new Runnable(){
@Override
public void run(){
setListAdapter(new ForumAdapter(getActivity()));
}
});
}
}).start();
if(ForumContent.ITEMS.size() == 0)
new Thread(new Runnable() {
@Override
public void run() {
ForumContent.getForum(getActivity());
getActivity().runOnUiThread(new Runnable(){
@Override
public void run(){
setListAdapter(new ForumAdapter(getActivity()));
}
});
}
}).start();
else
setListAdapter(new ForumAdapter(getActivity()));
}