Add UI components for bluetooth anomaly
Bug: 62602318 Test: make -j40 AnomalyTester Change-Id: I4584e6ada784d8d87558a5b30cf55e2de33d443a
This commit is contained in:
@@ -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>
|
55
tests/anomaly-tester/res/layout/bluetooth_anomaly.xml
Normal file
55
tests/anomaly-tester/res/layout/bluetooth_anomaly.xml
Normal file
@@ -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>
|
@@ -16,7 +16,7 @@ package com.android.settings.anomaly.tester;
|
||||
|
||||
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 @@ public class AnomalyActivity extends Activity {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
}
|
||||
|
||||
public void startBluetoothAnomaly(View view) {
|
||||
// Add in future cl
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user