Skip to content

Commit

Permalink
[nrf noup] [android] Use ScrollView in main screen
Browse files Browse the repository at this point in the history
Some buttons were not visible on low-resolution devices.

Signed-off-by: Damian Krolik <[email protected]>
  • Loading branch information
Damian-Nordic committed Jun 6, 2022
1 parent 2d1f8a1 commit 29e7dbd
Showing 1 changed file with 94 additions and 88 deletions.
Original file line number Diff line number Diff line change
@@ -1,103 +1,109 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<Button
android:id="@+id/scanQrBtn"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/scan_qr_code_btn_text" />
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="wrap_content">

<Button
android:id="@+id/provisionWiFiCredentialsBtn"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/provision_wifi_credentials_btn_text" />
<Button
android:id="@+id/scanQrBtn"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/scan_qr_code_btn_text" />

<Button
android:id="@+id/provisionThreadCredentialsBtn"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/provision_thread_credentials_btn_text" />
<Button
android:id="@+id/provisionWiFiCredentialsBtn"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/provision_wifi_credentials_btn_text" />

<Button
android:id="@+id/provisionCustomFlowBtn"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/provision_custom_flow_btn_text" />
<Button
android:id="@+id/provisionThreadCredentialsBtn"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/provision_thread_credentials_btn_text" />

<Button
android:id="@+id/onOffClusterBtn"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/on_off_level_btn_text" />
<Button
android:id="@+id/provisionCustomFlowBtn"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/provision_custom_flow_btn_text" />

<Button
android:id="@+id/sensorClustersBtn"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/sensor_client_btn_text" />
<Button
android:id="@+id/onOffClusterBtn"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/on_off_level_btn_text" />

<Button
android:id="@+id/multiAdminClusterBtn"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/multi_admin_client_btn_text" />
<Button
android:id="@+id/sensorClustersBtn"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/sensor_client_btn_text" />

<Button
android:id="@+id/opCredClustersBtn"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/op_cred_client_btn_text" />
<Button
android:id="@+id/multiAdminClusterBtn"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/multi_admin_client_btn_text" />

<Button
android:id="@+id/basicClusterBtn"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/basic_cluster_btn_text" />
<Button
android:id="@+id/opCredClustersBtn"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/op_cred_client_btn_text" />

<Button
android:id="@+id/attestationTestBtn"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:visibility="gone"
android:text="@string/attestation_test_btn_text" />
<Button
android:id="@+id/basicClusterBtn"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/basic_cluster_btn_text" />

<Button
android:id="@+id/wildcardBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/wildcard_btn_text" />
<Button
android:id="@+id/attestationTestBtn"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:visibility="gone"
android:text="@string/attestation_test_btn_text" />

<Button
android:id="@+id/clusterInteractionBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/cluster_interaction_tool" />
<Button
android:id="@+id/wildcardBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/wildcard_btn_text" />

</LinearLayout>
<Button
android:id="@+id/clusterInteractionBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/cluster_interaction_tool" />

</LinearLayout>

</ScrollView>

0 comments on commit 29e7dbd

Please sign in to comment.