FreeOfCharge2022-23/FtcRobotController/src/main/res/layout/activity_ftc_controller.xml
Nathan Wang cfafe34339 initial commit
\
2021-10-19 17:53:06 -05:00

191 lines
6.9 KiB
XML

<!--
Copyright (c) 2014, 2015 Qualcomm Technologies Inc
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted (subject to the limitations in the disclaimer below) provided that
the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
Neither the name of Qualcomm Technologies Inc nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS
LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:style="http://schemas.android.com/apk/res-auto"
tools:context="org.firstinspires.ftc.robotcontroller.internal.FtcRobotControllerActivity"
android:focusable="true"
android:id="@+id/entire_screen"
android:orientation="vertical">
<!-- black bar on top -->
<RelativeLayout
android:id="@+id/top_bar"
android:layout_width="fill_parent"
android:layout_height="80dp"
android:background="@color/background_black">
<ImageView
android:id="@+id/robotIcon"
android:src="@drawable/icon_robotcontroller"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:adjustViewBounds="true"
android:layout_margin="1dp"/>
<TextView
android:id="@+id/textDeviceName"
android:layout_toEndOf="@id/robotIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/textWhite"
android:textAppearance="?android:attr/textAppearanceMedium"
android:padding="8dp"
android:textStyle="bold"/>
<ImageButton
android:id="@+id/menu_buttons"
android:scaleType="fitXY"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_menu"
android:background="@android:color/transparent"
android:padding="15dp"
android:adjustViewBounds="true"
android:layout_alignParentEnd="true"
android:layout_centerInParent="true"
android:layout_centerHorizontal="true"
android:layout_margin="10dp"/>
</RelativeLayout>
<!-- end of black bar -->
<include layout="@layout/header"
android:id="@+id/included_header"/>
<RelativeLayout
android:background="@color/background_very_light_grey"
android:id="@+id/RelativeLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:keepScreenOn="true"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin" >
<TextView
android:id="@+id/textNetworkConnectionStatus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:text="" />
<TextView
android:id="@+id/textRobotStatus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/textNetworkConnectionStatus"
android:visibility="invisible"
android:text="" />
<TextView
android:id="@+id/textOpMode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/textRobotStatus"
android:visibility="invisible"
android:text="" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/textOpMode"
android:layout_above="@+id/textGamepad1">
<LinearLayout
android:id="@+id/monitorContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/cameraMonitorViewId"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical"
/>
<FrameLayout
android:id="@+id/tfodMonitorViewId"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
/>
</LinearLayout>
<!-- When visible, the error message will overlay and thus partially
obscure part of the camera monitor. We make this trade off so as to
allow for a bigger camera monitor view in the common case when the
error is not in fact present
-->
<TextView style="@style/FtcTextViewStyleBold"
android:id="@+id/textErrorMessage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""
android:visibility="invisible"
android:textColor="?attr/textMediumDark" />
</FrameLayout>
<TextView
android:id="@+id/textGamepad1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/textGamepad2"
android:visibility="invisible"
android:text="" />
<TextView
android:id="@+id/textGamepad2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:visibility="invisible"
android:text="" />
</RelativeLayout>
<WebView
android:id="@+id/webViewBlocksRuntime"
android:layout_width="1dp"
android:layout_height="1dp" />
</LinearLayout>