Use ProgressView instance of ProgressBar, remove useless stuff
This commit is contained in:
1 parent
ca2a55fd12
commit
3523503d08
26 files changed
+20
-597
No files matched your search
@@ -35,7 +35,6 @@ import com.hippo.ehviewer.gallery.glrenderer.BasicTexture;
|
||||
import com.hippo.ehviewer.gallery.glrenderer.GLCanvas;
|
||||
import com.hippo.ehviewer.gallery.glrenderer.GLES11Canvas;
|
||||
import com.hippo.ehviewer.gallery.glrenderer.GLES20Canvas;
|
||||
import com.hippo.ehviewer.gallery.glrenderer.TextTexture;
|
||||
import com.hippo.ehviewer.gallery.glrenderer.UploadedTexture;
|
||||
import com.hippo.ehviewer.gallery.util.ApiHelper;
|
||||
import com.hippo.ehviewer.gallery.util.GalleryUtils;
|
||||
@@ -201,7 +200,7 @@ public class GLRootView extends GLSurfaceView
|
||||
}
|
||||
if (mRenderRequested) return;
|
||||
mRenderRequested = true;
|
||||
if (ApiHelper.HAS_POST_ON_ANIMATION) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||
postOnAnimation(mRequestRenderOnAnimationFrame);
|
||||
} else {
|
||||
super.requestRender();
|
||||
|
||||
@@ -119,7 +119,7 @@ public class GalleryDetailScene extends Scene implements View.OnClickListener,
|
||||
private TextView mCommentMore;
|
||||
private PreviewLayout mPreviewLayout;
|
||||
|
||||
private View mProgressBar;
|
||||
private View mProgressView;
|
||||
|
||||
private ViewTransition mViewTransition;
|
||||
|
||||
@@ -175,9 +175,9 @@ public class GalleryDetailScene extends Scene implements View.OnClickListener,
|
||||
mCommentMore = (TextView) mContent.findViewById(R.id.comment_more);
|
||||
mPreviewLayout = (PreviewLayout) mContent.findViewById(R.id.preview);
|
||||
|
||||
mProgressBar = findViewById(R.id.progress_bar);
|
||||
mProgressView = findViewById(R.id.progress_view);
|
||||
|
||||
mViewTransition = new ViewTransition(mContent, mProgressBar);
|
||||
mViewTransition = new ViewTransition(mContent, mProgressView);
|
||||
}
|
||||
|
||||
private void handleAnnouncer(Announcer announcer) {
|
||||
|
||||
@@ -25,7 +25,6 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
@@ -33,6 +32,7 @@ import com.hippo.effect.ViewTransition;
|
||||
import com.hippo.ehviewer.R;
|
||||
import com.hippo.util.ExceptionUtils;
|
||||
import com.hippo.util.LayoutManagerUtils;
|
||||
import com.hippo.widget.ProgressView;
|
||||
import com.hippo.widget.recyclerview.EasyRecyclerView;
|
||||
import com.hippo.widget.refreshlayout.RefreshLayout;
|
||||
import com.hippo.yorozuya.AssertUtils;
|
||||
@@ -47,7 +47,7 @@ public class ContentLayout extends FrameLayout {
|
||||
|
||||
private static final String TAG = ContentLayout.class.getSimpleName();
|
||||
|
||||
private ProgressBar mProgressBar;
|
||||
private ProgressView mProgressView;
|
||||
private ViewGroup mTipView;
|
||||
private RefreshLayout mRefreshLayout;
|
||||
private EasyRecyclerView mRecyclerView;
|
||||
@@ -77,7 +77,7 @@ public class ContentLayout extends FrameLayout {
|
||||
private void init(Context context) {
|
||||
LayoutInflater.from(context).inflate(R.layout.widget_content_layout, this);
|
||||
|
||||
mProgressBar = (ProgressBar) getChildAt(0);
|
||||
mProgressView = (ProgressView) getChildAt(0);
|
||||
mTipView = (ViewGroup) getChildAt(1);
|
||||
mRefreshLayout = (RefreshLayout) getChildAt(2);
|
||||
mRecyclerView = (EasyRecyclerView) mRefreshLayout.getChildAt(1);
|
||||
@@ -165,7 +165,7 @@ public class ContentLayout extends FrameLayout {
|
||||
|
||||
private Context mContext;
|
||||
|
||||
private ProgressBar mProgressBar;
|
||||
private ProgressView mProgressView;
|
||||
private ViewGroup mTipView;
|
||||
private RefreshLayout mRefreshLayout;
|
||||
private EasyRecyclerView mRecyclerView;
|
||||
@@ -277,7 +277,7 @@ public class ContentLayout extends FrameLayout {
|
||||
}
|
||||
|
||||
private void init(ContentLayout contentLayout) {
|
||||
mProgressBar = contentLayout.mProgressBar;
|
||||
mProgressView = contentLayout.mProgressView;
|
||||
mTipView = contentLayout.mTipView;
|
||||
mRefreshLayout = contentLayout.mRefreshLayout;
|
||||
mRecyclerView = contentLayout.mRecyclerView;
|
||||
@@ -285,7 +285,7 @@ public class ContentLayout extends FrameLayout {
|
||||
mTextView = contentLayout.mTextView;
|
||||
mLayoutManager = generateLayoutManager();
|
||||
|
||||
mViewTransition = new ViewTransition(mRefreshLayout, mProgressBar, mTipView);
|
||||
mViewTransition = new ViewTransition(mRefreshLayout, mProgressView, mTipView);
|
||||
mViewTransition.showView(2, false);
|
||||
|
||||
mRecyclerView.setLayoutManager(mLayoutManager);
|
||||
|
||||
@@ -48,7 +48,7 @@ public final class PreviewLayout extends LinearLayout implements View.OnClickLis
|
||||
private int mCurrentPreviewPage = -1;
|
||||
|
||||
private SimpleGridLayout mSimpleGridLayout;
|
||||
private View mProgressBar;
|
||||
private View mProgressView;
|
||||
private View mTopPrevious;
|
||||
private TextView mTopSelection;
|
||||
private View mTopNext;
|
||||
@@ -93,7 +93,7 @@ public final class PreviewLayout extends LinearLayout implements View.OnClickLis
|
||||
mTopSelection = (TextView) viewGroup.getChildAt(2);
|
||||
mTopNext = viewGroup.getChildAt(4);
|
||||
mSimpleGridLayout = (SimpleGridLayout) getChildAt(1);
|
||||
mProgressBar = getChildAt(2);
|
||||
mProgressView = getChildAt(2);
|
||||
viewGroup = (ViewGroup) getChildAt(3);
|
||||
mBottomPrevious = viewGroup.getChildAt(0);
|
||||
mBottomSelection = (TextView) viewGroup.getChildAt(2);
|
||||
@@ -114,7 +114,7 @@ public final class PreviewLayout extends LinearLayout implements View.OnClickLis
|
||||
AccurateClick.setOnAccurateClickListener(mTopSelection, this);
|
||||
AccurateClick.setOnAccurateClickListener(mBottomSelection, this);
|
||||
|
||||
mViewTransition = new ViewTransition(mSimpleGridLayout, mProgressBar);
|
||||
mViewTransition = new ViewTransition(mSimpleGridLayout, mProgressView);
|
||||
}
|
||||
|
||||
public void setData(PreviewSet[] previewSets, int gid, LayoutInflater inflater, Conaco conaco) {
|
||||
|
||||
Reference in new issue
Block a user