-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Android] Implement Write Attribute in CHIPTool (#25457)
* Implement Write API UI * Update Wildcard Fragment for write * Update examples/android/CHIPTool/app/src/main/res/values/strings.xml Co-authored-by: Cliff Chung <[email protected]> * Modify some logs --------- Co-authored-by: Cliff Chung <[email protected]>
- Loading branch information
Showing
5 changed files
with
249 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
examples/android/CHIPTool/app/src/main/res/layout/write_dialog.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:padding="16dp"> | ||
|
||
<TextView | ||
android:id="@+id/titleText" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/write_dialog_title_text" | ||
android:textSize="22sp" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<TextView | ||
android:id="@+id/titleValueTypeTv" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:text="@string/write_dialog_value_type_hint" | ||
android:textSize="16sp" | ||
android:layout_marginTop="8dp" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/titleText" /> | ||
|
||
<Spinner | ||
android:id="@+id/writeValueTypeSp" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:hint="@string/subscribe_dialog_is_urgent_hint" | ||
android:inputType="text" | ||
android:spinnerMode="dropdown" | ||
android:textSize="16sp" | ||
android:layout_marginTop="8dp" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/titleValueTypeTv" /> | ||
|
||
<EditText | ||
android:id="@+id/writeValueEd" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:hint="@string/write_dialog_write_value_hint" | ||
android:inputType="text" | ||
android:textSize="16sp" | ||
android:layout_marginBottom="8dp" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/writeValueTypeSp" /> | ||
|
||
<EditText | ||
android:id="@+id/dataVersionEd" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:hint="@string/write_dialog_data_version_hint" | ||
android:inputType="text" | ||
android:textSize="16sp" | ||
android:layout_marginBottom="8dp" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/writeValueEd" /> | ||
|
||
<EditText | ||
android:id="@+id/timedRequestTimeoutEd" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:hint="@string/write_dialog_timed_request_timeout_hint" | ||
android:inputType="number" | ||
android:textSize="16sp" | ||
android:layout_marginBottom="8dp" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/dataVersionEd" /> | ||
|
||
<EditText | ||
android:id="@+id/imTimeoutEd" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:hint="@string/write_dialog_im_timeout_hint" | ||
android:inputType="number" | ||
android:textSize="16sp" | ||
android:layout_marginBottom="8dp" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/timedRequestTimeoutEd" | ||
app:layout_constraintBottom_toTopOf="@id/exampleHint"/> | ||
<TextView | ||
android:id="@+id/exampleHint" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/write_dialog_user_guide_hint" | ||
android:textSize="10sp" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/imTimeoutEd" | ||
app:layout_constraintBottom_toTopOf="@id/writeBtn"/> | ||
|
||
<Button | ||
android:id="@+id/writeBtn" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/write_dialog_write_btn_text" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" /> | ||
</androidx.constraintlayout.widget.ConstraintLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters