Xml文件  |  59行  |  2.83 KB

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->
<com.android.camera.ui.RotateLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:id="@+id/on_screen_indicators"
        android:layout_height="match_parent"
        android:layout_width="match_parent"
        style="@style/OnScreenIndicators">

    <!-- RelativeLayout is used to let the indicators always on the top and left of the viewfinder,
         and align them vertical center in LinearLayout. -->
    <RelativeLayout
            tools:ignore="UselessParent"
            android:layout_height="match_parent"
            android:layout_width="match_parent">
        <LinearLayout
                android:orientation="horizontal"
                android:layout_height="@dimen/onscreen_indicators_height"
                android:layout_width="wrap_content"
                android:layout_alignParentTop="true"
                android:layout_alignParentLeft="true"
                android:gravity="center_vertical">
            <ImageView android:id="@+id/onscreen_flash_indicator"
                    style="@style/OnScreenIndicator"
                    android:visibility="visible"/>
            <ImageView android:id="@+id/onscreen_white_balance_indicator"
                    style="@style/OnScreenIndicator"/>
            <TextView android:id="@+id/onscreen_exposure_indicator"
                    style="@style/OnScreenIndicator"
                    android:paddingLeft="3dp"
                    android:paddingRight="3dp"
                    android:gravity="center_vertical"
                    android:textSize="@dimen/onscreen_exposure_indicator_text_size"
                    android:textColor="@android:color/white"/>
            <ImageView android:id="@+id/onscreen_scene_indicator"
                    style="@style/OnScreenIndicator"
                    android:src="@drawable/ic_indicators_scn"/>
            <ImageView android:id="@+id/onscreen_gps_indicator"
                    style="@style/OnScreenIndicator"/>
            <ImageView android:id="@+id/onscreen_focus_indicator"
                    style="@style/OnScreenIndicator"/>
        </LinearLayout>
    </RelativeLayout>
</com.android.camera.ui.RotateLayout>