- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 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 160
原创 设置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 950
原创 选择器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 201
原创 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 415
原创 自定义Loading Dialog
一、准备好一组帧动画 1.在drawable-hdpi建一个xml animation-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 295
原创 资源索引
/* * 根据名字返回各种文件的索引 * layout * id * drawable * attr * string * style */ public static int getString(Context context , String name){ return context.get
2017-02-14 15:24:49 181
原创 ActiveAndroid基础使用
一、资源下载 项目资源:https://github.com/pardom/ActiveAndroid jar包下载:https://github.com/pardom/ActiveAndroid/downloads 二、基本工作 Menifest.xml设置 在中添加 <!-- 数据库名字和版本号 --> <meta-data android:name="AA_D
2017-02-10 12:38:35 335
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人