现在的位置: 首页 > 综合 > 正文

android实现 vertical_horina…布局

2013年12月08日 ⁄ 综合 ⁄ 共 1897字 ⁄ 字号 评论关闭
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#ffffff"
    android:gravity="center"
    android:orientation="vertical" >

    <TableLayout
        android:id="@+id/rl_titlebar"
        android:layout_width="match_parent"
        android:layout_height="40dip"
        android:background="@drawable/top_bar_bg" >

        <TableRow>

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="28dip"
                android:layout_marginLeft="2dip"
                android:gravity="center_vertical"
                android:text="@string/website" />
        </TableRow>
    </TableLayout>

    <ScrollView
        android:id="@+id/ScrollView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scrollbars="vertical" >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical" >

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                 android:gravity="center_vertical"
                android:orientation="horizontal" >

              
                    <ImageView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:src="@drawable/index_search" />
                

                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                     android:gravity="center_vertical"
                    android:orientation="vertical" >
                    <TextView 
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="现在的时间"
                        android:textSize="28px"
                        />
                    <TextView 
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="天气真的不错"
                        android:textSize="18px"
                        />
                </LinearLayout>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:gravity="center_vertical"
                    android:orientation="vertical" >
                    
                    <ImageView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:src="@drawable/home_index_arrow" />
                    
                </LinearLayout>
            </LinearLayout>
        </LinearLayout>
    </ScrollView>

</LinearLayout>

效果

抱歉!评论已关闭.