码迷,mamicode.com
首页 > 其他好文 > 详细

练习2

时间:2015-06-15 19:01:50      阅读:96      评论:0      收藏:0      [点我收藏+]

标签:

<?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="@drawable/menu_background"
    android:orientation="horizontal"
    android:paddingBottom="40dp"
    android:paddingLeft="25dp"
    android:paddingRight="25dp"
    android:paddingTop="25dp" >
    <Gallery android:id="@+id/gallery_more"android:layout_width="0dp"android:layout_height="match_parent"
        android:layout_weight="1" />
    <LinearLayoutandroid:layout_width="wrap_content"android:layout_height="match_parent"
android:layout_marginLeft="20dp"android:layout_marginTop="20dp"android:orientation="vertical" >
        <Buttonandroid:id="@+id/btn_browseOrder"android:layout_width="wrap_content"android:layout_height="wrap_content"
            android:layout_marginBottom="10dp"android:background="@drawable/btn_browse_order" />
        <Buttonandroid:id="@+id/btn_change_table" android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:layout_marginBottom="10dp" android:background="@drawable/btn_change_table" />
        <Button
            android:id="@+id/btn_merge_table" android:layout_width="wrap_content"android:layout_height="wrap_content"
            android:layout_marginBottom="10dp" android:background="@drawable/btn_merge_table" />
        <Button
            android:id="@+id/btn_option"android:layout_width="wrap_content"android:layout_height="wrap_content"
            android:layout_marginBottom="10dp" android:background="@drawable/btn_option" /></LinearLayout></LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center_horizontal"
    android:orientation="vertical"
    android:background="@drawable/menu_background" >
    <RelativeLayout
        android:id="@+id/relativeLayout1"android:layout_width="wrap_content"android:layout_height="wrap_content"
        android:layout_marginBottom="50dp"
        android:layout_marginLeft="70dp"
        android:layout_marginRight="70dp"
        android:layout_marginTop="50dp"
        android:paddingTop="30dp"
        android:background="@drawable/login_bg" >
        
        <TextView
            android:id="@+id/loginnametextview"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_marginTop="25dp"
            android:layout_marginLeft="65dp"
            android:layout_toLeftOf="@+id/edtxt_login_pwd"
            android:text="@string/username"
            android:textColor="#000000"
            android:textSize="20sp" >
        </TextView>
        <EditText
            android:id="@+id/edt_username"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_marginRight="15dp"
            android:layout_marginLeft="10dp"
            android:layout_alignTop="@+id/loginnametextview"
            android:layout_toRightOf="@+id/loginnametextview"
            android:background="@drawable/input_bg"
            android:hint="@string/username_hint"
            android:singleLine="true"
            android:text="login01" >
        </EditText>
        
        <TextView
            android:id="@+id/loginpasswordtextview"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_below="@+id/edt_username"
            android:layout_marginLeft="65dp"
            android:layout_marginTop="15dp"
            android:text="@string/password"
            android:textColor="#000000"
            android:textSize="20sp" >
        </TextView>
         <EditText
            android:id="@+id/edt_password"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginRight="15dp"
            android:layout_marginLeft="10dp"
            android:layout_alignParentRight="true"
            android:layout_alignTop="@+id/loginpasswordtextview"
            android:layout_toRightOf="@+id/loginpasswordtextview"
            android:background="@drawable/input_bg"
            android:inputType="textPassword"
            android:hint="@string/password_hint"
            android:text="999999" >
        </EditText>
        
         <Button
            android:id="@+id/btn_login"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/edt_password"
            android:layout_marginTop="15dp"
            android:layout_alignRight="@+id/edt_password"
            android:background="@drawable/btn_login" >
        </Button>
        

    </RelativeLayout>

</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="match_parent"
    android:background="@drawable/menu_background"
    android:gravity="center_horizontal"
    android:orientation="vertical"
    android:paddingLeft="25dp"
    android:paddingRight="25dp"
    android:paddingTop="25dp" >

    <Gallery
        android:id="@+id/gallery_main"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_weight="1" />

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="40dp"
        android:layout_marginTop="10dp"
        android:gravity="center" >

        <Button
            android:id="@+id/btn_order"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="5dp"
            android:background="@drawable/btn_choosedish" />

        <Button
            android:id="@+id/btn_checkout"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="5dp"
            android:background="@drawable/btn_checkout" />

        <Button
            android:id="@+id/btn_orderSchedule"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="5dp"
            android:background="@drawable/btn_order_schedule" />

        <Button
            android:id="@+id/btn_increaseOrder"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="5dp"
            android:background="@drawable/btn_add_order" />

        <Button
            android:id="@+id/btn_more"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="5dp"
            android:background="@drawable/btn_more" />
    </LinearLayout>
</LinearLayout>
<?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="@drawable/menu_background"
    android:orientation="vertical"
    android:paddingLeft="25dp"
    android:paddingRight="25dp"
    android:paddingTop="25dp" >
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center_vertical"
        android:orientation="horizontal" >
        <TextView
            android:id="@+id/tv_orderId4checkDetail"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/order_id"
            android:textColor="#000000" />

        <TextView
            android:id="@+id/tv_totalPrice4checkDetail"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="10dp"
            android:text="@string/total_price"
            android:textColor="#000000" />

        <TextView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:gravity="right"
            android:text="@string/member_name"
            android:textColor="#000000" />

        <EditText
            android:id="@+id/tv_memberName"
            android:layout_width="140dp"
            android:layout_height="wrap_content"
            android:background="@drawable/input_bg"
            android:singleLine="true"
            android:textSize="10sp" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:orientation="vertical" >

        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/title_bg"
            android:gravity="center_vertical"
            android:orientation="horizontal" >

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:gravity="center"
                android:text="@string/index"
                android:textColor="#000000" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="3"
                android:gravity="center"
                android:text="@string/dish_name"
                android:textColor="#000000" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:gravity="center"
                android:text="@string/unit_price"
                android:textColor="#000000" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:gravity="center"
                android:text="@string/count"
                android:textColor="#000000" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:gravity="center"
                android:text="@string/price"
                android:textColor="#000000" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:gravity="center"
                android:text="@string/dishclass"
                android:textColor="#000000" />
        </LinearLayout>

        <ListView
            android:id="@+id/list_dishes4checkDetail"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:background="@drawable/border3"
            android:cacheColorHint="#00000000"
            android:fadingEdge="none"
            android:listSelector="#12edf8" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="40dp"
        android:layout_marginTop="10dp"
        android:gravity="right|center_vertical" >
        <Button
            android:id="@+id/btn_back2checkout"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginRight="5dp"
            android:background="@drawable/btn_back" />
        <Button
            android:id="@+id/btn_checkoutOrder"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/btn_ok" />
    </LinearLayout>
</LinearLayout>


练习2

标签:

原文地址:http://my.oschina.net/u/1994482/blog/466977

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!