Firstly, I have to say that I am just a beginner with the Android programming, and I may not understood things correctly. ^^
Secondly, my problem is that the R file (the one which create the different IDs of the objects) just stopped to create new ones.
I noticed that when I created a new image_button at the main_layout and when I tried to look for it on the MainActivity it wrote that it didn't exist.
Moreover, only after I modify the R file (which I should not touch according to the system warning), I have control over the new IDs.
And after breaking my head for two days - I decided to ask you,
The R file:
public final class R {
public static final class attr {
}
public static final class dimen {
/* Default screen margins, per the Android Design guidelines.
Customize dimensions originally defined in res/values/dimens.xml (such as
screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
*/
public static final int activity_horizontal_margin = 0x7F040000;
public static final int activity_vertical_margin = 0x7F040001;
}
public static final class drawable {
public static final int ic_launcher = 0x7F020000;
public static final int loading_i = 0x7F020001;
}
public static final class id {
public static final int action_settings = 0x7F080004;
public static final int button1 = 0x7F080001;
public static final int imbt = 0x7F080003;
public static final int textView1 = 0x7F080000;
public static final int tv1 = 0x7F080002;
}
public static final class layout {
public static final int activity_main = 0x7F030000;
public static final int firstpage = 0x7F030001;
public static final int loading_screen = 0x7F030002;
}
public static final class menu {
public static final int main = 0x7F070000;
}
public static final class string {
public static final int action_settings = 0x7F050001;
public static final int app_name = 0x7F050000;
public static final int hello_world = 0x7F050002;
}
The creation of the new object:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ImageButton
android:id="@+id/imgBtn1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>