<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<!-- 滚动条 -->
<!-- 每个ScrollView控件里面只能包含一个子元素、如果有多个子元素可用现行布局包裹起来 -->

<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

<LinearLayout
android:id="@+id/linear"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_horizontal">
<!-- 图片控件 -->
<ImageView
android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:src="@drawable/a" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world"
android:textSize="30sp" />


</LinearLayout>
</ScrollView>

</LinearLayout>

更多相关文章

  1. android控件相对布局
  2. Android CheckBox控件使用OnClickListener和OnCheckedChangeList
  3. Android 基本控件
  4. Android下拉刷新控件
  5. android之AutoCompleteTextView控件用法
  6. 控件属性:
  7. Android:控件GridView的使用实例
  8. 系出名门Android(5) - 控件(View)

随机推荐

  1. Android 文件的保存与读取之SDCard(SD卡)存
  2. android中移植 c/c++程序
  3. 解决 Android 在Eclipse 开发中 Class No
  4. android gravity and LinerarLayout for
  5. android vim编辑器的移植
  6. Android 使用Vitamio打造自己的万能播放
  7. Android SDK r20.x更新时,没有Android API
  8. android webview拦截超链接
  9. Android历史
  10. Android 2011年开发风向标