aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/java/net/lacolaco/smileessence/view/adapter
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2017-10-04 21:10:58 +0900
committerKazuki Yamaguchi <k@rhe.jp>2017-10-04 22:00:52 +0900
commit986fa8cd8bdf6110d2aa390a9dcafc4ff19ee6dd (patch)
treee92964cc05dc18021011fbed2f8f249b7f3ed5b6 /app/src/main/java/net/lacolaco/smileessence/view/adapter
parentb471085c2b2d6229bb6fb54a6d444802147a7392 (diff)
downloadSmileEssence-986fa8cd8bdf6110d2aa390a9dcafc4ff19ee6dd.tar.gz
worldify (wip)2017-10-04
Diffstat (limited to 'app/src/main/java/net/lacolaco/smileessence/view/adapter')
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/adapter/CustomListAdapter.java36
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/adapter/EventListAdapter.java89
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/adapter/MessageListAdapter.java23
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/adapter/OrderedCustomListAdapter.java66
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/adapter/SearchListAdapter.java65
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/adapter/StatusListAdapter.java71
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/adapter/TimelineAdapter.java39
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/adapter/UnorderedCustomListAdapter.java88
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/adapter/UserListListAdapter.java50
9 files changed, 153 insertions, 374 deletions
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/adapter/CustomListAdapter.java b/app/src/main/java/net/lacolaco/smileessence/view/adapter/CustomListAdapter.java
index 802a0dd3..6d7420fb 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/adapter/CustomListAdapter.java
+++ b/app/src/main/java/net/lacolaco/smileessence/view/adapter/CustomListAdapter.java
@@ -1,37 +1,20 @@
package net.lacolaco.smileessence.view.adapter;
-import android.app.Activity;
-import android.view.View;
-import android.view.ViewGroup;
import android.widget.BaseAdapter;
import net.lacolaco.smileessence.util.UIHandler;
-import net.lacolaco.smileessence.viewmodel.IViewModel;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
-public abstract class CustomListAdapter<T extends IViewModel> extends BaseAdapter {
-
- // ------------------------------ FIELDS ------------------------------
-
- protected boolean isNotifiable = true;
+public abstract class CustomListAdapter<T> extends BaseAdapter {
+ private boolean isNotifiable = true;
private List<T> frozenList = new ArrayList<>();
- private Activity activity;
-
- // --------------------------- CONSTRUCTORS ---------------------------
-
- CustomListAdapter(Activity activity) {
- this.activity = activity;
- }
-
- // --------------------- GETTER / SETTER METHODS ---------------------
public final void setNotifiable(boolean notifiable) {
isNotifiable = notifiable;
}
- // --------------------- Interface BaseAdapter ---------------------
-
@Override
public final int getCount() {
return frozenList.size();
@@ -48,21 +31,12 @@ public abstract class CustomListAdapter<T extends IViewModel> extends BaseAdapte
}
@Override
- public final View getView(int position, View convertView, ViewGroup parent) {
- return getItem(position).getView(activity, activity.getLayoutInflater(), convertView);
- }
-
- // ------------------------ OVERRIDE METHODS ------------------------
-
- @Override
public final void notifyDataSetChanged() {
- frozenList = getFrozenList();
+ frozenList = Collections.unmodifiableList(getList());
super.notifyDataSetChanged();
}
- // -------------------------- OTHER METHODS --------------------------
-
- protected abstract List<T> getFrozenList();
+ protected abstract List<T> getList();
public void update() {
if (isNotifiable) {
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/adapter/EventListAdapter.java b/app/src/main/java/net/lacolaco/smileessence/view/adapter/EventListAdapter.java
index 18741e02..2ce0386d 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/adapter/EventListAdapter.java
+++ b/app/src/main/java/net/lacolaco/smileessence/view/adapter/EventListAdapter.java
@@ -25,13 +25,92 @@
package net.lacolaco.smileessence.view.adapter;
import android.app.Activity;
-import net.lacolaco.smileessence.viewmodel.EventViewModel;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+import com.android.volley.toolbox.NetworkImageView;
+import net.lacolaco.smileessence.R;
+import net.lacolaco.smileessence.World;
+import net.lacolaco.smileessence.data.ImageCache;
+import net.lacolaco.smileessence.entity.Event;
+import net.lacolaco.smileessence.entity.RBinding;
+import net.lacolaco.smileessence.preference.UserPreferenceHelper;
+import net.lacolaco.smileessence.util.StringUtils;
+import net.lacolaco.smileessence.util.UIObserverBundle;
+import net.lacolaco.smileessence.view.DialogHelper;
+import net.lacolaco.smileessence.view.dialog.UserDetailDialogFragment;
+import net.lacolaco.smileessence.view.listener.ListItemClickListener;
-public class EventListAdapter extends UnorderedCustomListAdapter<EventViewModel> {
+import java.lang.ref.WeakReference;
+import java.util.List;
- // --------------------------- CONSTRUCTORS ---------------------------
+public class EventListAdapter extends CustomListAdapter<Event> {
+ private final World world;
+ private final Activity activity;
- public EventListAdapter(Activity activity) {
- super(activity);
+ public EventListAdapter(World world, Activity activity) {
+ super();
+ this.world = world;
+ this.activity = activity;
+ }
+
+ @Override
+ protected List<Event> getList() {
+ return world.getEvents();
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ Event event = getItem(position);
+ if (convertView == null) {
+ convertView = activity.getLayoutInflater().inflate(R.layout.list_item_status, null);
+ }
+ UIObserverBundle bundle = (UIObserverBundle) convertView.getTag();
+ if (bundle != null) {
+ bundle.detachAll();
+ } else {
+ bundle = new UIObserverBundle();
+ convertView.setTag(bundle);
+ }
+
+ int textSize = UserPreferenceHelper.getInstance().getTextSize();
+
+ TextView header = (TextView) convertView.findViewById(R.id.textview_status_header);
+ header.setTextSize(textSize);
+
+ updateViewUser(event, convertView);
+
+ TextView content = (TextView) convertView.findViewById(R.id.textview_status_text);
+ content.setTextSize(textSize);
+ content.setText(event.getTargetObject() != null ? event.getTargetObject().getText() : "");
+ TextView footer = (TextView) convertView.findViewById(R.id.textview_status_footer);
+ footer.setTextSize(textSize - 2);
+ footer.setText(StringUtils.dateToString(event.getCreatedAt()));
+ ImageView favorited = (ImageView) convertView.findViewById(R.id.imageview_status_favorited);
+ favorited.setVisibility(View.GONE);
+ convertView.setOnClickListener(new ListItemClickListener(activity, () -> {
+ UserDetailDialogFragment fragment = new UserDetailDialogFragment();
+ fragment.setUserID(event.getSource().getId());
+ DialogHelper.showDialog(activity, fragment);
+ }));
+
+ final WeakReference<View> weakView = new WeakReference<>(convertView);
+ bundle.attach(event.getSource(), changes -> {
+ View strongView = weakView.get();
+ if (strongView != null && changes.contains(RBinding.BASIC))
+ updateViewUser(event, strongView);
+ });
+
+ return convertView;
+ }
+
+ private void updateViewUser(Event event, View convertedView) {
+ NetworkImageView icon = (NetworkImageView) convertedView.findViewById(R.id.imageview_status_icon);
+ String iconUrl = event.getSource().getProfileImageUrlOriginal();
+ ImageCache.getInstance().setImageToView(iconUrl, icon);
+
+ TextView header = (TextView) convertedView.findViewById(R.id.textview_status_header);
+ header.setText(event.getFormattedString());
}
}
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/adapter/MessageListAdapter.java b/app/src/main/java/net/lacolaco/smileessence/view/adapter/MessageListAdapter.java
index 114f9e58..c2a53df9 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/adapter/MessageListAdapter.java
+++ b/app/src/main/java/net/lacolaco/smileessence/view/adapter/MessageListAdapter.java
@@ -25,23 +25,28 @@
package net.lacolaco.smileessence.view.adapter;
import android.app.Activity;
-import net.lacolaco.smileessence.viewmodel.MessageViewModel;
+import android.view.View;
+import android.view.ViewGroup;
+import net.lacolaco.smileessence.entity.DirectMessage;
+import net.lacolaco.smileessence.view.Partials;
-public class MessageListAdapter extends OrderedCustomListAdapter<MessageViewModel> {
-
- // --------------------------- CONSTRUCTORS ---------------------------
+public class MessageListAdapter extends OrderedCustomListAdapter<DirectMessage> {
+ private final Activity activity;
public MessageListAdapter(Activity activity) {
- super(activity);
+ this.activity = activity;
}
- // --------------------- GETTER / SETTER METHODS ---------------------
-
public long getLastID() {
- return getItem(getCount() - 1).getDirectMessage().getId();
+ return getItem(getCount() - 1).getId();
}
public long getTopID() {
- return getItem(0).getDirectMessage().getId();
+ return getItem(0).getId();
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ return Partials.getDirectMessageView(getItem(position), activity, convertView);
}
}
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/adapter/OrderedCustomListAdapter.java b/app/src/main/java/net/lacolaco/smileessence/view/adapter/OrderedCustomListAdapter.java
index 43d04b2e..3de58658 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/adapter/OrderedCustomListAdapter.java
+++ b/app/src/main/java/net/lacolaco/smileessence/view/adapter/OrderedCustomListAdapter.java
@@ -1,66 +1,31 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view.adapter;
-import android.app.Activity;
import net.lacolaco.smileessence.entity.IdObject;
-import net.lacolaco.smileessence.viewmodel.IViewModel;
import java.util.*;
-public class OrderedCustomListAdapter<T extends IViewModel & IdObject> extends CustomListAdapter<T> {
-
- // ------------------------------ FIELDS ------------------------------
-
+public abstract class OrderedCustomListAdapter<T extends IdObject> extends CustomListAdapter<T> {
private final Map<Long, T> treeMap;
- // --------------------------- CONSTRUCTORS ---------------------------
-
- public OrderedCustomListAdapter(Activity activity) {
- this(activity, Long::compare);
+ public OrderedCustomListAdapter() {
+ this(Long::compare);
}
- public OrderedCustomListAdapter(Activity activity, Comparator<Long> comparator) {
- super(activity);
- this.treeMap = new TreeMap<>(Collections.reverseOrder(comparator)); // 降順
+ public OrderedCustomListAdapter(Comparator<Long> comparator) {
+ super();
+ this.treeMap = new TreeMap<>(Collections.reverseOrder(comparator));
}
- // ------------------------ OVERRIDE METHODS ------------------------
-
@Override
- protected synchronized List<T> getFrozenList() {
- return Collections.unmodifiableList(new ArrayList<>(treeMap.values()));
+ protected synchronized List<T> getList() {
+ return new ArrayList<>(treeMap.values());
}
- // -------------------------- OTHER METHODS --------------------------
-
- public synchronized void addItem(T item) {
+ public synchronized void add(T item) {
treeMap.put(item.getId(), item);
}
- public synchronized void addItems(List<T> items) {
+ public synchronized void addAll(Collection<T> items) {
for (T item : items) {
treeMap.put(item.getId(), item);
}
@@ -70,16 +35,7 @@ public class OrderedCustomListAdapter<T extends IViewModel & IdObject> extends C
treeMap.clear();
}
- public synchronized T removeItem(T item) {
+ public synchronized T remove(T item) {
return treeMap.remove(item.getId());
}
-
- public synchronized int removeItemById(long id) {
- T item = treeMap.remove(id);
- if (item == null) {
- return 0;
- } else {
- return 1;
- }
- }
}
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/adapter/SearchListAdapter.java b/app/src/main/java/net/lacolaco/smileessence/view/adapter/SearchListAdapter.java
deleted file mode 100644
index 48657748..00000000
--- a/app/src/main/java/net/lacolaco/smileessence/view/adapter/SearchListAdapter.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package net.lacolaco.smileessence.view.adapter;
-
-import android.app.Activity;
-
-public class SearchListAdapter extends StatusListAdapter {
- private String query;
- private OnQueryChangeListener listener;
-
- // --------------------------- CONSTRUCTORS ---------------------------
-
- public SearchListAdapter(Activity activity) {
- super(activity);
- }
-
- // --------------------- GETTER / SETTER METHODS ---------------------
-
- public String getQuery() {
- return query;
- }
-
- public void setOnQueryChangeListener(OnQueryChangeListener listener) {
- this.listener = listener;
- }
-
- // -------------------------- OTHER METHODS --------------------------
-
- public void initSearch(String query) {
- this.query = query;
- clear();
- if (listener != null) {
- listener.onQueryChange(query);
- }
- }
-
- // -------------------------- INNER CLASSES --------------------------
-
- public interface OnQueryChangeListener {
-
- void onQueryChange(String newQuery);
- }
-}
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/adapter/StatusListAdapter.java b/app/src/main/java/net/lacolaco/smileessence/view/adapter/StatusListAdapter.java
deleted file mode 100644
index 5fda8d56..00000000
--- a/app/src/main/java/net/lacolaco/smileessence/view/adapter/StatusListAdapter.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package net.lacolaco.smileessence.view.adapter;
-
-import android.app.Activity;
-import net.lacolaco.smileessence.entity.Tweet;
-import net.lacolaco.smileessence.viewmodel.StatusViewModel;
-
-public class StatusListAdapter extends OrderedCustomListAdapter<StatusViewModel> {
-
- // --------------------------- CONSTRUCTORS ---------------------------
-
- public StatusListAdapter(Activity activity) {
- super(activity);
- }
-
- // --------------------- GETTER / SETTER METHODS ---------------------
-
- public long getLastID() {
- if (getCount() > 0) {
- return getItem(getCount() - 1).getTweet().getId();
- } else {
- return -1;
- }
- }
-
- public long getTopID() {
- if (getCount() > 0) {
- return getItem(0).getTweet().getId();
- } else {
- return -1;
- }
- }
-
- // -------------------------- OTHER METHODS --------------------------
-
- @Override
- public synchronized int removeItemById(long statusID) {
- int count = 0;
- count += super.removeItemById(statusID);
- Tweet t = Tweet.fetch(statusID);
- if (t != null) {
- for (long retweetId : t.getRetweets().values()) {
- count += super.removeItemById(retweetId);
- }
- }
- return count;
- }
-}
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/adapter/TimelineAdapter.java b/app/src/main/java/net/lacolaco/smileessence/view/adapter/TimelineAdapter.java
new file mode 100644
index 00000000..0dbe8d53
--- /dev/null
+++ b/app/src/main/java/net/lacolaco/smileessence/view/adapter/TimelineAdapter.java
@@ -0,0 +1,39 @@
+package net.lacolaco.smileessence.view.adapter;
+
+import android.app.Activity;
+import android.view.View;
+import android.view.ViewGroup;
+import net.lacolaco.smileessence.entity.Tweet;
+import net.lacolaco.smileessence.view.Partials;
+
+import java.util.*;
+
+public class TimelineAdapter extends OrderedCustomListAdapter<Tweet> {
+ private final Activity activity;
+
+ public TimelineAdapter(Activity activity) {
+ super();
+ this.activity = activity;
+ }
+
+ public long getLastID() {
+ if (getCount() > 0) {
+ return getItem(getCount() - 1).getId();
+ } else {
+ return -1;
+ }
+ }
+
+ public long getTopID() {
+ if (getCount() > 0) {
+ return getItem(0).getId();
+ } else {
+ return -1;
+ }
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ return Partials.getTweetView(getItem(position), activity, convertView, true);
+ }
+}
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/adapter/UnorderedCustomListAdapter.java b/app/src/main/java/net/lacolaco/smileessence/view/adapter/UnorderedCustomListAdapter.java
deleted file mode 100644
index 02f90bc2..00000000
--- a/app/src/main/java/net/lacolaco/smileessence/view/adapter/UnorderedCustomListAdapter.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package net.lacolaco.smileessence.view.adapter;
-
-import android.app.Activity;
-import net.lacolaco.smileessence.viewmodel.IViewModel;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.ListIterator;
-
-public class UnorderedCustomListAdapter<T extends IViewModel> extends CustomListAdapter<T> {
-
- // ------------------------------ FIELDS ------------------------------
-
- private final List<T> list = new ArrayList<>();
-
- // --------------------------- CONSTRUCTORS ---------------------------
-
- public UnorderedCustomListAdapter(Activity activity) {
- super(activity);
- }
-
- // ------------------------ OVERRIDE METHODS ------------------------
-
- @Override
- protected synchronized List<T> getFrozenList() {
- return Collections.unmodifiableList(new ArrayList<>(list));
- }
-
- // -------------------------- OTHER METHODS --------------------------
-
- public synchronized void addItemToTop(T item) {
- if (!list.contains(item)) {
- list.add(0, item);
- }
- }
-
- public synchronized void addItemsToTop(List<T> items) {
- ListIterator<T> iterator = items.listIterator(items.size());
- while (iterator.hasPrevious()) {
- addItemToTop(iterator.previous());
- }
- }
-
- public synchronized void addItemToBottom(T item) {
- if (!list.contains(item)) {
- list.add(item);
- }
- }
-
- public synchronized void addItemsToBottom(List<T> items) {
- for (T item : items) {
- addItemToBottom(item);
- }
- }
-
- public synchronized void clear() {
- list.clear();
- }
-
- public synchronized boolean removeItem(T item) {
- return list.remove(item);
- }
-}
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/adapter/UserListListAdapter.java b/app/src/main/java/net/lacolaco/smileessence/view/adapter/UserListListAdapter.java
deleted file mode 100644
index 81e33d7e..00000000
--- a/app/src/main/java/net/lacolaco/smileessence/view/adapter/UserListListAdapter.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package net.lacolaco.smileessence.view.adapter;
-
-import android.app.Activity;
-
-public class UserListListAdapter extends StatusListAdapter {
-
- // ------------------------------ FIELDS ------------------------------
-
- private String listFullName;
-
- // --------------------------- CONSTRUCTORS ---------------------------
-
- public UserListListAdapter(Activity activity) {
- super(activity);
- }
-
- // --------------------- GETTER / SETTER METHODS ---------------------
-
- public String getListFullName() {
- return listFullName;
- }
-
- public void setListFullName(String listFullName) {
- this.listFullName = listFullName;
- }
-}