I'm trying to add some buttons/textviews or any other components to my relativelayout. I can't place them anywhere but top left. However, if I edit XML code it works fine.
Here is the screenshot of current status
I already changed my layout to relativeLayout but still no luck. (Android Studio 3.3)
My layout xml is:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/activity_main"
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:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
tools:context=".MainActivity">
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" />
</RelativeLayout>
I would expect to move these buttons/textviews relative to each other but they just stuck at top left.