Question: I'm new at starting learning Android Studio and I'm having some trouble here. on this explanation of the code, I'm supposed to see the Hello world stick to the right but he doesn't wanna move from the left. Here is what is expected :
[result expected](https://i.stack.imgur.com/1gB67.png) and what I'm having [result at the moment](https://i.stack.imgur.com/Kr2Pz.png).

```
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:visibility="visible"
    tools:context=".MainActivity">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="end"
        android:gravity="center"
        android:text="Hello World!" />

</LinearLayout>

```

Answer: 
Add `android:orientation="vertical"` to your `LinearLayout`. Default orientation is horizontal.
**Try this code :-**

```
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="visible"
android:orientation="horizontal">

<TextView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="end"
    android:gravity="end"
    android:text="Hello World!" />

</LinearLayout>

```