diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2015-09-23 01:02:26 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2015-09-23 01:02:26 +0900 |
commit | b850a97e7b19df6c11c6d45984c79c3070cb606c (patch) | |
tree | e10d639d0850619c97218f58b37c4c5ab7f07044 /app/src/main/java/net/lacolaco/smileessence/view/CustomListFragment.java | |
parent | be8fa9c1b0a732659c4501178f651708c6f6dd4a (diff) | |
download | SmileEssence-b850a97e7b19df6c11c6d45984c79c3070cb606c.tar.gz |
Account#getUser() が null を返さないように。とりあえずデータベース上にある screenName を利用する
Diffstat (limited to 'app/src/main/java/net/lacolaco/smileessence/view/CustomListFragment.java')
-rw-r--r-- | app/src/main/java/net/lacolaco/smileessence/view/CustomListFragment.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/CustomListFragment.java b/app/src/main/java/net/lacolaco/smileessence/view/CustomListFragment.java index 4cdd7d3f..a5074c6a 100644 --- a/app/src/main/java/net/lacolaco/smileessence/view/CustomListFragment.java +++ b/app/src/main/java/net/lacolaco/smileessence/view/CustomListFragment.java @@ -92,8 +92,7 @@ public abstract class CustomListFragment<T extends CustomListAdapter> extends Pa public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View page = inflater.inflate(R.layout.fragment_list, container, false); PullToRefreshListView listView = getListView(page); - T adapter = getAdapter(); - listView.setAdapter(adapter); + listView.setAdapter(getAdapter()); listView.setOnScrollListener(this); listView.setOnRefreshListener(this); listView.setMode(getRefreshMode()); @@ -108,14 +107,13 @@ public abstract class CustomListFragment<T extends CustomListAdapter> extends Pa @Override public void onViewStateRestored(Bundle savedInstanceState) { super.onViewStateRestored(savedInstanceState); - if (savedInstanceState != null) { - } } protected PullToRefreshListView getListView(View page) { return (PullToRefreshListView) page.findViewById(R.id.fragment_list_listview); } + // must be called in UI thread protected void updateListViewWithNotice(AbsListView absListView, boolean addedToTop) { T adapter = getAdapter(); int before = adapter.getCount(); |