Merge "Add UI components for bluetooth anomaly" into oc-mr1-dev
am: 3949ed53a9
Change-Id: I2cfae5ecff424ff042e0a0b29a610908563b8348
diff --git a/tests/anomaly-tester/res/layout/activity_main.xml b/tests/anomaly-tester/res/layout/activity_main.xml
index 6977d78..63d025e 100644
--- a/tests/anomaly-tester/res/layout/activity_main.xml
+++ b/tests/anomaly-tester/res/layout/activity_main.xml
@@ -20,8 +20,38 @@
android:layout_width="match_parent"
android:orientation="vertical">
- <TextView
+ <ScrollView
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="Anomaly App"/>
+ android:layout_height="0dp"
+ android:layout_weight="4"
+ android:padding="4dp"
+ android:textSize="16sp">
+ <TextView
+ android:id="@+id/displayText"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:maxLines="100000"/>
+ </ScrollView>
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="2dp"
+ android:background="#444444"/>
+
+ <ScrollView
+ android:layout_height="0dp"
+ android:layout_width="match_parent"
+ android:layout_weight="6"
+ android:padding="5dp">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:gravity="center">
+
+ <include layout="@layout/bluetooth_anomaly"/>
+
+ </LinearLayout>
+ </ScrollView>
</LinearLayout>
\ No newline at end of file
diff --git a/tests/anomaly-tester/res/layout/bluetooth_anomaly.xml b/tests/anomaly-tester/res/layout/bluetooth_anomaly.xml
new file mode 100644
index 0000000..7de558e
--- /dev/null
+++ b/tests/anomaly-tester/res/layout/bluetooth_anomaly.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:paddingBottom="6dp">
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="Bluetooth Anomaly"
+ android:textSize="16sp"/>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+ <EditText
+ android:id="@+id/bluetooth_threshold"
+ android:layout_width="0dp"
+ android:layout_weight="3"
+ android:layout_height="wrap_content"
+ android:hint="Threshold(ms)"/>
+
+ <EditText
+ android:id="@+id/bluetooth_run_time"
+ android:layout_width="0dp"
+ android:layout_weight="3"
+ android:layout_height="wrap_content"
+ android:hint="Run time(ms)"/>
+
+ <Button
+ android:layout_width="0dp"
+ android:layout_weight="2"
+ android:layout_height="wrap_content"
+ android:text="START"
+ android:onClick="startBluetoothAnomaly"/>
+ </LinearLayout>
+
+</LinearLayout>
\ No newline at end of file
diff --git a/tests/anomaly-tester/src/com/android/settings/anomaly/tester/AnomalyActivity.java b/tests/anomaly-tester/src/com/android/settings/anomaly/tester/AnomalyActivity.java
index 8628091..6aa8edd 100644
--- a/tests/anomaly-tester/src/com/android/settings/anomaly/tester/AnomalyActivity.java
+++ b/tests/anomaly-tester/src/com/android/settings/anomaly/tester/AnomalyActivity.java
@@ -16,7 +16,7 @@
import android.app.Activity;
import android.os.Bundle;
-import com.android.settings.anomaly.tester.R;
+import android.view.View;
public class AnomalyActivity extends Activity {
@@ -25,4 +25,8 @@
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
+
+ public void startBluetoothAnomaly(View view) {
+ // Add in future cl
+ }
}