Android的加入id来布局打破我的code [英] Android adding id to layout break my code

查看:249
本文介绍了Android的加入id来布局打破我的code的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时,当我在XML中添加ID到布局,它只是打破我的code。直到我添加ID到布局,一切工作正常。没有错误,没有日志,它只是打破了一切,而不需要登记任何错误。而当我删除I​​D一切又回来了。 (这不是@ ID /添加my_id - >@ + ID /添加my_id错误)

我想知道是什么导致的?

在一个XML文件,我有这个问题:

 <?XML版本=1.0编码=UTF-8&GT?;< LinearLayout中的xmlns:机器人=htt​​p://schemas.android.com/apk/res/android
    的xmlns:工具=htt​​p://schemas.android.com/tool​​s
    机器人:layout_width =match_parent
    机器人:layout_height =match_parent
    机器人:fillViewport =真
    机器人:方向=垂直
    工具:上下文=MainActivity。>
    <滚动型
        机器人:方向=垂直
        机器人:layout_width =match_parent
        机器人:layout_height =WRAP_CONTENT
        机器人:滚动条=无>   <的LinearLayout
        机器人:方向=垂直
        机器人:layout_width =match_parent
        机器人:layout_height =WRAP_CONTENT>
               <的TextView
                   机器人:layout_width =match_parent
                   机器人:layout_height =WRAP_CONTENT
                   机器人:layout_gravity =顶|左
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =14dp
                   机器人:文字颜色=#C8C8C8
                   机器人:TEXTSIZE =20SP
                   机器人:文字=@字符串/ apparence/>       <的LinearLayout
                机器人:ID =@ + ID / layout_apparence//这是问题所在
                机器人:方向=垂直
                机器人:layout_width =match_parent
                机器人:layout_height =WRAP_CONTENT
                机器人:layout_marginTop =6DP
                机器人:layout_marginRight =6DP
                机器人:layout_marginLeft =6DP
                机器人:paddingRight =6DP
                机器人:paddingTop =6DP
                机器人:paddingLeft =6DP
                机器人:paddingBottom会=6DP
                机器人:背景=@绘制/ note_corps>               <的TextView
                   机器人:layout_width =match_parent
                   机器人:layout_height =WRAP_CONTENT
                   机器人:layout_gravity =顶|左
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =6DP
                   机器人:文字颜色=#666666
                   机器人:TEXTSIZE =20SP
                   机器人:文字=@字符串/ text_size_settings/>               <的TextView
                   机器人:ID =@ + ID / fontSize的preVIEW
                   机器人:知名度=水涨船高
                   机器人:layout_width =match_parent
                   机器人:layout_height =WRAP_CONTENT
                   机器人:layout_gravity =顶|左
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =6DP
                   机器人:文字颜色=#666666
                   机器人:TEXTSIZE =20SP
                   机器人:文字=@字符串/ font_size_is/>              <搜索栏
                  机器人:ID =@ + ID / fontBar
                  机器人:最大=100
                  机器人:layout_width =match_parent
                  机器人:layout_height =WRAP_CONTENT/>               <的TextView
                   机器人:layout_width =match_parent
                   机器人:layout_height =WRAP_CONTENT
                   机器人:layout_gravity =顶|左
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =6DP
                   机器人:文字颜色=#666666
                   机器人:TEXTSIZE =20SP
                   机器人:文字=@字符串/ card_size/>              < RadioGroup中
                  机器人:ID =@ + ID / cardSize
                  机器人:layout_width =match_parent
                  机器人:layout_height =WRAP_CONTENT>                  <单选
                      机器人:ID =@ + ID / cardSizeSmall
                      机器人:layout_width =match_parent
                      机器人:layout_height =WRAP_CONTENT
                      机器人:文字颜色=#666666
                      机器人:文字=@字符串/ card_size_small/>                  <单选
                      机器人:ID =@ + ID / cardSizeNormal
                      机器人:layout_width =match_parent
                      机器人:layout_height =WRAP_CONTENT
                      机器人:文字颜色=#666666
                      机器人:文字=@字符串/ card_size_normal/>                  <单选
                      机器人:ID =@ + ID / cardSizeBig
                      机器人:layout_width =match_parent
                      机器人:layout_height =WRAP_CONTENT
                      机器人:文字颜色=#666666
                      机器人:文字=@字符串/ card_size_big/>              < / RadioGroup中>               <的TextView
                   机器人:layout_width =match_parent
                   机器人:layout_height =WRAP_CONTENT
                   机器人:layout_gravity =顶|左
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =6DP
                   机器人:文字颜色=#666666
                   机器人:TEXTSIZE =20SP
                   机器人:文字=@字符串/主题为/>
              < RadioGroup中
                  机器人:ID =@ + ID / themeChooser
                  机器人:layout_width =match_parent
                  机器人:layout_height =WRAP_CONTENT>                  <单选
                      机器人:ID =@ + ID / lightTheme
                      机器人:layout_width =match_parent
                      机器人:layout_height =WRAP_CONTENT
                      机器人:文字颜色=#666666
                      机器人:文字=@字符串/ light_theme/>                  <单选
                      机器人:ID =@ + ID / darkTheme
                      机器人:layout_width =match_parent
                      机器人:layout_height =WRAP_CONTENT
                      机器人:文字颜色=#666666
                      机器人:文字=@字符串/ dark_theme/>              < / RadioGroup中>
         < / LinearLayout中>              <的TextView
                   机器人:layout_width =match_parent
                   机器人:layout_height =WRAP_CONTENT
                   机器人:layout_gravity =顶|左
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =14dp
                   机器人:文字颜色=#C8C8C8
                   机器人:TEXTSIZE =20SP
                   机器人:文字=@字符串/排序/>
         <的LinearLayout
               机器人:layout_width =match_parent
               机器人:layout_height =WRAP_CONTENT
               机器人:方向=垂直
               机器人:layout_marginTop =6DP
               机器人:layout_marginLeft =6DP
               机器人:layout_marginRight =6DP
               机器人:paddingRight =6DP
               机器人:paddingTop =6DP
               机器人:paddingLeft =6DP
               机器人:paddingBottom会=6DP
               机器人:背景=@绘制/ note_corps>               <的TextView
                   机器人:layout_width =match_parent
                   机器人:layout_height =match_parent
                   机器人:layout_gravity =顶|左
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =6DP
                   机器人:文字颜色=#666666
                   机器人:TEXTSIZE =20SP
                   机器人:文字=@字符串/命令/>               < RadioGroup中
                   机器人:ID =@ + ID / sortNoteRadioGroup
                   机器人:layout_width =match_parent
                   机器人:layout_height =WRAP_CONTENT>
                   <单选
                       机器人:ID =@ + ID / plusRecente
                       机器人:layout_width =match_parent
                       机器人:layout_height =WRAP_CONTENT
                       机器人:文字颜色=#666666
                       机器人:文字=@字符串/ order_plus_recente/>                   <单选
                       机器人:ID =@ + ID / plusAncienne
                       机器人:layout_width =match_parent
                       机器人:layout_height =WRAP_CONTENT
                       机器人:文字颜色=#666666
                       机器人:文字=@字符串/ order_moins_recente/>                   <单选
                       机器人:ID =@ + ID / alphaCroiss
                       机器人:layout_width =match_parent
                       机器人:layout_height =WRAP_CONTENT
                       机器人:文字颜色=#666666
                       机器人:文字=@字符串/ order_alpha_croiss/>                   <单选
                       机器人:ID =@ + ID / alphaDecroiss
                       机器人:layout_width =WRAP_CONTENT
                       机器人:layout_height =WRAP_CONTENT
                       机器人:文字颜色=#666666
                       机器人:文字=@字符串/ order_alpha_decroi/>
               < / RadioGroup中>         < / LinearLayout中>              <的TextView
                   机器人:layout_width =match_parent
                   机器人:layout_height =WRAP_CONTENT
                   机器人:layout_gravity =顶|左
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =14dp
                   机器人:文字颜色=#C8C8C8
                   机器人:TEXTSIZE =20SP
                   机器人:文字=@字符串/ date_heure/>           <的LinearLayout
               机器人:layout_width =match_parent
               机器人:layout_height =WRAP_CONTENT
               机器人:方向=垂直
               机器人:layout_marginTop =6DP
               机器人:layout_marginLeft =6DP
               机器人:layout_marginRight =6DP
               机器人:layout_marginBottom =6DP
               机器人:paddingRight =6DP
               机器人:paddingTop =6DP
               机器人:paddingLeft =6DP
               机器人:paddingBottom会=6DP
               机器人:背景=@绘制/ note_corps>               <的TextView
                   机器人:layout_width =match_parent
                   机器人:layout_height =WRAP_CONTENT
                   机器人:layout_gravity =顶|左
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =6DP
                   机器人:文字颜色=#666666
                   机器人:TEXTSIZE =20SP
                   机器人:文字=@字符串/ date_heure/>             < RadioGroup中
                 机器人:ID =@ + ID / precisionDate
                 机器人:layout_width =match_parent
                 机器人:layout_height =WRAP_CONTENT>                 <单选
                      机器人:ID =@ + ID / display_date_time
                      机器人:layout_width =match_parent
                      机器人:layout_height =WRAP_CONTENT
                      机器人:文字颜色=#666666
                      机器人:文字=@字符串/ show_date_time/>                  <单选
                      机器人:ID =@ + ID / hide_date_time
                      机器人:layout_width =match_parent
                      机器人:layout_height =WRAP_CONTENT
                      机器人:文字颜色=#666666
                      机器人:文字=@字符串/ hide_date_time/>                 <单选
                      机器人:ID =@ + ID / hide_time
                      机器人:layout_width =match_parent
                      机器人:layout_height =WRAP_CONTENT
                      机器人:文字颜色=#666666
                      机器人:文字=@字符串/ hide_time/>             < / RadioGroup中>       < / LinearLayout中>
              <的TextView
                   机器人:layout_width =match_parent
                   机器人:layout_height =WRAP_CONTENT
                   机器人:layout_gravity =顶|左
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =14dp
                   机器人:文字颜色=#C8C8C8
                   机器人:TEXTSIZE =20SP
                   机器人:文字=@字符串/其他/>
           <的LinearLayout
               机器人:layout_width =match_parent
               机器人:layout_height =WRAP_CONTENT
               机器人:方向=垂直
               机器人:layout_marginTop =6DP
               机器人:layout_marginLeft =6DP
               机器人:layout_marginRight =6DP
               机器人:layout_marginBottom =6DP
               机器人:paddingRight =6DP
               机器人:paddingTop =6DP
               机器人:paddingLeft =6DP
               机器人:paddingBottom会=6DP
               机器人:背景=@绘制/ note_corps>              <的TextView
                   机器人:layout_width =match_parent
                   机器人:layout_height =match_parent
                   机器人:layout_gravity =顶|左
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =6DP
                   机器人:文字颜色=#666666
                   机器人:TEXTSIZE =20SP
                   机器人:文字=@字符串/ no_title/>
              < RadioGroup中
                  机器人:ID =@ + ID / noTitle
                  机器人:layout_width =match_parent
                  机器人:layout_height =WRAP_CONTENT>
                 <单选
                      机器人:ID =@ + ID / leaveEmpty
                      机器人:layout_width =match_parent
                      机器人:layout_height =WRAP_CONTENT
                      机器人:文字颜色=#666666
                      机器人:文字=@字符串/ leave_empty/>                  <单选
                      机器人:ID =@ + ID / useDate
                      机器人:layout_width =match_parent
                      机器人:layout_height =WRAP_CONTENT
                      机器人:文字颜色=#666666
                      机器人:文字=@字符串/ use_date/>                  <单选
                      机器人:ID =@ + ID / useNote
                      机器人:layout_width =match_parent
                      机器人:layout_height =WRAP_CONTENT
                      机器人:文字颜色=#666666
                      机器人:文字=@字符串/ use_note/>              < / RadioGroup中>               <的TextView
                   机器人:layout_width =match_parent
                   机器人:layout_height =match_parent
                   机器人:layout_gravity =顶|左
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =6DP
                   机器人:文字颜色=#666666
                   机器人:TEXTSIZE =20SP
                   机器人:文字=@字符串/动画/>               <复选框
                   机器人:ID =@ + ID / disableAnimation
                   机器人:layout_width =match_parent
                   机器人:layout_height =WRAP_CONTENT
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =6DP
                   机器人:文字颜色=#666666
                   机器人:文字=@字符串/ disable_animation/>
               <的TextView
                   机器人:layout_width =match_parent
                   机器人:layout_height =match_parent
                   机器人:layout_gravity =顶|左
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =6DP
                   机器人:文字颜色=#666666
                   机器人:TEXTSIZE =20SP
                   机器人:文字=@字符串/ SUP pression/>               <复选框
                   机器人:ID =@ + ID / disableConfirmation
                   机器人:layout_width =match_parent
                   机器人:layout_height =WRAP_CONTENT
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =6DP
                   机器人:文字颜色=#666666
                   机器人:文字=@字符串/ disable_confirmation/>
         < / LinearLayout中>
                <的TextView
                   机器人:layout_width =match_parent
                   机器人:layout_height =WRAP_CONTENT
                   机器人:layout_gravity =顶|左
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =14dp
                   机器人:文字颜色=#C8C8C8
                   机器人:TEXTSIZE =20SP
                   机器人:文字=@字符串/ editor_tips/>
           <的LinearLayout
               机器人:layout_width =match_parent
               机器人:layout_height =WRAP_CONTENT
               机器人:方向=垂直
               机器人:layout_marginTop =6DP
               机器人:layout_marginLeft =6DP
               机器人:layout_marginRight =6DP
               机器人:layout_marginBottom =6DP
               机器人:paddingRight =6DP
               机器人:paddingTop =6DP
               机器人:paddingLeft =6DP
               机器人:paddingBottom会=6DP
               机器人:背景=@绘制/ note_corps>              <的TextView
                   机器人:layout_width =match_parent
                   机器人:layout_height =WRAP_CONTENT
                   机器人:layout_gravity =顶|左
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =14dp
                   机器人:文字颜色=#666666
                   机器人:TEXTSIZE =20SP
                   机器人:文字=@字符串/ editor_tips/>
              <的TextView
                   机器人:layout_width =match_parent
                   机器人:layout_height =WRAP_CONTENT
                   机器人:layout_gravity =顶|左
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =14dp
                   机器人:文字颜色=#666666
                   机器人:文字=@字符串/提示/>           < / LinearLayout中>              <的TextView
                   机器人:layout_width =match_parent
                   机器人:layout_height =WRAP_CONTENT
                   机器人:layout_gravity =顶|左
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =14dp
                   机器人:文字颜色=#C8C8C8
                   机器人:TEXTSIZE =20SP
                   机器人:文字=@字符串/关于/>         <的LinearLayout
               机器人:layout_width =match_parent
               机器人:layout_height =WRAP_CONTENT
               机器人:方向=垂直
               机器人:layout_marginTop =6DP
               机器人:layout_marginLeft =6DP
               机器人:layout_marginRight =6DP
               机器人:layout_marginBottom =6DP
               机器人:paddingRight =6DP
               机器人:paddingTop =6DP
               机器人:paddingLeft =6DP
               机器人:paddingBottom会=6DP
               机器人:背景=@绘制/ note_corps>               <的TextView
                   机器人:layout_width =match_parent
                   机器人:layout_height =match_parent
                   机器人:layout_gravity =顶|左
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =6DP
                   机器人:文字颜色=#666666
                   机器人:TEXTSIZE =20SP
                   机器人:文字=@字符串/版/>              <的TextView
                   机器人:layout_width =match_parent
                   机器人:layout_height =match_parent
                   机器人:layout_gravity =顶|左
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =6DP
                   机器人:文字颜色=#9A9A9A
                   机器人:TEXTSIZE =16SP
                   机器人:文字=@字符串/ TEXT_VERSION/>               <的TextView
                   机器人:layout_width =match_parent
                   机器人:layout_height =match_parent
                   机器人:layout_gravity =顶|左
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =6DP
                   机器人:文字颜色=#666666
                   机器人:TEXTSIZE =20SP
                   机器人:文字=@字符串/接触/>              <的TextView
                   机器人:layout_width =match_parent
                   机器人:layout_height =match_parent
                   机器人:layout_gravity =顶|左
                   机器人:layout_marginTop =6DP
                   机器人:layout_marginLeft =6DP
                   机器人:文字颜色=#9A9A9A
                   机器人:TEXTSIZE =16SP
                   机器人:文字=@字符串/ report_to/>
         < / LinearLayout中>
    < / LinearLayout中>    < /滚动型>
< / LinearLayout中>


解决方案

好吧,我也没搞清楚为什么它这样做,但通​​过Eclipse的乳宁之前的设备手动卸载应用程序清理错误...

sometimes when I add an id to a layout in xml it just breaks my code. Everything works fine until I add an id to a layout. No error, no log, it just breaks everything without registering any error. And when I remove the id everything is back. (it's not the "@id/my_id" -> "@+id/my_id" error)

I'd like to know what can cause that ?

One of the xml file I have this issue with:

<?xml version="1.0" encoding="utf-8"?>

<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"
    android:fillViewport="true"
    android:orientation="vertical"
    tools:context=".MainActivity" >


    <ScrollView
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:scrollbars="none" >

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


               <TextView 
                   android:layout_width="match_parent"
                   android:layout_height="wrap_content"
                   android:layout_gravity="top|left"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="14dp"
                   android:textColor="#C8C8C8"
                   android:textSize="20sp"
                   android:text="@string/apparence" />  



       <LinearLayout 
                android:id="@+id/layout_apparence"  //HERE IS THE PROBLEM
                android:orientation="vertical"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="6dp"
                android:layout_marginRight="6dp"
                android:layout_marginLeft="6dp"
                android:paddingRight="6dp"
                android:paddingTop="6dp"
                android:paddingLeft="6dp"
                android:paddingBottom="6dp"
                android:background="@drawable/note_corps" >

               <TextView 
                   android:layout_width="match_parent"
                   android:layout_height="wrap_content"
                   android:layout_gravity="top|left"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="6dp"
                   android:textColor="#666666"
                   android:textSize="20sp"
                   android:text="@string/text_size_settings" />  

               <TextView 
                   android:id="@+id/fontSizePreview"
                   android:visibility="gone"
                   android:layout_width="match_parent"
                   android:layout_height="wrap_content"
                   android:layout_gravity="top|left"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="6dp"
                   android:textColor="#666666"
                   android:textSize="20sp"
                   android:text="@string/font_size_is" />  

              <SeekBar
                  android:id="@+id/fontBar"
                  android:max="100"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content" />



               <TextView 
                   android:layout_width="match_parent"
                   android:layout_height="wrap_content"
                   android:layout_gravity="top|left"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="6dp"
                   android:textColor="#666666"
                   android:textSize="20sp"
                   android:text="@string/card_size" />     

              <RadioGroup 
                  android:id="@+id/cardSize"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content">

                  <RadioButton 
                      android:id="@+id/cardSizeSmall"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:textColor="#666666"
                      android:text="@string/card_size_small"/>

                  <RadioButton 
                      android:id="@+id/cardSizeNormal"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:textColor="#666666"
                      android:text="@string/card_size_normal"/>

                  <RadioButton 
                      android:id="@+id/cardSizeBig"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:textColor="#666666"
                      android:text="@string/card_size_big"/>

              </RadioGroup>



               <TextView 
                   android:layout_width="match_parent"
                   android:layout_height="wrap_content"
                   android:layout_gravity="top|left"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="6dp"
                   android:textColor="#666666"
                   android:textSize="20sp"
                   android:text="@string/theme" />     


              <RadioGroup 
                  android:id="@+id/themeChooser"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content">

                  <RadioButton 
                      android:id="@+id/lightTheme"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:textColor="#666666"
                      android:text="@string/light_theme"/>

                  <RadioButton 
                      android:id="@+id/darkTheme"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:textColor="#666666"
                      android:text="@string/dark_theme"/>

              </RadioGroup>




         </LinearLayout>



              <TextView 
                   android:layout_width="match_parent"
                   android:layout_height="wrap_content"
                   android:layout_gravity="top|left"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="14dp"
                   android:textColor="#C8C8C8"
                   android:textSize="20sp"
                   android:text="@string/sort" />  




         <LinearLayout
               android:layout_width="match_parent"
               android:layout_height="wrap_content"
               android:orientation="vertical"
               android:layout_marginTop="6dp"
               android:layout_marginLeft="6dp"
               android:layout_marginRight="6dp"
               android:paddingRight="6dp"
               android:paddingTop="6dp"
               android:paddingLeft="6dp"
               android:paddingBottom="6dp"
               android:background="@drawable/note_corps"  >

               <TextView 
                   android:layout_width="match_parent"
                   android:layout_height="match_parent"
                   android:layout_gravity="top|left"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="6dp"
                   android:textColor="#666666"
                   android:textSize="20sp"
                   android:text="@string/order" />   



               <RadioGroup
                   android:id="@+id/sortNoteRadioGroup"
                   android:layout_width="match_parent"
                   android:layout_height="wrap_content">


                   <RadioButton
                       android:id="@+id/plusRecente"
                       android:layout_width="match_parent"
                       android:layout_height="wrap_content"
                       android:textColor="#666666"
                       android:text="@string/order_plus_recente" />

                   <RadioButton
                       android:id="@+id/plusAncienne"
                       android:layout_width="match_parent"
                       android:layout_height="wrap_content"
                       android:textColor="#666666"
                       android:text="@string/order_moins_recente" />

                   <RadioButton
                       android:id="@+id/alphaCroiss"
                       android:layout_width="match_parent"
                       android:layout_height="wrap_content"
                       android:textColor="#666666"
                       android:text="@string/order_alpha_croiss" />

                   <RadioButton
                       android:id="@+id/alphaDecroiss"
                       android:layout_width="wrap_content"
                       android:layout_height="wrap_content"
                       android:textColor="#666666"
                       android:text="@string/order_alpha_decroi" />


               </RadioGroup>



         </LinearLayout>



              <TextView 
                   android:layout_width="match_parent"
                   android:layout_height="wrap_content"
                   android:layout_gravity="top|left"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="14dp"
                   android:textColor="#C8C8C8"
                   android:textSize="20sp"
                   android:text="@string/date_heure" /> 





           <LinearLayout
               android:layout_width="match_parent"
               android:layout_height="wrap_content"
               android:orientation="vertical"
               android:layout_marginTop="6dp"
               android:layout_marginLeft="6dp"
               android:layout_marginRight="6dp"
               android:layout_marginBottom="6dp"
               android:paddingRight="6dp"
               android:paddingTop="6dp"
               android:paddingLeft="6dp"
               android:paddingBottom="6dp"
               android:background="@drawable/note_corps"  >

               <TextView 
                   android:layout_width="match_parent"
                   android:layout_height="wrap_content"
                   android:layout_gravity="top|left"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="6dp"
                   android:textColor="#666666"
                   android:textSize="20sp"
                   android:text="@string/date_heure" />  

             <RadioGroup
                 android:id="@+id/precisionDate"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content">

                 <RadioButton
                      android:id="@+id/display_date_time"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:textColor="#666666"
                      android:text="@string/show_date_time" />

                  <RadioButton
                      android:id="@+id/hide_date_time"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:textColor="#666666"
                      android:text="@string/hide_date_time"/>

                 <RadioButton
                      android:id="@+id/hide_time"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:textColor="#666666"
                      android:text="@string/hide_time" />

             </RadioGroup>

       </LinearLayout>


              <TextView 
                   android:layout_width="match_parent"
                   android:layout_height="wrap_content"
                   android:layout_gravity="top|left"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="14dp"
                   android:textColor="#C8C8C8"
                   android:textSize="20sp"
                   android:text="@string/others" /> 


           <LinearLayout
               android:layout_width="match_parent"
               android:layout_height="wrap_content"
               android:orientation="vertical"
               android:layout_marginTop="6dp"
               android:layout_marginLeft="6dp"
               android:layout_marginRight="6dp"
               android:layout_marginBottom="6dp"
               android:paddingRight="6dp"
               android:paddingTop="6dp"
               android:paddingLeft="6dp"
               android:paddingBottom="6dp"
               android:background="@drawable/note_corps"  >



              <TextView 
                   android:layout_width="match_parent"
                   android:layout_height="match_parent"
                   android:layout_gravity="top|left"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="6dp"
                   android:textColor="#666666"
                   android:textSize="20sp"
                   android:text="@string/no_title" />   


              <RadioGroup 
                  android:id="@+id/noTitle"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content">


                 <RadioButton 
                      android:id="@+id/leaveEmpty"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:textColor="#666666"
                      android:text="@string/leave_empty"/>

                  <RadioButton 
                      android:id="@+id/useDate"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:textColor="#666666"
                      android:text="@string/use_date"/>

                  <RadioButton 
                      android:id="@+id/useNote"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:textColor="#666666"
                      android:text="@string/use_note"/>

              </RadioGroup>

               <TextView 
                   android:layout_width="match_parent"
                   android:layout_height="match_parent"
                   android:layout_gravity="top|left"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="6dp"
                   android:textColor="#666666"
                   android:textSize="20sp"
                   android:text="@string/animations" />  

               <CheckBox 
                   android:id="@+id/disableAnimation"
                   android:layout_width="match_parent"
                   android:layout_height="wrap_content"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="6dp"
                   android:textColor="#666666"
                   android:text="@string/disable_animation"/>


               <TextView 
                   android:layout_width="match_parent"
                   android:layout_height="match_parent"
                   android:layout_gravity="top|left"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="6dp"
                   android:textColor="#666666"
                   android:textSize="20sp"
                   android:text="@string/suppression" />  

               <CheckBox 
                   android:id="@+id/disableConfirmation"
                   android:layout_width="match_parent"
                   android:layout_height="wrap_content"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="6dp"
                   android:textColor="#666666"
                   android:text="@string/disable_confirmation"/>


         </LinearLayout>




                <TextView 
                   android:layout_width="match_parent"
                   android:layout_height="wrap_content"
                   android:layout_gravity="top|left"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="14dp"
                   android:textColor="#C8C8C8"
                   android:textSize="20sp"
                   android:text="@string/editor_tips" /> 




           <LinearLayout
               android:layout_width="match_parent"
               android:layout_height="wrap_content"
               android:orientation="vertical"
               android:layout_marginTop="6dp"
               android:layout_marginLeft="6dp"
               android:layout_marginRight="6dp"
               android:layout_marginBottom="6dp"
               android:paddingRight="6dp"
               android:paddingTop="6dp"
               android:paddingLeft="6dp"
               android:paddingBottom="6dp"
               android:background="@drawable/note_corps"  >



              <TextView 
                   android:layout_width="match_parent"
                   android:layout_height="wrap_content"
                   android:layout_gravity="top|left"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="14dp"
                   android:textColor="#666666"
                   android:textSize="20sp"
                   android:text="@string/editor_tips" /> 


              <TextView 
                   android:layout_width="match_parent"
                   android:layout_height="wrap_content"
                   android:layout_gravity="top|left"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="14dp"
                   android:textColor="#666666"
                   android:text="@string/tips" /> 



           </LinearLayout>



              <TextView 
                   android:layout_width="match_parent"
                   android:layout_height="wrap_content"
                   android:layout_gravity="top|left"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="14dp"
                   android:textColor="#C8C8C8"
                   android:textSize="20sp"
                   android:text="@string/about" />  





         <LinearLayout
               android:layout_width="match_parent"
               android:layout_height="wrap_content"
               android:orientation="vertical"
               android:layout_marginTop="6dp"
               android:layout_marginLeft="6dp"
               android:layout_marginRight="6dp"
               android:layout_marginBottom="6dp"
               android:paddingRight="6dp"
               android:paddingTop="6dp"
               android:paddingLeft="6dp"
               android:paddingBottom="6dp"
               android:background="@drawable/note_corps"  >

               <TextView 
                   android:layout_width="match_parent"
                   android:layout_height="match_parent"
                   android:layout_gravity="top|left"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="6dp"
                   android:textColor="#666666"
                   android:textSize="20sp"
                   android:text="@string/version" />      

              <TextView 
                   android:layout_width="match_parent"
                   android:layout_height="match_parent"
                   android:layout_gravity="top|left"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="6dp"
                   android:textColor="#9A9A9A"
                   android:textSize="16sp"
                   android:text="@string/text_version" /> 

               <TextView 
                   android:layout_width="match_parent"
                   android:layout_height="match_parent"
                   android:layout_gravity="top|left"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="6dp"
                   android:textColor="#666666"
                   android:textSize="20sp"
                   android:text="@string/contact" />      

              <TextView 
                   android:layout_width="match_parent"
                   android:layout_height="match_parent"
                   android:layout_gravity="top|left"
                   android:layout_marginTop="6dp"
                   android:layout_marginLeft="6dp"
                   android:textColor="#9A9A9A"
                   android:textSize="16sp"
                   android:text="@string/report_to" /> 


         </LinearLayout>




    </LinearLayout>

    </ScrollView>


</LinearLayout>

解决方案

Ok I did not find out why it was doing this but uninstalling the app manually on devices before runing through Eclipse cleaned the error...

这篇关于Android的加入id来布局打破我的code的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆