Question: If I use `findViewById` like this(first code) then I can't use same `id`(`usernameid`) in different layout: 

```
username = (EditText) findViewById(R.id.usernameid);

```

Is there any way to use like this (second code)? :

```
username = (EditText) findViewById(R.layout.activity-signup.id.usernameid);

```

Answer: 
In Android you cant assign an View to layout with defined ID liked this

```
username = (EditText) findViewById(R.layout.activity-signup.id.usernameid);

```

the only way is passing EditText to EditText Id.
In java file layout id of layout is already added in java file.