/*
* Copyright (C) 2011 The Android Open Source Project
*
* 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.wm.remusic.widget;
import android.content.Context;
import android.content.res.Resources;
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 android.support.annotation.CallSuper;
import android.support.annotation.DrawableRes;
import android.support.v4.os.ParcelableCompat;
import android.support.v4.os.ParcelableCompatCreatorCallbacks;
import android.support.v4.view.AccessibilityDelegateCompat;
import android.support.v4.view.KeyEventCompat;
import android.support.v4.view.MotionEventCompat;
import android.support.v4.view.VelocityTrackerCompat;
import android.support.v4.view.ViewCompat;
import android.support.v4.view.ViewConfigurationCompat;
import android.support.v4.view.ViewPager;
import android.support.v4.view.WindowInsetsCompat;
import android.support.v4.view.accessibility.AccessibilityEventCompat;
import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat;
import android.support.v4.view.accessibility.AccessibilityRecordCompat;
import android.support.v4.widget.EdgeEffectCompat;
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.Animation;
import android.view.animation.Interpolator;
import android.widget.Scroller;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
/**
* Layout manager that allows the user to flip left and right
* through pages of data. You supply an implementation of a
* {@link PagerAdapter} to generate the pages that the view shows.
*
* <p>Note this class is currently under early design and
* development. The API will likely change in later updates of
* the compatibility library, requiring changes to the source code
* of apps when they are compiled against the newer version.</p>
*
* <p>ViewPager is most often used in conjunction with {@link android.app.Fragment},
* which is a convenient way to supply and manage the lifecycle of each page.
* There are standard adapters implemented for using fragments with the ViewPager,
* which cover the most common use cases. These are
* {@link android.support.v4.app.FragmentPagerAdapter} and
* {@link android.support.v4.app.FragmentStatePagerAdapter}; each of these
* classes have simple code showing how to build a full user interface
* with them.
*
* <p>For more information about how to use ViewPager, read <a
* href="{@docRoot}training/implementing-navigation/lateral.html">Creating Swipe Views with
* Tabs</a>.</p>
*
* <p>Below is a more complicated example of ViewPager, using it in conjunction
* with {@link android.app.ActionBar} tabs. You can find other examples of using
* ViewPager in the API 4+ Support Demos and API 13+ Support Demos sample code.
*
* {@sample development/samples/Support13Demos/src/com/example/android/supportv13/app/ActionBarTabsPager.java
* complete}
*/
public class RoundViewPager extends ViewGroup {
private static final String TAG = "ViewPager";
private static final boolean DEBUG = true;
private static final boolean USE_CACHE = false;
private static final int DEFAULT_OFFSCREEN_PAGES = 1;
private static final int MAX_SETTLE_DURATION = 1000; // 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 widthFactor;
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 boolean mIsScrollStarted;
private PagerObserver mObserver;
private int mPageMargin;
private Drawable mMarginDrawable;
private int mTopPageBounds;
private int mBottomPageBounds;
// Offsets of the first and lastPosition 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 int mDefaultGutterSize;
private int mGutterSize;
private int mTouchSlop;
/**
* Position of the lastPosition 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 currentPosition 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
没有合适的资源?快使用搜索试试~ 我知道了~
嵌入式大作业,车载多媒体开发+源代码+文档说明
共924个文件
png:300个
java:286个
xml:195个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 133 浏览量
2023-12-17
18:24:51
上传
评论
收藏 41.49MB ZIP 举报
温馨提示
嵌入式大作业,车载多媒体开发+源代码+文档说明 不懂运行,下载完可以私聊问,可远程教学 该资源内项目源码是个人的课程设计,代码都测试ok,都是运行成功后才上传资源,答辩评审平均分达到96分,放心下载使用! ## 项目备注 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.md文件(如有),仅供学习参考, 切勿用于商业用途。
资源推荐
资源详情
资源评论
收起资源包目录
嵌入式大作业,车载多媒体开发+源代码+文档说明 (924个子文件)
MediaAidlInterface.aidl 2KB
MusicTrack.aidl 55B
app-release.apk 11.1MB
gradlew.bat 2KB
.gitignore 41B
.gitignore 7B
build.gradle 1KB
build.gradle 532B
settings.gradle 15B
gradlew 5KB
app.iml 13KB
remusic.iml 938B
remusic-master.iml 868B
BaiduLBS_Android.jar 2.33MB
so.jar 655KB
mail.jar 558KB
YoumiSdk_v7.0.0_2017-01-06.jar 81KB
gradle-wrapper.jar 52KB
activation.jar 50KB
additionnal.jar 45KB
RoundViewPager.java 121KB
MediaService.java 115KB
SwipeRefreshLayout.java 51KB
PlayingActivity.java 38KB
PlaylistActivity.java 30KB
RecommendFragment.java 27KB
MoreFragment.java 27KB
MusicPlayer.java 25KB
AlbumsDetailActivity.java 25KB
RankPlaylistActivity.java 24KB
RadioDetailActivity.java 23KB
ThemeUtils.java 20KB
BMA.java 20KB
LrcView.java 19KB
MusicUtils.java 18KB
NetMoreFragment.java 18KB
SongPlayCount.java 17KB
MusicFragment.java 17KB
DownService.java 17KB
ConverPinYin.java 17KB
DownloadTask.java 17KB
PlaylistsManager.java 16KB
ArtistDetailActivity.java 16KB
MainFragmentAdapter.java 16KB
HttpUtil.java 15KB
BillboardJson.java 14KB
PlaylistSelectActivity.java 14KB
Main2Activity.java 14KB
ImageUtils.java 14KB
GradientDrawableUtils.java 13KB
DragSortRecycler.java 13KB
SimpleWidgetProvider.java 13KB
PagerAdapter.java 13KB
SimpleMoreFragment.java 13KB
SelectActivity.java 13KB
DownFragment.java 13KB
LoodView.java 13KB
Nammu.java 12KB
RecentFragment.java 12KB
MapActivity.java 12KB
PlaylistManagerActivity.java 12KB
DownloadManager.java 12KB
ArtistInfoMusicFragment.java 12KB
Aes.java 12KB
ArtistFragment.java 12KB
PlayQueueFragment.java 12KB
MainApplication.java 11KB
DrawableUtils.java 11KB
AlbumFragment.java 11KB
TintProgressDialog.java 11KB
FolderFragment.java 11KB
PlaylistInfo.java 11KB
TintManager.java 11KB
FolderDetailFragment.java 11KB
MainActivity.java 11KB
LockActivity.java 10KB
AlbumDetailFragment.java 10KB
PreferencesUtility.java 10KB
RoundImageView.java 10KB
ArtistDetailFragment.java 10KB
SwipeProgressBar.java 10KB
RecentActivity.java 10KB
DownFileStore.java 10KB
AllPlaylistFragment.java 10KB
CommonUtils.java 10KB
DownMusicFragment.java 10KB
SearchSongInfo.java 10KB
PlaylistDetailFragment.java 10KB
AddNetPlaylistDialog.java 9KB
QuickControlsFragment.java 9KB
RequestDealThread.java 9KB
MediaButtonIntentReceiver.java 9KB
SearchMusicFragment.java 9KB
PermissionHelper.java 9KB
ArtistInfo.java 9KB
AddPlaylistDialog.java 9KB
SearchArtistSongInfo.java 9KB
AppCompatCompoundDrawableHelper.java 8KB
MusicPlaybackState.java 8KB
RankingFragment.java 8KB
共 924 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10
资源评论
机智的程序员zero
- 粉丝: 2167
- 资源: 4254
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 国家开放大学电大化工制图形考任务答案
- 基于python+sqlite实现知识图谱的农作物病虫害防治智能问答平台
- 移动通信系统ofdm的STO和CFO matlab
- 2024年全国职业院校技能大赛集成电路应用开发赛项竞赛试题(03卷)
- 基于CRT(远程访问终端)+ARM(GEC)+Linux+C语言的视频监控系统源码+文档说明.zip
- 用vue.js开发微信app
- CentOS-7-x86-64-Minimal-2009-迷你版系统镜像
- wireshark抓包软件
- Cookie Maker 工作室
- Screenshot_20240605_211604_com.netease.edu.ucmooc.jpg
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功