Implement an error console. The console is displayed when the user has enabled debug in the browser (been to about:debug) and there are errors on the page. It can be toggled on/off in debug mode in the settings menu.
diff --git a/res/layout/custom_screen.xml b/res/layout/custom_screen.xml
index 2c41fef..3ea8ec9 100644
--- a/res/layout/custom_screen.xml
+++ b/res/layout/custom_screen.xml
@@ -28,10 +28,16 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
+
+ <LinearLayout android:id="@+id/error_console"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ />
+
<FrameLayout android:id="@+id/main_content"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:foreground="?android:attr/windowContentOverlay"
/>
</LinearLayout>
-</FrameLayout>
\ No newline at end of file
+</FrameLayout>
diff --git a/res/layout/error_console.xml b/res/layout/error_console.xml
new file mode 100644
index 0000000..0fffcde
--- /dev/null
+++ b/res/layout/error_console.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!-- Copyright (C) 2009 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:id="@+id/error_console_view_group_id"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical"
+ android:background="#000000">
+
+ <TextView android:id="@+id/error_console_header_id"
+ android:text="@string/error_console_header_text_minimized"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:paddingTop="2dip"
+ android:paddingBottom="2dip"
+ android:paddingLeft="5dip"
+ style="?android:attr/listSeparatorTextViewStyle"
+ android:visibility="gone"
+ />
+
+ <view class="com.android.browser.ErrorConsoleView$ErrorConsoleListView"
+ android:id="@+id/error_console_list_id"
+ android:layout_width="fill_parent"
+ android:layout_height="200dip"
+ android:visibility="gone"
+ android:layout_weight="1"
+ android:cacheColorHint="#000000"
+ />
+
+ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/error_console_eval_view_group_id"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:visibility="gone">
+
+ <EditText android:id="@+id/error_console_eval_text_id"
+ android:hint="@string/error_console_eval_text_hint"
+ android:layout_height="wrap_content"
+ android:scrollHorizontally="true"
+ android:inputType="text"
+ android:layout_width="0dip"
+ android:layout_gravity="left"
+ android:layout_weight="1.0"
+ />
+
+ <Button android:id="@+id/error_console_eval_button_id"
+ android:text="@string/error_console_eval_button_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ />
+ </LinearLayout>
+</LinearLayout>