- 博客(7)
- 收藏
- 关注
原创 使用Fragment代替Activity
activity_fragment: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/fragment_container" android:layout_width="match_parent" android:layout_hei
2016-10-28 00:05:42 1793 3
原创 通过Intent传递对象的另类方法
我们都知道,通过Intent在Activity之间传递对象一般有两种方法,Serializable和Parcelable,那有没有其他的方法呢?事实上本人发现一个非常简单的方法,分享出来,请大家不吝赐教。
2016-10-14 23:35:30 404
原创 Bitmap和Drawable互相转换的方法
public class ImageUtils { public static Bitmap drawable2Bitmap(Drawable drawable) { return ((BitmapDrawable) drawable).getBitmap(); } public static Drawable bitmap2Drawable(Contex
2016-10-14 18:05:52 727
原创 使用Toolbar和DrawerLayout实现酷炫的侧滑动画效果
activity_main.xml: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-aut
2016-10-11 18:44:35 1074
原创 半透明效果的Activity
要实现半透明效果的Activity很简单,只要把Activity的主题中的android:windowBackground设置为半透明的背景色,并且把android:windowIsTranslucent设置为true即可,即: @color/systemSetupBackground true @android:style/Animation.Activity
2016-10-10 18:00:29 533
原创 TabLayout + ViewPager实现标签栏效果
首先在布局文件中添加TabLayout: <android.support.design.widget.TabLayout android:id="@+id/ivy_module_widget_shop_tab_layout" android:layout_width="match_parent" android:layout_height="wrap_content
2016-10-09 18:17:08 635
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人