# Beginning Android Layouts - Part 9: RelativeLayout | Ray Wenderlich

**URL:** <https://forums.kodeco.com/t/beginning-android-layouts-part-9-relativelayout-ray-wenderlich/40645>\
**Category:** 🎓 Courses & Articles\
**Created:** [March 22, 2018, 2:36pm UTC](https://forums.kodeco.com/t/beginning-android-layouts-part-9-relativelayout-ray-wenderlich/40645 "2018-03-22T14:36:56Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![macsimus](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/macsimus/32/109104_2.png) [@macsimus](https://forums.kodeco.com/u/macsimus)\
**Post date:** [March 22, 2018, 2:36pm UTC](https://forums.kodeco.com/t/beginning-android-layouts-part-9-relativelayout-ray-wenderlich/40645/1 "2018-03-22T14:36:56Z")

</div>

Learn about how to use the RelativeLayout ViewGroup to position sibling views with specific relationships to one another.

* * *
 This is a companion discussion topic for the original entry at [https://www.raywenderlich.com/4701-beginning-android-layouts/lessons/9](https://www.raywenderlich.com/4701-beginning-android-layouts/lessons/9)

---

<div class="post-metadata">

**Author:** ![stripydonkey](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@stripydonkey](https://forums.kodeco.com/u/stripydonkey)\
**Post date:** [July 4, 2018, 3:31pm UTC](https://forums.kodeco.com/t/beginning-android-layouts-part-9-relativelayout-ray-wenderlich/40645/2 "2018-07-04T15:31:46Z")

</div>

I encountered a problem with this lesson when I tried to add the app:srcCompat line to the file list\_item\_team\_member.xml. The “app” tag showed in red, and my build failed. Browsing online led me to add xmlns:app=“[http://schemas.android.com/apk/res-auto](http://schemas.android.com/apk/res-auto)” to the header, which solved the problem. I am using Android Studio 3.1.3 on MacOS El Capitan.

Otherwise, everything is going very well. 🙂

---

<div class="post-metadata">

**Author:** ![macsimus](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/macsimus/32/109104_2.png) [@macsimus](https://forums.kodeco.com/u/macsimus)\
**Post date:** [July 4, 2018, 3:50pm UTC](https://forums.kodeco.com/t/beginning-android-layouts-part-9-relativelayout-ray-wenderlich/40645/3 "2018-07-04T15:50:28Z")

</div>

Thanks Rob! Yep, adding the `app` namespace will be necessary when using custom attributes like `app:srcCompat`, and similarly sometimes you’ll need the `tools` namespace, for example to add a `tools:text` attribute to a `TextView` so that you can see a preview in Android Studio.

Usually, when you add something like an `app:srcCompat` attribute, you can then hit **Option+Return** on macOS (or **Alt+Enter** on PC) to automatically add the `app` namespace to the header. Android Studio is sometimes finicky about doing this, but if you move the cursor to the error and once you see `app` underlined, telling you that Android Studio is ready to add the namespace, it will usually work.

---

<div class="post-metadata">

**Author:** ![stripydonkey](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@stripydonkey](https://forums.kodeco.com/u/stripydonkey)\
**Post date:** [July 5, 2018, 9:37am UTC](https://forums.kodeco.com/t/beginning-android-layouts-part-9-relativelayout-ray-wenderlich/40645/4 "2018-07-05T09:37:41Z")

</div>

Thank you for the fast response, and the tip. I’ll look out for that prompting in the future.

---

<div class="post-metadata">

**Author:** ![stripydonkey](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@stripydonkey](https://forums.kodeco.com/u/stripydonkey)\
**Post date:** [July 5, 2018, 11:36am UTC](https://forums.kodeco.com/t/beginning-android-layouts-part-9-relativelayout-ray-wenderlich/40645/5 "2018-07-05T11:36:44Z")

</div>

Next problem.  
After following the instructions to install the Picasso library, the tutorial sends me to TeamMemberAdapter and asked that I add a line that starts with:  
Picasso.with

However, after entering Picasso, it doesn’t seem to offer a .with extension, and if I enter it manually the “with” shows up in red, and subsequently refuses to build. The associated error message is “Unresolved reference”, giving options to rename the reference, or to introduce a local variable.

Not sure where to go from here…

* * *

Can’t reply with a thank you as I’ve reached my posting limit for the thread, but I again appreciate the help. Hopefully there won’t be too many more time-bombs awaiting me!

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [July 5, 2018, 1:32pm UTC](https://forums.kodeco.com/t/beginning-android-layouts-part-9-relativelayout-ray-wenderlich/40645/6 "2018-07-05T13:32:40Z")

</div>

@macsimus Can you please help with this when you get a chance? Thank you - much appreciated! :]

---

<div class="post-metadata">

**Author:** ![macsimus](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/macsimus/32/109104_2.png) [@macsimus](https://forums.kodeco.com/u/macsimus)\
**Post date:** [July 5, 2018, 2:43pm UTC](https://forums.kodeco.com/t/beginning-android-layouts-part-9-relativelayout-ray-wenderlich/40645/7 "2018-07-05T14:43:05Z")

</div>

Since the recording of this course, there was a change in the Picasso library to rename `with()` to `get()`. So if you’re using the most recent version of Picasso, just replace `with()` with `get()` and you should be good to go. Thanks!

---

<div class="post-metadata">

**Author:** ![oneredlite](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/oneredlite/32/81494_2.png) [@oneredlite](https://forums.kodeco.com/u/oneredlite)\
**Post date:** [August 31, 2018, 2:08am UTC](https://forums.kodeco.com/t/beginning-android-layouts-part-9-relativelayout-ray-wenderlich/40645/8 "2018-08-31T02:08:30Z")

</div>

Hi Macsimus,

I have encounter a red letters on with in TeamMemberAdapter.kt after I follow the instructions on adding Picasso 2.71828 dependency. " Picasso.with(itemView.teamMemberAvatar.context).load(member.avatarUrl)  
.into(itemView.teamMemberAvatar)" the “with” is highlighted red and asking for reference or introduce a variable?

Is this something wrong with Picasso dependency? or I need declare something else?

Thanks  
John newbie on android

---

<div class="post-metadata">

**Author:** ![macsimus](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/macsimus/32/109104_2.png) [@macsimus](https://forums.kodeco.com/u/macsimus)\
**Post date:** [August 31, 2018, 2:24am UTC](https://forums.kodeco.com/t/beginning-android-layouts-part-9-relativelayout-ray-wenderlich/40645/9 "2018-08-31T02:24:08Z")

</div>

Hi John,

Since the recording of this course, there was a change in the Picasso library to replace `with(context)` with `get()` . So if you’re using the most recent version of Picasso, just replace `with(...)` with `get()` and you should be good to go. Thanks!

---

<div class="post-metadata">

**Author:** ![oneredlite](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/oneredlite/32/81494_2.png) [@oneredlite](https://forums.kodeco.com/u/oneredlite)\
**Post date:** [August 31, 2018, 4:06am UTC](https://forums.kodeco.com/t/beginning-android-layouts-part-9-relativelayout-ray-wenderlich/40645/10 "2018-08-31T04:06:49Z")

</div>

Thanks for answer quickly, although, I have encounter another "Too many arguments for public open fun get(): Picasso! defined in com.squareup.picasso.Picasso " error. Since the new Picasso update in dependency, it was only choice that I can pick from the list and I did not see version 2.5.2 any more.

Here the error in the code below   
fun bind(member;Member) {  
this.member = member  
Picasso.get(itemView.teamMemberAvatar.context).load(member.avatarUrl).into(itemView.teamMemberAvatar)  
itemView.teamMemberLogin.text = member.login  
itemView.teamMemberType.text = member.type  
}

---

<div class="post-metadata">

**Author:** ![macsimus](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/macsimus/32/109104_2.png) [@macsimus](https://forums.kodeco.com/u/macsimus)\
**Post date:** [August 31, 2018, 4:19am UTC](https://forums.kodeco.com/t/beginning-android-layouts-part-9-relativelayout-ray-wenderlich/40645/11 "2018-08-31T04:19:25Z")

</div>

Thanks John. You don’t need any parameters in the get() call. :]
