findViewById (2131230729) What are these numbers?

0
I'm analyzing a class from an Android app project, I'm new and I did not understand these numbers within the findViewById(2131230729) , within the parenthesis it was to have R.id. "layout" how do I go through that number to figure out the layout?

    
asked by anonymous 20.03.2018 / 16:58

1 answer

3

When you reference findViewById() , and put R.id.input , this id is an integer, all ids of your application takes the < in> id by an integer. This reference comes from R.java , that's where you save those ids . Ex:

     <EditText
         android:id="@+id/input"
         android:layout_height="wrap_content"
         android:layout_width="match_parent"
         android:inputType="text"/>

The id @+id/input goes to R.java as an integer, so it is transformed for future reference of findViewById , for example.

    
20.03.2018 / 17:16