Fixed Downloading of items, and two-plane layout for large devices
Signed-off-by: Ricky Barrette <rickbarrette@gmail.com>
This commit is contained in:
@@ -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()));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user