Merge "Add UI components for bluetooth anomaly" into oc-mr1-dev

This commit is contained in:
Lei Yu
2017-08-24 17:35:15 +00:00
committed by Android (Google) Code Review
3 changed files with 93 additions and 4 deletions

View File

@@ -20,8 +20,38 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<TextView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="0dp"
android:text="Anomaly App"/> 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> </LinearLayout>

View 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>

View File

@@ -16,7 +16,7 @@ package com.android.settings.anomaly.tester;
import android.app.Activity; import android.app.Activity;
import android.os.Bundle; import android.os.Bundle;
import com.android.settings.anomaly.tester.R; import android.view.View;
public class AnomalyActivity extends Activity { public class AnomalyActivity extends Activity {
@@ -25,4 +25,8 @@ public class AnomalyActivity extends Activity {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main); setContentView(R.layout.activity_main);
} }
public void startBluetoothAnomaly(View view) {
// Add in future cl
}
} }