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 and what I'm having result at the moment.
<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>
Add android:orientation="vertical"
to your LinearLayout
. Default orientation is horizontal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With