• 布局主要代码


    Activity_main:

     <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:background="@drawable/bg2" >

     <Button         android:id="@+id/button2"         android:layout_width="fill_parent"         android:layout_height="wrap_content"         android:layout_alignParentLeft="true"         android:layout_below="@+id/button1"         android:text="错题巩固" />

        <Button         android:id="@+id/button3"         android:layout_width="fill_parent"         android:layout_height="wrap_content"         android:layout_alignParentLeft="true"         android:layout_below="@+id/button2"         android:text="退出" />

        <Button         android:id="@+id/button1"         android:layout_width="fill_parent"         android:layout_height="wrap_content"         android:layout_alignParentLeft="true"         android:layout_alignParentTop="true"         android:layout_marginTop="148dp"         android:text="开始" />

    </RelativeLayout>

    CAL_MAIN:

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/RelativeLayout1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/bg2"
        android:orientation="vertical" >

    <Button
            android:id="@+id/button4"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_above="@+id/textView2"
            android:layout_alignParentLeft="true"
            android:layout_marginBottom="18dp"
            android:text="确定" />

       <TextView     

        android:id="@+id/textView1"  

           android:layout_width="fill_parent"   

          android:layout_height="50dp

    "         android:layout_above="@+id/EditText1"  

           android:layout_centerHorizontal="true"  

           android:layout_marginBottom="30dp"  

           android:gravity="center"     

        android:textSize="20px"   

          android:editable="true" />

     <EditText     

        android:id="@+id/EditText1"  

           android:layout_width="wrap_content"    

         android:layout_height="50dp"   

          android:layout_above="@+id/button4"    

         android:layout_centerHorizontal="true"  

           android:digits="1234567890.-"   

          android:ems="10"       

      android:numeric="decimal" >

     <TextView       

      android:id="@+id/textView2"   

          android:layout_width="230dp"    

         android:layout_height="70dp"    

         android:layout_alignParentBottom="true"    

         android:layout_alignParentRight="true"  

           android:layout_marginBottom="135dp"   

          android:editable="true"      

       android:textSize="20px" />

        <ImageView     

        android:id="@+id/imageView1"   

          android:layout_width="wrap_content"       

      android:layout_height="wrap_content"    

         android:layout_alignBottom="@+id/textView2"  

           android:layout_alignTop="@+id/textView2"   

          android:layout_alignParentLeft="true"  

           android:layout_toLeftOf="@+id/textView2"/>

    </RelativeLayout>

            <requestFocus />    

    </EditText>

    SHOW_MAIN:

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/LinearLayout1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:background="@drawable/bg2">

    <LinearLayout
           android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:layout_gravity="center">

      <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center" >


                <TextView
                    android:id="@+id/textView1"
                    android:layout_width="93dp"
                    android:layout_height="wrap_content"
                    android:editable="true"
                    android:text="" />


                <EditText
                    android:id="@+id/EditText1"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:digits="1234567890.-"
                    android:ems="10"
                    android:numeric="decimal"
                    android:text="" >

          <requestFocus />
                </EditText>
            </LinearLayout>

      <Button
            android:id="@+id/button6"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="确定" />
            <Button
            android:id="@+id/button7"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="下一题" />
            <Button

    android:id="@+id/button8"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="从错题库删除" />
            <Button
            android:id="@+id/button9"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="返回" />
      <LinearLayout
           android:layout_width="fill_parent"
          android:layout_height="match_parent"
          android:orientation="horizontal">
                <ImageView

     android:id="@+id/imageView2"        

             android:layout_width="fill_parent"      

               android:layout_height="70dp"     

                android:layout_weight="5"/>

                <TextView         

            android:id="@+id/textView2"   

                  android:layout_width="fill_parent"       

              android:layout_height="70dp"          

            android:layout_weight="3"               

      android:editable="true"          

           android:text="" />   

          </LinearLayout>

                </LinearLayout>

    </LinearLayout>

  • 相关阅读:
    Codeforces Round #388 (Div. 2)
    Codeforces Round #388 (Div. 2)
    Codeforces Round #388 (Div. 2)
    FZU 1914 单调队列
    ACM学习历程—POJ 3764 The xor-longest Path(xor && 字典树 && 贪心)
    ACM学习历程—SGU 275 To xor or not to xor(xor高斯消元)
    ACM学习历程—CSU 1216 异或最大值(xor && 贪心 && 字典树)
    ACM学习历程—HDU 5512 Pagodas(数学)
    ACM学习历程—HDU5521 Meeting(图论)
    ACM学习历程—HDU1030 Delta-wave(数学)
  • 原文地址:https://www.cnblogs.com/wuzijian/p/5059861.html
Copyright © 2020-2023  润新知