diff --git a/app/src/main/java/com/hippo/ehviewer/ui/annotation/DrawerLifeCircle.java b/app/src/main/java/com/hippo/ehviewer/ui/annotation/DrawerLifeCircle.java deleted file mode 100644 index 43c211151..000000000 --- a/app/src/main/java/com/hippo/ehviewer/ui/annotation/DrawerLifeCircle.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2016 Hippo Seven - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.hippo.ehviewer.ui.annotation; - -import android.os.Bundle; -import android.view.LayoutInflater; -import android.view.ViewGroup; - -import androidx.fragment.app.Fragment; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Created in {@link Fragment#onCreateView(LayoutInflater, ViewGroup, Bundle)}, - * destroyed in {@link Fragment#onDestroyView()}. - */ -@Retention(RetentionPolicy.SOURCE) -@Target({ElementType.FIELD}) -public @interface DrawerLifeCircle { -} diff --git a/app/src/main/java/com/hippo/ehviewer/ui/annotation/ViewLifeCircle.java b/app/src/main/java/com/hippo/ehviewer/ui/annotation/ViewLifeCircle.java deleted file mode 100644 index 23291438e..000000000 --- a/app/src/main/java/com/hippo/ehviewer/ui/annotation/ViewLifeCircle.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2016 Hippo Seven - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.hippo.ehviewer.ui.annotation; - -import android.os.Bundle; -import android.view.LayoutInflater; -import android.view.ViewGroup; - -import androidx.fragment.app.Fragment; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Created in {@link Fragment#onCreateView(LayoutInflater, ViewGroup, Bundle)}, - * destroyed in {@link Fragment#onDestroyView()}. - */ -@Retention(RetentionPolicy.SOURCE) -@Target({ElementType.FIELD}) -public @interface ViewLifeCircle { -} diff --git a/app/src/main/java/com/hippo/ehviewer/ui/annotation/WholeLifeCircle.java b/app/src/main/java/com/hippo/ehviewer/ui/annotation/WholeLifeCircle.java deleted file mode 100644 index f9aca5533..000000000 --- a/app/src/main/java/com/hippo/ehviewer/ui/annotation/WholeLifeCircle.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2016 Hippo Seven - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.hippo.ehviewer.ui.annotation; - -import android.app.Activity; -import android.os.Bundle; - -import androidx.fragment.app.Fragment; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Created in {@link Fragment#onCreate(Bundle)} or {@link Activity#onCreate(Bundle)}, - * destroyed in {@link Fragment#onDestroy()} or {@link Activity#onDestroy()}. - */ -@Retention(RetentionPolicy.SOURCE) -@Target({ElementType.FIELD}) -public @interface WholeLifeCircle { -} diff --git a/app/src/main/java/com/hippo/ehviewer/ui/scene/FavoritesScene.kt b/app/src/main/java/com/hippo/ehviewer/ui/scene/FavoritesScene.kt index 8aaae526b..d0b976afa 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/scene/FavoritesScene.kt +++ b/app/src/main/java/com/hippo/ehviewer/ui/scene/FavoritesScene.kt @@ -57,9 +57,6 @@ import com.hippo.ehviewer.client.data.FavListUrlBuilder import com.hippo.ehviewer.client.data.GalleryInfo import com.hippo.ehviewer.client.parser.FavoritesParser import com.hippo.ehviewer.ui.CommonOperations -import com.hippo.ehviewer.ui.annotation.DrawerLifeCircle -import com.hippo.ehviewer.ui.annotation.ViewLifeCircle -import com.hippo.ehviewer.ui.annotation.WholeLifeCircle import com.hippo.ehviewer.widget.GalleryInfoContentHelper import com.hippo.widget.ContentLayout import com.hippo.widget.FabLayout @@ -85,33 +82,24 @@ class FavoritesScene : SearchBarScene(), OnDragHandlerListener, OnClickFabListen var limit // -1 for error = 0 - @ViewLifeCircle private var mRecyclerView: EasyRecyclerView? = null - @ViewLifeCircle private var mFabLayout: FabLayout? = null - @ViewLifeCircle private var mAdapter: FavoritesAdapter? = null - @ViewLifeCircle private var mHelper: FavoritesHelper? = null private var mActionFabDrawable: AddDeleteDrawable? = null private var mDrawerLayout: DrawerLayout? = null - @DrawerLifeCircle private var mDrawerAdapter: FavDrawerAdapter? = null - @WholeLifeCircle private var mClient: EhClient? = null - @WholeLifeCircle private var mFavCatArray: Array? = Settings.getFavCat() - @WholeLifeCircle private var mFavCountArray: IntArray? = Settings.getFavCount() - @WholeLifeCircle private var mUrlBuilder: FavListUrlBuilder? = null private val showNormalFabsRunnable = Runnable { if (mFabLayout != null) { diff --git a/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryDetailScene.kt b/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryDetailScene.kt index b94abd518..1560997ef 100755 --- a/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryDetailScene.kt +++ b/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryDetailScene.kt @@ -91,7 +91,6 @@ import com.hippo.ehviewer.spider.SpiderDen import com.hippo.ehviewer.ui.CommonOperations import com.hippo.ehviewer.ui.GalleryInfoBottomSheet import com.hippo.ehviewer.ui.MainActivity -import com.hippo.ehviewer.ui.annotation.WholeLifeCircle import com.hippo.ehviewer.ui.scene.GalleryListScene.Companion.getStartArgs import com.hippo.ehviewer.widget.GalleryRatingBar import com.hippo.ehviewer.widget.GalleryRatingBar.OnUserRateListener @@ -125,7 +124,6 @@ class GalleryDetailScene : CollapsingToolbarScene(), View.OnClickListener, Downl private var mViewTransition: ViewTransition? = null private var mViewTransition2: ViewTransition? = null - @WholeLifeCircle private var mDownloadState = 0 private var mAction: String? = null private var mGalleryInfo: GalleryInfo? = null