自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

原创 ViewPager+Fragment

一、来几个Fragment(eclipse) 1.继承Fragment并覆写onCreateView方法public class ChatFragment extends Fragment{ @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bun

2017-02-20 18:29:26 150

原创 设置RadioButton的drawableTop大小

private void setSize(RadioButton rb){ Rect rect=new Rect(); rect.set(0,0,60,60); //距离父窗体的距离,可以理解为左上和右下的坐标 Drawable[] drawables = rb.getCompoundDrawables(); drawables[

2017-02-20 17:28:19 928

原创 选择器selector

1.在选择器中加shape,使按钮有圆角等效果<selector xmlns:android="http://schemas.android.com/apk/res/android" > <item android:state_pressed="true"> <shape><corners android:radius="5dp"/> <solid a

2017-02-15 18:50:58 194

原创 Intent的各种flags

1.singleTop属性 Intent i=new Intent(this,MainActivity.class); //让MainActivity有singleTop的属性,即界面Main-->A-->B-->Main,此时栈内只有MainActivity i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | In

2017-02-15 17:58:12 403

原创 自定义Loading Dialog

一、准备好一组帧动画 1.在drawable-hdpi建一个xmlanimation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="false" > item android:duration="@integer/time_loading_dialo

2017-02-14 18:00:54 287

原创 资源索引

/* * 根据名字返回各种文件的索引 * layout * id * drawable * attr * string * style */ public static int getString(Context context , String name){ return context.get

2017-02-14 15:24:49 174

原创 ActiveAndroid基础使用

一、资源下载项目资源:https://github.com/pardom/ActiveAndroidjar包下载:https://github.com/pardom/ActiveAndroid/downloads二、基本工作Menifest.xml设置 在中添加 <!-- 数据库名字和版本号 --> <meta-data android:name="AA_D

2017-02-10 12:38:35 322

提示
确定要删除当前文章?
取消 删除