一:
slider代替以前的viewpager的图片轮播
http://uisource.com/project/android-image-slider/
@InjectView(R.id.slider) SliderLayout mDemoSlider;
// 图片轮播 for (int i = 0; i < 3; i++) { TextSliderView textSliderView = new TextSliderView(context); textSliderView .description("demo"+i) .image(imageUrl) .setOnSliderClickListener(this); mDemoSlider.addSlider(textSliderView); }
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:custom="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <com.daimajia.slider.library.SliderLayout android:id="@+id/slider" android:layout_width="match_parent" custom:pager_animation="Accordion" custom:auto_cycle="true" custom:indicator_visibility="visible" custom:pager_animation_span="1100" android:layout_height="200dp"/> <!--custom:selected_drawable="@drawable/bird"--> <com.daimajia.slider.library.Indicators.PagerIndicator android:id="@+id/custom_indicator" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" custom:selected_color="#0095BF" custom:unselected_color="#55333333" custom:shape="oval" custom:selected_padding_left="6dp" custom:selected_padding_right="6dp" custom:unselected_padding_left="2dp" custom:unselected_padding_right="2dp" android:layout_centerHorizontal="true" android:layout_alignParentBottom="true" custom:selected_width="6dp" custom:selected_height="6dp" custom:unselected_width="6dp" custom:unselected_height="6dp" android:layout_marginBottom="20dp" />
二:
Picasso 图片加载
Picasso.with(context).load(url).into(image);
三:GsonFormat
https://github.com/zzz40500/GsonFormat
四:Parcelable 插件
Android Parcelable Code Generator