package com.wanyue.common.custom;
import android.content.Context;
import android.content.res.TypedArray;
import android.database.DataSetObserver;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemClock;
import androidx.core.os.ParcelableCompat;
import androidx.core.os.ParcelableCompatCreatorCallbacks;
import androidx.core.view.AccessibilityDelegateCompat;
import androidx.core.view.MotionEventCompat;
import androidx.core.view.VelocityTrackerCompat;
import androidx.core.view.ViewCompat;
import androidx.core.view.ViewConfigurationCompat;
import androidx.core.view.accessibility.AccessibilityEventCompat;
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
import androidx.core.view.accessibility.AccessibilityRecordCompat;
import androidx.core.widget.EdgeEffectCompat;
import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager;
import android.util.AttributeSet;
import android.util.Log;
import android.view.FocusFinder;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.SoundEffectConstants;
import android.view.VelocityTracker;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.accessibility.AccessibilityEvent;
import android.view.animation.Interpolator;
import android.widget.Scroller;
import org.jetbrains.annotations.NotNull;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
/**
* 垂直ViewPager
*/
public class VerticalViewPager extends ViewGroup {
private static final String TAG = "ViewPager";
private static final boolean DEBUG = false;
private static final boolean USE_CACHE = false;
private static final int DEFAULT_OFFSCREEN_PAGES = 1;
private static final int MAX_SETTLE_DURATION = 600; // ms
private static final int MIN_DISTANCE_FOR_FLING = 25; // dips
private static final int DEFAULT_GUTTER_SIZE = 16; // dips
private static final int MIN_FLING_VELOCITY = 400; // dips
private static final int[] LAYOUT_ATTRS = new int[]{
android.R.attr.layout_gravity
};
/**
* Used to track what the expected number of items in the adapter should be.
* If the app changes this when we don't expect it, we'll throw a big obnoxious exception.
*/
private int mExpectedAdapterCount;
static class ItemInfo {
Object object;
int position;
boolean scrolling;
float heightFactor;
float offset;
}
private static final Comparator<ItemInfo> COMPARATOR = new Comparator<ItemInfo>() {
@Override
public int compare(ItemInfo lhs, ItemInfo rhs) {
return lhs.position - rhs.position;
}
};
private static final Interpolator sInterpolator = new Interpolator() {
public float getInterpolation(float t) {
t -= 1.0f;
return t * t * t * t * t + 1.0f;
}
};
private final ArrayList<ItemInfo> mItems = new ArrayList<ItemInfo>();
private final ItemInfo mTempItem = new ItemInfo();
private final Rect mTempRect = new Rect();
private PagerAdapter mAdapter;
private int mCurItem; // Index of currently displayed page.
private int mRestoredCurItem = -1;
private Parcelable mRestoredAdapterState = null;
private ClassLoader mRestoredClassLoader = null;
private Scroller mScroller;
private PagerObserver mObserver;
private int mPageMargin;
private Drawable mMarginDrawable;
private int mLeftPageBounds;
private int mRightPageBounds;
// Offsets of the first and last items, if known.
// Set during population, used to determine if we are at the beginning
// or end of the pager data set during touch scrolling.
private float mFirstOffset = -Float.MAX_VALUE;
private float mLastOffset = Float.MAX_VALUE;
private int mChildWidthMeasureSpec;
private int mChildHeightMeasureSpec;
private boolean mInLayout;
private boolean mScrollingCacheEnabled;
private boolean mPopulatePending;
private int mOffscreenPageLimit = DEFAULT_OFFSCREEN_PAGES;
private boolean mIsBeingDragged;
private boolean mIsUnableToDrag;
private boolean mIgnoreGutter;
private int mDefaultGutterSize;
private int mGutterSize;
private int mTouchSlop;
/**
* Position of the last motion event.
*/
private float mLastMotionX;
private float mLastMotionY;
private float mInitialMotionX;
private float mInitialMotionY;
/**
* ID of the active pointer. This is used to retain consistency during
* drags/flings if multiple pointers are used.
*/
private int mActivePointerId = INVALID_POINTER;
/**
* Sentinel value for no current active pointer.
* Used by {@link #mActivePointerId}.
*/
private static final int INVALID_POINTER = -1;
/**
* Determines speed during touch scrolling
*/
private VelocityTracker mVelocityTracker;
private int mMinimumVelocity;
private int mMaximumVelocity;
private int mFlingDistance;
private int mCloseEnough;
// If the pager is at least this close to its final position, complete the scroll
// on touch down and let the user interact with the content inside instead of
// "catching" the flinging pager.
private static final int CLOSE_ENOUGH = 2; // dp
private boolean mFakeDragging;
private long mFakeDragBeginTime;
private EdgeEffectCompat mTopEdge;
private EdgeEffectCompat mBottomEdge;
private boolean mFirstLayout = true;
private boolean mNeedCalculatePageOffsets = false;
private boolean mCalledSuper;
private int mDecorChildCount;
private ViewPager.OnPageChangeListener mOnPageChangeListener;
private ViewPager.OnPageChangeListener mInternalPageChangeListener;
private OnAdapterChangeListener mAdapterChangeListener;
private ViewPager.PageTransformer mPageTransformer;
private Method mSetChildrenDrawingOrderEnabled;
private static final int DRAW_ORDER_DEFAULT = 0;
private static final int DRAW_ORDER_FORWARD = 1;
private static final int DRAW_ORDER_REVERSE = 2;
private int mDrawingOrder;
private ArrayList<View> mDrawingOrderedChildren;
private static final ViewPositionComparator sPositionComparator = new ViewPositionComparator();
/**
* Indicates that the pager is in an idle, settled state. The current page
* is fully in view and no animation is in progress.
*/
public static final int SCROLL_STATE_IDLE = 0;
/**
* Indicates that the pager is currently being dragged by the user.
*/
public static final int SCROLL_STATE_DRAGGING = 1;
/**
* Indicates that the pager is in the process of settling to a final position.
*/
public static final int SCROLL_STATE_SETTLING = 2;
private final Runnable mEndScrollRunnable = new Runnable() {
public void run() {
setScrollState(SCROLL_STATE_IDLE);
populate();
}
};
private int mScrollState = SCROLL_STATE_IDLE;
/**
* Used internally to monitor when adapters are switched.
*/
interface OnAdapterChangeListener {
public void onAdapterChanged(PagerAdapter oldAdapter, PagerAdapter newAdapter);
}
/**
* Used internally to tag special types of child views that should be added as
* pager decorations by default.
*/
interface Decor {
}
public VerticalViewPager(Context context) {
super(context);
initViewPager();
}
public VerticalViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
initViewPager();
}
void initVi
没有合适的资源?快使用搜索试试~ 我知道了~
基于Android的万岳直播商城系统开源设计源码
共2001个文件
java:804个
xml:694个
png:425个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 59 浏览量
2024-04-08
21:08:03
上传
评论
收藏 70.34MB ZIP 举报
温馨提示
万岳直播商城系统 - 基于Android开发,包含2256个文件,如JAVA、XML、PNG、SO、JAR、GRADLE、GITIGNORE、PRO、JPG和JSON等。该系统是一个开源的直播商城系统,适用于直播和短视频带货场景,支持多商户、直播电商、社交电商等功能,为用户提供了一个高效、易用的直播购物体验。
资源推荐
资源详情
资源评论
收起资源包目录
基于Android的万岳直播商城系统开源设计源码 (2001个子文件)
LiteAVSDK_Smart_6.5.7272.aar 27.77MB
gradlew.bat 2KB
server.cer 923B
.DS_Store 8KB
.gitignore 208B
.gitignore 7B
.gitignore 7B
.gitignore 7B
.gitignore 7B
.gitignore 7B
.gitignore 7B
build.gradle 5KB
config.gradle 4KB
build.gradle 2KB
build.gradle 2KB
build.gradle 2KB
build.gradle 1KB
build.gradle 1KB
build.gradle 1KB
settings.gradle 123B
gradlew 5KB
MobTools-2018.1128.1916.jar 383KB
alipaySdk-20180601.jar 304KB
TencentLocationSdk_v6.2.5.3.jar 286KB
AndroidPicker-1.5.6.jar 216KB
TencentMapSDK_1.2.8.1.jar 216KB
MobCommons-2018.1128.1916.jar 167KB
bdasr_3.0.8.2.jar 146KB
ShareSDK-Core-3.4.0.jar 120KB
commons-io-1.4.jar 106KB
gradle-wrapper.jar 53KB
SDKWrapper-2018.0801.1824.jar 50KB
ShareSDK-Wechat-Core-3.4.0.jar 44KB
ShareSDK-QQ-3.4.0.jar 39KB
ShareSDK-Facebook-3.4.0.jar 35KB
ShareSDK-QZone-3.4.0.jar 34KB
ShareSDK-Twitter-3.4.0.jar 24KB
ShareSDK-Wechat-3.4.0.jar 6KB
ShareSDK-Wechat-Moments-3.4.0.jar 6KB
ShareSDK-Wechat-Favorite-3.4.0.jar 6KB
VerticalViewPager.java 107KB
ZoomView.java 50KB
TxImMessageUtil.java 46KB
ChatRoomViewHolder.java 43KB
LiveAudienceActivity.java 34KB
ZoomImageView.java 33KB
LiveActivity.java 31KB
LiveHttpUtil.java 31KB
ImRoomAdapter.java 29KB
LiveAnchorActivity.java 26KB
ItemDecoration.java 26KB
LiveGiftAnimPresenter.java 26KB
LiveRoomViewHolder.java 25KB
LiveLinkMicPresenter.java 24KB
DialogUitl.java 23KB
GSYVideoHelper.java 23KB
RxRefreshView.java 23KB
SocketClient.java 23KB
MaterialProgressDrawable.java 22KB
LiveUserDialogFragment.java 21KB
MainAPI.java 20KB
BubbleDialog.java 20KB
CommonAppConfig.java 20KB
ShopAPI.java 20KB
MainHomeUserViewProxy.java 20KB
LiveLinkMicAnchorPresenter.java 18KB
LiveLinkMicPkPresenter.java 17KB
LiveGiftDialogFragment.java 17KB
LocationActivity.java 16KB
SpannableStringUtils.java 16KB
LivePushTxViewHolder.java 15KB
LivePlayTxViewHolder.java 14KB
LiveTextRender.java 14KB
ConfigBean.java 14KB
StringUtil.java 14KB
GoodsDetailActivity.java 14KB
OnekeyShareThemeImpl.java 14KB
CommonRefreshView.java 14KB
AnimationBuilder.java 14KB
CommitOrderActivity.java 14KB
ChatGiftDialogFragment.java 13KB
ShopCartModel.java 13KB
MaterialHeader.java 13KB
ChatRoomActivity.java 13KB
Constants.java 13KB
ImListAdapter.java 13KB
ShopCartActivity.java 12KB
MyDiamondsActivity.java 12KB
CommonAPI.java 12KB
BubbleLayout.java 12KB
LiveReadyViewHolder.java 12KB
ChatListViewHolder.java 12KB
UserBean.java 11KB
BaseViewProxy.java 11KB
LuckLiveGiftViewHolder.java 11KB
LiveLinkMicListDialogFragment.java 11KB
ItemSlideHelper.java 11KB
ProcessImageUtil.java 11KB
LiveLinkMicPkViewHolder.java 11KB
LoginActivity.java 11KB
共 2001 条
- 1
- 2
- 3
- 4
- 5
- 6
- 21
资源评论
沐知全栈开发
- 粉丝: 5798
- 资源: 5215
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- MATLAB实现基于RF随机森林的时间序列预测-递归预测未来(多指标评价)(含完整的程序和代码详解)
- MATLAB实现TSO-ELM金枪鱼群优化算法优化极限学习机多输入单输出回归预测(多指标,多图)(含完整的程序和代码详解)
- MT管理器v2.14.5-MT管理器-能强大的Android文件管理工具,主要用于管理和编辑手机中的文件-MT管理器vip版本
- MATLAB实现POA-CNN-GRU鹈鹕算法优化卷积门控循环单元多输入单输出回归预测(含完整的程序和代码详解)
- MATLAB实现BES-SVM秃鹰搜索优化算法优化支持向量机多输入单输出回归预测(多指标,多图)(含完整的程序和代码详解)
- 儿童智能产品研究报告 -设计原则、发展趋势
- AMI aptio 4.x BIOS状态码(POST CODE)及开机Beep声含义表(Checkpoints & Beep Codes for Debugging R1.11)
- 创新创业心得体会.pdf
- 基于springboot的企业考勤管理系统源码+数据库+文档说明(java毕业设计)
- Maven私服nexus-3.74.0-05-unix.tar.gz包下载
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功