资源简介
Android 日历+记事本+提醒 源码
代码片段和文件信息
package com.readystatesoftware.viewbadger;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.Typeface;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.RoundRectShape;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewParent;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.DecelerateInterpolator;
import android.widget.frameLayout;
import android.widget.TabWidget;
import android.widget.TextView;
/**
* A simple text label view that can be applied as a “badge“ to any given {@link android.view.View}.
* This class is intended to be instantiated at runtime rather than included in xml layouts.
*
* @author Jeff Gilfelt
*/
public class BadgeView extends TextView {
public static final int POSITION_TOP_LEFT = 1;
public static final int POSITION_TOP_RIGHT = 2;
public static final int POSITION_BOTTOM_LEFT = 3;
public static final int POSITION_BOTTOM_RIGHT = 4;
public static final int POSITION_CENTER = 5;
private static final int DEFAULT_MARGIN_DIP = 5;
private static final int DEFAULT_LR_PADDING_DIP = 5;
private static final int DEFAULT_CORNER_RADIUS_DIP = 8;
private static final int DEFAULT_POSITION = POSITION_TOP_RIGHT;
private static final int DEFAULT_BADGE_COLOR = Color.parseColor(“#CCFF0000“); //Color.RED;
private static final int DEFAULT_TEXT_COLOR = Color.WHITE;
private static Animation fadeIn;
private static Animation fadeOut;
private Context context;
private View target;
private int badgePosition;
private int badgeMarginH;
private int badgeMarginV;
private int badgeColor;
private boolean isShown;
private ShapeDrawable badgeBg;
private int targetTabIndex;
public BadgeView(Context context) {
this(context (AttributeSet) null android.R.attr.textViewstyle);
}
public BadgeView(Context context AttributeSet attrs) {
this(context attrs android.R.attr.textViewstyle);
}
/**
* Constructor -
*
* create a new BadgeView instance attached to a target {@link android.view.View}.
*
* @param context context for this view.
* @param target the View to attach the badge to.
*/
public BadgeView(Context context View target) {
this(context null android.R.attr.textViewstyle target 0);
}
/**
* Constructor -
*
* create a new BadgeView instance attached to a target {@link android.widget.TabWidget}
* tab at a given index.
*
* @param context context for this view.
* @param target the TabWidget to attach the badge to.
* @param index the position of the tab within the target.
*/
public BadgeView(Context context TabWidget tar
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\
文件 372 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\.classpath
文件 39 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\.gitignore
文件 821 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\.project
文件 706 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\AndroidManifest.xm
文件 11393 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\LICENSE
文件 1417 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\README.markdown
目录 0 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\lib\
文件 7774 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\lib\android-viewbadger.jar
文件 1248 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\proguard.cfg
文件 360 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\project.properties
目录 0 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\res\
目录 0 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\res\drawable-hdpi\
文件 3566 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\res\drawable-hdpi\badge_ifaux.9.png
文件 4147 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\res\drawable-hdpi\icon.png
目录 0 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\res\drawable-ldpi\
文件 1723 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\res\drawable-ldpi\icon.png
目录 0 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\res\drawable-mdpi\
文件 2574 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\res\drawable-mdpi\icon.png
目录 0 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\res\layout\
文件 2170 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\res\layout\demos.xm
文件 1204 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\res\layout\main.xm
文件 5374 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\res\layout\tests.xm
目录 0 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\res\values\
文件 125 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\res\values\strings.xm
目录 0 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\src\
目录 0 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\src\com\
目录 0 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\src\com\readystatesoftware\
目录 0 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\src\com\readystatesoftware\viewbadger\
文件 11943 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\src\com\readystatesoftware\viewbadger\BadgeView.java
目录 0 2012-09-04 18:38 jgilfelt-android-viewbadger-9e5d8f2\src\viewbadger\
............此处省略3个文件信息
相关资源
- Android代码-多功能拨号盘源码.zip
- printershare直接破解版--11.5(适配andr
- android RDP远程桌面客户端源码
- 手机远程控制手机android
- spring boot+ios app+android app 即时通讯项目
- Androidrepo文件
- Aandroid 多线程断点续传同时多个大文
- Vue项目实现手机端上传图片,使用于
- Android多文件断点续传
- Android多线程文件夹及断点续传
- android 安卓 FTP 文件 管理
- Android-5.1.1_r1源码.7z
- mac版adb工具
- NFC Card万能读卡android程序
- Android直连Mysql数据库需要导入的jar包
- android实现谷歌地图项目
- Android日历239876
- 主页面框架
- Android双列滑动表格(双表头不动)
- android绘制心电图
- Android安卓中文API开发文档参考手册官
- Android开发的UI图标大全
- Crypto++ 7.0.0 for Android 已编译
- Android手机通过otg线外接usb摄像头
- AndroidStudio使用svn第一次提交忽略文件
- Android编程设计模式之原型模式详解
- 浅谈Android客户端与服务器的数据交互
- 基于android框架的客户端和基于java服务
- 好用的支持android 6.0以上的libserial_p
- AndroidStudio插件配置
评论
共有 条评论