有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java如何有效阻止更改所有活动字段?

如何阻止活动的所有字段?我试着使用安卓:editable="false"安卓:inputType="none",但没有解决我的问题

我不希望任何字段可以更改,只需阅读

字段是EditTextSpinner

          <TextView
            安卓:id="@+id/textId_loan"
            安卓:layout_width="match_parent"
            安卓:layout_height="33dp"
            安卓:text="ID loan"
            安卓:textSize="18sp"
            tools:layout_editor_absoluteX="0dp"
            tools:layout_editor_absoluteY="39dp" />
         
          <Spinner
            安卓:id="@+id/spinnerId_owner"
            安卓:layout_width="match_parent"
            安卓:layout_height="34dp"
            安卓:contentDescription="Checkbox to choose the owner of the book from which to lend the book." />

          <Spinner
            安卓:id="@+id/spinnerId_book"
            安卓:layout_width="match_parent"
            安卓:layout_height="33dp"
            安卓:contentDescription="Checkbox to choose the book from which to borrow." />
         
         <EditText
            安卓:id="@+id/editLoan_date"
            安卓:layout_width="match_parent"
            安卓:layout_height="wrap_content"
            安卓:contentDescription="Book loan date."
            安卓:hint="Book loan date"
            安卓:inputType="date" />

         <EditText
            安卓:id="@+id/editDate_return"
            安卓:layout_width="match_parent"
            安卓:layout_height="wrap_content"
            安卓:contentDescription="Book return date."
            安卓:ems="10"
            安卓:hint="Book return date"
            安卓:inputType="date"/>

共 (0) 个答案