Edittext里面的复选框怎么样?

时间:2012-08-09 16:59:41

标签: android checkbox android-edittext evernote

我正在为我的论文在android中创建一个笔记应用程序,只是想问一下如何在EditText中放置复选框,如何将其保存在保存格式的数据库中。我在evernote上看到了这个 我真的不知道。感谢

1 个答案:

答案 0 :(得分:0)

尝试在RelativeLayout中将EditText与CheckBox重叠:

<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" >

    <EditText
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:inputType="text"
        />

    <CheckBox
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="the checkbox" />    
</RelativeLayout>

您希望将数据保存到保存格式的数据库中?如果它只是文本,您应该将其保存在文本类型的列中。可在此处找到数据库指南:http://www.vogella.com/articles/AndroidSQLite/article.html