好玩的水平滚动图,这个图片的原理很简单,就是一个火炬水平滚动足球的小小的一个源码的小案例,这个案例一看源码就会明白的,来看一下效果图:


  MAIN.XML文件代码为
  

  <?xml version="1.0" encoding="utf-8"?>  <HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"  android:layout_width="fill_parent"  android:layout_height="wrap_content"  >  <LinearLayout androidrientation="horizontal"  android:layout_width="fill_parent"  android:layout_height="fill_parent"  >  <TextView  android:layout_width="fill_parent"  android:layout_height="wrap_content"  android:text="滚动视图"  android:textSize="30dp"  />  <ImageView  android:layout_width="wrap_content"  android:layout_height="wrap_content"  android:text="@drawable/item1"  />  <TextView  android:layout_width="wrap_content"  android:layout_height="wrap_content"  android:text="水平滚动"  android:textSize="30dp"  />  <ImageView  android:layout_width="wrap_content"  android:layout_height="wrap_content"  android:text="@drawable/item2"  />  <ImageView  android:layout_width="wrap_content"  android:layout_height="wrap_content"  android:text="@drawable/item3"  />  <ImageView  android:layout_width="wrap_content"  android:layout_height="wrap_content"  android:text="@drawable/item4"  />  <ImageView  android:layout_width="wrap_content"  android:layout_height="wrap_content"  android:text="@drawable/item5"  />  </LinearLayout>  </HorizontalScrollView>  

点击此处下载源码


转载:http://www.adobex.com/android/source/details/00000168.htm

更多相关文章

  1. 2014.01.21 ——— android 关联android-support源码
  2. 细数Android(安卓)Studio中使用junit4测试框架中的坑
  3. Android内容提供者源码
  4. android源码下载方式
  5. 【30篇突击 android】源码统计四
  6. Android(安卓)4.0.1 源码下载,编译和运行
  7. scrollview 滚动条
  8. android支持多行的radiogroup
  9. [android源码下载索引贴】微信+二维码那都不是事......

随机推荐

  1. Android(安卓)横竖屏切换小结
  2. android 网络联接
  3. android studio 中引入第三方jar包(非源
  4. AndroidStudio快捷键整理--2
  5. Android: 启动init.rc 中service的权限问
  6. Android(安卓)浅析 EventBus (二) 原理
  7. android studio introduction No.3 hotke
  8. 报错:Could not find lint.jar (com.andro
  9. 【Android】 Activity
  10. 关于android的pan_display