Skip to content

Commit

Permalink
changing the id of the view to make it obvious that it’s not the same…
Browse files Browse the repository at this point in the history
… as layout name
  • Loading branch information
filipkis committed Jan 29, 2014
1 parent ce4eaaa commit de9d117
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion res/layout/example_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:id="@+id/example_view" >
android:id="@+id/this_is_example_view_id" >

<TextView
android:id="@+id/example_text"
Expand Down
4 changes: 2 additions & 2 deletions src/se/kth/csc/iprog/dinnerplanner/android/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ protected void onCreate(Bundle savedInstanceState) {
// it must come before any call to findViewById method
setContentView(R.layout.activity_main);

// Creating the view class
ExampleView mainView = new ExampleView(findViewById(R.id.example_view));
// Creating the view class instance
ExampleView mainView = new ExampleView(findViewById(R.id.this_is_example_view_id));

}

Expand Down

0 comments on commit de9d117

Please sign in to comment.