![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Android笔记
zlm_julie
这个作者很懒,什么都没留下…
展开
-
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 · 413 阅读 · 0 评论 -
设置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 · 943 阅读 · 0 评论 -
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 · 154 阅读 · 0 评论 -
资源索引
/* * 根据名字返回各种文件的索引 * layout * id * drawable * attr * string * style */ public static int getString(Context context , String name){ return context.get原创 2017-02-14 15:24:49 · 177 阅读 · 0 评论 -
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 · 328 阅读 · 0 评论 -
选择器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 · 198 阅读 · 0 评论 -
自定义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 · 293 阅读 · 0 评论