From c86532ef6d337d2b16f8bc29b70205677d571683 Mon Sep 17 00:00:00 2001 From: Kazuki Yamaguchi Date: Mon, 9 Oct 2017 17:45:51 +0900 Subject: reinit --- .../smileessence/view/adapter/CustomListAdapter.kt | 6 ++--- .../smileessence/view/adapter/EventListAdapter.kt | 24 ------------------- .../view/adapter/MessageListAdapter.kt | 24 ------------------- .../smileessence/view/adapter/PageListAdapter.kt | 28 +--------------------- .../smileessence/view/adapter/TimelineAdapter.kt | 2 +- .../view/adapter/UnorderedCustomListAdapter.kt | 4 +++- 6 files changed, 7 insertions(+), 81 deletions(-) (limited to 'app/src/main/java/net/lacolaco/smileessence/view/adapter') diff --git a/app/src/main/java/net/lacolaco/smileessence/view/adapter/CustomListAdapter.kt b/app/src/main/java/net/lacolaco/smileessence/view/adapter/CustomListAdapter.kt index e68e3746..612c14e5 100644 --- a/app/src/main/java/net/lacolaco/smileessence/view/adapter/CustomListAdapter.kt +++ b/app/src/main/java/net/lacolaco/smileessence/view/adapter/CustomListAdapter.kt @@ -2,9 +2,7 @@ package net.lacolaco.smileessence.view.adapter import android.widget.BaseAdapter import net.lacolaco.smileessence.util.UIHandler - -import java.util.ArrayList -import java.util.Collections +import java.util.* abstract class CustomListAdapter : BaseAdapter() { private var isNotifiable = true @@ -42,4 +40,4 @@ abstract class CustomListAdapter : BaseAdapter() { fun updateForce() { UIHandler().post { this.notifyDataSetChanged() } } -} \ No newline at end of file +} diff --git a/app/src/main/java/net/lacolaco/smileessence/view/adapter/EventListAdapter.kt b/app/src/main/java/net/lacolaco/smileessence/view/adapter/EventListAdapter.kt index 86e80e2b..b38bf25e 100644 --- a/app/src/main/java/net/lacolaco/smileessence/view/adapter/EventListAdapter.kt +++ b/app/src/main/java/net/lacolaco/smileessence/view/adapter/EventListAdapter.kt @@ -1,27 +1,3 @@ -/* - * 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 diff --git a/app/src/main/java/net/lacolaco/smileessence/view/adapter/MessageListAdapter.kt b/app/src/main/java/net/lacolaco/smileessence/view/adapter/MessageListAdapter.kt index 90a17c90..6d80486f 100644 --- a/app/src/main/java/net/lacolaco/smileessence/view/adapter/MessageListAdapter.kt +++ b/app/src/main/java/net/lacolaco/smileessence/view/adapter/MessageListAdapter.kt @@ -1,27 +1,3 @@ -/* - * 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 diff --git a/app/src/main/java/net/lacolaco/smileessence/view/adapter/PageListAdapter.kt b/app/src/main/java/net/lacolaco/smileessence/view/adapter/PageListAdapter.kt index d400ac4f..2e739faa 100644 --- a/app/src/main/java/net/lacolaco/smileessence/view/adapter/PageListAdapter.kt +++ b/app/src/main/java/net/lacolaco/smileessence/view/adapter/PageListAdapter.kt @@ -1,27 +1,3 @@ -/* - * 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.os.Bundle @@ -29,10 +5,8 @@ import android.support.v13.app.FragmentPagerAdapter import net.lacolaco.smileessence.activity.MainActivity import net.lacolaco.smileessence.logging.Logger import net.lacolaco.smileessence.view.page.PageFragment - import java.lang.ref.WeakReference -import java.util.ArrayList -import java.util.HashMap +import java.util.* class PageListAdapter(_activity: MainActivity) : FragmentPagerAdapter(_activity.fragmentManager) { private val pages = ArrayList() diff --git a/app/src/main/java/net/lacolaco/smileessence/view/adapter/TimelineAdapter.kt b/app/src/main/java/net/lacolaco/smileessence/view/adapter/TimelineAdapter.kt index 511db35e..362e183b 100644 --- a/app/src/main/java/net/lacolaco/smileessence/view/adapter/TimelineAdapter.kt +++ b/app/src/main/java/net/lacolaco/smileessence/view/adapter/TimelineAdapter.kt @@ -3,9 +3,9 @@ package net.lacolaco.smileessence.view.adapter import android.app.Activity import android.view.View import android.view.ViewGroup +import net.lacolaco.smileessence.World import net.lacolaco.smileessence.entity.Tweet import net.lacolaco.smileessence.view.Partials -import net.lacolaco.smileessence.World class TimelineAdapter(private val activity: Activity, private val world: World) : OrderedCustomListAdapter() { val lastID: Long diff --git a/app/src/main/java/net/lacolaco/smileessence/view/adapter/UnorderedCustomListAdapter.kt b/app/src/main/java/net/lacolaco/smileessence/view/adapter/UnorderedCustomListAdapter.kt index f32fa7f3..46b40681 100644 --- a/app/src/main/java/net/lacolaco/smileessence/view/adapter/UnorderedCustomListAdapter.kt +++ b/app/src/main/java/net/lacolaco/smileessence/view/adapter/UnorderedCustomListAdapter.kt @@ -3,7 +3,9 @@ package net.lacolaco.smileessence.view.adapter import java.util.* abstract class UnorderedCustomListAdapter constructor(override val list: ArrayList = ArrayList()) : CustomListAdapter() { - init { update() } + init { + update() + } @Synchronized fun add(item: T) = list.add(item) -- cgit v1.2.3