- 博客(8)
- 资源 (1)
- 收藏
- 关注
原创 去应用更新
String packageName = MainActivity.this.getPackageName();Intent intent = new Intent(Intent.ACTION_VIEW);intent.setData(Uri.parse("market://details?id=" + packageName));MainActivity.this.startActivit...
2018-10-31 09:32:24
235
原创 RelativeLayout的各种属性整理
相对于父元素android:layout_alignParentLeft="true":在父元素左边android:layout_alignParentRight="true":在父元素右边android:layout_alignParentTop="true":在父元素顶部android:layout_alignParentBottom="true":在父元素底部 相对于兄弟元素...
2018-07-23 10:45:41
172
原创 Animation动作框架
Animation框架定义了透明度,旋转,缩放和位移几种常见的动画,来控制View。1.透明度动画 AlphaAnimation alphaAnimation=new AlphaAnimation(0,1);//初始化透明,从0-1 alphaAnimation.setDuration(1000);//持续时间 view.startAnimation(alphaAnimati
2018-01-30 17:28:21
777
原创 RecyclerView使用
1.RecyclerView的用法:mRecyclerView = (RecyclerView) findViewById(R.id.my_recycler_view);// 设置布局管理器mLayoutManager=new LayoutManager();mRecyclerView.setLayoutManager(mLayoutManager);// 设置adapter
2018-01-29 17:09:25
174
原创 TabLayout+viewPager
实现过程1.在build.gradle中添加依赖,例如:compile 'com.android.support:support-v4:23.4.0'compile 'com.android.support:design:23.4.0'2.然后在主布局文件activity_main.xml中添加布局控件: xmlns:app="http://schemas.and
2018-01-25 11:19:23
192
原创 android之Fragment切换
1.初始化Fragment@Overrideprotected void initView() { homeFragment=new HomeFragment.getInstance(); myFragment=new MyFragment.getInstance(); fragmentManager = getSupportFragment
2018-01-24 17:18:14
294
原创 Android倒计时之 CountDownTimer
这里给大家介绍一种android中倒计时方法, 通过一个简单的例子来使用CountDownTimer实现倒计时5秒: mTimeCount = new TimeCount(6000, 1000); mTimeCount.start();/** * 倒计时 */class TimeCount extends CountDownTimer
2018-01-24 11:06:19
253
转载 java.util.Queue使用方法
在java5中新增加了java.util.Queue接口,用以支持队列的常见操作。该接口扩展了java.util.Collection接口。Queue使用时要尽量避免Collection的add()和remove()方法,而是要使用offer()来加入元素,使用poll()来获取并移出元素。它们的优点是通过返回值可以判断成功与否,add()和remove()方法在失败的时候会抛出异常。 如
2018-01-18 16:32:24
633
greenDaoDemo
2018-02-13
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人