资源简介
开源中国Android客户端源码,有非常好的实用、收藏、学习价值,这是我学android的启蒙代码,哈哈。
代码片段和文件信息
/*
* Copyright (C) 2011 Patrik Akerfeldt
* Copyright (C) 2011 Jake Wharton
*
* 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.viewpagerindicator;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.style;
import android.graphics.drawable.Drawable;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.v4.view.MotionEventCompat;
import android.support.v4.view.ViewConfigurationCompat;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
import static android.graphics.Paint.ANTI_ALIAS_FLAG;
import static android.widget.LinearLayout.HORIZONTAL;
import static android.widget.LinearLayout.VERTICAL;
/**
* Draws circles (one for each view). The current view position is filled and
* others are only stroked.
*/
public class CirclePageIndicator extends View implements PageIndicator {
private static final int INVALID_POINTER = -1;
private float mRadius;
private final Paint mPaintPageFill = new Paint(ANTI_ALIAS_FLAG);
private final Paint mPaintStroke = new Paint(ANTI_ALIAS_FLAG);
private final Paint mPaintFill = new Paint(ANTI_ALIAS_FLAG);
private ViewPager mViewPager;
private ViewPager.OnPageChangeListener mListener;
private int mCurrentPage;
private int mSnapPage;
private float mPageOffset;
private int mScrollState;
private int mOrientation;
private boolean mCentered;
private boolean mSnap;
private int mTouchSlop;
private float mLastMotionX = -1;
private int mActivePointerId = INVALID_POINTER;
private boolean mIsDragging;
public CirclePageIndicator(Context context) {
this(context null);
}
public CirclePageIndicator(Context context AttributeSet attrs) {
this(context attrs R.attr.vpiCirclePageIndicatorstyle);
}
public CirclePageIndicator(Context context AttributeSet attrs int defstyle) {
super(context attrs defstyle);
if (isInEditMode()) return;
//Load defaults from resources
final Resources res = getResources();
final int defaultPageColor = res.getColor(R.color.default_circle_indicator_page_color);
final int defaultFillColor = res.getColor(R.color.default_circle_indicator_fill_col
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-05-25 02:12 android-app\
文件 289 2015-05-25 02:12 android-app\.gitignore
文件 357 2015-05-25 02:12 android-app\Gradle化说明
文件 18092 2015-05-25 02:12 android-app\LICENSE.txt
文件 4520 2015-05-25 02:12 android-app\README.md
文件 4183 2015-05-25 02:12 android-app\README_old.md
目录 0 2015-05-25 02:12 android-app\libraries\
目录 0 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\
文件 190 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\.gitignore
文件 4694 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\CHANGELOG.md
文件 4556 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\README.md
文件 4545 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\checkst
目录 0 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\library\
文件 466 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\library\.classpath
文件 837 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\library\.project
文件 264 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\library\AndroidManifest.xm
目录 0 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\library\libs\
文件 758727 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\library\libs\android-support-v4.jar
文件 1493 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\library\pom.xm
文件 382 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\library\project.properties
目录 0 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\library\res\
目录 0 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\library\res\color\
文件 1358 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\library\res\color\vpi__dark_theme.xm
文件 1370 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\library\res\color\vpi__light_theme.xm
目录 0 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\library\res\drawable-hdpi\
文件 147 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\library\res\drawable-hdpi\vpi__tab_selected_focused_holo.9.png
文件 148 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\library\res\drawable-hdpi\vpi__tab_selected_holo.9.png
文件 147 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\library\res\drawable-hdpi\vpi__tab_selected_pressed_holo.9.png
文件 146 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\library\res\drawable-hdpi\vpi__tab_unselected_focused_holo.9.png
文件 153 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\library\res\drawable-hdpi\vpi__tab_unselected_holo.9.png
文件 145 2015-05-25 02:12 android-app\libraries\Android-ViewPagerIndicator-master\library\res\drawable-hdpi\vpi__tab_unselected_pressed_holo.9.png
............此处省略2141个文件信息
相关资源
- java web mysql 网上商城完整源码 +sql 脚
- 基于Android的天气预报APP
- 《Android移动应用开发案例教程》项目
- java swing局域网的聊天源码
- 《Android第一行代码》源码
- JavaWeb库存管理系统V1.1源码
- android游戏开发源码 塔防游戏----精灵
- 简单实现Android 6.0指纹识别Demo
- 网上商城源码+数据库完全个人设计
- worldwind java 版源码
- android涂鸦
- android 蓝牙串口客户端
- 基于linux C/C++和android的酒店终端管理
- 基于Android的课堂点名系统
- 毕设外卖订餐系统JAVA+JSP+数据库+项目
- Unity2d RubysAdventrue正式版4.0Android平台
- Android API 文档含有中文版+英文官方版
- QQ音乐 安卓版 破解版 去广告版
- Android-一个模仿完成的新闻聚合app
- Android代码-安卓跑酷游戏
- javaWeb SSH进销存管理系统源代码
- 毕业设计-源码Java基于SSM网上试衣间设
- Android条形码解析扫描
- Android 俄罗斯方块与贪吃蛇
- mips64el-linux-android241157
- Android自定义折线图,可左右滑动,可
- Android Socket 服务端实现
- Android AppBarLayout+TabLayout+RecyclerView+Vi
- android端基于深度学习的车牌识别
- JAVA项目开发案例全程实录 第二版 全
评论
共有 条评论