<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(NDK+JNI)---JNI全面解析
  2. android前端与php后端连接(以登录为例)
  3. Android(安卓)Fragment 真正的完全解析(上
  4. android项目中bindService失败的原因
  5. android looper,handler,messagequeue,me
  6. Android(安卓)Task的应用
  7. Android(安卓)WebView控件
  8. 【Android(安卓)Developers Training】 1
  9. Android中实现震动的方法
  10. selector 背景选择器