• Andoird Studio写一个简单的生词本项目


    此博客链接:

    1.在activity_main.xml中复制下面代码。

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#CCCCCC"
        android:paddingBottom="@dimen/activity_vertical_margin"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:paddingTop="@dimen/activity_vertical_margin"
        tools:context=".MainActivity" >
     
        <LinearLayout 
            android:layout_marginTop="50dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
            
            <Button 
                style="?android:attr/buttonBarButtonStyle"
                android:id="@+id/insert"
                android:layout_width="100dp"
                android:layout_height="wrap_content"
                android:background="@drawable/shape" />
            <Button
                style="?android:attr/buttonBarButtonStyle"
                android:id="@+id/search"
                android:layout_width="100dp"
                android:layout_height="wrap_content"
                android:layout_marginLeft="10dp"
                android:background="@drawable/shape" />
            <Button 
                style="?android:attr/buttonBarButtonStyle"
                android:id="@+id/delete"
                android:layout_width="100dp"
                android:layout_height="wrap_content"
                android:layout_marginLeft="10dp"
                android:background="@drawable/shape" />
            
        </LinearLayout>
        
        <RelativeLayout 
            android:layout_marginTop="200dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
            
            <EditText 
                android:id="@+id/word"
                android:background="@drawable/edittextshape"
                android:layout_width="match_parent"
                android:layout_height="50dp"
                android:padding="3dp"
                android:inputType="textUri"
                android:hint="@string/word" />
     
            <ImageButton
                android:id="@+id/clear1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:contentDescription="@string/clear"
                android:src="@drawable/clear"
                android:visibility="visible" />
            
        </RelativeLayout>
        <RelativeLayout 
            android:layout_marginTop="300dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">        
            <EditText 
                android:inputType="text"
                android:id="@+id/detail"
                android:background="@drawable/edittextshape"
                android:layout_width="match_parent"
                android:layout_height="50dp"
                android:padding="3dp"
                android:hint="@string/detail"
                android:textColorHint="#AAAAAA" />        
            <ImageButton
                android:id="@+id/clear2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:contentDescription="@string/clear"
                android:src="@drawable/clear"
                android:visibility="visible" />
            
        </RelativeLayout>
        <RelativeLayout 
            android:layout_marginTop="400dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">        
            <EditText 
                android:background="@drawable/edittextshape"
                android:inputType="textUri"
                android:id="@+id/search_edittext"
                android:layout_width="match_parent"
                android:layout_height="50dp"
                android:padding="3dp"
                android:hint="@string/search" />
            
            <ImageButton
                android:id="@+id/clear3"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:contentDescription="@string/clear"
                android:src="@drawable/clear"
                android:visibility="visible" />        
        </RelativeLayout>
    </RelativeLayout>

     

  • 相关阅读:
    JVM 规范
    通过jmap查看jvm采用的垃圾收集器
    Nginx做前端Proxy时TIME_WAIT过多的问题
    nginx访问http自动跳转到https
    mysql5.7启动slave报错 ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository
    nginx检查报错 error while loading shared libraries: libprofiler.so.0: cannot open shared object file: No such file or directory
    Nginx+Center OS 7.2 开机启动设置(转载)
    windows下安装pycharm并连接Linux的python环境
    jenkins结合脚本实现代码自动化部署及一键回滚至上一版本
    centos7-安装mysql5.6.36
  • 原文地址:https://www.cnblogs.com/ping2yingshi/p/13095805.html
Copyright © 2020-2023  润新知