<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright (C) 2008 ZXing authors
 Copyright 2011 <NAME>

 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.
 -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
             android:layout_width="fill_parent"
             android:layout_height="fill_parent">

  <SurfaceView android:id="@+id/preview_view"
               android:layout_width="fill_parent"
               android:layout_height="fill_parent"
               android:layout_centerInParent="true"/>
     
  <edu.sfsu.cs.orange.ocr.ViewfinderView
      android:id="@+id/viewfinder_view"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:background="#0000"/>

  <LinearLayout android:id="@+id/result_view"
                android:orientation="vertical"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:background="@color/result_view"
                android:visibility="gone"
                android:padding="4dip">

    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:gravity="center"
        android:padding="12dip">

      <LinearLayout
          android:orientation="vertical"
          android:layout_width="wrap_content"
          android:layout_height="fill_parent"
          android:gravity="right|center_vertical">

        <ImageView android:id="@+id/image_view"
                   android:layout_width="160dip"
                   android:layout_height="wrap_content"
                   android:maxWidth="160dip"
                   android:maxHeight="160dip"
                   android:layout_marginBottom="4dip"
                   android:adjustViewBounds="true"
                   android:scaleType="centerInside"/>

        <LinearLayout
          android:orientation="horizontal"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content">

          <TextView android:id="@+id/source_language_text_view_label"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="OCR"
                    android:textColor="@color/result_minor_text"
                    android:textStyle="bold"
                    android:textSize="14sp"
                    android:paddingRight="4dip"/>

          <TextView android:id="@+id/source_language_text_view"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="@color/result_minor_text"
                    android:textSize="14sp"/>

        </LinearLayout>

        <LinearLayout
          android:orientation="horizontal"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content">

          <TextView android:id="@+id/translation_language_label_text_view"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Translation"
                    android:textColor="@color/translation_text"
                    android:textStyle="bold"
                    android:textSize="14sp"
                    android:paddingRight="4dip"/>

          <TextView android:id="@+id/translation_language_text_view"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="@color/translation_text"
                    android:textSize="14sp"
                    android:text="[Target language]"/>

        </LinearLayout>

      </LinearLayout>

      <ScrollView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content">

        <LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="vertical">

          <TextView android:id="@+id/ocr_result_text_view"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="@color/result_text"
                    android:textColorLink="@color/result_text"
                    android:textSize="22sp"
                    android:paddingLeft="12dip"
                    android:autoLink="web"/>
        
          <TextView android:id="@+id/translation_text_view"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="@color/translation_text"
                    android:textColorLink="@color/translation_text"
                    android:textSize="22sp"
                    android:paddingLeft="12dip"
                    android:autoLink="web"
                    android:clickable="true"/>
           
          <LinearLayout android:id="@+id/indeterminate_progress_indicator_view"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        >
            
              <ProgressBar android:id="@+android:id/progress_small"
		                   style="?android:attr/progressBarStyleSmall" 
		                   android:layout_width="wrap_content"
                           android:layout_height="wrap_content"
                           android:paddingLeft="12dip" 
                           android:paddingTop="10dip"/>
          </LinearLayout>
          
          
        </LinearLayout>

      </ScrollView>

    </LinearLayout>

  </LinearLayout>

  <RelativeLayout android:id="@+id/camera_button_view"
           android:layout_width="fill_parent"
           android:layout_height="fill_parent">

    <TextView android:id="@+id/status_view_top"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"    
              android:layout_alignParentTop="true"
              android:background="#0000"
              android:text=""
              android:textColor="@color/status_text"
              android:textSize="14sp"
              android:autoLink="web"
              android:clickable="true" />
 
    <edu.sfsu.cs.orange.ocr.camera.ShutterButton
              android:id="@+id/shutter_button"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:background="@drawable/shutter_button"
              android:clickable="true"
              android:focusable="true"
              android:layout_alignParentRight="true"
              android:gravity="center_vertical"
              android:layout_marginRight="8dip"
              android:layout_marginTop="8dip"
              android:scaleType="center"
              android:visibility="gone" /> 
     
    <TextView android:id="@+id/status_view_bottom"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignParentBottom="true"
              android:background="#0000"
              android:text=""
              android:textColor="@color/status_text"
              android:textSize="14sp"
              android:autoLink="web"   
              android:clickable="true" />
     
     <!-- 
     <ToggleButton android:id="@+id/torch_button"
		      android:layout_width="wrap_content" 
		      android:layout_height="wrap_content"
		      android:background="@drawable/torch_button"
		      android:clickable="true" 
		      android:focusable="true"
		      android:textOff=""
		      android:textOn=""
		      android:layout_alignParentRight="true" 
		      android:layout_alignParentBottom="true"
		      android:layout_marginRight="8dip" 
		      android:layout_marginBottom="8dip"
		      android:scaleType="center" />
     -->
     
  </RelativeLayout>

</FrameLayout>
<commit_msg>Fix resource ID value<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright (C) 2008 ZXing authors
 Copyright 2011 <NAME>

 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.
 -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
             android:layout_width="fill_parent"
             android:layout_height="fill_parent">

  <SurfaceView android:id="@+id/preview_view"
               android:layout_width="fill_parent"
               android:layout_height="fill_parent"
               android:layout_centerInParent="true"/>
     
  <edu.sfsu.cs.orange.ocr.ViewfinderView
      android:id="@+id/viewfinder_view"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:background="#0000"/>

  <LinearLayout android:id="@+id/result_view"
                android:orientation="vertical"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:background="@color/result_view"
                android:visibility="gone"
                android:padding="4dip">

    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:gravity="center"
        android:padding="12dip">

      <LinearLayout
          android:orientation="vertical"
          android:layout_width="wrap_content"
          android:layout_height="fill_parent"
          android:gravity="right|center_vertical">

        <ImageView android:id="@+id/image_view"
                   android:layout_width="160dip"
                   android:layout_height="wrap_content"
                   android:maxWidth="160dip"
                   android:maxHeight="160dip"
                   android:layout_marginBottom="4dip"
                   android:adjustViewBounds="true"
                   android:scaleType="centerInside"/>

        <LinearLayout
          android:orientation="horizontal"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content">

          <TextView android:id="@+id/source_language_text_view_label"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="OCR"
                    android:textColor="@color/result_minor_text"
                    android:textStyle="bold"
                    android:textSize="14sp"
                    android:paddingRight="4dip"/>

          <TextView android:id="@+id/source_language_text_view"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="@color/result_minor_text"
                    android:textSize="14sp"/>

        </LinearLayout>

        <LinearLayout
          android:orientation="horizontal"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content">

          <TextView android:id="@+id/translation_language_label_text_view"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Translation"
                    android:textColor="@color/translation_text"
                    android:textStyle="bold"
                    android:textSize="14sp"
                    android:paddingRight="4dip"/>

          <TextView android:id="@+id/translation_language_text_view"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="@color/translation_text"
                    android:textSize="14sp"
                    android:text="[Target language]"/>

        </LinearLayout>

      </LinearLayout>

      <ScrollView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content">

        <LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="vertical">

          <TextView android:id="@+id/ocr_result_text_view"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="@color/result_text"
                    android:textColorLink="@color/result_text"
                    android:textSize="22sp"
                    android:paddingLeft="12dip"
                    android:autoLink="web"/>
        
          <TextView android:id="@+id/translation_text_view"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="@color/translation_text"
                    android:textColorLink="@color/translation_text"
                    android:textSize="22sp"
                    android:paddingLeft="12dip"
                    android:autoLink="web"
                    android:clickable="true"/>
           
          <LinearLayout android:id="@+id/indeterminate_progress_indicator_view"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        >
            
              <ProgressBar android:id="@+id/progress_small"
		                   style="?android:attr/progressBarStyleSmall" 
		                   android:layout_width="wrap_content"
                           android:layout_height="wrap_content"
                           android:paddingLeft="12dip" 
                           android:paddingTop="10dip"/>
          </LinearLayout>
          
          
        </LinearLayout>

      </ScrollView>

    </LinearLayout>

  </LinearLayout>

  <RelativeLayout android:id="@+id/camera_button_view"
           android:layout_width="fill_parent"
           android:layout_height="fill_parent">

    <TextView android:id="@+id/status_view_top"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"    
              android:layout_alignParentTop="true"
              android:background="#0000"
              android:text=""
              android:textColor="@color/status_text"
              android:textSize="14sp"
              android:autoLink="web"
              android:clickable="true" />
 
    <edu.sfsu.cs.orange.ocr.camera.ShutterButton
              android:id="@+id/shutter_button"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:background="@drawable/shutter_button"
              android:clickable="true"
              android:focusable="true"
              android:layout_alignParentRight="true"
              android:gravity="center_vertical"
              android:layout_marginRight="8dip"
              android:layout_marginTop="8dip"
              android:scaleType="center"
              android:visibility="gone" /> 
     
    <TextView android:id="@+id/status_view_bottom"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignParentBottom="true"
              android:background="#0000"
              android:text=""
              android:textColor="@color/status_text"
              android:textSize="14sp"
              android:autoLink="web"   
              android:clickable="true" />
     
     <!-- 
     <ToggleButton android:id="@+id/torch_button"
		      android:layout_width="wrap_content" 
		      android:layout_height="wrap_content"
		      android:background="@drawable/torch_button"
		      android:clickable="true" 
		      android:focusable="true"
		      android:textOff=""
		      android:textOn=""
		      android:layout_alignParentRight="true" 
		      android:layout_alignParentBottom="true"
		      android:layout_marginRight="8dip" 
		      android:layout_marginBottom="8dip"
		      android:scaleType="center" />
     -->
     
  </RelativeLayout>

</FrameLayout>

{'fraction_non_alphanumeric': 0.09887732428955678, 'fraction_numerical': 0.00830312244181967, 'mean_word_length': 2.105119825708061, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 2, '>': 79, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4126516', 'n_tokens_mistral': 4564, 'n_tokens_neox': 4057, 'n_words': 547}